From: Amine Khaldi Date: Fri, 18 Apr 2014 20:22:07 +0000 (+0000) Subject: [WIDL] X-Git-Tag: backups/0.3.17@66124~1713 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=16e97786ece9f1791e6b1d712f4ac54be5fbc940 [WIDL] * Sync with Wine 1.7.17. CORE-8080 svn path=/trunk/; revision=62774 --- diff --git a/reactos/media/doc/README.WINE b/reactos/media/doc/README.WINE index 4c67a396d54..953c8db5b87 100644 --- a/reactos/media/doc/README.WINE +++ b/reactos/media/doc/README.WINE @@ -22,7 +22,7 @@ When porting a new DLL from Wine to ReactOS, please do the following steps The following build tools are shared with Wine. reactos/tools/unicode # Synced to Wine-1.7.1 -reactos/tools/widl # Synced to Wine-1.5.11 +reactos/tools/widl # Synced to Wine-1.7.17 reactos/tools/wpp # Synced to Wine-1.7.1 The following libraries are shared with Wine. diff --git a/reactos/tools/widl/getopt.c b/reactos/tools/widl/getopt.c index c41bb0f8b63..3fae7871fa1 100644 --- a/reactos/tools/widl/getopt.c +++ b/reactos/tools/widl/getopt.c @@ -31,21 +31,10 @@ * SUCH DAMAGE. */ -#include -#include #include #include -#include #include -extern int opterr; /* if error message should be printed */ -extern int optind; /* index into parent argv vector */ -extern int optopt; /* character checked for validity */ -extern int optreset; /* reset getopt */ -extern char *optarg; /* argument associated with option */ - -int getopt (int, char * const *, const char *); - struct option { const char *name; int has_arg; @@ -53,384 +42,874 @@ struct option { int val; }; -int getopt_long (int, char *const *, const char *, const struct option *, int *); - -#define no_argument 0 -#define required_argument 1 -#define optional_argument 2 - -#define REPLACE_GETOPT - -#define _DIAGASSERT(x) do {} while (0) - -#ifdef REPLACE_GETOPT int opterr = 1; int optind = 1; int optopt = '?'; int optreset; char *optarg; -#endif -#define __progname __argv[0] +#define my_index strchr -#define IGNORE_FIRST (*options == '-' || *options == '+') -#define PRINT_ERROR ((opterr) && ((*options != ':') || (IGNORE_FIRST && options[1] != ':'))) +#ifdef _LIBC +# ifdef USE_NONOPTION_FLAGS +# define SWAP_FLAGS(ch1, ch2) \ + if (nonoption_flags_len > 0) \ + { \ + char __tmp = __getopt_nonoption_flags[ch1]; \ + __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \ + __getopt_nonoption_flags[ch2] = __tmp; \ + } +# else +# define SWAP_FLAGS(ch1, ch2) +# endif +#else /* !_LIBC */ +# define SWAP_FLAGS(ch1, ch2) +#endif /* _LIBC */ -#ifndef IS_POSIXLY_CORRECT -#define IS_POSIXLY_CORRECT (getenv("POSIXLY_CORRECT") != NULL) -#endif +int __getopt_initialized; -#define PERMUTE (!IS_POSIXLY_CORRECT && !IGNORE_FIRST) +static int first_nonopt = -1; +static int last_nonopt = -1; -#define IN_ORDER (!IS_POSIXLY_CORRECT && *options == '-') +static char *nextchar; -#define BADCH (int)'?' -#define BADARG ((IGNORE_FIRST && options[1] == ':') || (*options == ':') ? (int)':' : (int)'?') -#define INORDER (int)1 +static char *posixly_correct; -static char EMSG[1]; +static enum +{ + REQUIRE_ORDER, + PERMUTE, + RETURN_IN_ORDER +} ordering; -static int getopt_internal (int,char * const *,const char *); -static int gcd (int,int); -static void permute_args (int,int,int,char * const *); +static void +exchange (argv) + char **argv; +{ + int bottom = first_nonopt; + int middle = last_nonopt; + int top = optind; + char *tem; + + /* Exchange the shorter segment with the far end of the longer segment. + That puts the shorter segment into the right place. + It leaves the longer segment in the right place overall, + but it consists of two parts that need to be swapped next. */ + +#if defined _LIBC && defined USE_NONOPTION_FLAGS + /* First make sure the handling of the `__getopt_nonoption_flags' + string can work normally. Our top argument must be in the range + of the string. */ + if (nonoption_flags_len > 0 && top >= nonoption_flags_max_len) + { + /* We must extend the array. The user plays games with us and + presents new arguments. */ + char *new_str = malloc (top + 1); + if (new_str == NULL) + nonoption_flags_len = nonoption_flags_max_len = 0; + else + { + memset (__mempcpy (new_str, __getopt_nonoption_flags, + nonoption_flags_max_len), + '\0', top + 1 - nonoption_flags_max_len); + nonoption_flags_max_len = top + 1; + __getopt_nonoption_flags = new_str; + } + } +#endif -static char *place = EMSG; + while (top > middle && middle > bottom) + { + if (top - middle > middle - bottom) + { + /* Bottom segment is the short one. */ + int len = middle - bottom; + register int i; + + /* Swap it with the top part of the top segment. */ + for (i = 0; i < len; i++) + { + tem = argv[bottom + i]; + argv[bottom + i] = argv[top - (middle - bottom) + i]; + argv[top - (middle - bottom) + i] = tem; + SWAP_FLAGS (bottom + i, top - (middle - bottom) + i); + } + /* Exclude the moved bottom segment from further swapping. */ + top -= len; + } + else + { + /* Top segment is the short one. */ + int len = top - middle; + register int i; + + /* Swap it with the bottom part of the bottom segment. */ + for (i = 0; i < len; i++) + { + tem = argv[bottom + i]; + argv[bottom + i] = argv[middle + i]; + argv[middle + i] = tem; + SWAP_FLAGS (bottom + i, middle + i); + } + /* Exclude the moved top segment from further swapping. */ + bottom += len; + } + } -static int nonopt_start = -1; -static int nonopt_end = -1; + /* Update records for the slots the non-options now occupy. */ -static const char recargchar[] = "option requires an argument -- %c"; -static const char recargstring[] = "option requires an argument -- %s"; -static const char ambig[] = "ambiguous option -- %.*s"; -static const char noarg[] = "option doesn't take an argument -- %.*s"; -static const char illoptchar[] = "unknown option -- %c"; -static const char illoptstring[] = "unknown option -- %s"; + first_nonopt += (optind - last_nonopt); + last_nonopt = optind; +} -static void -_vwarnx(const char *fmt,va_list ap) +static const char * +_getopt_initialize (argc, argv, optstring) + int argc; + char *const *argv; + const char *optstring; { - (void)fprintf(stderr,"%s: ",__progname); - if (fmt != NULL) - (void)vfprintf(stderr,fmt,ap); - (void)fprintf(stderr,"\n"); + /* Start processing options with ARGV-element 1 (since ARGV-element 0 + is the program name); the sequence of previously skipped + non-option ARGV-elements is empty. */ + + first_nonopt = last_nonopt = optind; + + nextchar = NULL; + + posixly_correct = getenv ("POSIXLY_CORRECT"); + + /* Determine how to handle the ordering of options and nonoptions. */ + + if (optstring[0] == '-') + { + ordering = RETURN_IN_ORDER; + ++optstring; + } + else if (optstring[0] == '+') + { + ordering = REQUIRE_ORDER; + ++optstring; + } + else if (posixly_correct != NULL) + ordering = REQUIRE_ORDER; + else + ordering = PERMUTE; + +#if defined _LIBC && defined USE_NONOPTION_FLAGS + if (posixly_correct == NULL + && argc == __libc_argc && argv == __libc_argv) + { + if (nonoption_flags_max_len == 0) + { + if (__getopt_nonoption_flags == NULL + || __getopt_nonoption_flags[0] == '\0') + nonoption_flags_max_len = -1; + else + { + const char *orig_str = __getopt_nonoption_flags; + int len = nonoption_flags_max_len = strlen (orig_str); + if (nonoption_flags_max_len < argc) + nonoption_flags_max_len = argc; + __getopt_nonoption_flags = malloc (nonoption_flags_max_len); + if (__getopt_nonoption_flags == NULL) + nonoption_flags_max_len = -1; + else + memset (__mempcpy (__getopt_nonoption_flags, orig_str, len), + '\0', nonoption_flags_max_len - len); + } + } + nonoption_flags_len = nonoption_flags_max_len; + } + else + nonoption_flags_len = 0; +#endif + + return optstring; } -static void -warnx(const char *fmt,...) +int +getopt_long_only (int argc, char * const *argv, const char *options, const struct option *long_options, int *opt_index) { - va_list ap; - va_start(ap,fmt); - _vwarnx(fmt,ap); - va_end(ap); + return _getopt_internal (argc, argv, options, long_options, opt_index, 1); } -static int -gcd(a,b) - int a; - int b; +int +_getopt_internal (argc, argv, optstring, longopts, longind, long_only) + int argc; + char *const *argv; + const char *optstring; + const struct option *longopts; + int *longind; + int long_only; { - int c; + int print_errors = opterr; + if (optstring[0] == ':') + print_errors = 0; + + if (argc < 1) + return -1; + + optarg = NULL; + + if (optind == 0 || !__getopt_initialized) + { + if (optind == 0) + optind = 1; /* Don't scan ARGV[0], the program name. */ + optstring = _getopt_initialize (argc, argv, optstring); + __getopt_initialized = 1; + } + + /* Test whether ARGV[optind] points to a non-option argument. + Either it does not have option syntax, or there is an environment flag + from the shell indicating it is not an option. The later information + is only used when the used in the GNU libc. */ +#if defined _LIBC && defined USE_NONOPTION_FLAGS +# define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \ + || (optind < nonoption_flags_len \ + && __getopt_nonoption_flags[optind] == '1')) +#else +# define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0') +#endif - c = a % b; - while (c != 0) { - a = b; - b = c; - c = a % b; + if (nextchar == NULL || *nextchar == '\0') + { + /* Advance to the next ARGV-element. */ + + /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been + moved back by the user (who may also have changed the arguments). */ + if (last_nonopt > optind) + last_nonopt = optind; + if (first_nonopt > optind) + first_nonopt = optind; + + if (ordering == PERMUTE) + { + /* If we have just processed some options following some non-options, + exchange them so that the options come first. */ + + if (first_nonopt != last_nonopt && last_nonopt != optind) + exchange ((char **) argv); + else if (last_nonopt != optind) + first_nonopt = optind; + + /* Skip any additional non-options + and extend the range of non-options previously skipped. */ + + while (optind < argc && NONOPTION_P) + optind++; + last_nonopt = optind; } - return b; -} + /* The special ARGV-element `--' means premature end of options. + Skip it like a null option, + then exchange with previous non-options as if it were an option, + then skip everything else like a non-option. */ -static void -permute_args(panonopt_start,panonopt_end,opt_end,nargv) - int panonopt_start; - int panonopt_end; - int opt_end; - char * const *nargv; -{ - int cstart,cyclelen,i,j,ncycle,nnonopts,nopts,pos; - char *swap; - - _DIAGASSERT(nargv != NULL); - - nnonopts = panonopt_end - panonopt_start; - nopts = opt_end - panonopt_end; - ncycle = gcd(nnonopts,nopts); - cyclelen = (opt_end - panonopt_start) / ncycle; - - for (i = 0; i < ncycle; i++) { - cstart = panonopt_end+i; - pos = cstart; - for (j = 0; j < cyclelen; j++) { - if (pos >= panonopt_end) - pos -= nnonopts; - else - pos += nopts; - swap = nargv[pos]; + if (optind != argc && !strcmp (argv[optind], "--")) + { + optind++; - ((char **) nargv)[pos] = nargv[cstart]; + if (first_nonopt != last_nonopt && last_nonopt != optind) + exchange ((char **) argv); + else if (first_nonopt == last_nonopt) + first_nonopt = optind; + last_nonopt = argc; - ((char **)nargv)[cstart] = swap; - } + optind = argc; } -} -static int -getopt_internal(nargc,nargv,options) - int nargc; - char * const *nargv; - const char *options; -{ - char *oli; - int optchar; - - _DIAGASSERT(nargv != NULL); - _DIAGASSERT(options != NULL); - - optarg = NULL; + /* If we have done all the ARGV-elements, stop the scan + and back over any non-options that we skipped and permuted. */ - if (optind == 0) - optind = 1; + if (optind == argc) + { + /* Set the next-arg-index to point at the non-options + that we previously skipped, so the caller will digest them. */ + if (first_nonopt != last_nonopt) + optind = first_nonopt; + return -1; + } - if (optreset) - nonopt_start = nonopt_end = -1; -start: - if (optreset || !*place) { - optreset = 0; - if (optind >= nargc) { - place = EMSG; - if (nonopt_end != -1) { + /* If we have come to a non-option and did not permute it, + either stop the scan or describe it to the caller and pass it by. */ - permute_args(nonopt_start,nonopt_end,optind,nargv); - optind -= nonopt_end - nonopt_start; - } - else if (nonopt_start != -1) { + if (NONOPTION_P) + { + if (ordering == REQUIRE_ORDER) + return -1; + optarg = argv[optind++]; + return 1; + } - optind = nonopt_start; - } - nonopt_start = nonopt_end = -1; - return -1; + /* We have found another option-ARGV-element. + Skip the initial punctuation. */ + + nextchar = (argv[optind] + 1 + + (longopts != NULL && argv[optind][1] == '-')); + } + + /* Decode the current option-ARGV-element. */ + + /* Check whether the ARGV-element is a long option. + + If long_only and the ARGV-element has the form "-f", where f is + a valid short option, don't consider it an abbreviated form of + a long option that starts with f. Otherwise there would be no + way to give the -f short option. + + On the other hand, if there's a long option "fubar" and + the ARGV-element is "-fu", do consider that an abbreviation of + the long option, just like "--fu", and not "-f" with arg "u". + + This distinction seems to be the most useful approach. */ + + if (longopts != NULL + && (argv[optind][1] == '-' + || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1]))))) + { + char *nameend; + const struct option *p; + const struct option *pfound = NULL; + int exact = 0; + int ambig = 0; + int indfound = -1; + int option_index; + + for (nameend = nextchar; *nameend && *nameend != '='; nameend++) + /* Do nothing. */ ; + + /* Test all long options for either exact match + or abbreviated matches. */ + for (p = longopts, option_index = 0; p->name; p++, option_index++) + if (!strncmp (p->name, nextchar, nameend - nextchar)) + { + if ((unsigned int) (nameend - nextchar) + == (unsigned int) strlen (p->name)) + { + /* Exact match found. */ + pfound = p; + indfound = option_index; + exact = 1; + break; + } + else if (pfound == NULL) + { + /* First nonexact match found. */ + pfound = p; + indfound = option_index; + } + else if (long_only + || pfound->has_arg != p->has_arg + || pfound->flag != p->flag + || pfound->val != p->val) + /* Second or later nonexact match found. */ + ambig = 1; + } + + if (ambig && !exact) + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + if (__asprintf (&buf, _("%s: option `%s' is ambiguous\n"), + argv[0], argv[optind]) >= 0) + { + + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); } - if ((*(place = nargv[optind]) != '-') - || (place[1] == '\0')) { - place = EMSG; - if (IN_ORDER) { +#else + fprintf (stderr, "%s: option `%s' is ambiguous\n", + argv[0], argv[optind]); +#endif + } + nextchar += strlen (nextchar); + optind++; + optopt = 0; + return '?'; + } - optarg = nargv[optind++]; - return INORDER; - } - if (!PERMUTE) { + if (pfound != NULL) + { + option_index = indfound; + optind++; + if (*nameend) + { + /* Don't test has_arg with >, because some C compilers don't + allow it to be used on enums. */ + if (pfound->has_arg) + optarg = nameend + 1; + else + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + int n; +#endif - return -1; + if (argv[optind - 1][1] == '-') + { + /* --option */ +#if defined _LIBC && defined USE_IN_LIBIO + n = __asprintf (&buf, "\ +%s: option `--%s' doesn't allow an argument\n", + argv[0], pfound->name); +#else + fprintf (stderr, "\ +%s: option `--%s' doesn't allow an argument\n", + argv[0], pfound->name); +#endif } - - if (nonopt_start == -1) - nonopt_start = optind; - else if (nonopt_end != -1) { - permute_args(nonopt_start,nonopt_end,optind,nargv); - nonopt_start = optind - - (nonopt_end - nonopt_start); - nonopt_end = -1; + else + { + /* +option or -option */ +#if defined _LIBC && defined USE_IN_LIBIO + n = __asprintf (&buf, "\ +%s: option `%c%s' doesn't allow an argument\n", + argv[0], argv[optind - 1][0], + pfound->name); +#else + fprintf (stderr, "\ +%s: option `%c%s' doesn't allow an argument\n", + argv[0], argv[optind - 1][0], pfound->name); +#endif } - optind++; - goto start; - } - if (nonopt_start != -1 && nonopt_end == -1) - nonopt_end = optind; - if (place[1] && *++place == '-') { - place++; - return -2; - } - } - if ((optchar = (int)*place++) == (int)':' || - (oli = strchr(options + (IGNORE_FIRST ? 1 : 0),optchar)) == NULL) { - - if (!*place) - ++optind; - if (PRINT_ERROR) - warnx(illoptchar,optchar); - optopt = optchar; - return BADCH; - } - if (optchar == 'W' && oli[1] == ';') { +#if defined _LIBC && defined USE_IN_LIBIO + if (n >= 0) + { + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); - if (*place) - return -2; + free (buf); + } +#endif + } - if (++optind >= nargc) { - place = EMSG; - if (PRINT_ERROR) - warnx(recargchar,optchar); - optopt = optchar; - return BADARG; - } else - place = nargv[optind]; + nextchar += strlen (nextchar); - return -2; - } - if (*++oli != ':') { - if (!*place) - ++optind; - } else { - optarg = NULL; - if (*place) - optarg = place; - - else if (oli[1] != ':') { - if (++optind >= nargc) { - place = EMSG; - if (PRINT_ERROR) - warnx(recargchar,optchar); - optopt = optchar; - return BADARG; - } else - optarg = nargv[optind]; + optopt = pfound->val; + return '?'; + } + } + else if (pfound->has_arg == 1) + { + if (optind < argc) + optarg = argv[optind++]; + else + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + if (__asprintf (&buf, _("\ +%s: option `%s' requires an argument\n"), + argv[0], argv[optind - 1]) >= 0) + { + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); + } +#else + fprintf (stderr, + "%s: option `%s' requires an argument\n", + argv[0], argv[optind - 1]); +#endif + } + nextchar += strlen (nextchar); + optopt = pfound->val; + return optstring[0] == ':' ? ':' : '?'; } - place = EMSG; - ++optind; + } + nextchar += strlen (nextchar); + if (longind != NULL) + *longind = option_index; + if (pfound->flag) + { + *(pfound->flag) = pfound->val; + return 0; + } + return pfound->val; } - return optchar; -} - -#ifdef REPLACE_GETOPT - -int -getopt(nargc,nargv,options) - int nargc; - char * const *nargv; - const char *options; -{ - int retval; - - _DIAGASSERT(nargv != NULL); - _DIAGASSERT(options != NULL); - - if ((retval = getopt_internal(nargc,nargv,options)) == -2) { - ++optind; + /* Can't find it as a long option. If this is not getopt_long_only, + or the option starts with '--' or is not a valid short + option, then it's an error. + Otherwise interpret it as a short option. */ + if (!long_only || argv[optind][1] == '-' + || my_index (optstring, *nextchar) == NULL) + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + int n; +#endif - if (nonopt_end != -1) { - permute_args(nonopt_start,nonopt_end,optind,nargv); - optind -= nonopt_end - nonopt_start; + if (argv[optind][1] == '-') + { + /* --option */ +#if defined _LIBC && defined USE_IN_LIBIO + n = __asprintf (&buf, _("%s: unrecognized option `--%s'\n"), + argv[0], nextchar); +#else + fprintf (stderr, "%s: unrecognized option `--%s'\n", + argv[0], nextchar); +#endif } - nonopt_start = nonopt_end = -1; - retval = -1; - } - return retval; -} + else + { + /* +option or -option */ +#if defined _LIBC && defined USE_IN_LIBIO + n = __asprintf (&buf, _("%s: unrecognized option `%c%s'\n"), + argv[0], argv[optind][0], nextchar); +#else + fprintf (stderr, "%s: unrecognized option `%c%s'\n", + argv[0], argv[optind][0], nextchar); #endif + } -int -getopt_long(nargc,nargv,options,long_options,idx) - int nargc; - char * const *nargv; - const char *options; - const struct option *long_options; - int *idx; -{ - int retval; - - _DIAGASSERT(nargv != NULL); - _DIAGASSERT(options != NULL); - _DIAGASSERT(long_options != NULL); - - if ((retval = getopt_internal(nargc,nargv,options)) == -2) { - char *current_argv,*has_equal; - size_t current_argv_len; - int i,match; - - current_argv = place; - match = -1; - - optind++; - place = EMSG; - - if (*current_argv == '\0') { +#if defined _LIBC && defined USE_IN_LIBIO + if (n >= 0) + { + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); - if (nonopt_end != -1) { - permute_args(nonopt_start,nonopt_end,optind,nargv); - optind -= nonopt_end - nonopt_start; - } - nonopt_start = nonopt_end = -1; - return -1; + free (buf); } - if ((has_equal = strchr(current_argv,'=')) != NULL) { +#endif + } + nextchar = (char *) ""; + optind++; + optopt = 0; + return '?'; + } + } - current_argv_len = has_equal - current_argv; - has_equal++; - } else - current_argv_len = strlen(current_argv); + /* Look at and handle the next short option-character. */ - for (i = 0; long_options[i].name; i++) { + { + char c = *nextchar++; + char *temp = my_index (optstring, c); - if (strncmp(current_argv,long_options[i].name,current_argv_len)) - continue; + /* Increment `optind' when we start to process its last character. */ + if (*nextchar == '\0') + ++optind; - if (strlen(long_options[i].name) == - (unsigned)current_argv_len) { + if (temp == NULL || c == ':') + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + int n; +#endif - match = i; - break; - } - if (match == -1) - match = i; - else { - - if (PRINT_ERROR) - warnx(ambig,(int)current_argv_len,current_argv); - optopt = 0; - return BADCH; - } + if (posixly_correct) + { + /* 1003.2 specifies the format of this message. */ +#if defined _LIBC && defined USE_IN_LIBIO + n = __asprintf (&buf, _("%s: illegal option -- %c\n"), + argv[0], c); +#else + fprintf (stderr, "%s: illegal option -- %c\n", argv[0], c); +#endif + } + else + { +#if defined _LIBC && defined USE_IN_LIBIO + n = __asprintf (&buf, _("%s: invalid option -- %c\n"), + argv[0], c); +#else + fprintf (stderr, "%s: invalid option -- %c\n", argv[0], c); +#endif + } + +#if defined _LIBC && defined USE_IN_LIBIO + if (n >= 0) + { + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); + } +#endif + } + optopt = c; + return '?'; + } + /* Convenience. Treat POSIX -W foo same as long option --foo */ + if (temp[0] == 'W' && temp[1] == ';') + { + char *nameend; + const struct option *p; + const struct option *pfound = NULL; + int exact = 0; + int ambig = 0; + int indfound = 0; + int option_index; + + /* This is an option that requires an argument. */ + if (*nextchar != '\0') + { + optarg = nextchar; + /* If we end this ARGV-element by taking the rest as an arg, + we must advance to the next element now. */ + optind++; + } + else if (optind == argc) + { + if (print_errors) + { + /* 1003.2 specifies the format of this message. */ +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + if (__asprintf (&buf, + _("%s: option requires an argument -- %c\n"), + argv[0], c) >= 0) + { + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); + } +#else + fprintf (stderr, "%s: option requires an argument -- %c\n", + argv[0], c); +#endif + } + optopt = c; + if (optstring[0] == ':') + c = ':'; + else + c = '?'; + return c; + } + else + /* We already incremented `optind' once; + increment it again when taking next ARGV-elt as argument. */ + optarg = argv[optind++]; + + /* optarg is now the argument, see if it's in the + table of longopts. */ + + for (nextchar = nameend = optarg; *nameend && *nameend != '='; nameend++) + /* Do nothing. */ ; + + /* Test all long options for either exact match + or abbreviated matches. */ + for (p = longopts, option_index = 0; p->name; p++, option_index++) + if (!strncmp (p->name, nextchar, nameend - nextchar)) + { + if ((unsigned int) (nameend - nextchar) == strlen (p->name)) + { + /* Exact match found. */ + pfound = p; + indfound = option_index; + exact = 1; + break; } - if (match != -1) { - if (long_options[match].has_arg == no_argument - && has_equal) { - if (PRINT_ERROR) - warnx(noarg,(int)current_argv_len,current_argv); - - if (long_options[match].flag == NULL) - optopt = long_options[match].val; - else - optopt = 0; - return BADARG; - } - if (long_options[match].has_arg == required_argument || - long_options[match].has_arg == optional_argument) { - if (has_equal) - optarg = has_equal; - else if (long_options[match].has_arg == - required_argument) { - - optarg = nargv[optind++]; - } - } - if ((long_options[match].has_arg == required_argument) - && (optarg == NULL)) { - - if (PRINT_ERROR) - warnx(recargstring,current_argv); - - if (long_options[match].flag == NULL) - optopt = long_options[match].val; - else - optopt = 0; - --optind; - return BADARG; - } - } else { - if (PRINT_ERROR) - warnx(illoptstring,current_argv); - optopt = 0; - return BADCH; + else if (pfound == NULL) + { + /* First nonexact match found. */ + pfound = p; + indfound = option_index; } - if (long_options[match].flag) { - *long_options[match].flag = long_options[match].val; - retval = 0; - } else - retval = long_options[match].val; - if (idx) - *idx = match; - } - return retval; + else + /* Second or later nonexact match found. */ + ambig = 1; + } + if (ambig && !exact) + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + if (__asprintf (&buf, _("%s: option `-W %s' is ambiguous\n"), + argv[0], argv[optind]) >= 0) + { + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); + } +#else + fprintf (stderr, "%s: option `-W %s' is ambiguous\n", + argv[0], argv[optind]); +#endif + } + nextchar += strlen (nextchar); + optind++; + return '?'; + } + if (pfound != NULL) + { + option_index = indfound; + if (*nameend) + { + /* Don't test has_arg with >, because some C compilers don't + allow it to be used on enums. */ + if (pfound->has_arg) + optarg = nameend + 1; + else + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + if (__asprintf (&buf, _("\ +%s: option `-W %s' doesn't allow an argument\n"), + argv[0], pfound->name) >= 0) + { + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); + } +#else + fprintf (stderr, "\ +%s: option `-W %s' doesn't allow an argument\n", + argv[0], pfound->name); +#endif + } + + nextchar += strlen (nextchar); + return '?'; + } + } + else if (pfound->has_arg == 1) + { + if (optind < argc) + optarg = argv[optind++]; + else + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + if (__asprintf (&buf, _("\ +%s: option `%s' requires an argument\n"), + argv[0], argv[optind - 1]) >= 0) + { + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); + } +#else + fprintf (stderr, + "%s: option `%s' requires an argument\n", + argv[0], argv[optind - 1]); +#endif + } + nextchar += strlen (nextchar); + return optstring[0] == ':' ? ':' : '?'; + } + } + nextchar += strlen (nextchar); + if (longind != NULL) + *longind = option_index; + if (pfound->flag) + { + *(pfound->flag) = pfound->val; + return 0; + } + return pfound->val; + } + nextchar = NULL; + return 'W'; /* Let the application handle it. */ + } + if (temp[1] == ':') + { + if (temp[2] == ':') + { + /* This is an option that accepts an argument optionally. */ + if (*nextchar != '\0') + { + optarg = nextchar; + optind++; + } + else + optarg = NULL; + nextchar = NULL; + } + else + { + /* This is an option that requires an argument. */ + if (*nextchar != '\0') + { + optarg = nextchar; + /* If we end this ARGV-element by taking the rest as an arg, + we must advance to the next element now. */ + optind++; + } + else if (optind == argc) + { + if (print_errors) + { + /* 1003.2 specifies the format of this message. */ +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + if (__asprintf (&buf, _("\ +%s: option requires an argument -- %c\n"), + argv[0], c) >= 0) + { + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); + } +#else + fprintf (stderr, + "%s: option requires an argument -- %c\n", + argv[0], c); +#endif + } + optopt = c; + if (optstring[0] == ':') + c = ':'; + else + c = '?'; + } + else + /* We already incremented `optind' once; + increment it again when taking next ARGV-elt as argument. */ + optarg = argv[optind++]; + nextchar = NULL; + } + } + return c; + } } diff --git a/reactos/tools/widl/header.c b/reactos/tools/widl/header.c index 309a4c2a176..916f2941055 100644 --- a/reactos/tools/widl/header.c +++ b/reactos/tools/widl/header.c @@ -109,17 +109,7 @@ unsigned int get_attrv(const attr_list_t *list, enum attr_type t) return 0; } -int is_void(const type_t *t) -{ - return type_get_type(t) == TYPE_VOID; -} - -int is_conformant_array(const type_t *t) -{ - return is_array(t) && type_array_has_conformance(t); -} - -void write_guid(FILE *f, const char *guid_prefix, const char *name, const UUID *uuid) +static void write_guid(FILE *f, const char *guid_prefix, const char *name, const UUID *uuid) { if (!uuid) return; fprintf(f, "DEFINE_GUID(%s_%s, 0x%08x, 0x%04x, 0x%04x, 0x%02x,0x%02x, 0x%02x," @@ -1351,6 +1341,7 @@ static void write_imports(FILE *header, const statement_list_t *stmts) case STMT_TYPEDEF: case STMT_MODULE: case STMT_CPPQUOTE: + case STMT_PRAGMA: case STMT_DECLARATION: /* not processed here */ break; @@ -1385,6 +1376,7 @@ static void write_forward_decls(FILE *header, const statement_list_t *stmts) case STMT_TYPEDEF: case STMT_MODULE: case STMT_CPPQUOTE: + case STMT_PRAGMA: case STMT_DECLARATION: /* not processed here */ break; @@ -1437,6 +1429,7 @@ static void write_header_stmts(FILE *header, const statement_list_t *stmts, cons break; case STMT_IMPORTLIB: case STMT_MODULE: + case STMT_PRAGMA: /* not included in header */ break; case STMT_IMPORT: diff --git a/reactos/tools/widl/header.h b/reactos/tools/widl/header.h index 6d056db2df5..10601ff734e 100644 --- a/reactos/tools/widl/header.h +++ b/reactos/tools/widl/header.h @@ -28,9 +28,6 @@ extern int is_aliaschain_attr(const type_t *var, enum attr_type t); extern int is_attr(const attr_list_t *list, enum attr_type t); extern void *get_attrp(const attr_list_t *list, enum attr_type t); extern unsigned int get_attrv(const attr_list_t *list, enum attr_type t); -extern int is_void(const type_t *t); -extern int is_conformant_array(const type_t *t); -extern int is_declptr(const type_t *t); extern const char* get_name(const var_t *v); extern void write_type_left(FILE *h, type_t *t, int declonly); extern void write_type_right(FILE *h, type_t *t, int is_field); @@ -47,6 +44,7 @@ extern int need_proxy(const type_t *iface); extern int need_inline_stubs(const type_t *iface); extern int need_stub_files(const statement_list_t *stmts); extern int need_proxy_file(const statement_list_t *stmts); +extern int need_proxy_delegation(const statement_list_t *stmts); extern int need_inline_stubs_file(const statement_list_t *stmts); extern const var_t *is_callas(const attr_list_t *list); extern void write_args(FILE *h, const var_list_t *arg, const char *name, int obj, int do_indent); @@ -55,10 +53,33 @@ extern const type_t* get_explicit_generic_handle_type(const var_t* var); extern const var_t *get_func_handle_var( const type_t *iface, const var_t *func, unsigned char *explicit_fc, unsigned char *implicit_fc ); extern int has_out_arg_or_return(const var_t *func); -extern void write_guid(FILE *f, const char *guid_prefix, const char *name, - const UUID *uuid); extern int is_const_decl(const var_t *var); +static inline int is_ptr(const type_t *t) +{ + return type_get_type(t) == TYPE_POINTER; +} + +static inline int is_array(const type_t *t) +{ + return type_get_type(t) == TYPE_ARRAY; +} + +static inline int is_void(const type_t *t) +{ + return type_get_type(t) == TYPE_VOID; +} + +static inline int is_declptr(const type_t *t) +{ + return is_ptr(t) || (type_get_type(t) == TYPE_ARRAY && type_array_is_decl_as_ptr(t)); +} + +static inline int is_conformant_array(const type_t *t) +{ + return is_array(t) && type_array_has_conformance(t); +} + static inline int last_ptr(const type_t *type) { return is_ptr(type) && !is_declptr(type_pointer_get_ref(type)); diff --git a/reactos/tools/widl/parser.l b/reactos/tools/widl/parser.l index e80616792b4..b911186fc51 100644 --- a/reactos/tools/widl/parser.l +++ b/reactos/tools/widl/parser.l @@ -37,6 +37,7 @@ double [0-9]+\.[0-9]+([eE][+-]?[0-9]+)* %x WSTRQUOTE %x ATTR %x PP_LINE +%x PP_PRAGMA %x SQUOTE %{ @@ -125,6 +126,7 @@ UUID *parse_uuid(const char *u) ************************************************************************** */ %% +^{ws}*\#{ws}*pragma{ws}+ yy_push_state(PP_PRAGMA); ^{ws}*\#{ws}* yy_push_state(PP_LINE); [^\n]* { int lineno; @@ -144,6 +146,8 @@ UUID *parse_uuid(const char *u) line_number = lineno - 1; /* We didn't read the newline */ input_name = xstrdup(fname); } +midl_echo[^\n]* yyless(9); yy_pop_state(); return tCPPQUOTE; +[^\n]* parser_lval.str = xstrdup(yytext); yy_pop_state(); return aPRAGMA; \" yy_push_state(QUOTE); cbufidx = 0; \" { yy_pop_state(); @@ -261,6 +265,7 @@ static const struct keyword keywords[] = { {"long", tLONG}, {"methods", tMETHODS}, {"module", tMODULE}, + {"namespace", tNAMESPACE}, {"pascal", tPASCAL}, {"properties", tPROPERTIES}, {"register", tREGISTER}, @@ -414,7 +419,7 @@ static int kw_token(const char *kw) struct keyword key, *kwp; key.kw = kw; kwp = bsearch(&key, keywords, NKEYWORDS, sizeof(keywords[0]), kw_cmp_func); - if (kwp) { + if (kwp && (do_rt_extension || kwp->token != tNAMESPACE)) { parser_lval.str = xstrdup(kwp->kw); return kwp->token; } diff --git a/reactos/tools/widl/parser.tab.c b/reactos/tools/widl/parser.tab.c index 333f094f945..df664389552 100644 --- a/reactos/tools/widl/parser.tab.c +++ b/reactos/tools/widl/parser.tab.c @@ -115,33 +115,6 @@ #include "expr.h" #include "typetree.h" -#if defined(YYBYACC) - /* Berkeley yacc (byacc) doesn't seem to know about these */ - /* Some *BSD supplied versions do define these though */ -# ifndef YYEMPTY -# define YYEMPTY (-1) /* Empty lookahead value of yychar */ -# endif -# ifndef YYLEX -# define YYLEX yylex() -# endif - -#elif defined(YYBISON) - /* Bison was used for original development */ - /* #define YYEMPTY -2 */ - /* #define YYLEX yylex() */ - -#else - /* No yacc we know yet */ -# if !defined(YYEMPTY) || !defined(YYLEX) -# error Yacc version/type unknown. This version needs to be verified for settings of YYEMPTY and YYLEX. -# elif defined(__GNUC__) /* gcc defines the #warning directive */ -# warning Yacc version/type unknown. It defines YYEMPTY and YYLEX, but is not tested - /* #else we just take a chance that it works... */ -# endif -#endif - -#define YYERROR_VERBOSE - static unsigned char pointer_default = RPC_FC_UP; typedef struct list typelist_t; @@ -218,6 +191,7 @@ static statement_t *make_statement_type_decl(type_t *type); static statement_t *make_statement_reference(type_t *type); static statement_t *make_statement_declaration(var_t *var); static statement_t *make_statement_library(typelib_t *typelib); +static statement_t *make_statement_pragma(const char *str); static statement_t *make_statement_cppquote(const char *str); static statement_t *make_statement_importlib(const char *str); static statement_t *make_statement_module(type_t *type); @@ -225,11 +199,13 @@ static statement_t *make_statement_typedef(var_list_t *names); static statement_t *make_statement_import(const char *str); static statement_t *make_statement_typedef(var_list_t *names); static statement_list_t *append_statement(statement_list_t *list, statement_t *stmt); +static statement_list_t *append_statements(statement_list_t *, statement_list_t *); +static attr_list_t *append_attribs(attr_list_t *, attr_list_t *); /* Line 268 of yacc.c */ -#line 233 "parser.tab.c" +#line 209 "parser.tab.c" /* Enabling traces. */ #ifndef YYDEBUG @@ -241,7 +217,7 @@ static statement_list_t *append_statement(statement_list_t *list, statement_t *s # undef YYERROR_VERBOSE # define YYERROR_VERBOSE 1 #else -# define YYERROR_VERBOSE 0 +# define YYERROR_VERBOSE 1 #endif /* Enabling the token table. */ @@ -257,186 +233,188 @@ static statement_list_t *append_statement(statement_list_t *list, statement_t *s know about them. */ enum yytokentype { aIDENTIFIER = 258, - aKNOWNTYPE = 259, - aNUM = 260, - aHEXNUM = 261, - aDOUBLE = 262, - aSTRING = 263, - aWSTRING = 264, - aSQSTRING = 265, - aUUID = 266, - aEOF = 267, - SHL = 268, - SHR = 269, - MEMBERPTR = 270, - EQUALITY = 271, - INEQUALITY = 272, - GREATEREQUAL = 273, - LESSEQUAL = 274, - LOGICALOR = 275, - LOGICALAND = 276, - ELLIPSIS = 277, - tAGGREGATABLE = 278, - tALLOCATE = 279, - tANNOTATION = 280, - tAPPOBJECT = 281, - tASYNC = 282, - tASYNCUUID = 283, - tAUTOHANDLE = 284, - tBINDABLE = 285, - tBOOLEAN = 286, - tBROADCAST = 287, - tBYTE = 288, - tBYTECOUNT = 289, - tCALLAS = 290, - tCALLBACK = 291, - tCASE = 292, - tCDECL = 293, - tCHAR = 294, - tCOCLASS = 295, - tCODE = 296, - tCOMMSTATUS = 297, - tCONST = 298, - tCONTEXTHANDLE = 299, - tCONTEXTHANDLENOSERIALIZE = 300, - tCONTEXTHANDLESERIALIZE = 301, - tCONTROL = 302, - tCPPQUOTE = 303, - tDECODE = 304, - tDEFAULT = 305, - tDEFAULTBIND = 306, - tDEFAULTCOLLELEM = 307, - tDEFAULTVALUE = 308, - tDEFAULTVTABLE = 309, - tDISABLECONSISTENCYCHECK = 310, - tDISPLAYBIND = 311, - tDISPINTERFACE = 312, - tDLLNAME = 313, - tDOUBLE = 314, - tDUAL = 315, - tENABLEALLOCATE = 316, - tENCODE = 317, - tENDPOINT = 318, - tENTRY = 319, - tENUM = 320, - tERRORSTATUST = 321, - tEXPLICITHANDLE = 322, - tEXTERN = 323, - tFALSE = 324, - tFASTCALL = 325, - tFAULTSTATUS = 326, - tFLOAT = 327, - tFORCEALLOCATE = 328, - tHANDLE = 329, - tHANDLET = 330, - tHELPCONTEXT = 331, - tHELPFILE = 332, - tHELPSTRING = 333, - tHELPSTRINGCONTEXT = 334, - tHELPSTRINGDLL = 335, - tHIDDEN = 336, - tHYPER = 337, - tID = 338, - tIDEMPOTENT = 339, - tIGNORE = 340, - tIIDIS = 341, - tIMMEDIATEBIND = 342, - tIMPLICITHANDLE = 343, - tIMPORT = 344, - tIMPORTLIB = 345, - tIN = 346, - tIN_LINE = 347, - tINLINE = 348, - tINPUTSYNC = 349, - tINT = 350, - tINT3264 = 351, - tINT64 = 352, - tINTERFACE = 353, - tLCID = 354, - tLENGTHIS = 355, - tLIBRARY = 356, - tLICENSED = 357, - tLOCAL = 358, - tLONG = 359, - tMAYBE = 360, - tMESSAGE = 361, - tMETHODS = 362, - tMODULE = 363, - tNOCODE = 364, - tNONBROWSABLE = 365, - tNONCREATABLE = 366, - tNONEXTENSIBLE = 367, - tNOTIFY = 368, - tNOTIFYFLAG = 369, - tNULL = 370, - tOBJECT = 371, - tODL = 372, - tOLEAUTOMATION = 373, - tOPTIMIZE = 374, - tOPTIONAL = 375, - tOUT = 376, - tPARTIALIGNORE = 377, - tPASCAL = 378, - tPOINTERDEFAULT = 379, - tPROGID = 380, - tPROPERTIES = 381, - tPROPGET = 382, - tPROPPUT = 383, - tPROPPUTREF = 384, - tPROXY = 385, - tPTR = 386, - tPUBLIC = 387, - tRANGE = 388, - tREADONLY = 389, - tREF = 390, - tREGISTER = 391, - tREPRESENTAS = 392, - tREQUESTEDIT = 393, - tRESTRICTED = 394, - tRETVAL = 395, - tSAFEARRAY = 396, - tSHORT = 397, - tSIGNED = 398, - tSIZEIS = 399, - tSIZEOF = 400, - tSMALL = 401, - tSOURCE = 402, - tSTATIC = 403, - tSTDCALL = 404, - tSTRICTCONTEXTHANDLE = 405, - tSTRING = 406, - tSTRUCT = 407, - tSWITCH = 408, - tSWITCHIS = 409, - tSWITCHTYPE = 410, - tTHREADING = 411, - tTRANSMITAS = 412, - tTRUE = 413, - tTYPEDEF = 414, - tUIDEFAULT = 415, - tUNION = 416, - tUNIQUE = 417, - tUNSIGNED = 418, - tUSESGETLASTERROR = 419, - tUSERMARSHAL = 420, - tUUID = 421, - tV1ENUM = 422, - tVARARG = 423, - tVERSION = 424, - tVIPROGID = 425, - tVOID = 426, - tWCHAR = 427, - tWIREMARSHAL = 428, - tAPARTMENT = 429, - tNEUTRAL = 430, - tSINGLE = 431, - tFREE = 432, - tBOTH = 433, - ADDRESSOF = 434, - NEG = 435, - POS = 436, - PPTR = 437, - CAST = 438 + aPRAGMA = 259, + aKNOWNTYPE = 260, + aNUM = 261, + aHEXNUM = 262, + aDOUBLE = 263, + aSTRING = 264, + aWSTRING = 265, + aSQSTRING = 266, + aUUID = 267, + aEOF = 268, + SHL = 269, + SHR = 270, + MEMBERPTR = 271, + EQUALITY = 272, + INEQUALITY = 273, + GREATEREQUAL = 274, + LESSEQUAL = 275, + LOGICALOR = 276, + LOGICALAND = 277, + ELLIPSIS = 278, + tAGGREGATABLE = 279, + tALLOCATE = 280, + tANNOTATION = 281, + tAPPOBJECT = 282, + tASYNC = 283, + tASYNCUUID = 284, + tAUTOHANDLE = 285, + tBINDABLE = 286, + tBOOLEAN = 287, + tBROADCAST = 288, + tBYTE = 289, + tBYTECOUNT = 290, + tCALLAS = 291, + tCALLBACK = 292, + tCASE = 293, + tCDECL = 294, + tCHAR = 295, + tCOCLASS = 296, + tCODE = 297, + tCOMMSTATUS = 298, + tCONST = 299, + tCONTEXTHANDLE = 300, + tCONTEXTHANDLENOSERIALIZE = 301, + tCONTEXTHANDLESERIALIZE = 302, + tCONTROL = 303, + tCPPQUOTE = 304, + tDECODE = 305, + tDEFAULT = 306, + tDEFAULTBIND = 307, + tDEFAULTCOLLELEM = 308, + tDEFAULTVALUE = 309, + tDEFAULTVTABLE = 310, + tDISABLECONSISTENCYCHECK = 311, + tDISPLAYBIND = 312, + tDISPINTERFACE = 313, + tDLLNAME = 314, + tDOUBLE = 315, + tDUAL = 316, + tENABLEALLOCATE = 317, + tENCODE = 318, + tENDPOINT = 319, + tENTRY = 320, + tENUM = 321, + tERRORSTATUST = 322, + tEXPLICITHANDLE = 323, + tEXTERN = 324, + tFALSE = 325, + tFASTCALL = 326, + tFAULTSTATUS = 327, + tFLOAT = 328, + tFORCEALLOCATE = 329, + tHANDLE = 330, + tHANDLET = 331, + tHELPCONTEXT = 332, + tHELPFILE = 333, + tHELPSTRING = 334, + tHELPSTRINGCONTEXT = 335, + tHELPSTRINGDLL = 336, + tHIDDEN = 337, + tHYPER = 338, + tID = 339, + tIDEMPOTENT = 340, + tIGNORE = 341, + tIIDIS = 342, + tIMMEDIATEBIND = 343, + tIMPLICITHANDLE = 344, + tIMPORT = 345, + tIMPORTLIB = 346, + tIN = 347, + tIN_LINE = 348, + tINLINE = 349, + tINPUTSYNC = 350, + tINT = 351, + tINT3264 = 352, + tINT64 = 353, + tINTERFACE = 354, + tLCID = 355, + tLENGTHIS = 356, + tLIBRARY = 357, + tLICENSED = 358, + tLOCAL = 359, + tLONG = 360, + tMAYBE = 361, + tMESSAGE = 362, + tMETHODS = 363, + tMODULE = 364, + tNAMESPACE = 365, + tNOCODE = 366, + tNONBROWSABLE = 367, + tNONCREATABLE = 368, + tNONEXTENSIBLE = 369, + tNOTIFY = 370, + tNOTIFYFLAG = 371, + tNULL = 372, + tOBJECT = 373, + tODL = 374, + tOLEAUTOMATION = 375, + tOPTIMIZE = 376, + tOPTIONAL = 377, + tOUT = 378, + tPARTIALIGNORE = 379, + tPASCAL = 380, + tPOINTERDEFAULT = 381, + tPROGID = 382, + tPROPERTIES = 383, + tPROPGET = 384, + tPROPPUT = 385, + tPROPPUTREF = 386, + tPROXY = 387, + tPTR = 388, + tPUBLIC = 389, + tRANGE = 390, + tREADONLY = 391, + tREF = 392, + tREGISTER = 393, + tREPRESENTAS = 394, + tREQUESTEDIT = 395, + tRESTRICTED = 396, + tRETVAL = 397, + tSAFEARRAY = 398, + tSHORT = 399, + tSIGNED = 400, + tSIZEIS = 401, + tSIZEOF = 402, + tSMALL = 403, + tSOURCE = 404, + tSTATIC = 405, + tSTDCALL = 406, + tSTRICTCONTEXTHANDLE = 407, + tSTRING = 408, + tSTRUCT = 409, + tSWITCH = 410, + tSWITCHIS = 411, + tSWITCHTYPE = 412, + tTHREADING = 413, + tTRANSMITAS = 414, + tTRUE = 415, + tTYPEDEF = 416, + tUIDEFAULT = 417, + tUNION = 418, + tUNIQUE = 419, + tUNSIGNED = 420, + tUSESGETLASTERROR = 421, + tUSERMARSHAL = 422, + tUUID = 423, + tV1ENUM = 424, + tVARARG = 425, + tVERSION = 426, + tVIPROGID = 427, + tVOID = 428, + tWCHAR = 429, + tWIREMARSHAL = 430, + tAPARTMENT = 431, + tNEUTRAL = 432, + tSINGLE = 433, + tFREE = 434, + tBOTH = 435, + ADDRESSOF = 436, + NEG = 437, + POS = 438, + PPTR = 439, + CAST = 440 }; #endif @@ -447,7 +425,7 @@ typedef union YYSTYPE { /* Line 293 of yacc.c */ -#line 153 "parser.y" +#line 129 "parser.y" attr_t *attr; attr_list_t *attr_list; @@ -477,7 +455,7 @@ typedef union YYSTYPE /* Line 293 of yacc.c */ -#line 481 "parser.tab.c" +#line 459 "parser.tab.c" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ @@ -489,7 +467,7 @@ typedef union YYSTYPE /* Line 343 of yacc.c */ -#line 493 "parser.tab.c" +#line 471 "parser.tab.c" #ifdef short # undef short @@ -708,20 +686,20 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 3 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 2733 +#define YYLAST 3077 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 208 +#define YYNTOKENS 210 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 100 +#define YYNNTS 101 /* YYNRULES -- Number of rules. */ -#define YYNRULES 381 +#define YYNRULES 387 /* YYNRULES -- Number of states. */ -#define YYNSTATES 662 +#define YYNSTATES 679 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 438 +#define YYMAXUTOK 440 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) @@ -732,16 +710,16 @@ static const yytype_uint8 yytranslate[] = 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 192, 2, 2, 2, 191, 184, 2, - 203, 204, 189, 188, 179, 187, 199, 190, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 181, 202, - 185, 207, 186, 180, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 194, 2, 2, 2, 193, 186, 2, + 207, 208, 191, 190, 181, 189, 201, 192, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 183, 206, + 187, 209, 188, 182, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 200, 2, 201, 183, 2, 2, 2, 2, 2, + 2, 202, 2, 203, 185, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 205, 182, 206, 193, 2, 2, 2, + 2, 2, 2, 204, 184, 205, 195, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -772,7 +750,8 @@ static const yytype_uint8 yytranslate[] = 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, - 175, 176, 177, 178, 194, 195, 196, 197, 198 + 175, 176, 177, 178, 179, 180, 196, 197, 198, 199, + 200 }; #if YYDEBUG @@ -780,208 +759,211 @@ static const yytype_uint8 yytranslate[] = YYRHS. */ static const yytype_uint16 yyprhs[] = { - 0, 0, 3, 5, 6, 9, 12, 16, 19, 22, - 25, 28, 29, 32, 35, 39, 42, 45, 48, 51, - 54, 55, 58, 59, 61, 63, 66, 69, 71, 74, - 76, 79, 81, 84, 86, 89, 92, 95, 98, 103, - 107, 111, 117, 120, 124, 129, 130, 132, 134, 138, - 140, 144, 148, 151, 155, 159, 162, 163, 165, 169, - 171, 175, 180, 182, 186, 187, 189, 194, 196, 198, - 200, 202, 204, 209, 214, 216, 218, 220, 222, 224, - 226, 228, 230, 232, 234, 239, 241, 243, 245, 250, - 252, 254, 256, 261, 266, 268, 270, 272, 274, 279, - 284, 289, 294, 299, 301, 306, 308, 310, 315, 317, - 322, 324, 326, 331, 336, 338, 340, 342, 344, 346, - 348, 350, 352, 354, 356, 358, 360, 362, 364, 369, - 371, 373, 375, 380, 385, 387, 389, 391, 393, 395, - 402, 404, 409, 411, 413, 415, 420, 422, 424, 426, - 431, 436, 441, 446, 448, 450, 455, 460, 462, 464, - 469, 474, 479, 481, 483, 485, 487, 489, 491, 493, - 494, 497, 502, 506, 507, 510, 512, 514, 518, 522, - 524, 530, 532, 536, 537, 539, 541, 543, 545, 547, - 549, 551, 553, 555, 557, 559, 565, 569, 573, 577, - 581, 585, 589, 593, 597, 601, 605, 609, 613, 617, - 621, 625, 629, 633, 637, 640, 643, 646, 649, 652, - 655, 659, 663, 669, 675, 680, 684, 686, 690, 692, - 694, 695, 698, 703, 707, 710, 713, 714, 717, 720, - 722, 726, 729, 731, 735, 738, 739, 741, 742, 744, - 746, 748, 750, 752, 754, 756, 759, 762, 764, 766, - 768, 770, 772, 774, 775, 777, 779, 782, 784, 787, - 790, 792, 794, 796, 799, 802, 805, 811, 812, 815, - 818, 821, 824, 827, 830, 834, 837, 841, 847, 853, - 854, 857, 860, 863, 866, 873, 882, 885, 888, 891, - 894, 897, 900, 906, 908, 910, 912, 914, 916, 917, - 920, 923, 927, 928, 930, 933, 936, 939, 943, 946, - 948, 950, 954, 957, 962, 966, 969, 971, 975, 978, - 979, 981, 985, 988, 990, 994, 999, 1003, 1006, 1008, - 1012, 1015, 1016, 1018, 1020, 1024, 1027, 1029, 1033, 1038, - 1040, 1044, 1045, 1048, 1051, 1053, 1057, 1059, 1063, 1065, - 1067, 1069, 1071, 1073, 1075, 1077, 1079, 1085, 1087, 1089, - 1091, 1093, 1096, 1098, 1101, 1103, 1106, 1111, 1116, 1122, - 1133, 1135 + 0, 0, 3, 5, 6, 12, 15, 18, 22, 25, + 28, 31, 34, 35, 38, 44, 47, 51, 54, 57, + 60, 63, 66, 67, 70, 71, 73, 75, 78, 81, + 83, 86, 88, 90, 93, 95, 98, 100, 103, 106, + 109, 112, 117, 121, 125, 131, 134, 138, 143, 144, + 146, 148, 152, 154, 158, 162, 165, 169, 173, 176, + 177, 179, 183, 185, 189, 194, 196, 200, 201, 203, + 208, 210, 212, 214, 216, 218, 223, 228, 230, 232, + 234, 236, 238, 240, 242, 244, 246, 248, 253, 255, + 257, 259, 264, 266, 268, 270, 275, 280, 282, 284, + 286, 288, 293, 298, 303, 308, 313, 315, 320, 322, + 324, 329, 331, 336, 338, 340, 345, 350, 352, 354, + 356, 358, 360, 362, 364, 366, 368, 370, 372, 374, + 376, 378, 383, 385, 387, 389, 394, 399, 401, 403, + 405, 407, 409, 416, 418, 423, 425, 427, 429, 434, + 436, 438, 440, 445, 450, 455, 460, 462, 464, 469, + 474, 479, 481, 483, 488, 493, 498, 500, 502, 504, + 506, 508, 510, 512, 513, 516, 521, 525, 526, 529, + 531, 533, 537, 541, 543, 549, 551, 555, 556, 558, + 560, 562, 564, 566, 568, 570, 572, 574, 576, 578, + 584, 588, 592, 596, 600, 604, 608, 612, 616, 620, + 624, 628, 632, 636, 640, 644, 648, 652, 656, 659, + 662, 665, 668, 671, 674, 678, 682, 688, 694, 699, + 703, 705, 709, 711, 713, 714, 717, 722, 726, 729, + 732, 733, 736, 739, 741, 745, 748, 750, 754, 757, + 758, 760, 761, 763, 765, 767, 769, 771, 773, 775, + 778, 781, 783, 785, 787, 789, 791, 793, 794, 796, + 798, 801, 803, 806, 809, 811, 813, 815, 818, 821, + 824, 830, 833, 834, 837, 840, 843, 846, 849, 852, + 856, 859, 863, 869, 875, 876, 879, 882, 885, 888, + 895, 904, 907, 910, 913, 916, 919, 922, 928, 930, + 932, 934, 936, 938, 939, 942, 945, 949, 950, 952, + 955, 958, 961, 965, 968, 970, 972, 976, 979, 984, + 988, 991, 993, 997, 1000, 1001, 1003, 1007, 1010, 1012, + 1016, 1021, 1025, 1028, 1030, 1034, 1037, 1038, 1040, 1042, + 1046, 1049, 1051, 1055, 1060, 1062, 1066, 1067, 1070, 1073, + 1075, 1079, 1081, 1085, 1087, 1089, 1091, 1093, 1095, 1097, + 1099, 1101, 1107, 1109, 1111, 1113, 1115, 1118, 1120, 1123, + 1125, 1128, 1133, 1139, 1145, 1156, 1158, 1162 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int16 yyrhs[] = { - 209, 0, -1, 210, -1, -1, 210, 275, -1, 210, - 274, -1, 210, 261, 202, -1, 210, 263, -1, 210, - 278, -1, 210, 222, -1, 210, 214, -1, -1, 211, - 275, -1, 211, 274, -1, 211, 261, 202, -1, 211, - 263, -1, 211, 278, -1, 211, 214, -1, 211, 219, - -1, 211, 222, -1, -1, 212, 214, -1, -1, 202, - -1, 216, -1, 215, 202, -1, 254, 202, -1, 218, - -1, 305, 202, -1, 240, -1, 65, 3, -1, 303, - -1, 152, 3, -1, 306, -1, 161, 3, -1, 229, - 240, -1, 229, 303, -1, 229, 306, -1, 48, 203, - 8, 204, -1, 89, 8, 202, -1, 217, 211, 12, - -1, 90, 203, 8, 204, 213, -1, 101, 3, -1, - 229, 220, 205, -1, 221, 211, 206, 213, -1, -1, - 225, -1, 226, -1, 224, 179, 226, -1, 224, -1, - 224, 179, 22, -1, 229, 283, 294, -1, 283, 294, - -1, 200, 243, 201, -1, 200, 189, 201, -1, 200, - 201, -1, -1, 229, -1, 200, 230, 201, -1, 232, - -1, 230, 179, 232, -1, 230, 201, 200, 232, -1, - 8, -1, 231, 179, 8, -1, -1, 23, -1, 25, - 203, 8, 204, -1, 26, -1, 27, -1, 29, -1, - 30, -1, 32, -1, 35, 203, 257, 204, -1, 37, - 203, 244, 204, -1, 41, -1, 42, -1, 44, -1, - 45, -1, 46, -1, 47, -1, 49, -1, 50, -1, - 51, -1, 52, -1, 53, 203, 246, 204, -1, 54, - -1, 55, -1, 56, -1, 58, 203, 8, 204, -1, - 60, -1, 61, -1, 62, -1, 63, 203, 231, 204, - -1, 64, 203, 246, 204, -1, 67, -1, 71, -1, - 73, -1, 74, -1, 76, 203, 245, 204, -1, 77, - 203, 8, 204, -1, 78, 203, 8, 204, -1, 79, - 203, 245, 204, -1, 80, 203, 8, 204, -1, 81, - -1, 83, 203, 245, 204, -1, 84, -1, 85, -1, - 86, 203, 243, 204, -1, 87, -1, 88, 203, 226, - 204, -1, 91, -1, 94, -1, 100, 203, 241, 204, - -1, 99, 203, 245, 204, -1, 99, -1, 102, -1, - 103, -1, 105, -1, 106, -1, 109, -1, 110, -1, - 111, -1, 112, -1, 113, -1, 114, -1, 116, -1, - 117, -1, 118, -1, 119, 203, 8, 204, -1, 120, - -1, 121, -1, 122, -1, 124, 203, 302, 204, -1, - 125, 203, 8, 204, -1, 127, -1, 128, -1, 129, - -1, 130, -1, 132, -1, 133, 203, 245, 179, 245, - 204, -1, 134, -1, 137, 203, 304, 204, -1, 138, - -1, 139, -1, 140, -1, 144, 203, 241, 204, -1, - 147, -1, 150, -1, 151, -1, 154, 203, 243, 204, - -1, 155, 203, 304, 204, -1, 157, 203, 304, 204, - -1, 156, 203, 301, 204, -1, 160, -1, 164, -1, - 165, 203, 304, 204, -1, 166, 203, 233, 204, -1, - 167, -1, 168, -1, 169, 203, 307, 204, -1, 170, - 203, 8, 204, -1, 173, 203, 304, 204, -1, 302, - -1, 11, -1, 8, -1, 38, -1, 70, -1, 123, - -1, 149, -1, -1, 235, 236, -1, 37, 245, 181, - 251, -1, 50, 181, 251, -1, -1, 238, 179, -1, - 238, -1, 239, -1, 238, 179, 239, -1, 257, 207, - 245, -1, 257, -1, 65, 256, 205, 237, 206, -1, - 242, -1, 241, 179, 242, -1, -1, 243, -1, 5, - -1, 6, -1, 7, -1, 69, -1, 115, -1, 158, - -1, 8, -1, 9, -1, 10, -1, 3, -1, 243, - 180, 243, 181, 243, -1, 243, 20, 243, -1, 243, - 21, 243, -1, 243, 182, 243, -1, 243, 183, 243, - -1, 243, 184, 243, -1, 243, 16, 243, -1, 243, - 17, 243, -1, 243, 186, 243, -1, 243, 185, 243, - -1, 243, 18, 243, -1, 243, 19, 243, -1, 243, - 13, 243, -1, 243, 14, 243, -1, 243, 188, 243, - -1, 243, 187, 243, -1, 243, 191, 243, -1, 243, - 189, 243, -1, 243, 190, 243, -1, 192, 243, -1, - 193, 243, -1, 188, 243, -1, 187, 243, -1, 184, - 243, -1, 189, 243, -1, 243, 15, 3, -1, 243, - 199, 3, -1, 203, 283, 290, 204, 243, -1, 145, - 203, 283, 290, 204, -1, 243, 200, 243, 201, -1, - 203, 243, 204, -1, 245, -1, 244, 179, 245, -1, - 243, -1, 243, -1, -1, 247, 248, -1, 228, 283, - 299, 202, -1, 228, 306, 202, -1, 252, 202, -1, - 229, 202, -1, -1, 250, 249, -1, 252, 202, -1, - 202, -1, 228, 283, 286, -1, 228, 303, -1, 254, - -1, 229, 283, 300, -1, 283, 300, -1, -1, 257, - -1, -1, 3, -1, 4, -1, 3, -1, 4, -1, - 33, -1, 172, -1, 260, -1, 143, 260, -1, 163, - 260, -1, 163, -1, 72, -1, 59, -1, 31, -1, - 66, -1, 75, -1, -1, 95, -1, 95, -1, 142, - 259, -1, 146, -1, 104, 259, -1, 82, 259, -1, - 97, -1, 39, -1, 96, -1, 40, 3, -1, 40, - 4, -1, 229, 261, -1, 262, 205, 264, 206, 213, - -1, -1, 264, 265, -1, 228, 275, -1, 57, 3, - -1, 57, 4, -1, 229, 266, -1, 126, 181, -1, - 268, 252, 202, -1, 107, 181, -1, 269, 253, 202, - -1, 267, 205, 268, 269, 206, -1, 267, 205, 272, - 202, 206, -1, -1, 181, 4, -1, 98, 3, -1, - 98, 4, -1, 229, 272, -1, 273, 271, 205, 212, - 206, 213, -1, 273, 181, 3, 205, 218, 212, 206, - 213, -1, 270, 213, -1, 272, 202, -1, 266, 202, - -1, 108, 3, -1, 108, 4, -1, 229, 276, -1, - 277, 205, 212, 206, 213, -1, 68, -1, 148, -1, - 136, -1, 93, -1, 43, -1, -1, 282, 281, -1, - 304, 284, -1, 285, 304, 284, -1, -1, 285, -1, - 281, 284, -1, 280, 284, -1, 279, 284, -1, 189, - 282, 286, -1, 234, 286, -1, 287, -1, 257, -1, - 203, 286, 204, -1, 287, 227, -1, 287, 203, 223, - 204, -1, 189, 282, 290, -1, 234, 290, -1, 291, - -1, 189, 282, 294, -1, 234, 294, -1, -1, 288, - -1, 203, 289, 204, -1, 291, 227, -1, 227, -1, - 203, 223, 204, -1, 291, 203, 223, 204, -1, 189, - 282, 294, -1, 234, 294, -1, 295, -1, 189, 282, - 294, -1, 234, 294, -1, -1, 292, -1, 257, -1, - 203, 293, 204, -1, 295, 227, -1, 227, -1, 203, - 223, 204, -1, 295, 203, 223, 204, -1, 286, -1, - 296, 179, 286, -1, -1, 181, 246, -1, 292, 297, - -1, 298, -1, 299, 179, 298, -1, 286, -1, 286, - 207, 246, -1, 174, -1, 175, -1, 176, -1, 177, - -1, 178, -1, 135, -1, 162, -1, 131, -1, 152, - 256, 205, 247, 206, -1, 171, -1, 4, -1, 258, - -1, 240, -1, 65, 3, -1, 303, -1, 152, 3, - -1, 306, -1, 161, 3, -1, 141, 203, 304, 204, - -1, 159, 228, 283, 296, -1, 161, 256, 205, 250, - 206, -1, 161, 256, 153, 203, 252, 204, 255, 205, - 235, 206, -1, 5, -1, 5, 199, 5, -1 + 211, 0, -1, 212, -1, -1, 212, 266, 204, 212, + 205, -1, 212, 278, -1, 212, 277, -1, 212, 263, + 206, -1, 212, 265, -1, 212, 281, -1, 212, 224, + -1, 212, 216, -1, -1, 213, 278, -1, 213, 266, + 204, 213, 205, -1, 213, 277, -1, 213, 263, 206, + -1, 213, 265, -1, 213, 281, -1, 213, 216, -1, + 213, 221, -1, 213, 224, -1, -1, 214, 216, -1, + -1, 206, -1, 218, -1, 217, 206, -1, 256, 206, + -1, 220, -1, 308, 206, -1, 4, -1, 242, -1, + 66, 3, -1, 306, -1, 154, 3, -1, 309, -1, + 163, 3, -1, 231, 242, -1, 231, 306, -1, 231, + 309, -1, 49, 207, 9, 208, -1, 90, 9, 206, + -1, 219, 213, 13, -1, 91, 207, 9, 208, 215, + -1, 102, 3, -1, 231, 222, 204, -1, 223, 213, + 205, 215, -1, -1, 227, -1, 228, -1, 226, 181, + 228, -1, 226, -1, 226, 181, 23, -1, 231, 286, + 297, -1, 286, 297, -1, 202, 245, 203, -1, 202, + 191, 203, -1, 202, 203, -1, -1, 231, -1, 202, + 232, 203, -1, 234, -1, 232, 181, 234, -1, 232, + 203, 202, 234, -1, 9, -1, 233, 181, 9, -1, + -1, 24, -1, 26, 207, 9, 208, -1, 27, -1, + 28, -1, 30, -1, 31, -1, 33, -1, 36, 207, + 259, 208, -1, 38, 207, 246, 208, -1, 42, -1, + 43, -1, 45, -1, 46, -1, 47, -1, 48, -1, + 50, -1, 51, -1, 52, -1, 53, -1, 54, 207, + 248, 208, -1, 55, -1, 56, -1, 57, -1, 59, + 207, 9, 208, -1, 61, -1, 62, -1, 63, -1, + 64, 207, 233, 208, -1, 65, 207, 248, 208, -1, + 68, -1, 72, -1, 74, -1, 75, -1, 77, 207, + 247, 208, -1, 78, 207, 9, 208, -1, 79, 207, + 9, 208, -1, 80, 207, 247, 208, -1, 81, 207, + 9, 208, -1, 82, -1, 84, 207, 247, 208, -1, + 85, -1, 86, -1, 87, 207, 245, 208, -1, 88, + -1, 89, 207, 228, 208, -1, 92, -1, 95, -1, + 101, 207, 243, 208, -1, 100, 207, 247, 208, -1, + 100, -1, 103, -1, 104, -1, 106, -1, 107, -1, + 111, -1, 112, -1, 113, -1, 114, -1, 115, -1, + 116, -1, 118, -1, 119, -1, 120, -1, 121, 207, + 9, 208, -1, 122, -1, 123, -1, 124, -1, 126, + 207, 305, 208, -1, 127, 207, 9, 208, -1, 129, + -1, 130, -1, 131, -1, 132, -1, 134, -1, 135, + 207, 247, 181, 247, 208, -1, 136, -1, 139, 207, + 307, 208, -1, 140, -1, 141, -1, 142, -1, 146, + 207, 243, 208, -1, 149, -1, 152, -1, 153, -1, + 156, 207, 245, 208, -1, 157, 207, 307, 208, -1, + 159, 207, 307, 208, -1, 158, 207, 304, 208, -1, + 162, -1, 166, -1, 167, 207, 307, 208, -1, 168, + 207, 235, 208, -1, 29, 207, 235, 208, -1, 169, + -1, 170, -1, 171, 207, 310, 208, -1, 172, 207, + 9, 208, -1, 175, 207, 307, 208, -1, 305, -1, + 12, -1, 9, -1, 39, -1, 71, -1, 125, -1, + 151, -1, -1, 237, 238, -1, 38, 247, 183, 253, + -1, 51, 183, 253, -1, -1, 240, 181, -1, 240, + -1, 241, -1, 240, 181, 241, -1, 259, 209, 247, + -1, 259, -1, 66, 258, 204, 239, 205, -1, 244, + -1, 243, 181, 244, -1, -1, 245, -1, 6, -1, + 7, -1, 8, -1, 70, -1, 117, -1, 160, -1, + 9, -1, 10, -1, 11, -1, 3, -1, 245, 182, + 245, 183, 245, -1, 245, 21, 245, -1, 245, 22, + 245, -1, 245, 184, 245, -1, 245, 185, 245, -1, + 245, 186, 245, -1, 245, 17, 245, -1, 245, 18, + 245, -1, 245, 188, 245, -1, 245, 187, 245, -1, + 245, 19, 245, -1, 245, 20, 245, -1, 245, 14, + 245, -1, 245, 15, 245, -1, 245, 190, 245, -1, + 245, 189, 245, -1, 245, 193, 245, -1, 245, 191, + 245, -1, 245, 192, 245, -1, 194, 245, -1, 195, + 245, -1, 190, 245, -1, 189, 245, -1, 186, 245, + -1, 191, 245, -1, 245, 16, 3, -1, 245, 201, + 3, -1, 207, 286, 293, 208, 245, -1, 147, 207, + 286, 293, 208, -1, 245, 202, 245, 203, -1, 207, + 245, 208, -1, 247, -1, 246, 181, 247, -1, 245, + -1, 245, -1, -1, 249, 250, -1, 230, 286, 302, + 206, -1, 230, 309, 206, -1, 254, 206, -1, 231, + 206, -1, -1, 252, 251, -1, 254, 206, -1, 206, + -1, 230, 286, 289, -1, 230, 306, -1, 256, -1, + 231, 286, 303, -1, 286, 303, -1, -1, 259, -1, + -1, 3, -1, 5, -1, 3, -1, 5, -1, 34, + -1, 174, -1, 262, -1, 145, 262, -1, 165, 262, + -1, 165, -1, 73, -1, 60, -1, 32, -1, 67, + -1, 76, -1, -1, 96, -1, 96, -1, 144, 261, + -1, 148, -1, 105, 261, -1, 83, 261, -1, 98, + -1, 40, -1, 97, -1, 41, 3, -1, 41, 5, + -1, 231, 263, -1, 264, 204, 267, 205, 215, -1, + 110, 3, -1, -1, 267, 268, -1, 230, 278, -1, + 58, 3, -1, 58, 5, -1, 231, 269, -1, 128, + 183, -1, 271, 254, 206, -1, 108, 183, -1, 272, + 255, 206, -1, 270, 204, 271, 272, 205, -1, 270, + 204, 275, 206, 205, -1, -1, 183, 5, -1, 99, + 3, -1, 99, 5, -1, 231, 275, -1, 276, 274, + 204, 214, 205, 215, -1, 276, 183, 3, 204, 220, + 214, 205, 215, -1, 273, 215, -1, 275, 206, -1, + 269, 206, -1, 109, 3, -1, 109, 5, -1, 231, + 279, -1, 280, 204, 214, 205, 215, -1, 69, -1, + 150, -1, 138, -1, 94, -1, 44, -1, -1, 285, + 284, -1, 307, 287, -1, 288, 307, 287, -1, -1, + 288, -1, 284, 287, -1, 283, 287, -1, 282, 287, + -1, 191, 285, 289, -1, 236, 289, -1, 290, -1, + 259, -1, 207, 289, 208, -1, 290, 229, -1, 290, + 207, 225, 208, -1, 191, 285, 293, -1, 236, 293, + -1, 294, -1, 191, 285, 297, -1, 236, 297, -1, + -1, 291, -1, 207, 292, 208, -1, 294, 229, -1, + 229, -1, 207, 225, 208, -1, 294, 207, 225, 208, + -1, 191, 285, 297, -1, 236, 297, -1, 298, -1, + 191, 285, 297, -1, 236, 297, -1, -1, 295, -1, + 259, -1, 207, 296, 208, -1, 298, 229, -1, 229, + -1, 207, 225, 208, -1, 298, 207, 225, 208, -1, + 289, -1, 299, 181, 289, -1, -1, 183, 248, -1, + 295, 300, -1, 301, -1, 302, 181, 301, -1, 289, + -1, 289, 209, 248, -1, 176, -1, 177, -1, 178, + -1, 179, -1, 180, -1, 137, -1, 164, -1, 133, + -1, 154, 258, 204, 249, 205, -1, 173, -1, 5, + -1, 260, -1, 242, -1, 66, 3, -1, 306, -1, + 154, 3, -1, 309, -1, 163, 3, -1, 143, 207, + 307, 208, -1, 230, 161, 230, 286, 299, -1, 163, + 258, 204, 252, 205, -1, 163, 258, 155, 207, 254, + 208, 257, 204, 237, 205, -1, 6, -1, 6, 201, + 6, -1, 7, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 328, 328, 342, 343, 344, 345, 348, 351, 352, - 353, 356, 357, 358, 359, 360, 363, 364, 365, 366, - 369, 370, 373, 374, 378, 379, 380, 381, 382, 386, - 387, 388, 389, 390, 391, 392, 393, 394, 397, 399, - 407, 413, 417, 419, 423, 430, 431, 434, 435, 438, - 439, 443, 448, 455, 459, 460, 463, 464, 468, 471, - 472, 473, 476, 477, 480, 481, 482, 483, 484, 485, - 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, - 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, - 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, - 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, - 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, - 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, - 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, - 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, - 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, - 579, 580, 581, 585, 586, 591, 592, 593, 594, 597, - 598, 601, 605, 611, 612, 613, 616, 620, 632, 636, - 641, 644, 645, 648, 649, 652, 653, 654, 655, 656, - 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, - 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, - 677, 678, 679, 680, 681, 682, 683, 684, 685, 686, - 687, 688, 689, 691, 693, 694, 697, 698, 701, 707, - 713, 714, 717, 722, 729, 730, 733, 734, 738, 739, - 742, 746, 752, 760, 764, 769, 770, 773, 774, 775, - 778, 780, 783, 784, 785, 786, 787, 788, 789, 790, - 791, 792, 793, 796, 797, 800, 801, 802, 803, 804, - 805, 806, 807, 810, 811, 819, 825, 829, 830, 834, - 837, 838, 841, 850, 851, 854, 855, 858, 864, 870, - 871, 874, 875, 878, 888, 895, 901, 905, 906, 909, - 910, 913, 918, 925, 926, 927, 931, 935, 938, 939, - 942, 943, 947, 948, 952, 953, 954, 958, 960, 962, - 966, 967, 968, 969, 977, 979, 981, 986, 988, 993, - 994, 999, 1000, 1001, 1002, 1007, 1016, 1018, 1019, 1024, - 1026, 1030, 1031, 1038, 1039, 1040, 1041, 1042, 1047, 1055, - 1056, 1059, 1060, 1063, 1070, 1071, 1076, 1077, 1081, 1082, - 1083, 1084, 1085, 1089, 1090, 1091, 1094, 1097, 1098, 1099, - 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1109, 1115, 1117, - 1123, 1124 + 0, 308, 308, 322, 323, 325, 326, 327, 330, 333, + 334, 335, 338, 339, 340, 342, 343, 344, 347, 348, + 349, 350, 353, 354, 357, 358, 362, 363, 364, 365, + 366, 367, 371, 372, 373, 374, 375, 376, 377, 378, + 379, 382, 384, 392, 398, 402, 404, 408, 415, 416, + 419, 420, 423, 424, 428, 433, 440, 444, 445, 448, + 449, 453, 456, 457, 458, 461, 462, 465, 466, 467, + 468, 469, 470, 471, 472, 473, 474, 475, 476, 477, + 478, 479, 480, 481, 482, 483, 484, 485, 486, 487, + 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, + 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, + 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, + 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, + 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, + 538, 539, 540, 544, 545, 546, 547, 548, 549, 550, + 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, + 561, 562, 563, 564, 565, 566, 567, 571, 572, 577, + 578, 579, 580, 583, 584, 587, 591, 597, 598, 599, + 602, 606, 618, 622, 627, 630, 631, 634, 635, 638, + 639, 640, 641, 642, 643, 644, 645, 646, 647, 648, + 649, 650, 651, 652, 653, 654, 655, 656, 657, 658, + 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, + 669, 670, 671, 672, 673, 674, 675, 677, 679, 680, + 683, 684, 687, 693, 699, 700, 703, 708, 715, 716, + 719, 720, 724, 725, 728, 732, 738, 746, 750, 755, + 756, 759, 760, 761, 764, 766, 769, 770, 771, 772, + 773, 774, 775, 776, 777, 778, 779, 782, 783, 786, + 787, 788, 789, 790, 791, 792, 793, 796, 797, 805, + 811, 815, 818, 819, 823, 826, 827, 830, 839, 840, + 843, 844, 847, 853, 859, 860, 863, 864, 867, 877, + 886, 892, 896, 897, 900, 901, 904, 909, 916, 917, + 918, 922, 926, 929, 930, 933, 934, 938, 939, 943, + 944, 945, 949, 951, 953, 957, 958, 959, 960, 968, + 970, 972, 977, 979, 984, 985, 990, 991, 992, 993, + 998, 1007, 1009, 1010, 1015, 1017, 1021, 1022, 1029, 1030, + 1031, 1032, 1033, 1038, 1046, 1047, 1050, 1051, 1054, 1061, + 1062, 1067, 1068, 1072, 1073, 1074, 1075, 1076, 1080, 1081, + 1082, 1085, 1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, + 1096, 1097, 1100, 1107, 1109, 1115, 1116, 1117 }; #endif @@ -990,9 +972,9 @@ static const yytype_uint16 yyrline[] = First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { - "$end", "error", "$undefined", "aIDENTIFIER", "aKNOWNTYPE", "aNUM", - "aHEXNUM", "aDOUBLE", "aSTRING", "aWSTRING", "aSQSTRING", "aUUID", - "aEOF", "SHL", "SHR", "MEMBERPTR", "EQUALITY", "INEQUALITY", + "$end", "error", "$undefined", "aIDENTIFIER", "aPRAGMA", "aKNOWNTYPE", + "aNUM", "aHEXNUM", "aDOUBLE", "aSTRING", "aWSTRING", "aSQSTRING", + "aUUID", "aEOF", "SHL", "SHR", "MEMBERPTR", "EQUALITY", "INEQUALITY", "GREATEREQUAL", "LESSEQUAL", "LOGICALOR", "LOGICALAND", "ELLIPSIS", "tAGGREGATABLE", "tALLOCATE", "tANNOTATION", "tAPPOBJECT", "tASYNC", "tASYNCUUID", "tAUTOHANDLE", "tBINDABLE", "tBOOLEAN", "tBROADCAST", @@ -1010,8 +992,8 @@ static const char *const yytname[] = "tIIDIS", "tIMMEDIATEBIND", "tIMPLICITHANDLE", "tIMPORT", "tIMPORTLIB", "tIN", "tIN_LINE", "tINLINE", "tINPUTSYNC", "tINT", "tINT3264", "tINT64", "tINTERFACE", "tLCID", "tLENGTHIS", "tLIBRARY", "tLICENSED", "tLOCAL", - "tLONG", "tMAYBE", "tMESSAGE", "tMETHODS", "tMODULE", "tNOCODE", - "tNONBROWSABLE", "tNONCREATABLE", "tNONEXTENSIBLE", "tNOTIFY", + "tLONG", "tMAYBE", "tMESSAGE", "tMETHODS", "tMODULE", "tNAMESPACE", + "tNOCODE", "tNONBROWSABLE", "tNONCREATABLE", "tNONEXTENSIBLE", "tNOTIFY", "tNOTIFYFLAG", "tNULL", "tOBJECT", "tODL", "tOLEAUTOMATION", "tOPTIMIZE", "tOPTIONAL", "tOUT", "tPARTIALIGNORE", "tPASCAL", "tPOINTERDEFAULT", "tPROGID", "tPROPERTIES", "tPROPGET", "tPROPPUT", "tPROPPUTREF", @@ -1026,7 +1008,7 @@ static const char *const yytname[] = "tNEUTRAL", "tSINGLE", "tFREE", "tBOTH", "','", "'?'", "':'", "'|'", "'^'", "'&'", "'<'", "'>'", "'-'", "'+'", "'*'", "'/'", "'%'", "'!'", "'~'", "ADDRESSOF", "NEG", "POS", "PPTR", "CAST", "'.'", "'['", "']'", - "';'", "'('", "')'", "'{'", "'}'", "'='", "$accept", "input", + "'{'", "'}'", "';'", "'('", "')'", "'='", "$accept", "input", "gbl_statements", "imp_statements", "int_statements", "semicolon_opt", "statement", "typedecl", "cppquote", "import_start", "import", "importlib", "libraryhdr", "library_start", "librarydef", "m_args", @@ -1037,14 +1019,15 @@ static const char *const yytname[] = "fields", "field", "ne_union_field", "ne_union_fields", "union_field", "s_field", "funcdef", "declaration", "m_ident", "t_ident", "ident", "base_type", "m_int", "int_std", "coclass", "coclasshdr", "coclassdef", - "coclass_ints", "coclass_int", "dispinterface", "dispinterfacehdr", - "dispint_props", "dispint_meths", "dispinterfacedef", "inherit", - "interface", "interfacehdr", "interfacedef", "interfacedec", "module", - "modulehdr", "moduledef", "storage_cls_spec", "function_specifier", - "type_qualifier", "m_type_qual_list", "decl_spec", "m_decl_spec_no_type", - "decl_spec_no_type", "declarator", "direct_declarator", - "abstract_declarator", "abstract_declarator_no_direct", - "m_abstract_declarator", "abstract_direct_declarator", "any_declarator", + "namespacedef", "coclass_ints", "coclass_int", "dispinterface", + "dispinterfacehdr", "dispint_props", "dispint_meths", "dispinterfacedef", + "inherit", "interface", "interfacehdr", "interfacedef", "interfacedec", + "module", "modulehdr", "moduledef", "storage_cls_spec", + "function_specifier", "type_qualifier", "m_type_qual_list", "decl_spec", + "m_decl_spec_no_type", "decl_spec_no_type", "declarator", + "direct_declarator", "abstract_declarator", + "abstract_declarator_no_direct", "m_abstract_declarator", + "abstract_direct_declarator", "any_declarator", "any_declarator_no_direct", "m_any_declarator", "any_direct_declarator", "declarator_list", "m_bitfield", "struct_declarator", "struct_declarator_list", "init_declarator", "threading_type", @@ -1074,99 +1057,99 @@ static const yytype_uint16 yytoknum[] = 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, - 425, 426, 427, 428, 429, 430, 431, 432, 433, 44, - 63, 58, 124, 94, 38, 60, 62, 45, 43, 42, - 47, 37, 33, 126, 434, 435, 436, 437, 438, 46, - 91, 93, 59, 40, 41, 123, 125, 61 + 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, + 435, 44, 63, 58, 124, 94, 38, 60, 62, 45, + 43, 42, 47, 37, 33, 126, 436, 437, 438, 439, + 440, 46, 91, 93, 123, 125, 59, 40, 41, 61 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint16 yyr1[] = { - 0, 208, 209, 210, 210, 210, 210, 210, 210, 210, - 210, 211, 211, 211, 211, 211, 211, 211, 211, 211, - 212, 212, 213, 213, 214, 214, 214, 214, 214, 215, - 215, 215, 215, 215, 215, 215, 215, 215, 216, 217, - 218, 219, 220, 221, 222, 223, 223, 224, 224, 225, - 225, 226, 226, 227, 227, 227, 228, 228, 229, 230, - 230, 230, 231, 231, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 232, 232, 232, 232, 232, 232, 232, - 232, 232, 232, 233, 233, 234, 234, 234, 234, 235, - 235, 236, 236, 237, 237, 237, 238, 238, 239, 239, - 240, 241, 241, 242, 242, 243, 243, 243, 243, 243, - 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, - 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, - 243, 243, 243, 243, 243, 243, 243, 243, 243, 243, - 243, 243, 243, 243, 243, 243, 244, 244, 245, 246, - 247, 247, 248, 248, 249, 249, 250, 250, 251, 251, - 252, 252, 253, 254, 254, 255, 255, 256, 256, 256, - 257, 257, 258, 258, 258, 258, 258, 258, 258, 258, - 258, 258, 258, 259, 259, 260, 260, 260, 260, 260, - 260, 260, 260, 261, 261, 262, 263, 264, 264, 265, - 266, 266, 267, 268, 268, 269, 269, 270, 270, 271, - 271, 272, 272, 273, 274, 274, 274, 275, 275, 276, - 276, 277, 278, 279, 279, 279, 280, 281, 282, 282, - 283, 283, 284, 284, 285, 285, 285, 286, 286, 286, - 287, 287, 287, 287, 288, 288, 288, 289, 289, 290, - 290, 291, 291, 291, 291, 291, 292, 292, 292, 293, - 293, 294, 294, 295, 295, 295, 295, 295, 295, 296, - 296, 297, 297, 298, 299, 299, 300, 300, 301, 301, - 301, 301, 301, 302, 302, 302, 303, 304, 304, 304, - 304, 304, 304, 304, 304, 304, 304, 305, 306, 306, - 307, 307 + 0, 210, 211, 212, 212, 212, 212, 212, 212, 212, + 212, 212, 213, 213, 213, 213, 213, 213, 213, 213, + 213, 213, 214, 214, 215, 215, 216, 216, 216, 216, + 216, 216, 217, 217, 217, 217, 217, 217, 217, 217, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 225, + 226, 226, 227, 227, 228, 228, 229, 229, 229, 230, + 230, 231, 232, 232, 232, 233, 233, 234, 234, 234, + 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, + 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, + 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, + 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, + 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, + 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, + 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, + 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, + 234, 234, 234, 234, 234, 234, 234, 234, 234, 234, + 234, 234, 234, 234, 234, 234, 234, 235, 235, 236, + 236, 236, 236, 237, 237, 238, 238, 239, 239, 239, + 240, 240, 241, 241, 242, 243, 243, 244, 244, 245, + 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, + 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, + 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, + 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, + 246, 246, 247, 248, 249, 249, 250, 250, 251, 251, + 252, 252, 253, 253, 254, 254, 255, 256, 256, 257, + 257, 258, 258, 258, 259, 259, 260, 260, 260, 260, + 260, 260, 260, 260, 260, 260, 260, 261, 261, 262, + 262, 262, 262, 262, 262, 262, 262, 263, 263, 264, + 265, 266, 267, 267, 268, 269, 269, 270, 271, 271, + 272, 272, 273, 273, 274, 274, 275, 275, 276, 277, + 277, 277, 278, 278, 279, 279, 280, 281, 282, 282, + 282, 283, 284, 285, 285, 286, 286, 287, 287, 288, + 288, 288, 289, 289, 289, 290, 290, 290, 290, 291, + 291, 291, 292, 292, 293, 293, 294, 294, 294, 294, + 294, 295, 295, 295, 296, 296, 297, 297, 298, 298, + 298, 298, 298, 298, 299, 299, 300, 300, 301, 302, + 302, 303, 303, 304, 304, 304, 304, 304, 305, 305, + 305, 306, 307, 307, 307, 307, 307, 307, 307, 307, + 307, 307, 308, 309, 309, 310, 310, 310 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const yytype_uint8 yyr2[] = { - 0, 2, 1, 0, 2, 2, 3, 2, 2, 2, - 2, 0, 2, 2, 3, 2, 2, 2, 2, 2, - 0, 2, 0, 1, 1, 2, 2, 1, 2, 1, - 2, 1, 2, 1, 2, 2, 2, 2, 4, 3, - 3, 5, 2, 3, 4, 0, 1, 1, 3, 1, - 3, 3, 2, 3, 3, 2, 0, 1, 3, 1, - 3, 4, 1, 3, 0, 1, 4, 1, 1, 1, - 1, 1, 4, 4, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 4, 1, 1, 1, 4, 1, - 1, 1, 4, 4, 1, 1, 1, 1, 4, 4, - 4, 4, 4, 1, 4, 1, 1, 4, 1, 4, - 1, 1, 4, 4, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, - 1, 1, 4, 4, 1, 1, 1, 1, 1, 6, - 1, 4, 1, 1, 1, 4, 1, 1, 1, 4, - 4, 4, 4, 1, 1, 4, 4, 1, 1, 4, - 4, 4, 1, 1, 1, 1, 1, 1, 1, 0, - 2, 4, 3, 0, 2, 1, 1, 3, 3, 1, - 5, 1, 3, 0, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 5, 3, 3, 3, 3, + 0, 2, 1, 0, 5, 2, 2, 3, 2, 2, + 2, 2, 0, 2, 5, 2, 3, 2, 2, 2, + 2, 2, 0, 2, 0, 1, 1, 2, 2, 1, + 2, 1, 1, 2, 1, 2, 1, 2, 2, 2, + 2, 4, 3, 3, 5, 2, 3, 4, 0, 1, + 1, 3, 1, 3, 3, 2, 3, 3, 2, 0, + 1, 3, 1, 3, 4, 1, 3, 0, 1, 4, + 1, 1, 1, 1, 1, 4, 4, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, + 1, 4, 1, 1, 1, 4, 4, 1, 1, 1, + 1, 4, 4, 4, 4, 4, 1, 4, 1, 1, + 4, 1, 4, 1, 1, 4, 4, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 4, 1, 1, 1, 4, 4, 1, 1, 1, + 1, 1, 6, 1, 4, 1, 1, 1, 4, 1, + 1, 1, 4, 4, 4, 4, 1, 1, 4, 4, + 4, 1, 1, 4, 4, 4, 1, 1, 1, 1, + 1, 1, 1, 0, 2, 4, 3, 0, 2, 1, + 1, 3, 3, 1, 5, 1, 3, 0, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, - 3, 3, 5, 5, 4, 3, 1, 3, 1, 1, - 0, 2, 4, 3, 2, 2, 0, 2, 2, 1, - 3, 2, 1, 3, 2, 0, 1, 0, 1, 1, - 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, - 1, 1, 1, 0, 1, 1, 2, 1, 2, 2, - 1, 1, 1, 2, 2, 2, 5, 0, 2, 2, - 2, 2, 2, 2, 3, 2, 3, 5, 5, 0, - 2, 2, 2, 2, 6, 8, 2, 2, 2, 2, - 2, 2, 5, 1, 1, 1, 1, 1, 0, 2, - 2, 3, 0, 1, 2, 2, 2, 3, 2, 1, - 1, 3, 2, 4, 3, 2, 1, 3, 2, 0, - 1, 3, 2, 1, 3, 4, 3, 2, 1, 3, - 2, 0, 1, 1, 3, 2, 1, 3, 4, 1, - 3, 0, 2, 2, 1, 3, 1, 3, 1, 1, - 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, - 1, 2, 1, 2, 1, 2, 4, 4, 5, 10, - 1, 3 + 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, + 2, 2, 2, 2, 3, 3, 5, 5, 4, 3, + 1, 3, 1, 1, 0, 2, 4, 3, 2, 2, + 0, 2, 2, 1, 3, 2, 1, 3, 2, 0, + 1, 0, 1, 1, 1, 1, 1, 1, 1, 2, + 2, 1, 1, 1, 1, 1, 1, 0, 1, 1, + 2, 1, 2, 2, 1, 1, 1, 2, 2, 2, + 5, 2, 0, 2, 2, 2, 2, 2, 2, 3, + 2, 3, 5, 5, 0, 2, 2, 2, 2, 6, + 8, 2, 2, 2, 2, 2, 2, 5, 1, 1, + 1, 1, 1, 0, 2, 2, 3, 0, 1, 2, + 2, 2, 3, 2, 1, 1, 3, 2, 4, 3, + 2, 1, 3, 2, 0, 1, 3, 2, 1, 3, + 4, 3, 2, 1, 3, 2, 0, 1, 1, 3, + 2, 1, 3, 4, 1, 3, 0, 2, 2, 1, + 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, + 1, 5, 1, 1, 1, 1, 2, 1, 2, 1, + 2, 4, 5, 5, 10, 1, 3, 1 }; /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. @@ -1174,816 +1157,889 @@ static const yytype_uint8 yyr2[] = means the default is an error. */ static const yytype_uint16 yydefact[] = { - 3, 0, 2, 1, 368, 260, 252, 271, 0, 307, - 0, 0, 259, 247, 261, 303, 258, 262, 263, 0, - 306, 265, 272, 270, 0, 263, 305, 0, 263, 0, - 267, 304, 247, 56, 247, 257, 367, 253, 64, 10, - 0, 24, 11, 27, 11, 9, 0, 370, 0, 369, - 254, 0, 0, 7, 0, 0, 22, 0, 289, 5, - 4, 0, 8, 312, 312, 312, 0, 0, 372, 312, - 0, 374, 273, 274, 0, 280, 281, 371, 249, 0, - 264, 269, 0, 291, 292, 268, 0, 266, 255, 373, - 0, 0, 57, 375, 0, 256, 65, 0, 67, 68, - 69, 70, 71, 0, 0, 74, 75, 76, 77, 78, - 79, 80, 81, 82, 83, 0, 85, 86, 87, 0, - 89, 90, 91, 0, 0, 94, 95, 96, 97, 0, - 0, 0, 0, 0, 103, 0, 105, 106, 0, 108, - 0, 110, 111, 114, 0, 115, 116, 117, 118, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 0, 129, - 130, 131, 0, 0, 134, 135, 136, 137, 365, 138, - 0, 140, 363, 0, 142, 143, 144, 0, 146, 147, - 148, 0, 0, 0, 0, 153, 364, 154, 0, 0, - 157, 158, 0, 0, 0, 0, 59, 162, 25, 0, - 0, 247, 0, 0, 247, 247, 0, 370, 275, 282, - 293, 301, 0, 372, 374, 26, 6, 277, 298, 0, - 23, 296, 297, 0, 0, 20, 316, 313, 315, 314, - 250, 251, 165, 166, 167, 168, 308, 0, 0, 320, - 356, 319, 244, 370, 372, 312, 374, 310, 28, 0, - 173, 39, 0, 230, 0, 0, 236, 0, 0, 0, + 3, 0, 2, 1, 31, 373, 264, 256, 275, 0, + 312, 0, 0, 263, 251, 265, 308, 262, 266, 267, + 0, 311, 269, 276, 274, 0, 267, 0, 310, 0, + 267, 0, 271, 309, 251, 251, 261, 372, 257, 67, + 11, 0, 26, 12, 29, 12, 10, 0, 60, 375, + 0, 374, 258, 0, 0, 8, 0, 0, 0, 24, + 0, 294, 6, 5, 0, 9, 317, 317, 317, 0, + 0, 377, 317, 0, 379, 277, 278, 0, 285, 286, + 376, 253, 0, 268, 273, 0, 296, 297, 272, 281, + 0, 270, 259, 378, 0, 380, 0, 260, 68, 0, + 70, 71, 0, 72, 73, 74, 0, 0, 77, 78, + 79, 80, 81, 82, 83, 84, 85, 86, 0, 88, + 89, 90, 0, 92, 93, 94, 0, 0, 97, 98, + 99, 100, 0, 0, 0, 0, 0, 106, 0, 108, + 109, 0, 111, 0, 113, 114, 117, 0, 118, 119, + 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, + 130, 0, 132, 133, 134, 0, 0, 137, 138, 139, + 140, 370, 141, 0, 143, 368, 0, 145, 146, 147, + 0, 149, 150, 151, 0, 0, 0, 0, 156, 369, + 157, 0, 0, 161, 162, 0, 0, 0, 0, 62, + 166, 27, 59, 59, 59, 251, 0, 0, 251, 251, + 0, 375, 279, 287, 298, 306, 0, 377, 379, 28, + 7, 282, 3, 303, 0, 25, 301, 302, 0, 0, + 22, 321, 318, 320, 319, 254, 255, 169, 170, 171, + 172, 313, 0, 0, 325, 361, 324, 248, 375, 377, + 317, 379, 315, 30, 0, 177, 42, 0, 234, 0, + 240, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 187, 0, + 0, 0, 0, 0, 187, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 67, 61, 43, 0, 19, 20, + 21, 0, 17, 0, 15, 13, 18, 24, 0, 60, + 376, 45, 304, 305, 378, 380, 46, 247, 59, 59, + 0, 59, 0, 0, 295, 22, 59, 0, 0, 323, + 0, 0, 48, 327, 316, 41, 0, 179, 180, 183, + 381, 59, 59, 59, 0, 168, 167, 0, 0, 198, + 189, 190, 191, 195, 196, 197, 192, 193, 0, 194, + 0, 0, 0, 0, 0, 0, 0, 232, 0, 230, + 233, 0, 0, 65, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 346, 0, 0, 185, 188, + 0, 0, 0, 0, 0, 0, 0, 0, 363, 364, + 365, 366, 367, 0, 0, 0, 0, 385, 387, 0, + 0, 0, 63, 67, 0, 16, 12, 47, 0, 24, + 0, 283, 4, 288, 0, 0, 0, 0, 0, 0, + 59, 24, 23, 60, 314, 322, 326, 362, 0, 58, + 0, 0, 52, 49, 50, 184, 178, 0, 371, 0, + 235, 0, 383, 60, 241, 0, 69, 160, 75, 0, + 222, 221, 220, 223, 218, 219, 0, 334, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 183, 0, 0, 0, 0, 0, 183, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 64, - 58, 40, 0, 17, 18, 19, 0, 15, 13, 12, - 16, 22, 371, 42, 299, 300, 373, 375, 43, 243, - 56, 0, 56, 0, 0, 290, 20, 0, 0, 0, - 318, 0, 0, 45, 322, 311, 38, 0, 175, 176, - 179, 376, 56, 349, 377, 56, 56, 0, 0, 194, - 185, 186, 187, 191, 192, 193, 188, 189, 0, 190, - 0, 0, 0, 0, 0, 0, 0, 228, 0, 226, - 229, 0, 0, 62, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 341, 0, 0, 181, 184, - 0, 0, 0, 0, 0, 0, 0, 0, 358, 359, - 360, 361, 362, 0, 0, 0, 164, 163, 0, 380, - 0, 0, 0, 60, 64, 0, 14, 44, 22, 0, - 278, 283, 0, 0, 0, 0, 0, 0, 0, 22, - 21, 0, 309, 317, 321, 357, 0, 55, 0, 0, - 49, 46, 47, 180, 174, 0, 366, 0, 231, 0, - 0, 378, 57, 237, 0, 66, 72, 0, 218, 217, - 216, 219, 214, 215, 0, 329, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 73, - 84, 88, 0, 92, 93, 98, 99, 100, 101, 102, - 104, 107, 109, 341, 308, 45, 346, 341, 343, 342, - 52, 338, 113, 183, 112, 128, 132, 133, 0, 141, - 145, 149, 150, 152, 151, 155, 156, 0, 159, 160, - 161, 61, 0, 276, 279, 285, 0, 372, 284, 287, - 0, 0, 242, 288, 20, 22, 302, 54, 53, 323, - 0, 177, 178, 0, 374, 350, 245, 235, 234, 329, - 225, 308, 45, 333, 329, 330, 0, 326, 207, 208, - 220, 201, 202, 205, 206, 196, 197, 0, 198, 199, - 200, 204, 203, 210, 209, 212, 213, 211, 221, 0, - 227, 63, 51, 341, 308, 0, 341, 0, 337, 45, - 345, 182, 0, 381, 22, 240, 286, 0, 294, 50, - 48, 351, 354, 0, 233, 0, 246, 0, 329, 308, - 0, 341, 0, 325, 0, 45, 332, 0, 224, 336, - 341, 347, 340, 344, 0, 139, 41, 22, 0, 353, - 0, 232, 169, 223, 324, 341, 334, 328, 331, 222, - 0, 195, 339, 348, 295, 352, 355, 0, 327, 335, - 0, 0, 379, 170, 0, 56, 56, 239, 172, 0, - 171, 238 + 0, 76, 87, 91, 0, 95, 96, 101, 102, 103, + 104, 105, 107, 110, 112, 346, 313, 48, 351, 346, + 348, 347, 55, 343, 116, 187, 115, 131, 135, 136, + 0, 144, 148, 152, 153, 155, 154, 158, 159, 0, + 163, 164, 165, 64, 0, 59, 354, 382, 280, 284, + 290, 0, 377, 289, 292, 0, 0, 246, 293, 22, + 24, 307, 57, 56, 328, 0, 181, 182, 0, 379, + 249, 239, 238, 334, 229, 313, 48, 338, 334, 335, + 0, 331, 211, 212, 224, 205, 206, 209, 210, 200, + 201, 0, 202, 203, 204, 208, 207, 214, 213, 216, + 217, 215, 225, 0, 231, 66, 54, 346, 313, 0, + 346, 0, 342, 48, 350, 186, 0, 386, 24, 14, + 0, 244, 291, 59, 299, 53, 51, 356, 359, 0, + 237, 0, 250, 0, 334, 313, 0, 346, 0, 330, + 0, 48, 337, 0, 228, 341, 346, 352, 345, 349, + 0, 142, 44, 355, 24, 0, 358, 0, 236, 173, + 227, 329, 346, 339, 333, 336, 226, 0, 199, 344, + 353, 300, 357, 360, 0, 332, 340, 0, 0, 384, + 174, 0, 59, 59, 243, 176, 0, 175, 242 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - -1, 1, 2, 199, 317, 221, 420, 40, 41, 42, - 43, 294, 206, 44, 295, 429, 430, 431, 432, 496, - 413, 92, 195, 364, 196, 398, 497, 647, 653, 327, - 328, 329, 243, 377, 378, 357, 358, 359, 361, 332, - 438, 443, 336, 658, 659, 531, 48, 605, 79, 498, - 49, 81, 50, 296, 52, 297, 310, 410, 54, 55, - 312, 415, 56, 224, 57, 58, 298, 299, 211, 61, - 300, 63, 64, 65, 318, 66, 226, 67, 240, 241, - 555, 612, 556, 557, 499, 587, 500, 501, 334, 629, - 602, 603, 242, 393, 197, 244, 69, 70, 246, 400 + -1, 1, 2, 202, 326, 226, 298, 41, 42, 43, + 44, 299, 210, 45, 300, 441, 442, 443, 444, 508, + 47, 309, 198, 374, 199, 347, 509, 664, 670, 336, + 337, 338, 248, 387, 388, 367, 368, 369, 371, 341, + 450, 454, 343, 675, 676, 546, 50, 621, 82, 510, + 51, 84, 52, 301, 54, 302, 303, 318, 421, 57, + 58, 321, 427, 59, 229, 60, 61, 304, 305, 215, + 64, 306, 66, 67, 68, 327, 69, 231, 70, 245, + 246, 569, 628, 570, 571, 511, 601, 512, 513, 537, + 646, 618, 619, 247, 403, 200, 249, 72, 73, 251, + 409 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -519 +#define YYPACT_NINF -526 static const yytype_int16 yypact[] = { - -519, 56, 1328, -519, -519, -519, -519, -519, 160, -519, - -140, 164, -519, 168, -519, -519, -519, -519, 7, 105, - -519, -519, -519, -519, 174, 7, -519, -58, 7, 426, - -519, -519, 178, -78, 180, 426, -519, -519, 2560, -519, - -15, -519, -519, -519, -519, -519, 2244, -11, -7, -519, - -519, 13, -36, -519, 15, -20, 20, 22, 12, -519, - -519, -6, -519, -16, -16, -16, 493, 2410, 31, -16, - 33, 41, -519, -519, 171, -519, -519, -72, -519, 4, - -519, -519, 45, -519, -519, -519, 2410, -519, -519, -71, - 44, 2316, -519, -111, -121, -519, -519, 49, -519, -519, - -519, -519, -519, 55, 67, -519, -519, -519, -519, -519, - -519, -519, -519, -519, -519, 70, -519, -519, -519, 72, - -519, -519, -519, 74, 76, -519, -519, -519, -519, 78, - 81, 84, 94, 97, -519, 103, -519, -519, 110, -519, - 113, -519, -519, 128, 130, -519, -519, -519, -519, -519, - -519, -519, -519, -519, -519, -519, -519, -519, 132, -519, - -519, -519, 138, 141, -519, -519, -519, -519, -519, -519, - 159, -519, -519, 161, -519, -519, -519, 162, -519, -519, - -519, 163, 166, 169, 170, -519, -519, -519, 176, 177, - -519, -519, 179, 191, 195, -74, -519, -519, -519, 1201, - 514, 264, 364, 288, 305, 322, 194, 172, -519, -519, - -519, -519, 493, 199, 202, -519, -519, -519, -519, -29, - -519, -519, -519, 334, 200, -519, -519, -519, -519, -519, - -519, -519, -519, -519, -519, -519, -519, 493, 493, -519, - 201, -133, -519, -519, -519, -16, -519, -519, -519, 206, - 336, -519, 207, -519, 493, 203, -519, 404, 336, 436, - 436, 409, 410, 436, 436, 412, 419, 436, 421, 436, - 436, 1747, 436, 436, 423, -73, 424, 436, 2410, 436, - 436, 2410, -37, 2410, 2410, 136, 429, 427, 2410, 2560, - 236, -519, 235, -519, -519, -519, 246, -519, -519, -519, - -519, 20, 248, -519, -519, -519, 248, -109, -519, -519, - -135, 270, -81, 252, 250, -519, -519, 615, 387, 255, - -519, 436, 73, 1747, -519, -519, -519, 266, 277, -519, - 259, -519, -134, -519, 297, -78, -132, 273, 274, -519, - -519, -519, -519, -519, -519, -519, -519, -519, 278, -519, - 436, 436, 436, 436, 436, 436, 1058, 2055, -143, -519, - 2055, 282, 285, -519, -129, 287, 290, 294, 295, 298, - 300, 302, 1745, 307, 2316, 260, 308, -106, -519, 2055, - 309, 311, 312, 330, 313, -89, 1817, 315, -519, -519, - -519, -519, -519, 316, 320, 321, -519, -519, 323, 289, - 324, 325, 328, -519, 2560, 525, -519, -519, 20, -3, - -519, -519, 345, 2316, 299, 944, 329, 445, 729, 20, - -519, 2316, -519, -519, -519, -519, 101, -519, 1937, 333, - 360, -519, -519, -519, 336, 436, -519, 2316, -519, 493, - 337, -519, 338, -519, 340, -519, -519, 2316, 14, 14, - 14, 14, 14, 14, 1842, 258, 436, 436, 540, 436, - 436, 436, 436, 436, 436, 436, 436, 436, 436, 436, - 436, 436, 436, 436, 436, 436, 545, 436, 436, -519, - -519, -519, 541, -519, -519, -519, -519, -519, -519, -519, - -519, -519, -519, 260, -519, 1455, -519, 260, -519, -519, - -519, -48, -519, 436, -519, -519, -519, -519, 436, -519, - -519, -519, -519, -519, -519, -519, -519, 547, -519, -519, - -519, -519, 351, -519, -519, -519, 493, -101, -519, -519, - 2316, 356, -519, -519, -519, 20, -519, -519, -519, -519, - 1653, -519, -519, 260, 357, -519, 336, -519, -519, 258, - -519, -519, 1581, -519, 258, -519, 361, -46, 280, 280, - -519, 751, 751, 197, 197, 2074, 981, 2034, 1996, 1977, - 1037, 197, 197, 284, 284, 14, 14, 14, -519, 1959, - -519, -519, -519, 83, -519, 362, 260, 363, -519, 1747, - -519, -519, 365, -519, 20, -519, -519, 830, -519, -519, - -519, 379, -519, -86, -519, 359, -519, 370, 518, -519, - 371, 260, 373, -519, 436, 1747, -519, 436, -519, -519, - 83, -519, -519, -519, 374, -519, -519, 20, 436, -519, - 260, -519, -519, -519, -519, 83, -519, -519, -519, 14, - 380, 2055, -519, -519, -519, -519, -519, -17, -519, -519, - 436, 402, -519, -519, 411, -40, -40, -519, -519, 383, - -519, -519 + -526, 59, 1737, -526, -526, -526, -526, -526, -526, 163, + -526, -138, 169, -526, 194, -526, -526, -526, -526, 12, + 73, -526, -526, -526, -526, 219, 12, 120, -526, -64, + 12, 300, -526, -526, 266, 270, 300, -526, -526, 2902, + -526, -48, -526, -526, -526, -526, -526, 46, 2579, -44, + -23, -526, -526, 39, 19, -526, 48, 47, 54, 62, + 76, -33, -526, -526, 82, -526, 96, 96, 96, 57, + 2751, 86, 96, 87, 90, -526, -526, 223, -526, -526, + 72, -526, 95, -526, -526, 103, -526, -526, -526, -526, + 2751, -526, -526, 99, 112, -112, -109, -526, -526, 21, + -526, -526, 56, -526, -526, -526, 93, 156, -526, -526, + -526, -526, -526, -526, -526, -526, -526, -526, 157, -526, + -526, -526, 162, -526, -526, -526, 164, 168, -526, -526, + -526, -526, 170, 171, 173, 174, 175, -526, 177, -526, + -526, 178, -526, 179, -526, -526, 184, 186, -526, -526, + -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, + -526, 187, -526, -526, -526, 193, 196, -526, -526, -526, + -526, -526, -526, 197, -526, -526, 200, -526, -526, -526, + 201, -526, -526, -526, 202, 203, 215, 216, -526, -526, + -526, 220, 225, -526, -526, 228, 231, 234, -56, -526, + -526, -526, 1620, 877, 136, 301, 373, 329, 347, 356, + 226, 195, -526, -526, -526, -526, 57, 237, 239, -526, + -526, -526, -526, -526, -22, -526, -526, -526, 357, 242, + -526, -526, -526, -526, -526, -526, -526, -526, -526, -526, + -526, -526, 57, 57, -526, 238, -141, -526, -526, -526, + 96, -526, -526, -526, 241, 365, -526, 243, -526, 247, + -526, 453, 161, 365, 713, 713, 454, 455, 713, 713, + 456, 457, 713, 458, 713, 713, 2168, 713, 713, 459, + -54, 461, 713, 2751, 713, 713, 2751, 135, 2751, 2751, + 161, 130, 462, 2751, 2902, 271, -526, 265, -526, -526, + -526, 273, -526, 276, -526, -526, -526, 62, 2665, -526, + 277, -526, -526, -526, 277, -105, -526, -526, -18, 1111, + 294, -76, 280, 278, -526, -526, 1213, 42, 279, -526, + 713, 94, 2168, -526, -526, -526, 284, 309, -526, 282, + -526, -13, 136, -11, 288, -526, -526, 289, 291, -526, + -526, -526, -526, -526, -526, -526, -526, -526, 285, -526, + 713, 713, 713, 713, 713, 713, 703, 2390, -91, -526, + 2390, 292, 296, -526, -70, 298, 302, 303, 304, 305, + 306, 307, 398, 308, 2665, 88, 310, -66, -526, 2390, + 311, 313, 314, 321, 315, -63, 2174, 316, -526, -526, + -526, -526, -526, 317, 318, 319, 322, 328, -526, 323, + 324, 326, -526, 2902, 499, -526, -526, -526, 57, 62, + -21, -526, -526, -526, 352, 2665, 331, 1503, 334, 419, + 1315, 62, -526, 2665, -526, -526, -526, -526, 450, -526, + 1425, 336, 366, -526, -526, -526, 365, 713, -526, 2665, + -526, 338, -526, 342, -526, 343, -526, -526, -526, 2665, + 18, 18, 18, 18, 18, 18, 2260, 248, 713, 713, + 547, 713, 713, 713, 713, 713, 713, 713, 713, 713, + 713, 713, 713, 713, 713, 713, 713, 713, 548, 713, + 713, -526, -526, -526, 543, -526, -526, -526, -526, -526, + -526, -526, -526, -526, -526, 88, -526, 1823, -526, 88, + -526, -526, -526, -137, -526, 713, -526, -526, -526, -526, + 713, -526, -526, -526, -526, -526, -526, -526, -526, 549, + -526, -526, -526, -526, 346, 994, -526, 375, -526, -526, + -526, 57, 166, -526, -526, 2665, 351, -526, -526, -526, + 62, -526, -526, -526, -526, 2082, -526, -526, 88, 354, + 365, -526, -526, 248, -526, -526, 1950, -526, 248, -526, + 350, -135, 25, 25, -526, 603, 603, 165, 165, 817, + 2285, 2369, 2408, 2440, 740, 165, 165, 64, 64, 18, + 18, 18, -526, 2329, -526, -526, -526, 70, -526, 353, + 88, 355, -526, 2168, -526, -526, 358, -526, 62, -526, + 57, -526, -526, 1417, -526, -526, -526, 379, -526, -94, + -526, 364, -526, 361, 100, -526, 369, 88, 370, -526, + 713, 2168, -526, 713, -526, -526, 70, -526, -526, -526, + 371, -526, -526, -526, 62, 713, -526, 88, -526, -526, + -526, -526, 70, -526, -526, -526, 18, 384, 2390, -526, + -526, -526, -526, -526, -3, -526, -526, 713, 411, -526, + -526, 412, -86, -86, -526, -526, 390, -526, -526 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -519, -519, -519, 549, -300, -291, 28, -519, -519, -519, - 182, -519, -519, -519, 589, -464, -519, -519, -258, -230, - -9, -2, -519, -519, -268, -519, -62, -519, -519, -519, - -519, 167, 5, 318, 102, -114, -519, -255, -257, -519, - -519, -519, -519, -50, -212, -519, 193, -519, 25, -64, - -519, 133, 100, 46, -519, 612, -519, -519, 569, -519, - -519, -519, -519, -519, -23, -519, 619, 6, -519, -519, - 620, -519, -519, -303, -466, -45, -24, -26, -219, -519, - -519, -519, -494, -519, -518, -519, -183, -519, -519, -519, - -13, -519, 414, -519, 352, 1, -33, -519, 3, -519 + -526, -526, 359, -28, -305, -300, -1, -526, -526, -526, + 176, -526, -526, -526, 23, -468, -526, -526, -257, -232, + -189, -2, -526, -526, -267, 312, -65, -526, -526, -526, + -526, 152, 7, 320, 92, 210, -526, -261, -256, -526, + -526, -526, -526, -60, -187, -526, 181, -526, 22, -67, + -526, 131, 40, 16, -526, 24, 26, -526, -526, 555, + -526, -526, -526, -526, -526, -12, -526, 28, 4, -526, + -526, 29, -526, -526, -287, -477, -38, 17, -14, -220, + -526, -526, -526, -500, -526, -525, -526, -467, -526, -526, + -526, -32, -526, 393, -526, 341, 1, -46, -526, 3, + -526 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which number is the opposite. If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -249 +#define YYTABLE_NINF -253 static const yytype_int16 yytable[] = { - 46, 212, 239, 68, 238, 71, 365, 47, 60, 366, - 407, 324, 369, 373, 371, 422, 418, 376, 319, 320, - 650, 403, 383, 210, 91, 601, 412, 9, 583, 458, - 39, 585, 255, 651, 245, 333, 478, 227, 227, 227, - 228, 229, -248, 227, -248, 247, 254, 213, 51, 214, - 482, 207, 15, 252, 11, 607, 3, 90, 168, 94, - 613, 479, 172, 74, 425, 38, 38, 322, 38, 24, - 323, 408, 436, 503, 441, 483, 339, 20, 340, 341, - 342, 343, 344, 345, 256, 608, 230, 231, 610, 186, - 503, -34, 208, 630, -248, 24, -248, 311, 504, 423, - 414, -241, 80, -241, 339, 289, 340, 341, 342, 343, - 344, 345, 601, 82, 634, 510, 631, 523, 620, 38, - 26, 232, 38, 440, 444, 624, 9, 290, 536, 88, - -30, -32, 31, -248, -248, 95, 521, 388, 389, 390, - 391, 392, 346, 635, 396, 86, 360, 397, 239, 360, - 238, 640, 322, 233, 322, 589, 372, 615, 85, 379, - 38, 87, 657, 72, 73, 379, 386, 75, 76, 217, - 346, 77, 78, 239, 239, 238, 238, 83, 84, 249, - 542, 89, 78, 93, 78, 219, 330, 198, 347, 652, - 239, -29, 238, 223, 338, 215, 313, 46, 46, 225, - 68, 68, 71, 71, 47, 47, 234, 360, 428, 250, - 456, 457, 458, 476, 477, 216, 347, 218, 348, 227, - 545, 325, 220, 580, 222, 553, 375, 293, 293, 90, - 94, 349, 235, -31, 597, 248, 448, 449, 450, 451, - 452, 453, 454, -33, 598, 384, 348, 251, 387, 253, - 394, 395, 257, 592, 239, 402, 238, 350, 258, 349, - 351, 352, 426, 230, 231, 354, 355, 302, 78, 374, - 259, 590, 494, 260, 427, 261, 356, 262, 375, 263, - 422, 264, 600, 322, 265, 350, 495, 266, 351, 352, - 353, 304, 305, 354, 355, 458, 232, 267, 232, 458, - 268, 409, 537, 626, 356, 422, 269, 595, 306, 78, - 582, 455, 451, 270, 588, 421, 271, 422, 68, 553, - 71, 374, 47, 437, 553, 307, 78, 616, 233, 493, - 233, 272, 422, 273, 442, 274, 644, 314, 315, 230, - 231, 275, 558, 559, 276, 561, 562, 563, 564, 565, - 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, - 576, 577, 277, 579, 278, 279, 280, 303, 526, 281, - 330, 645, 282, 283, -35, 239, 212, 238, 553, 284, - 285, 234, 286, 234, 471, 472, 473, 474, 475, 379, - 230, 231, 543, 554, 287, 654, 476, 477, 288, 308, - 619, -36, 549, 622, -37, 316, 335, 235, 321, 235, - 326, 331, 337, 530, 527, 524, 421, 362, 363, 68, - 367, 71, 213, 47, 214, 232, 207, 368, 637, 370, - 9, 380, 382, 586, 399, 401, 404, 642, 405, 339, - 544, 340, 341, 342, 343, 344, 345, 551, 406, 494, - 375, 411, 648, -248, 416, 417, 434, 233, 322, 424, - 322, 552, 239, 495, 238, 7, 435, 471, 472, 473, - 474, 475, 433, 473, 474, 475, 439, 445, 446, 476, - 477, 447, 606, 476, 477, 212, 480, 554, 517, 481, - 611, 484, 554, 374, 485, 375, 230, 231, 486, 487, - 639, 528, 488, 641, 489, 346, 490, 375, 18, 508, - 234, 492, 502, 505, 360, 506, 507, 509, 4, 512, - 513, 21, 22, 23, 514, 515, 525, 516, 518, 519, - 25, 232, 520, 522, 19, 533, 235, 539, 374, 540, - 547, 546, 548, 560, 375, 5, 554, 6, 578, 581, - 374, 347, 593, 7, 8, 594, 232, 9, 596, 604, - 628, 9, 10, 233, 632, 614, 621, 623, 28, 625, - 375, 11, 30, 12, 633, 636, 236, 638, 643, 13, - 14, 348, 15, 655, 649, 661, 16, 374, 233, 17, - 237, 45, 656, 200, 349, 421, 18, 385, 68, 534, - 71, 541, 47, 19, 292, 591, 660, 20, 532, 21, - 22, 23, 24, 374, 53, 209, 234, 646, 25, 4, - 350, 59, 62, 351, 352, 353, 309, 381, 354, 355, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 356, - 0, 234, 235, 0, 0, 0, 5, 0, 6, 0, - 26, 0, 0, 0, 7, 27, 28, 29, 9, 0, - 30, 0, 31, 10, 0, 0, 32, 235, 0, 0, - 0, 0, 0, 33, 12, 34, 0, 35, 0, 0, - 13, 14, 236, 15, 0, 36, 37, 16, 0, 0, - 17, 0, 0, 0, 0, 0, 237, 18, 0, 0, - 0, 0, 0, 0, 19, 0, 0, 551, 20, 0, - 21, 22, 23, 0, 38, 0, 0, 0, 322, 25, - 301, 552, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 26, 0, 0, 0, 0, 27, 28, 29, 0, - 5, 30, 6, 31, 456, 457, 458, 32, 7, 461, - 462, 0, 9, 0, 33, 0, 34, 10, 35, 0, - 0, 0, 0, 0, 0, 0, 36, 37, 12, 0, - 0, 0, 0, 0, 13, 14, 0, 15, 0, 0, - 0, 16, 0, 0, 17, 0, 0, 0, 0, 0, - 0, 18, 0, 0, 0, 38, 0, 0, 19, 0, - 0, 419, 20, 0, 21, 22, 23, 0, 0, 0, - 0, 0, 0, 25, 4, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 48, 40, 244, 71, 243, 74, 63, 417, 376, 49, + 216, 379, 375, 381, 333, 308, 386, 203, 53, 383, + 430, 393, 328, 329, 250, 46, 55, 412, 56, 597, + 62, 65, 424, 617, 470, 667, 214, 12, 596, 599, + 434, 470, 602, -252, 257, 235, 259, 236, 668, 217, + -252, 218, 232, 232, 232, 211, 94, 96, 232, 3, + 235, 331, 236, 623, 212, 331, 332, 331, 629, 77, + 603, 92, 631, 235, 437, 236, 97, 25, 25, 171, + 470, 237, 85, 175, 233, 234, 10, 647, 624, 252, + 490, 235, -252, 236, -37, 260, 237, 349, 626, -252, + 350, 351, 352, 353, 354, 355, 320, 435, 83, 237, + 189, 494, 648, 238, 10, 515, 39, 491, 515, 538, + 674, 636, 617, 89, 651, 294, 39, 237, 238, 420, + 635, 551, 425, 638, 426, 640, 407, 408, 495, 237, + 10, 238, 516, 90, 10, 522, 533, 295, 652, 244, + 228, 243, 449, 425, 425, 451, 455, 88, 201, 238, + 654, 91, -32, 657, 356, 16, 75, 239, 76, 659, + 345, 238, 78, 346, 79, 244, 244, 243, 243, 468, + 469, 470, 239, 219, 39, 665, 557, 419, 339, 39, + 21, 39, 448, 240, 452, 239, 348, 80, 536, 81, + 48, 48, 669, 71, 71, 74, 74, 204, 240, 49, + 49, 357, 322, 239, 483, 484, 485, 486, 487, 488, + 489, 240, 86, 221, 87, 239, 488, 489, 261, 594, + 94, 96, 254, 241, 28, 567, 232, 394, 385, 240, + 397, 358, 404, 405, 613, 220, 33, 411, 241, 242, + 614, 240, 222, 223, 359, 485, 486, 487, 224, 606, + 244, 506, 243, 262, 242, 488, 489, 334, 225, 93, + 418, 81, 331, 95, 384, 81, -252, 507, -33, 506, + 360, 604, 227, 361, 362, 438, 230, 237, 364, 365, + 331, 565, -34, 253, 385, 507, -36, 439, 616, 255, + 263, 366, 331, -252, 310, -35, 81, 566, 642, 256, + 434, 398, 399, 400, 401, 402, 258, 48, 40, 238, + 71, 611, 74, 63, 433, 432, 49, 71, 467, 74, + 384, 567, 312, 49, 313, 53, 567, 434, 39, 632, + 8, 453, 46, 55, 661, 56, 505, 62, 65, 434, + 314, 244, 81, 243, 483, 484, 485, 486, 487, 315, + 323, 81, 324, 264, 265, 434, 488, 489, 235, 266, + 236, 267, -245, 239, -245, 268, 311, 269, 270, 339, + 271, 272, 273, 19, 274, 275, 276, 541, 535, 662, + 643, 277, 567, 278, 279, 216, 22, 23, 24, 240, + 280, -38, 568, 281, 282, 26, 671, 283, 284, 285, + 286, 558, 468, 469, 470, 471, 472, 473, 474, 475, + 476, 563, 287, 288, 539, 545, 542, 289, 433, 432, + 316, 71, 290, 74, 217, 291, 218, 49, 292, 565, + 211, 293, 600, -39, 30, -40, 325, 330, 32, 335, + 331, 340, 559, 349, 342, 566, 350, 351, 352, 353, + 354, 355, 344, 372, 373, 377, 378, 380, 390, 385, + 392, 410, 414, 413, 244, 370, 243, 423, 370, 415, + 416, -252, 429, 425, 425, 382, 428, 436, 389, 445, + 446, 447, 459, 622, 389, 396, 456, 457, 568, 458, + 492, 627, 520, 568, 493, 384, 496, 216, 534, 20, + 497, 498, 499, 500, 501, 502, 504, 385, 514, 517, + 356, 518, 519, 521, 524, 525, 526, 527, 385, 529, + 528, 530, 531, 48, 532, 540, 71, 543, 74, 548, + 370, 440, 49, 244, 554, 243, 560, 555, 561, 562, + 574, 592, 595, 384, 608, 607, 610, 612, 630, 568, + 620, 637, 645, 639, 384, 385, 641, 357, 649, 650, + 460, 461, 462, 463, 464, 465, 466, 653, 655, 660, + 477, 319, 478, 479, 480, 481, 482, 483, 484, 485, + 486, 487, 666, 385, 672, 673, 678, 358, 556, 488, + 489, 384, 406, 213, 395, 549, 503, 605, 547, 317, + 359, 433, 432, 677, 71, 663, 74, 468, 469, 470, + 49, 391, 473, 474, 0, 0, 0, 0, 0, 384, + 0, 0, 0, 0, 0, 0, 360, 0, 0, 361, + 362, 363, 0, 0, 364, 365, 0, 0, 463, 0, + 0, 0, 0, 552, 0, 0, 0, 366, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 5, 0, 6, 0, 26, 0, 0, 0, 7, - 27, 28, 29, 9, 0, 30, 0, 31, 10, 0, - 0, 32, 0, 0, 0, 0, 0, 0, 33, 12, - 34, 0, 35, 0, 0, 13, 14, 0, 15, 0, - 36, 37, 16, 0, 0, 17, 0, 0, 0, 0, - 0, 0, 18, 0, 0, 0, 0, 0, 0, 19, - 0, 0, 0, 20, 0, 21, 22, 23, 0, 38, - 0, 0, 0, 0, 25, 535, 469, 470, 471, 472, - 473, 474, 475, 0, 0, 0, 0, 0, 4, 0, - 476, 477, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, - 0, 27, 28, 29, 0, 5, 30, 6, 31, 0, - 0, 0, 32, 7, 0, 0, 0, 9, 0, 33, - 0, 34, 0, 35, 456, 457, 458, 459, 460, 461, - 462, 36, 37, 12, 0, 0, 0, 0, 0, 201, - 14, 0, 15, 0, 0, 0, 16, 0, 0, 17, - 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, - 38, 0, 0, 0, 0, 0, 627, 20, 0, 21, - 22, 23, 0, 0, 0, 0, 0, 0, 25, 0, - 456, 457, 458, 459, 460, 461, 462, 0, 0, 0, - 0, 339, 4, 340, 341, 342, 343, 344, 345, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 26, 0, 0, 0, 0, 27, 28, 29, 0, 5, - 30, 6, 31, 0, 0, 0, 204, 7, 0, 0, - 0, 9, 0, 0, 0, 205, 0, 35, 0, 0, - 0, 0, 0, 0, 0, 36, 37, 12, 0, 0, - 0, 0, 0, 201, 14, 0, 15, 346, 0, 0, - 16, 0, 0, 17, 0, 0, 0, 0, 0, 0, - 18, 0, 0, 0, 38, 0, 0, 0, 0, 0, - 529, 20, 0, 21, 22, 23, 0, 0, 0, 0, - 0, 0, 25, 466, 467, 468, 469, 470, 471, 472, - 473, 474, 475, 347, 0, 0, 0, 0, 0, 0, - 476, 477, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 26, 0, 0, 0, 0, 27, - 28, 29, 0, 348, 30, 4, 31, 0, 0, 0, - 204, 0, 0, 291, 0, 0, 349, 0, 0, 205, - 0, 35, 469, 470, 471, 472, 473, 474, 475, 36, - 37, 0, 5, 0, 6, 0, 476, 477, 0, 0, - 7, 8, 350, 0, 9, 351, 352, 353, 0, 10, - 354, 355, 0, 0, 0, 0, 0, 0, 11, 0, - 12, 356, 0, 0, 0, 0, 13, 14, 0, 15, - 0, 0, 0, 16, 0, 0, 17, 0, 0, 0, - 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, - 19, 292, 0, 0, 20, 0, 21, 22, 23, 24, - 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 572, 573, + 0, 575, 576, 577, 578, 579, 580, 581, 582, 583, + 584, 585, 586, 587, 588, 589, 590, 591, 0, 593, + 0, 0, 0, 0, 0, 0, 349, 0, 5, 350, + 351, 352, 353, 354, 355, 0, 349, 0, 0, 350, + 351, 352, 353, 354, 355, 389, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 6, 0, 7, 0, 0, + 0, 0, 0, 8, 0, 0, 0, 10, 0, 0, + 0, 0, 0, 0, 468, 469, 470, 471, 472, 473, + 474, 0, 0, 13, 0, 0, 0, 0, 0, 205, + 15, 0, 16, 356, 0, 0, 17, 0, 0, 18, + 0, 0, 0, 356, 0, 0, 19, 0, 0, 0, + 481, 482, 483, 484, 485, 486, 487, 21, 0, 22, + 23, 24, 0, 0, 488, 489, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 357, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 357, 468, 469, 470, 471, 472, 473, 474, 0, 476, + 656, 28, 0, 658, 0, 0, 29, 30, 31, 0, + 358, 32, 0, 33, 0, 370, 0, 208, 0, 0, + 358, 0, 0, 359, 0, 0, 209, 0, 36, 0, + 0, 0, 0, 359, 0, 0, 37, 38, 0, 0, + 0, 4, 5, 0, 0, 0, 0, 0, 0, 360, + 0, 0, 361, 362, 363, 0, 0, 364, 365, 360, + 0, 0, 361, 362, 363, 0, 0, 364, 365, 6, + 366, 7, 0, 0, 0, 0, 0, 8, 9, 0, + 366, 10, 0, 0, 0, 0, 11, 481, 482, 483, + 484, 485, 486, 487, 0, 12, 0, 13, 0, 0, + 0, 488, 489, 14, 15, 0, 16, 0, 0, 0, + 17, 0, 0, 18, 0, 0, 0, 0, 0, 0, + 19, 0, 0, 0, 0, 0, 0, 20, 297, 0, + 0, 21, 0, 22, 23, 24, 25, 0, 0, 0, + 0, 0, 26, 0, 0, 0, 0, 27, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 4, 5, + 0, 478, 479, 480, 481, 482, 483, 484, 485, 486, + 487, 0, 0, 0, 0, 28, 0, 0, 488, 489, + 29, 30, 31, 0, 0, 32, 6, 33, 7, 0, + 0, 34, 0, 0, 8, 9, 0, 0, 10, 0, + 35, 0, 36, 11, 0, 0, 0, 0, 0, 0, + 37, 38, 12, 0, 13, 0, 0, 0, 0, 0, + 14, 15, 0, 16, 0, 0, 0, 17, 0, 0, + 18, 0, 0, 0, 0, 0, 0, 19, 0, 39, + 0, 0, 307, 0, 20, 297, 0, 0, 21, 0, + 22, 23, 24, 25, 0, 0, 0, 0, 0, 26, + 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 4, 0, 0, 0, 0, 26, 0, 0, - 0, 0, 27, 28, 29, 0, 0, 30, 0, 31, - 0, 0, 0, 32, 0, 0, 0, 0, 0, 5, - 33, 6, 34, 0, 35, 0, 0, 7, 8, 0, - 0, 9, 36, 37, 0, 0, 10, 0, 0, 0, - 0, 0, 0, 0, 0, 11, 0, 12, 0, 0, - 0, 0, 0, 13, 14, 0, 15, 0, 0, 0, - 16, 38, 0, 17, 0, 0, 0, 0, 0, 0, - 18, 0, 0, 0, 0, 0, 0, 19, 0, 0, - 0, 20, 0, 21, 22, 23, 24, 0, 0, 0, - 0, 0, 25, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 28, 0, 0, 0, 0, 29, 30, 31, + 0, 0, 32, 6, 33, 7, 0, 0, 34, 0, + 0, 8, 9, 0, 0, 10, 0, 35, 0, 36, + 11, 0, 0, 0, 0, 0, 0, 37, 38, 12, + 0, 13, 0, 0, 0, 0, 0, 14, 15, 0, + 16, 0, 0, 0, 17, 0, 0, 18, 0, 0, + 0, 0, 0, 0, 19, 0, 39, 0, 0, 609, + 0, 20, 0, 0, 0, 21, 0, 22, 23, 24, + 25, 0, 0, 0, 0, 0, 26, 4, 5, 0, + 0, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, - 0, 0, 0, 0, 26, 0, 0, 0, 0, 27, - 28, 29, 0, 0, 30, 0, 31, 0, 0, 0, - 32, 0, 0, 0, 0, 0, 5, 33, 6, 34, - 0, 35, 0, 232, 7, 0, 0, 0, 9, 36, - 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, - 201, 14, 0, 15, 0, 233, 0, 16, 38, 0, - 17, 0, 0, 0, 0, 0, 0, 18, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, - 21, 22, 23, 0, 0, 0, 0, 0, 0, 25, + 0, 0, 0, 0, 0, 6, 0, 7, 0, 28, + 0, 0, 0, 8, 29, 30, 31, 10, 0, 32, + 0, 33, 11, 0, 0, 34, 0, 0, 0, 0, + 0, 0, 0, 13, 35, 0, 36, 0, 0, 14, + 15, 0, 16, 0, 37, 38, 17, 0, 0, 18, + 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, + 0, 0, 0, 20, 0, 0, 0, 21, 0, 22, + 23, 24, 0, 39, 0, 0, 422, 0, 26, 4, + 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 234, 0, - 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, - 0, 26, 0, 0, 0, 0, 27, 28, 29, 0, - 0, 30, 0, 31, 235, 0, 0, 204, 0, 0, - 0, 0, 5, 0, 6, 0, 205, 0, 35, 232, - 7, 0, 0, 0, 9, 0, 36, 37, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 6, 0, 7, + 0, 28, 0, 0, 0, 8, 29, 30, 31, 10, + 0, 32, 0, 33, 11, 0, 0, 34, 0, 0, + 0, 0, 0, 0, 0, 13, 35, 0, 36, 0, + 0, 14, 15, 0, 16, 0, 37, 38, 17, 0, + 0, 18, 0, 0, 0, 0, 0, 0, 19, 0, + 0, 0, 0, 0, 0, 20, 0, 0, 0, 21, + 0, 22, 23, 24, 0, 39, 0, 0, 431, 0, + 26, 4, 5, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 468, + 469, 470, 471, 472, 473, 474, 475, 476, 0, 6, + 0, 7, 0, 28, 0, 0, 0, 8, 29, 30, + 31, 10, 0, 32, 0, 33, 11, 0, 0, 34, + 0, 0, 0, 0, 0, 0, 0, 13, 35, 0, + 36, 0, 0, 14, 15, 0, 16, 0, 37, 38, + 17, 0, 0, 18, 0, 0, 0, 0, 0, 0, + 19, 0, 0, 0, 0, 0, 0, 20, 5, 0, + 0, 21, 0, 22, 23, 24, 0, 39, 0, 0, + 550, 0, 26, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 6, 0, 7, 0, 0, + 0, 0, 0, 8, 0, 0, 0, 10, 0, 0, + 0, 0, 0, 0, 0, 28, 0, 0, 0, 0, + 29, 30, 31, 13, 0, 32, 0, 33, 0, 205, + 15, 34, 16, 0, 0, 0, 17, 0, 0, 18, + 35, 0, 36, 0, 0, 0, 19, 0, 0, 0, + 37, 38, 0, 0, 0, 0, 0, 21, 0, 22, + 23, 24, 0, 0, 0, 0, 0, 477, 26, 478, + 479, 480, 481, 482, 483, 484, 485, 486, 487, 39, + 0, 0, 644, 0, 4, 5, 488, 489, 553, 0, + 0, 0, 0, 296, 0, 0, 0, 0, 0, 0, + 0, 28, 0, 0, 0, 0, 29, 30, 31, 0, + 0, 32, 6, 33, 7, 0, 0, 208, 0, 0, + 8, 9, 0, 0, 10, 0, 209, 0, 36, 11, + 0, 0, 0, 0, 0, 0, 37, 38, 12, 0, + 13, 0, 0, 0, 0, 0, 14, 15, 0, 16, + 0, 0, 0, 17, 0, 0, 18, 0, 0, 0, + 0, 0, 0, 19, 0, 39, 0, 0, 544, 0, + 20, 297, 0, 0, 21, 0, 22, 23, 24, 25, + 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, + 27, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 4, 5, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 28, 0, + 0, 0, 0, 29, 30, 31, 0, 0, 32, 6, + 33, 7, 0, 0, 34, 0, 0, 8, 9, 0, + 0, 10, 0, 35, 0, 36, 11, 0, 0, 0, + 0, 0, 0, 37, 38, 12, 0, 13, 0, 0, + 0, 0, 0, 14, 15, 0, 16, 0, 0, 0, + 17, 0, 0, 18, 0, 0, 0, 0, 0, 0, + 19, 0, 39, 0, 0, 0, 0, 20, 5, 0, + 0, 21, 0, 22, 23, 24, 25, 0, 0, 0, + 0, 0, 26, 0, 0, 0, 0, 27, 0, 0, + 0, 0, 0, 0, 0, 6, 0, 7, 0, 0, + 0, 0, 237, 8, 0, 0, 0, 10, 0, 0, + 0, 0, 0, 0, 0, 28, 0, 0, 0, 0, + 29, 30, 31, 13, 0, 32, 0, 33, 0, 205, + 15, 34, 16, 0, 238, 0, 17, 0, -59, 18, + 35, 0, 36, 0, 0, 0, 19, 0, 0, 0, + 37, 38, 0, 0, 0, 0, 0, 21, 0, 22, + 23, 24, 0, 0, 0, 0, 0, 0, 26, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 39, + 0, 0, 0, 0, 0, 0, 0, 0, 239, 0, + 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, + 0, 28, 0, 0, 0, 0, 29, 30, 31, 0, + 0, 32, 0, 33, 240, 0, 0, 208, 0, 0, + 0, 0, 6, 0, 7, 0, 209, 0, 36, 237, + 8, 0, 0, 0, 10, 0, 37, 38, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 12, 0, 0, 0, 584, 0, 201, 14, 0, 15, - 0, 233, 0, 16, 0, 38, 17, 4, 0, 0, - 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 20, 599, 21, 22, 23, 0, - 0, 0, 0, 0, 5, 25, 6, 0, 0, 0, - 0, 0, 7, 0, 0, 0, 9, 0, 0, 0, - 0, 0, 0, 0, 234, 0, 0, 0, 0, 0, - 0, 0, 12, 0, 0, 0, 0, 26, 201, 14, - 0, 15, 27, 28, 29, 16, 0, 30, 17, 31, - 235, 0, 0, 204, 0, 18, 0, 0, 0, 0, - 0, 0, 205, 0, 35, 0, 20, 0, 21, 22, - 23, 4, 36, 37, 0, 0, 0, 25, 456, 457, - 458, 459, 460, 461, 462, 463, 464, 0, 0, 0, - 609, 0, 0, 0, 0, 0, 0, 0, 5, 0, - 6, 38, 0, 0, 0, 0, 7, 0, 0, 26, - 9, 0, 0, 0, 27, 28, 29, 0, 0, 30, - 0, 31, 0, 0, 0, 204, 12, 0, 0, 0, - 0, 0, 201, 14, 205, 15, 35, 0, 0, 16, - 0, 0, 17, 0, 36, 37, 0, 0, 0, 18, - 456, 457, 458, 459, 460, 461, 462, 463, 464, 0, - 20, 0, 21, 22, 23, 0, 0, 0, 0, 0, - 0, 25, 0, 38, 0, 456, 457, 458, 459, 460, - 461, 462, 463, 464, 0, 0, 0, 0, 0, 0, + 13, 0, 0, 0, 598, 0, 205, 15, 0, 16, + 0, 238, 0, 17, 0, 39, 18, 0, 0, 0, + 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 21, 0, 22, 23, 24, 0, + 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 26, 0, 0, 0, 0, 27, 28, - 29, 0, 0, 30, 0, 31, 0, 0, 0, 204, - 0, 0, 0, 0, 0, 0, 0, 0, 205, 0, - 35, 0, 0, 0, 0, 0, 0, 0, 36, 37, - 0, 0, 0, 0, 0, 465, 0, 466, 467, 468, - 469, 470, 471, 472, 473, 474, 475, 0, 0, 0, - 0, 0, 0, 0, 476, 477, 0, 38, 0, 491, - 456, 457, 458, 459, 460, 461, 462, 463, 464, 0, + 0, 0, 0, 0, 0, 239, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 5, 28, 0, + 0, 0, 0, 29, 30, 31, 0, 0, 32, 0, + 33, 240, 0, 0, 208, 615, 0, 0, 0, 0, + 0, 0, 0, 209, 6, 36, 7, 0, 0, 0, + 0, 0, 8, 37, 38, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 456, 457, 458, 459, 460, 461, 462, 463, - 464, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 456, 457, 458, 459, 460, 461, 462, 465, 0, 466, - 467, 468, 469, 470, 471, 472, 473, 474, 475, 456, - 457, 458, 459, 460, 461, 462, 476, 477, 0, 0, - 0, 511, 465, 0, 466, 467, 468, 469, 470, 471, - 472, 473, 474, 475, 0, 0, 0, 0, 0, 0, - 0, 476, 477, 0, 0, 0, 550, 456, 457, 458, - 459, 460, 461, 462, 463, 464, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 456, 457, - 458, 459, 460, 461, 462, 463, 464, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 456, 457, 458, - 459, 460, 461, 462, 0, 464, 0, 0, 0, 0, + 0, 625, 13, 0, 0, 0, 0, 0, 205, 15, + 0, 16, 39, 0, 0, 17, 0, 0, 18, 0, + 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, + 0, 0, 0, 5, 0, 0, 21, 0, 22, 23, + 24, 0, 0, 0, 0, 0, 0, 26, 468, 469, + 470, 471, 472, 473, 474, 475, 476, 0, 0, 0, + 6, 0, 7, 0, 0, 0, 0, 0, 8, 0, + 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, + 28, 0, 0, 0, 0, 29, 30, 31, 13, 0, + 32, 0, 33, 0, 205, 15, 208, 16, 0, 0, + 0, 17, 0, 0, 18, 209, 0, 36, 0, 0, + 0, 19, 0, 0, 0, 37, 38, 0, 0, 0, + 0, 0, 21, 0, 22, 23, 24, 0, 0, 0, + 0, 0, 0, 26, 468, 469, 470, 471, 472, 473, + 474, 475, 476, 0, 39, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 468, + 469, 470, 471, 472, 473, 474, 28, 0, 0, 0, + 0, 29, 30, 31, 0, 0, 32, 0, 33, 0, + 0, 0, 208, 0, 0, 0, 0, 0, 0, 0, + 0, 209, 0, 36, 0, 0, 0, 0, 0, 0, + 0, 37, 38, 468, 469, 470, 471, 472, 473, 474, + 475, 476, 0, 0, 0, 0, 477, 0, 478, 479, + 480, 481, 482, 483, 484, 485, 486, 487, 0, 0, + 39, 0, 0, 0, 0, 488, 489, 0, 0, 0, + 0, 0, 523, 468, 469, 470, 471, 472, 473, 474, + 475, 476, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 468, 469, 470, 471, 472, 473, + 474, 475, 476, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 468, 469, 470, 471, 472, 473, 474, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 465, 0, 466, - 467, 468, 469, 470, 471, 472, 473, 474, 475, 0, - 0, 0, 0, 0, 0, 0, 476, 477, 538, 465, - 0, 466, 467, 468, 469, 470, 471, 472, 473, 474, - 475, 0, 0, 0, 0, 0, 0, 0, 476, 477, - 618, 468, 469, 470, 471, 472, 473, 474, 475, 0, - 0, 0, 0, 0, 0, 0, 476, 477, 0, 467, - 468, 469, 470, 471, 472, 473, 474, 475, 0, 0, - 0, 0, 0, 0, 0, 476, 477, 0, 0, 0, + 0, 0, 477, 0, 478, 479, 480, 481, 482, 483, + 484, 485, 486, 487, 468, 469, 470, 471, 472, 473, + 474, 488, 489, 0, 0, 0, 0, 0, 564, 478, + 479, 480, 481, 482, 483, 484, 485, 486, 487, 0, + 0, 0, 0, 0, 0, 0, 488, 489, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 465, 617, 466, 467, 468, 469, - 470, 471, 472, 473, 474, 475, 0, 0, 0, 0, - 0, 0, 0, 476, 477, 465, 0, 466, 467, 468, - 469, 470, 471, 472, 473, 474, 475, 0, 4, 0, - 0, 0, 0, 0, 476, 477, 466, 467, 468, 469, - 470, 471, 472, 473, 474, 475, 0, 0, 0, 0, - 0, 0, 0, 476, 477, 5, 0, 6, 0, 0, - 0, 0, 0, 7, 8, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 11, 0, 12, 0, 0, 0, 0, 0, 201, - 14, 0, 15, 0, 0, 0, 16, 0, 0, 17, - 4, 0, 0, 0, 0, 0, 18, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 20, 0, 21, - 22, 23, 24, 0, 0, 202, 0, 5, 25, 6, - 0, 0, 203, 0, 0, 7, 0, 0, 0, 9, + 0, 477, 0, 478, 479, 480, 481, 482, 483, 484, + 485, 486, 487, 0, 0, 0, 0, 0, 0, 0, + 488, 489, 634, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, - 26, 201, 14, 0, 15, 27, 28, 29, 16, 0, - 30, 17, 31, 0, 0, 0, 204, 0, 18, 0, - 0, 0, 0, 0, 0, 205, 0, 35, 0, 20, - 0, 21, 22, 23, 4, 36, 37, 0, 0, 0, - 25, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 5, 0, 6, 0, 0, 0, 0, 0, 7, - 0, 0, 26, 0, 0, 0, 0, 27, 28, 29, - 0, 0, 30, 0, 31, 0, 0, 0, 204, 12, - 0, 0, 0, 0, 0, 201, 14, 205, 0, 35, - 0, 0, 16, 0, 0, 17, 0, 36, 37, 0, - 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 21, 22, 23, 0, 0, - 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, + 0, 477, 633, 478, 479, 480, 481, 482, 483, 484, + 485, 486, 487, 0, 0, 0, 0, 0, 0, 0, + 488, 489, 477, 0, 478, 479, 480, 481, 482, 483, + 484, 485, 486, 487, 5, 0, 0, 0, 0, 0, + 0, 488, 489, 479, 480, 481, 482, 483, 484, 485, + 486, 487, 0, 0, 0, 0, 0, 0, 0, 488, + 489, 6, 0, 7, 0, 0, 0, 0, 0, 8, + 9, 0, 0, 10, 0, 0, 480, 481, 482, 483, + 484, 485, 486, 487, 0, 0, 0, 12, 0, 13, + 0, 488, 489, 0, 0, 205, 15, 0, 16, 0, + 0, 0, 17, 0, 0, 18, 0, 0, 0, 0, + 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, + 5, 0, 0, 21, 0, 22, 23, 24, 25, 0, + 0, 206, 0, 0, 26, 0, 0, 0, 207, 0, + 0, 0, 0, 0, 0, 0, 0, 6, 0, 7, + 0, 0, 0, 0, 0, 8, 0, 0, 0, 10, + 0, 0, 0, 0, 0, 0, 0, 28, 0, 0, + 0, 0, 29, 30, 31, 13, 0, 32, 0, 33, + 0, 205, 15, 208, 16, 0, 0, 0, 17, 0, + 0, 18, 209, 0, 36, 0, 0, 0, 19, 0, + 0, 0, 37, 38, 0, 0, 5, 0, 0, 21, + 0, 22, 23, 24, 0, 0, 0, 0, 0, 0, + 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 6, 0, 7, 0, 0, 0, 0, + 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 28, 0, 0, 0, 0, 29, 30, + 31, 13, 0, 32, 0, 33, 0, 205, 15, 208, + 0, 0, 0, 0, 17, 0, 0, 18, 209, 0, + 36, 0, 0, 0, 19, 0, 0, 0, 37, 38, + 0, 0, 0, 0, 0, 0, 0, 22, 23, 24, + 0, 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 27, 28, 29, 0, 0, 30, 0, 0, 0, - 0, 0, 204, 0, 0, 0, 0, 0, 0, 0, - 0, 205, 0, 35, 0, 0, 0, 0, 0, 0, - 0, 36, 37, 96, 0, 97, 98, 99, 0, 100, - 101, 0, 102, 0, 0, 103, 0, 104, 0, 0, - 0, 105, 106, 0, 107, 108, 109, 110, 0, 111, - 112, 113, 114, 115, 116, 117, 118, 0, 119, 0, - 120, 121, 122, 123, 124, 0, 0, 125, 0, 0, - 0, 126, 0, 127, 128, 0, 129, 130, 131, 132, - 133, 134, 0, 135, 136, 137, 138, 139, 140, 0, - 0, 141, 0, 0, 142, 0, 0, 0, 0, 143, - 144, 0, 145, 146, 0, 147, 148, 0, 0, 149, - 150, 151, 152, 153, 154, 0, 155, 156, 157, 158, - 159, 160, 161, 0, 162, 163, 0, 164, 165, 166, - 167, 168, 169, 170, 171, 172, 0, 173, 174, 175, - 176, 0, 0, 0, 177, 0, 0, 178, 0, 0, - 179, 180, 0, 0, 181, 182, 183, 184, 0, 0, - 185, 0, 186, 0, 187, 188, 189, 190, 191, 192, - 193, 0, 0, 194 + 0, 0, 0, 0, 29, 30, 31, 0, 0, 32, + 0, 0, 0, 0, 0, 208, 0, 0, 0, 0, + 0, 0, 0, 0, 209, 0, 36, 0, 0, 0, + 0, 0, 0, 0, 37, 38, 98, 0, 99, 100, + 101, 102, 103, 104, 0, 105, 0, 0, 106, 0, + 107, 0, 0, 0, 108, 109, 0, 110, 111, 112, + 113, 0, 114, 115, 116, 117, 118, 119, 120, 121, + 0, 122, 0, 123, 124, 125, 126, 127, 0, 0, + 128, 0, 0, 0, 129, 0, 130, 131, 0, 132, + 133, 134, 135, 136, 137, 0, 138, 139, 140, 141, + 142, 143, 0, 0, 144, 0, 0, 145, 0, 0, + 0, 0, 146, 147, 0, 148, 149, 0, 150, 151, + 0, 0, 0, 152, 153, 154, 155, 156, 157, 0, + 158, 159, 160, 161, 162, 163, 164, 0, 165, 166, + 0, 167, 168, 169, 170, 171, 172, 173, 174, 175, + 0, 176, 177, 178, 179, 0, 0, 0, 180, 0, + 0, 181, 0, 0, 182, 183, 0, 0, 184, 185, + 186, 187, 0, 0, 188, 0, 189, 0, 190, 191, + 192, 193, 194, 195, 196, 0, 0, 197 }; #define yypact_value_is_default(yystate) \ - ((yystate) == (-519)) + ((yystate) == (-526)) #define yytable_value_is_error(yytable_value) \ YYID (0) static const yytype_int16 yycheck[] = { - 2, 46, 66, 2, 66, 2, 263, 2, 2, 264, - 301, 241, 267, 271, 269, 318, 316, 272, 237, 238, - 37, 289, 277, 46, 33, 543, 107, 43, 494, 15, - 2, 495, 153, 50, 67, 254, 179, 63, 64, 65, - 64, 65, 153, 69, 153, 69, 91, 46, 2, 46, - 179, 46, 68, 86, 57, 549, 0, 32, 131, 34, - 554, 204, 135, 203, 321, 200, 200, 200, 200, 98, - 203, 206, 206, 179, 206, 204, 3, 93, 5, 6, - 7, 8, 9, 10, 205, 551, 3, 4, 552, 162, - 179, 202, 46, 179, 205, 98, 205, 126, 204, 318, - 312, 202, 95, 204, 3, 179, 5, 6, 7, 8, - 9, 10, 630, 8, 608, 204, 202, 408, 584, 200, - 136, 38, 200, 335, 336, 589, 43, 201, 419, 29, - 202, 202, 148, 205, 205, 35, 404, 174, 175, 176, - 177, 178, 69, 609, 8, 203, 260, 11, 212, 263, - 212, 615, 200, 70, 200, 203, 270, 203, 25, 273, - 200, 28, 202, 3, 4, 279, 280, 3, 4, 205, - 69, 3, 4, 237, 238, 237, 238, 3, 4, 8, - 435, 3, 4, 3, 4, 205, 250, 202, 115, 206, - 254, 202, 254, 181, 258, 202, 219, 199, 200, 205, - 199, 200, 199, 200, 199, 200, 123, 321, 322, 205, - 13, 14, 15, 199, 200, 202, 115, 202, 145, 245, - 439, 245, 202, 478, 202, 455, 271, 199, 200, 204, - 205, 158, 149, 202, 534, 202, 350, 351, 352, 353, - 354, 355, 356, 202, 535, 278, 145, 202, 281, 205, - 283, 284, 203, 508, 318, 288, 318, 184, 203, 158, - 187, 188, 189, 3, 4, 192, 193, 3, 4, 271, - 203, 501, 189, 203, 201, 203, 203, 203, 323, 203, - 583, 203, 540, 200, 203, 184, 203, 203, 187, 188, - 189, 3, 4, 192, 193, 15, 38, 203, 38, 15, - 203, 310, 201, 594, 203, 608, 203, 526, 3, 4, - 493, 356, 426, 203, 497, 317, 203, 620, 317, 549, - 317, 323, 317, 332, 554, 3, 4, 557, 70, 374, - 70, 203, 635, 203, 336, 203, 627, 3, 4, 3, - 4, 203, 456, 457, 203, 459, 460, 461, 462, 463, - 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, - 474, 475, 203, 477, 203, 203, 203, 3, 413, 203, - 434, 628, 203, 203, 202, 439, 421, 439, 608, 203, - 203, 123, 203, 123, 187, 188, 189, 190, 191, 503, - 3, 4, 437, 455, 203, 650, 199, 200, 203, 205, - 583, 202, 447, 586, 202, 205, 203, 149, 207, 149, - 204, 204, 8, 415, 413, 409, 418, 8, 8, 418, - 8, 418, 421, 418, 421, 38, 421, 8, 611, 8, - 43, 8, 8, 495, 5, 8, 200, 620, 203, 3, - 437, 5, 6, 7, 8, 9, 10, 189, 202, 189, - 495, 181, 635, 205, 202, 205, 179, 70, 200, 204, - 200, 203, 526, 203, 526, 39, 207, 187, 188, 189, - 190, 191, 206, 189, 190, 191, 179, 204, 204, 199, - 200, 203, 546, 199, 200, 530, 204, 549, 199, 204, - 552, 204, 554, 495, 204, 540, 3, 4, 204, 204, - 614, 202, 204, 617, 204, 69, 204, 552, 82, 179, - 123, 204, 204, 204, 628, 204, 204, 204, 4, 204, - 204, 95, 96, 97, 204, 204, 181, 204, 204, 204, - 104, 38, 204, 8, 89, 206, 149, 204, 540, 179, - 202, 204, 202, 3, 589, 31, 608, 33, 3, 8, - 552, 115, 5, 39, 40, 204, 38, 43, 202, 202, - 181, 43, 48, 70, 205, 204, 204, 204, 142, 204, - 615, 57, 146, 59, 204, 204, 189, 204, 204, 65, - 66, 145, 68, 181, 204, 202, 72, 589, 70, 75, - 203, 2, 181, 44, 158, 597, 82, 279, 597, 417, - 597, 434, 597, 89, 90, 503, 656, 93, 415, 95, - 96, 97, 98, 615, 2, 46, 123, 630, 104, 4, - 184, 2, 2, 187, 188, 189, 212, 275, 192, 193, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 203, - -1, 123, 149, -1, -1, -1, 31, -1, 33, -1, - 136, -1, -1, -1, 39, 141, 142, 143, 43, -1, - 146, -1, 148, 48, -1, -1, 152, 149, -1, -1, - -1, -1, -1, 159, 59, 161, -1, 163, -1, -1, - 65, 66, 189, 68, -1, 171, 172, 72, -1, -1, - 75, -1, -1, -1, -1, -1, 203, 82, -1, -1, - -1, -1, -1, -1, 89, -1, -1, 189, 93, -1, - 95, 96, 97, -1, 200, -1, -1, -1, 200, 104, - 206, 203, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 4, -1, -1, -1, -1, -1, -1, + 2, 2, 69, 2, 69, 2, 2, 307, 269, 2, + 48, 272, 268, 274, 246, 204, 277, 45, 2, 276, + 325, 282, 242, 243, 70, 2, 2, 294, 2, 506, + 2, 2, 108, 558, 16, 38, 48, 58, 505, 507, + 327, 16, 509, 155, 90, 3, 155, 5, 51, 48, + 155, 48, 66, 67, 68, 48, 34, 35, 72, 0, + 3, 202, 5, 563, 48, 202, 207, 202, 568, 207, + 207, 31, 207, 3, 330, 5, 36, 99, 99, 133, + 16, 39, 9, 137, 67, 68, 44, 181, 565, 72, + 181, 3, 204, 5, 206, 204, 39, 3, 566, 204, + 6, 7, 8, 9, 10, 11, 128, 327, 96, 39, + 164, 181, 206, 71, 44, 181, 202, 208, 181, 419, + 206, 598, 647, 3, 624, 181, 202, 39, 71, 318, + 597, 431, 321, 600, 321, 603, 6, 7, 208, 39, + 44, 71, 208, 207, 44, 208, 413, 203, 625, 216, + 183, 216, 341, 342, 343, 342, 343, 26, 206, 71, + 627, 30, 206, 631, 70, 69, 3, 125, 5, 636, + 9, 71, 3, 12, 5, 242, 243, 242, 243, 14, + 15, 16, 125, 206, 202, 652, 447, 205, 255, 202, + 94, 202, 205, 151, 205, 125, 263, 3, 418, 5, + 202, 203, 205, 202, 203, 202, 203, 161, 151, 202, + 203, 117, 224, 125, 189, 190, 191, 192, 193, 201, + 202, 151, 3, 204, 5, 125, 201, 202, 207, 490, + 208, 209, 9, 191, 138, 467, 250, 283, 276, 151, + 286, 147, 288, 289, 549, 206, 150, 293, 191, 207, + 550, 151, 204, 206, 160, 191, 192, 193, 204, 520, + 327, 191, 327, 207, 207, 201, 202, 250, 206, 3, + 308, 5, 202, 3, 276, 5, 204, 207, 206, 191, + 186, 513, 206, 189, 190, 191, 204, 39, 194, 195, + 202, 191, 206, 206, 332, 207, 206, 203, 555, 204, + 207, 207, 202, 204, 3, 206, 5, 207, 608, 206, + 597, 176, 177, 178, 179, 180, 204, 319, 319, 71, + 319, 541, 319, 319, 326, 326, 319, 326, 366, 326, + 332, 563, 3, 326, 5, 319, 568, 624, 202, 571, + 40, 343, 319, 319, 644, 319, 384, 319, 319, 636, + 3, 418, 5, 418, 189, 190, 191, 192, 193, 3, + 3, 5, 5, 207, 207, 652, 201, 202, 3, 207, + 5, 207, 206, 125, 208, 207, 3, 207, 207, 446, + 207, 207, 207, 83, 207, 207, 207, 425, 416, 645, + 610, 207, 624, 207, 207, 433, 96, 97, 98, 151, + 207, 206, 467, 207, 207, 105, 667, 207, 207, 207, + 207, 449, 14, 15, 16, 17, 18, 19, 20, 21, + 22, 459, 207, 207, 420, 427, 425, 207, 430, 430, + 204, 430, 207, 430, 433, 207, 433, 430, 207, 191, + 433, 207, 507, 206, 144, 206, 204, 209, 148, 208, + 202, 208, 449, 3, 207, 207, 6, 7, 8, 9, + 10, 11, 9, 9, 9, 9, 9, 9, 9, 507, + 9, 9, 207, 202, 541, 265, 541, 183, 268, 206, + 204, 204, 204, 672, 673, 275, 206, 208, 278, 205, + 181, 209, 207, 560, 284, 285, 208, 208, 563, 208, + 208, 566, 181, 568, 208, 507, 208, 545, 9, 90, + 208, 208, 208, 208, 208, 208, 208, 555, 208, 208, + 70, 208, 208, 208, 208, 208, 208, 208, 566, 201, + 208, 208, 208, 535, 208, 183, 535, 206, 535, 205, + 330, 331, 535, 610, 208, 610, 208, 181, 206, 206, + 3, 3, 9, 555, 208, 6, 181, 206, 208, 624, + 206, 208, 183, 208, 566, 603, 208, 117, 204, 208, + 360, 361, 362, 363, 364, 365, 366, 208, 208, 208, + 182, 222, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 208, 631, 183, 183, 206, 147, 446, 201, + 202, 603, 290, 48, 284, 429, 208, 515, 427, 216, + 160, 613, 613, 673, 613, 647, 613, 14, 15, 16, + 613, 280, 19, 20, -1, -1, -1, -1, -1, 631, + -1, -1, -1, -1, -1, -1, 186, -1, -1, 189, + 190, 191, -1, -1, 194, 195, -1, -1, 438, -1, + -1, -1, -1, 203, -1, -1, -1, 207, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 136, -1, -1, -1, -1, 141, 142, 143, -1, - 31, 146, 33, 148, 13, 14, 15, 152, 39, 18, - 19, -1, 43, -1, 159, -1, 161, 48, 163, -1, - -1, -1, -1, -1, -1, -1, 171, 172, 59, -1, - -1, -1, -1, -1, 65, 66, -1, 68, -1, -1, - -1, 72, -1, -1, 75, -1, -1, -1, -1, -1, - -1, 82, -1, -1, -1, 200, -1, -1, 89, -1, - -1, 206, 93, -1, 95, 96, 97, -1, -1, -1, - -1, -1, -1, 104, 4, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 468, 469, + -1, 471, 472, 473, 474, 475, 476, 477, 478, 479, + 480, 481, 482, 483, 484, 485, 486, 487, -1, 489, + -1, -1, -1, -1, -1, -1, 3, -1, 5, 6, + 7, 8, 9, 10, 11, -1, 3, -1, -1, 6, + 7, 8, 9, 10, 11, 515, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 32, -1, 34, -1, -1, + -1, -1, -1, 40, -1, -1, -1, 44, -1, -1, + -1, -1, -1, -1, 14, 15, 16, 17, 18, 19, + 20, -1, -1, 60, -1, -1, -1, -1, -1, 66, + 67, -1, 69, 70, -1, -1, 73, -1, -1, 76, + -1, -1, -1, 70, -1, -1, 83, -1, -1, -1, + 187, 188, 189, 190, 191, 192, 193, 94, -1, 96, + 97, 98, -1, -1, 201, 202, -1, -1, 105, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 117, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 117, 14, 15, 16, 17, 18, 19, 20, -1, 22, + 630, 138, -1, 633, -1, -1, 143, 144, 145, -1, + 147, 148, -1, 150, -1, 645, -1, 154, -1, -1, + 147, -1, -1, 160, -1, -1, 163, -1, 165, -1, + -1, -1, -1, 160, -1, -1, 173, 174, -1, -1, + -1, 4, 5, -1, -1, -1, -1, -1, -1, 186, + -1, -1, 189, 190, 191, -1, -1, 194, 195, 186, + -1, -1, 189, 190, 191, -1, -1, 194, 195, 32, + 207, 34, -1, -1, -1, -1, -1, 40, 41, -1, + 207, 44, -1, -1, -1, -1, 49, 187, 188, 189, + 190, 191, 192, 193, -1, 58, -1, 60, -1, -1, + -1, 201, 202, 66, 67, -1, 69, -1, -1, -1, + 73, -1, -1, 76, -1, -1, -1, -1, -1, -1, + 83, -1, -1, -1, -1, -1, -1, 90, 91, -1, + -1, 94, -1, 96, 97, 98, 99, -1, -1, -1, + -1, -1, 105, -1, -1, -1, -1, 110, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 4, 5, + -1, 184, 185, 186, 187, 188, 189, 190, 191, 192, + 193, -1, -1, -1, -1, 138, -1, -1, 201, 202, + 143, 144, 145, -1, -1, 148, 32, 150, 34, -1, + -1, 154, -1, -1, 40, 41, -1, -1, 44, -1, + 163, -1, 165, 49, -1, -1, -1, -1, -1, -1, + 173, 174, 58, -1, 60, -1, -1, -1, -1, -1, + 66, 67, -1, 69, -1, -1, -1, 73, -1, -1, + 76, -1, -1, -1, -1, -1, -1, 83, -1, 202, + -1, -1, 205, -1, 90, 91, -1, -1, 94, -1, + 96, 97, 98, 99, -1, -1, -1, -1, -1, 105, + -1, -1, -1, -1, 110, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 4, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 31, -1, 33, -1, 136, -1, -1, -1, 39, - 141, 142, 143, 43, -1, 146, -1, 148, 48, -1, - -1, 152, -1, -1, -1, -1, -1, -1, 159, 59, - 161, -1, 163, -1, -1, 65, 66, -1, 68, -1, - 171, 172, 72, -1, -1, 75, -1, -1, -1, -1, - -1, -1, 82, -1, -1, -1, -1, -1, -1, 89, - -1, -1, -1, 93, -1, 95, 96, 97, -1, 200, - -1, -1, -1, -1, 104, 206, 185, 186, 187, 188, - 189, 190, 191, -1, -1, -1, -1, -1, 4, -1, - 199, 200, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 136, -1, -1, -1, - -1, 141, 142, 143, -1, 31, 146, 33, 148, -1, - -1, -1, 152, 39, -1, -1, -1, 43, -1, 159, - -1, 161, -1, 163, 13, 14, 15, 16, 17, 18, - 19, 171, 172, 59, -1, -1, -1, -1, -1, 65, - 66, -1, 68, -1, -1, -1, 72, -1, -1, 75, - -1, -1, -1, -1, -1, -1, 82, -1, -1, -1, - 200, -1, -1, -1, -1, -1, 206, 93, -1, 95, - 96, 97, -1, -1, -1, -1, -1, -1, 104, -1, - 13, 14, 15, 16, 17, 18, 19, -1, -1, -1, - -1, 3, 4, 5, 6, 7, 8, 9, 10, -1, + -1, -1, 138, -1, -1, -1, -1, 143, 144, 145, + -1, -1, 148, 32, 150, 34, -1, -1, 154, -1, + -1, 40, 41, -1, -1, 44, -1, 163, -1, 165, + 49, -1, -1, -1, -1, -1, -1, 173, 174, 58, + -1, 60, -1, -1, -1, -1, -1, 66, 67, -1, + 69, -1, -1, -1, 73, -1, -1, 76, -1, -1, + -1, -1, -1, -1, 83, -1, 202, -1, -1, 205, + -1, 90, -1, -1, -1, 94, -1, 96, 97, 98, + 99, -1, -1, -1, -1, -1, 105, 4, 5, -1, + -1, 110, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 136, -1, -1, -1, -1, 141, 142, 143, -1, 31, - 146, 33, 148, -1, -1, -1, 152, 39, -1, -1, - -1, 43, -1, -1, -1, 161, -1, 163, -1, -1, - -1, -1, -1, -1, -1, 171, 172, 59, -1, -1, - -1, -1, -1, 65, 66, -1, 68, 69, -1, -1, - 72, -1, -1, 75, -1, -1, -1, -1, -1, -1, - 82, -1, -1, -1, 200, -1, -1, -1, -1, -1, - 206, 93, -1, 95, 96, 97, -1, -1, -1, -1, - -1, -1, 104, 182, 183, 184, 185, 186, 187, 188, - 189, 190, 191, 115, -1, -1, -1, -1, -1, -1, - 199, 200, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 136, -1, -1, -1, -1, 141, - 142, 143, -1, 145, 146, 4, 148, -1, -1, -1, - 152, -1, -1, 12, -1, -1, 158, -1, -1, 161, - -1, 163, 185, 186, 187, 188, 189, 190, 191, 171, - 172, -1, 31, -1, 33, -1, 199, 200, -1, -1, - 39, 40, 184, -1, 43, 187, 188, 189, -1, 48, - 192, 193, -1, -1, -1, -1, -1, -1, 57, -1, - 59, 203, -1, -1, -1, -1, 65, 66, -1, 68, - -1, -1, -1, 72, -1, -1, 75, -1, -1, -1, - -1, -1, -1, 82, -1, -1, -1, -1, -1, -1, - 89, 90, -1, -1, 93, -1, 95, 96, 97, 98, - -1, -1, -1, -1, -1, 104, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 32, -1, 34, -1, 138, + -1, -1, -1, 40, 143, 144, 145, 44, -1, 148, + -1, 150, 49, -1, -1, 154, -1, -1, -1, -1, + -1, -1, -1, 60, 163, -1, 165, -1, -1, 66, + 67, -1, 69, -1, 173, 174, 73, -1, -1, 76, + -1, -1, -1, -1, -1, -1, 83, -1, -1, -1, + -1, -1, -1, 90, -1, -1, -1, 94, -1, 96, + 97, 98, -1, 202, -1, -1, 205, -1, 105, 4, + 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 32, -1, 34, + -1, 138, -1, -1, -1, 40, 143, 144, 145, 44, + -1, 148, -1, 150, 49, -1, -1, 154, -1, -1, + -1, -1, -1, -1, -1, 60, 163, -1, 165, -1, + -1, 66, 67, -1, 69, -1, 173, 174, 73, -1, + -1, 76, -1, -1, -1, -1, -1, -1, 83, -1, + -1, -1, -1, -1, -1, 90, -1, -1, -1, 94, + -1, 96, 97, 98, -1, 202, -1, -1, 205, -1, + 105, 4, 5, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 14, + 15, 16, 17, 18, 19, 20, 21, 22, -1, 32, + -1, 34, -1, 138, -1, -1, -1, 40, 143, 144, + 145, 44, -1, 148, -1, 150, 49, -1, -1, 154, + -1, -1, -1, -1, -1, -1, -1, 60, 163, -1, + 165, -1, -1, 66, 67, -1, 69, -1, 173, 174, + 73, -1, -1, 76, -1, -1, -1, -1, -1, -1, + 83, -1, -1, -1, -1, -1, -1, 90, 5, -1, + -1, 94, -1, 96, 97, 98, -1, 202, -1, -1, + 205, -1, 105, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 32, -1, 34, -1, -1, + -1, -1, -1, 40, -1, -1, -1, 44, -1, -1, + -1, -1, -1, -1, -1, 138, -1, -1, -1, -1, + 143, 144, 145, 60, -1, 148, -1, 150, -1, 66, + 67, 154, 69, -1, -1, -1, 73, -1, -1, 76, + 163, -1, 165, -1, -1, -1, 83, -1, -1, -1, + 173, 174, -1, -1, -1, -1, -1, 94, -1, 96, + 97, 98, -1, -1, -1, -1, -1, 182, 105, 184, + 185, 186, 187, 188, 189, 190, 191, 192, 193, 202, + -1, -1, 205, -1, 4, 5, 201, 202, 203, -1, + -1, -1, -1, 13, -1, -1, -1, -1, -1, -1, + -1, 138, -1, -1, -1, -1, 143, 144, 145, -1, + -1, 148, 32, 150, 34, -1, -1, 154, -1, -1, + 40, 41, -1, -1, 44, -1, 163, -1, 165, 49, + -1, -1, -1, -1, -1, -1, 173, 174, 58, -1, + 60, -1, -1, -1, -1, -1, 66, 67, -1, 69, + -1, -1, -1, 73, -1, -1, 76, -1, -1, -1, + -1, -1, -1, 83, -1, 202, -1, -1, 205, -1, + 90, 91, -1, -1, 94, -1, 96, 97, 98, 99, + -1, -1, -1, -1, -1, 105, -1, -1, -1, -1, + 110, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 4, 5, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 138, -1, + -1, -1, -1, 143, 144, 145, -1, -1, 148, 32, + 150, 34, -1, -1, 154, -1, -1, 40, 41, -1, + -1, 44, -1, 163, -1, 165, 49, -1, -1, -1, + -1, -1, -1, 173, 174, 58, -1, 60, -1, -1, + -1, -1, -1, 66, 67, -1, 69, -1, -1, -1, + 73, -1, -1, 76, -1, -1, -1, -1, -1, -1, + 83, -1, 202, -1, -1, -1, -1, 90, 5, -1, + -1, 94, -1, 96, 97, 98, 99, -1, -1, -1, + -1, -1, 105, -1, -1, -1, -1, 110, -1, -1, + -1, -1, -1, -1, -1, 32, -1, 34, -1, -1, + -1, -1, 39, 40, -1, -1, -1, 44, -1, -1, + -1, -1, -1, -1, -1, 138, -1, -1, -1, -1, + 143, 144, 145, 60, -1, 148, -1, 150, -1, 66, + 67, 154, 69, -1, 71, -1, 73, -1, 161, 76, + 163, -1, 165, -1, -1, -1, 83, -1, -1, -1, + 173, 174, -1, -1, -1, -1, -1, 94, -1, 96, + 97, 98, -1, -1, -1, -1, -1, -1, 105, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 202, + -1, -1, -1, -1, -1, -1, -1, -1, 125, -1, + -1, -1, -1, -1, -1, 5, -1, -1, -1, -1, + -1, 138, -1, -1, -1, -1, 143, 144, 145, -1, + -1, 148, -1, 150, 151, -1, -1, 154, -1, -1, + -1, -1, 32, -1, 34, -1, 163, -1, 165, 39, + 40, -1, -1, -1, 44, -1, 173, 174, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 4, -1, -1, -1, -1, 136, -1, -1, - -1, -1, 141, 142, 143, -1, -1, 146, -1, 148, - -1, -1, -1, 152, -1, -1, -1, -1, -1, 31, - 159, 33, 161, -1, 163, -1, -1, 39, 40, -1, - -1, 43, 171, 172, -1, -1, 48, -1, -1, -1, - -1, -1, -1, -1, -1, 57, -1, 59, -1, -1, - -1, -1, -1, 65, 66, -1, 68, -1, -1, -1, - 72, 200, -1, 75, -1, -1, -1, -1, -1, -1, - 82, -1, -1, -1, -1, -1, -1, 89, -1, -1, - -1, 93, -1, 95, 96, 97, 98, -1, -1, -1, - -1, -1, 104, -1, -1, -1, -1, -1, -1, -1, + 60, -1, -1, -1, 191, -1, 66, 67, -1, 69, + -1, 71, -1, 73, -1, 202, 76, -1, -1, -1, + -1, -1, -1, 83, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 94, -1, 96, 97, 98, -1, + -1, -1, -1, -1, -1, 105, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 4, - -1, -1, -1, -1, 136, -1, -1, -1, -1, 141, - 142, 143, -1, -1, 146, -1, 148, -1, -1, -1, - 152, -1, -1, -1, -1, -1, 31, 159, 33, 161, - -1, 163, -1, 38, 39, -1, -1, -1, 43, 171, - 172, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 59, -1, -1, -1, -1, -1, - 65, 66, -1, 68, -1, 70, -1, 72, 200, -1, - 75, -1, -1, -1, -1, -1, -1, 82, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 93, -1, - 95, 96, 97, -1, -1, -1, -1, -1, -1, 104, + -1, -1, -1, -1, -1, 125, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 5, 138, -1, + -1, -1, -1, 143, 144, 145, -1, -1, 148, -1, + 150, 151, -1, -1, 154, 23, -1, -1, -1, -1, + -1, -1, -1, 163, 32, 165, 34, -1, -1, -1, + -1, -1, 40, 173, 174, -1, 44, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 123, -1, - -1, -1, -1, -1, -1, 4, -1, -1, -1, -1, - -1, 136, -1, -1, -1, -1, 141, 142, 143, -1, - -1, 146, -1, 148, 149, -1, -1, 152, -1, -1, - -1, -1, 31, -1, 33, -1, 161, -1, 163, 38, - 39, -1, -1, -1, 43, -1, 171, 172, -1, -1, + -1, 191, 60, -1, -1, -1, -1, -1, 66, 67, + -1, 69, 202, -1, -1, 73, -1, -1, 76, -1, + -1, -1, -1, -1, -1, 83, -1, -1, -1, -1, + -1, -1, -1, 5, -1, -1, 94, -1, 96, 97, + 98, -1, -1, -1, -1, -1, -1, 105, 14, 15, + 16, 17, 18, 19, 20, 21, 22, -1, -1, -1, + 32, -1, 34, -1, -1, -1, -1, -1, 40, -1, + -1, -1, 44, -1, -1, -1, -1, -1, -1, -1, + 138, -1, -1, -1, -1, 143, 144, 145, 60, -1, + 148, -1, 150, -1, 66, 67, 154, 69, -1, -1, + -1, 73, -1, -1, 76, 163, -1, 165, -1, -1, + -1, 83, -1, -1, -1, 173, 174, -1, -1, -1, + -1, -1, 94, -1, 96, 97, 98, -1, -1, -1, + -1, -1, -1, 105, 14, 15, 16, 17, 18, 19, + 20, 21, 22, -1, 202, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 14, + 15, 16, 17, 18, 19, 20, 138, -1, -1, -1, + -1, 143, 144, 145, -1, -1, 148, -1, 150, -1, + -1, -1, 154, -1, -1, -1, -1, -1, -1, -1, + -1, 163, -1, 165, -1, -1, -1, -1, -1, -1, + -1, 173, 174, 14, 15, 16, 17, 18, 19, 20, + 21, 22, -1, -1, -1, -1, 182, -1, 184, 185, + 186, 187, 188, 189, 190, 191, 192, 193, -1, -1, + 202, -1, -1, -1, -1, 201, 202, -1, -1, -1, + -1, -1, 208, 14, 15, 16, 17, 18, 19, 20, + 21, 22, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 14, 15, 16, 17, 18, 19, + 20, 21, 22, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 14, 15, 16, 17, 18, 19, 20, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 59, -1, -1, -1, 189, -1, 65, 66, -1, 68, - -1, 70, -1, 72, -1, 200, 75, 4, -1, -1, - -1, -1, -1, 82, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 93, 22, 95, 96, 97, -1, - -1, -1, -1, -1, 31, 104, 33, -1, -1, -1, - -1, -1, 39, -1, -1, -1, 43, -1, -1, -1, - -1, -1, -1, -1, 123, -1, -1, -1, -1, -1, - -1, -1, 59, -1, -1, -1, -1, 136, 65, 66, - -1, 68, 141, 142, 143, 72, -1, 146, 75, 148, - 149, -1, -1, 152, -1, 82, -1, -1, -1, -1, - -1, -1, 161, -1, 163, -1, 93, -1, 95, 96, - 97, 4, 171, 172, -1, -1, -1, 104, 13, 14, - 15, 16, 17, 18, 19, 20, 21, -1, -1, -1, - 189, -1, -1, -1, -1, -1, -1, -1, 31, -1, - 33, 200, -1, -1, -1, -1, 39, -1, -1, 136, - 43, -1, -1, -1, 141, 142, 143, -1, -1, 146, - -1, 148, -1, -1, -1, 152, 59, -1, -1, -1, - -1, -1, 65, 66, 161, 68, 163, -1, -1, 72, - -1, -1, 75, -1, 171, 172, -1, -1, -1, 82, - 13, 14, 15, 16, 17, 18, 19, 20, 21, -1, - 93, -1, 95, 96, 97, -1, -1, -1, -1, -1, - -1, 104, -1, 200, -1, 13, 14, 15, 16, 17, - 18, 19, 20, 21, -1, -1, -1, -1, -1, -1, + -1, -1, 182, -1, 184, 185, 186, 187, 188, 189, + 190, 191, 192, 193, 14, 15, 16, 17, 18, 19, + 20, 201, 202, -1, -1, -1, -1, -1, 208, 184, + 185, 186, 187, 188, 189, 190, 191, 192, 193, -1, + -1, -1, -1, -1, -1, -1, 201, 202, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 136, -1, -1, -1, -1, 141, 142, - 143, -1, -1, 146, -1, 148, -1, -1, -1, 152, - -1, -1, -1, -1, -1, -1, -1, -1, 161, -1, - 163, -1, -1, -1, -1, -1, -1, -1, 171, 172, - -1, -1, -1, -1, -1, 180, -1, 182, 183, 184, - 185, 186, 187, 188, 189, 190, 191, -1, -1, -1, - -1, -1, -1, -1, 199, 200, -1, 200, -1, 204, - 13, 14, 15, 16, 17, 18, 19, 20, 21, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 13, 14, 15, 16, 17, 18, 19, 20, - 21, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 13, 14, 15, 16, 17, 18, 19, 180, -1, 182, - 183, 184, 185, 186, 187, 188, 189, 190, 191, 13, - 14, 15, 16, 17, 18, 19, 199, 200, -1, -1, - -1, 204, 180, -1, 182, 183, 184, 185, 186, 187, - 188, 189, 190, 191, -1, -1, -1, -1, -1, -1, - -1, 199, 200, -1, -1, -1, 204, 13, 14, 15, - 16, 17, 18, 19, 20, 21, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 13, 14, - 15, 16, 17, 18, 19, 20, 21, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 13, 14, 15, - 16, 17, 18, 19, -1, 21, -1, -1, -1, -1, + -1, 182, -1, 184, 185, 186, 187, 188, 189, 190, + 191, 192, 193, -1, -1, -1, -1, -1, -1, -1, + 201, 202, 203, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 180, -1, 182, - 183, 184, 185, 186, 187, 188, 189, 190, 191, -1, - -1, -1, -1, -1, -1, -1, 199, 200, 201, 180, -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, - 191, -1, -1, -1, -1, -1, -1, -1, 199, 200, - 201, 184, 185, 186, 187, 188, 189, 190, 191, -1, - -1, -1, -1, -1, -1, -1, 199, 200, -1, 183, - 184, 185, 186, 187, 188, 189, 190, 191, -1, -1, - -1, -1, -1, -1, -1, 199, 200, -1, -1, -1, + 191, 192, 193, -1, -1, -1, -1, -1, -1, -1, + 201, 202, 182, -1, 184, 185, 186, 187, 188, 189, + 190, 191, 192, 193, 5, -1, -1, -1, -1, -1, + -1, 201, 202, 185, 186, 187, 188, 189, 190, 191, + 192, 193, -1, -1, -1, -1, -1, -1, -1, 201, + 202, 32, -1, 34, -1, -1, -1, -1, -1, 40, + 41, -1, -1, 44, -1, -1, 186, 187, 188, 189, + 190, 191, 192, 193, -1, -1, -1, 58, -1, 60, + -1, 201, 202, -1, -1, 66, 67, -1, 69, -1, + -1, -1, 73, -1, -1, 76, -1, -1, -1, -1, + -1, -1, 83, -1, -1, -1, -1, -1, -1, -1, + 5, -1, -1, 94, -1, 96, 97, 98, 99, -1, + -1, 102, -1, -1, 105, -1, -1, -1, 109, -1, + -1, -1, -1, -1, -1, -1, -1, 32, -1, 34, + -1, -1, -1, -1, -1, 40, -1, -1, -1, 44, + -1, -1, -1, -1, -1, -1, -1, 138, -1, -1, + -1, -1, 143, 144, 145, 60, -1, 148, -1, 150, + -1, 66, 67, 154, 69, -1, -1, -1, 73, -1, + -1, 76, 163, -1, 165, -1, -1, -1, 83, -1, + -1, -1, 173, 174, -1, -1, 5, -1, -1, 94, + -1, 96, 97, 98, -1, -1, -1, -1, -1, -1, + 105, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 32, -1, 34, -1, -1, -1, -1, + -1, 40, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 138, -1, -1, -1, -1, 143, 144, + 145, 60, -1, 148, -1, 150, -1, 66, 67, 154, + -1, -1, -1, -1, 73, -1, -1, 76, 163, -1, + 165, -1, -1, -1, 83, -1, -1, -1, 173, 174, + -1, -1, -1, -1, -1, -1, -1, 96, 97, 98, + -1, -1, -1, -1, -1, -1, 105, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 180, 181, 182, 183, 184, 185, - 186, 187, 188, 189, 190, 191, -1, -1, -1, -1, - -1, -1, -1, 199, 200, 180, -1, 182, 183, 184, - 185, 186, 187, 188, 189, 190, 191, -1, 4, -1, - -1, -1, -1, -1, 199, 200, 182, 183, 184, 185, - 186, 187, 188, 189, 190, 191, -1, -1, -1, -1, - -1, -1, -1, 199, 200, 31, -1, 33, -1, -1, - -1, -1, -1, 39, 40, -1, -1, 43, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 57, -1, 59, -1, -1, -1, -1, -1, 65, - 66, -1, 68, -1, -1, -1, 72, -1, -1, 75, - 4, -1, -1, -1, -1, -1, 82, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 93, -1, 95, - 96, 97, 98, -1, -1, 101, -1, 31, 104, 33, - -1, -1, 108, -1, -1, 39, -1, -1, -1, 43, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 59, -1, -1, -1, -1, - 136, 65, 66, -1, 68, 141, 142, 143, 72, -1, - 146, 75, 148, -1, -1, -1, 152, -1, 82, -1, - -1, -1, -1, -1, -1, 161, -1, 163, -1, 93, - -1, 95, 96, 97, 4, 171, 172, -1, -1, -1, - 104, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 31, -1, 33, -1, -1, -1, -1, -1, 39, - -1, -1, 136, -1, -1, -1, -1, 141, 142, 143, - -1, -1, 146, -1, 148, -1, -1, -1, 152, 59, - -1, -1, -1, -1, -1, 65, 66, 161, -1, 163, - -1, -1, 72, -1, -1, 75, -1, 171, 172, -1, - -1, -1, 82, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 95, 96, 97, -1, -1, - -1, -1, -1, -1, 104, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 141, 142, 143, -1, -1, 146, -1, -1, -1, - -1, -1, 152, -1, -1, -1, -1, -1, -1, -1, - -1, 161, -1, 163, -1, -1, -1, -1, -1, -1, - -1, 171, 172, 23, -1, 25, 26, 27, -1, 29, - 30, -1, 32, -1, -1, 35, -1, 37, -1, -1, - -1, 41, 42, -1, 44, 45, 46, 47, -1, 49, - 50, 51, 52, 53, 54, 55, 56, -1, 58, -1, - 60, 61, 62, 63, 64, -1, -1, 67, -1, -1, - -1, 71, -1, 73, 74, -1, 76, 77, 78, 79, - 80, 81, -1, 83, 84, 85, 86, 87, 88, -1, - -1, 91, -1, -1, 94, -1, -1, -1, -1, 99, - 100, -1, 102, 103, -1, 105, 106, -1, -1, 109, - 110, 111, 112, 113, 114, -1, 116, 117, 118, 119, - 120, 121, 122, -1, 124, 125, -1, 127, 128, 129, - 130, 131, 132, 133, 134, 135, -1, 137, 138, 139, - 140, -1, -1, -1, 144, -1, -1, 147, -1, -1, - 150, 151, -1, -1, 154, 155, 156, 157, -1, -1, - 160, -1, 162, -1, 164, 165, 166, 167, 168, 169, - 170, -1, -1, 173 + -1, -1, -1, -1, 143, 144, 145, -1, -1, 148, + -1, -1, -1, -1, -1, 154, -1, -1, -1, -1, + -1, -1, -1, -1, 163, -1, 165, -1, -1, -1, + -1, -1, -1, -1, 173, 174, 24, -1, 26, 27, + 28, 29, 30, 31, -1, 33, -1, -1, 36, -1, + 38, -1, -1, -1, 42, 43, -1, 45, 46, 47, + 48, -1, 50, 51, 52, 53, 54, 55, 56, 57, + -1, 59, -1, 61, 62, 63, 64, 65, -1, -1, + 68, -1, -1, -1, 72, -1, 74, 75, -1, 77, + 78, 79, 80, 81, 82, -1, 84, 85, 86, 87, + 88, 89, -1, -1, 92, -1, -1, 95, -1, -1, + -1, -1, 100, 101, -1, 103, 104, -1, 106, 107, + -1, -1, -1, 111, 112, 113, 114, 115, 116, -1, + 118, 119, 120, 121, 122, 123, 124, -1, 126, 127, + -1, 129, 130, 131, 132, 133, 134, 135, 136, 137, + -1, 139, 140, 141, 142, -1, -1, -1, 146, -1, + -1, 149, -1, -1, 152, 153, -1, -1, 156, 157, + 158, 159, -1, -1, 162, -1, 164, -1, 166, 167, + 168, 169, 170, 171, 172, -1, -1, 175 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint16 yystos[] = { - 0, 209, 210, 0, 4, 31, 33, 39, 40, 43, - 48, 57, 59, 65, 66, 68, 72, 75, 82, 89, - 93, 95, 96, 97, 98, 104, 136, 141, 142, 143, - 146, 148, 152, 159, 161, 163, 171, 172, 200, 214, - 215, 216, 217, 218, 221, 222, 229, 240, 254, 258, - 260, 261, 262, 263, 266, 267, 270, 272, 273, 274, - 275, 277, 278, 279, 280, 281, 283, 285, 303, 304, - 305, 306, 3, 4, 203, 3, 4, 3, 4, 256, - 95, 259, 8, 3, 4, 259, 203, 259, 260, 3, - 256, 228, 229, 3, 256, 260, 23, 25, 26, 27, - 29, 30, 32, 35, 37, 41, 42, 44, 45, 46, - 47, 49, 50, 51, 52, 53, 54, 55, 56, 58, - 60, 61, 62, 63, 64, 67, 71, 73, 74, 76, - 77, 78, 79, 80, 81, 83, 84, 85, 86, 87, - 88, 91, 94, 99, 100, 102, 103, 105, 106, 109, - 110, 111, 112, 113, 114, 116, 117, 118, 119, 120, - 121, 122, 124, 125, 127, 128, 129, 130, 131, 132, - 133, 134, 135, 137, 138, 139, 140, 144, 147, 150, - 151, 154, 155, 156, 157, 160, 162, 164, 165, 166, - 167, 168, 169, 170, 173, 230, 232, 302, 202, 211, - 211, 65, 101, 108, 152, 161, 220, 240, 261, 266, - 272, 276, 283, 303, 306, 202, 202, 205, 202, 205, - 202, 213, 202, 181, 271, 205, 284, 285, 284, 284, - 3, 4, 38, 70, 123, 149, 189, 203, 234, 257, - 286, 287, 300, 240, 303, 304, 306, 284, 202, 8, - 205, 202, 304, 205, 283, 153, 205, 203, 203, 203, - 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, - 203, 203, 203, 203, 203, 203, 203, 203, 203, 203, - 203, 203, 203, 203, 203, 203, 203, 203, 203, 179, - 201, 12, 90, 214, 219, 222, 261, 263, 274, 275, - 278, 206, 3, 3, 3, 4, 3, 3, 205, 300, - 264, 126, 268, 272, 3, 4, 205, 212, 282, 286, - 286, 207, 200, 203, 227, 284, 204, 237, 238, 239, - 257, 204, 247, 286, 296, 203, 250, 8, 257, 3, - 5, 6, 7, 8, 9, 10, 69, 115, 145, 158, - 184, 187, 188, 189, 192, 193, 203, 243, 244, 245, - 243, 246, 8, 8, 231, 246, 245, 8, 8, 245, - 8, 245, 243, 226, 229, 283, 245, 241, 242, 243, - 8, 302, 8, 245, 304, 241, 243, 304, 174, 175, - 176, 177, 178, 301, 304, 304, 8, 11, 233, 5, - 307, 8, 304, 232, 200, 203, 202, 213, 206, 228, - 265, 181, 107, 228, 252, 269, 202, 205, 212, 206, - 214, 229, 281, 286, 204, 246, 189, 201, 243, 223, - 224, 225, 226, 206, 179, 207, 206, 228, 248, 179, - 252, 206, 229, 249, 252, 204, 204, 203, 243, 243, - 243, 243, 243, 243, 243, 283, 13, 14, 15, 16, - 17, 18, 19, 20, 21, 180, 182, 183, 184, 185, - 186, 187, 188, 189, 190, 191, 199, 200, 179, 204, - 204, 204, 179, 204, 204, 204, 204, 204, 204, 204, - 204, 204, 204, 283, 189, 203, 227, 234, 257, 292, - 294, 295, 204, 179, 204, 204, 204, 204, 179, 204, - 204, 204, 204, 204, 204, 204, 204, 199, 204, 204, - 204, 232, 8, 213, 275, 181, 283, 303, 202, 206, - 229, 253, 254, 206, 218, 206, 213, 201, 201, 204, - 179, 239, 245, 283, 306, 286, 204, 202, 202, 283, - 204, 189, 203, 227, 234, 288, 290, 291, 243, 243, - 3, 243, 243, 243, 243, 243, 243, 243, 243, 243, - 243, 243, 243, 243, 243, 243, 243, 243, 3, 243, - 245, 8, 294, 282, 189, 223, 234, 293, 294, 203, - 227, 242, 245, 5, 204, 286, 202, 212, 213, 22, - 226, 292, 298, 299, 202, 255, 257, 290, 282, 189, - 223, 234, 289, 290, 204, 203, 227, 181, 201, 294, - 282, 204, 294, 204, 223, 204, 213, 206, 181, 297, - 179, 202, 205, 204, 290, 282, 204, 294, 204, 243, - 223, 243, 294, 204, 213, 246, 298, 235, 294, 204, - 37, 50, 206, 236, 245, 181, 181, 202, 251, 252, - 251, 202 + 0, 211, 212, 0, 4, 5, 32, 34, 40, 41, + 44, 49, 58, 60, 66, 67, 69, 73, 76, 83, + 90, 94, 96, 97, 98, 99, 105, 110, 138, 143, + 144, 145, 148, 150, 154, 163, 165, 173, 174, 202, + 216, 217, 218, 219, 220, 223, 224, 230, 231, 242, + 256, 260, 262, 263, 264, 265, 266, 269, 270, 273, + 275, 276, 277, 278, 280, 281, 282, 283, 284, 286, + 288, 306, 307, 308, 309, 3, 5, 207, 3, 5, + 3, 5, 258, 96, 261, 9, 3, 5, 261, 3, + 207, 261, 262, 3, 258, 3, 258, 262, 24, 26, + 27, 28, 29, 30, 31, 33, 36, 38, 42, 43, + 45, 46, 47, 48, 50, 51, 52, 53, 54, 55, + 56, 57, 59, 61, 62, 63, 64, 65, 68, 72, + 74, 75, 77, 78, 79, 80, 81, 82, 84, 85, + 86, 87, 88, 89, 92, 95, 100, 101, 103, 104, + 106, 107, 111, 112, 113, 114, 115, 116, 118, 119, + 120, 121, 122, 123, 124, 126, 127, 129, 130, 131, + 132, 133, 134, 135, 136, 137, 139, 140, 141, 142, + 146, 149, 152, 153, 156, 157, 158, 159, 162, 164, + 166, 167, 168, 169, 170, 171, 172, 175, 232, 234, + 305, 206, 213, 213, 161, 66, 102, 109, 154, 163, + 222, 242, 263, 269, 275, 279, 286, 306, 309, 206, + 206, 204, 204, 206, 204, 206, 215, 206, 183, 274, + 204, 287, 288, 287, 287, 3, 5, 39, 71, 125, + 151, 191, 207, 236, 259, 289, 290, 303, 242, 306, + 307, 309, 287, 206, 9, 204, 206, 307, 204, 155, + 204, 207, 207, 207, 207, 207, 207, 207, 207, 207, + 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, + 207, 207, 207, 207, 207, 207, 207, 207, 207, 207, + 207, 207, 207, 207, 181, 203, 13, 91, 216, 221, + 224, 263, 265, 266, 277, 278, 281, 205, 230, 231, + 3, 3, 3, 5, 3, 3, 204, 303, 267, 212, + 128, 271, 275, 3, 5, 204, 214, 285, 289, 289, + 209, 202, 207, 229, 287, 208, 239, 240, 241, 259, + 208, 249, 207, 252, 9, 9, 12, 235, 259, 3, + 6, 7, 8, 9, 10, 11, 70, 117, 147, 160, + 186, 189, 190, 191, 194, 195, 207, 245, 246, 247, + 245, 248, 9, 9, 233, 248, 247, 9, 9, 247, + 9, 247, 245, 228, 231, 286, 247, 243, 244, 245, + 9, 305, 9, 247, 307, 243, 245, 307, 176, 177, + 178, 179, 180, 304, 307, 307, 235, 6, 7, 310, + 9, 307, 234, 202, 207, 206, 204, 215, 286, 205, + 230, 268, 205, 183, 108, 230, 254, 272, 206, 204, + 214, 205, 216, 231, 284, 289, 208, 248, 191, 203, + 245, 225, 226, 227, 228, 205, 181, 209, 205, 230, + 250, 254, 205, 231, 251, 254, 208, 208, 208, 207, + 245, 245, 245, 245, 245, 245, 245, 286, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 182, 184, 185, + 186, 187, 188, 189, 190, 191, 192, 193, 201, 202, + 181, 208, 208, 208, 181, 208, 208, 208, 208, 208, + 208, 208, 208, 208, 208, 286, 191, 207, 229, 236, + 259, 295, 297, 298, 208, 181, 208, 208, 208, 208, + 181, 208, 208, 208, 208, 208, 208, 208, 208, 201, + 208, 208, 208, 234, 9, 213, 289, 299, 215, 278, + 183, 286, 306, 206, 205, 231, 255, 256, 205, 220, + 205, 215, 203, 203, 208, 181, 241, 247, 286, 309, + 208, 206, 206, 286, 208, 191, 207, 229, 236, 291, + 293, 294, 245, 245, 3, 245, 245, 245, 245, 245, + 245, 245, 245, 245, 245, 245, 245, 245, 245, 245, + 245, 245, 3, 245, 247, 9, 297, 285, 191, 225, + 236, 296, 297, 207, 229, 244, 247, 6, 208, 205, + 181, 289, 206, 214, 215, 23, 228, 295, 301, 302, + 206, 257, 259, 293, 285, 191, 225, 236, 292, 293, + 208, 207, 229, 183, 203, 297, 285, 208, 297, 208, + 225, 208, 215, 289, 205, 183, 300, 181, 206, 204, + 208, 293, 285, 208, 297, 208, 245, 225, 245, 297, + 208, 215, 248, 301, 237, 297, 208, 38, 51, 205, + 238, 247, 183, 183, 206, 253, 254, 253, 206 }; #define yyerrok (yyerrstatus = 0) @@ -2820,7 +2876,7 @@ yyreduce: case 2: /* Line 1806 of yacc.c */ -#line 328 "parser.y" +#line 308 "parser.y" { fix_incomplete(); check_statements((yyvsp[(1) - (1)].stmt_list), FALSE); check_all_user_types((yyvsp[(1) - (1)].stmt_list)); @@ -2838,230 +2894,251 @@ yyreduce: case 3: /* Line 1806 of yacc.c */ -#line 342 "parser.y" +#line 322 "parser.y" { (yyval.stmt_list) = NULL; } break; case 4: /* Line 1806 of yacc.c */ -#line 343 "parser.y" - { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), make_statement_reference((yyvsp[(2) - (2)].type))); } +#line 324 "parser.y" + { (yyval.stmt_list) = append_statements((yyvsp[(1) - (5)].stmt_list), (yyvsp[(4) - (5)].stmt_list)); } break; case 5: /* Line 1806 of yacc.c */ -#line 344 "parser.y" - { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), make_statement_type_decl((yyvsp[(2) - (2)].type))); } +#line 325 "parser.y" + { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), make_statement_reference((yyvsp[(2) - (2)].type))); } break; case 6: /* Line 1806 of yacc.c */ -#line 345 "parser.y" +#line 326 "parser.y" + { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), make_statement_type_decl((yyvsp[(2) - (2)].type))); } + break; + + case 7: + +/* Line 1806 of yacc.c */ +#line 327 "parser.y" { (yyval.stmt_list) = (yyvsp[(1) - (3)].stmt_list); reg_type((yyvsp[(2) - (3)].type), (yyvsp[(2) - (3)].type)->name, 0); } break; - case 7: + case 8: /* Line 1806 of yacc.c */ -#line 348 "parser.y" +#line 330 "parser.y" { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), make_statement_type_decl((yyvsp[(2) - (2)].type))); reg_type((yyvsp[(2) - (2)].type), (yyvsp[(2) - (2)].type)->name, 0); } break; - case 8: + case 9: /* Line 1806 of yacc.c */ -#line 351 "parser.y" +#line 333 "parser.y" { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), make_statement_module((yyvsp[(2) - (2)].type))); } break; - case 9: + case 10: /* Line 1806 of yacc.c */ -#line 352 "parser.y" +#line 334 "parser.y" { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), make_statement_library((yyvsp[(2) - (2)].typelib))); } break; - case 10: + case 11: /* Line 1806 of yacc.c */ -#line 353 "parser.y" +#line 335 "parser.y" { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), (yyvsp[(2) - (2)].statement)); } break; - case 11: + case 12: /* Line 1806 of yacc.c */ -#line 356 "parser.y" +#line 338 "parser.y" { (yyval.stmt_list) = NULL; } break; - case 12: + case 13: /* Line 1806 of yacc.c */ -#line 357 "parser.y" +#line 339 "parser.y" { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), make_statement_reference((yyvsp[(2) - (2)].type))); } break; - case 13: + case 14: /* Line 1806 of yacc.c */ -#line 358 "parser.y" +#line 341 "parser.y" + { (yyval.stmt_list) = append_statements((yyvsp[(1) - (5)].stmt_list), (yyvsp[(4) - (5)].stmt_list)); } + break; + + case 15: + +/* Line 1806 of yacc.c */ +#line 342 "parser.y" { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), make_statement_type_decl((yyvsp[(2) - (2)].type))); } break; - case 14: + case 16: /* Line 1806 of yacc.c */ -#line 359 "parser.y" +#line 343 "parser.y" { (yyval.stmt_list) = (yyvsp[(1) - (3)].stmt_list); reg_type((yyvsp[(2) - (3)].type), (yyvsp[(2) - (3)].type)->name, 0); } break; - case 15: + case 17: /* Line 1806 of yacc.c */ -#line 360 "parser.y" +#line 344 "parser.y" { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), make_statement_type_decl((yyvsp[(2) - (2)].type))); reg_type((yyvsp[(2) - (2)].type), (yyvsp[(2) - (2)].type)->name, 0); } break; - case 16: + case 18: /* Line 1806 of yacc.c */ -#line 363 "parser.y" +#line 347 "parser.y" { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), make_statement_module((yyvsp[(2) - (2)].type))); } break; - case 17: + case 19: /* Line 1806 of yacc.c */ -#line 364 "parser.y" +#line 348 "parser.y" { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), (yyvsp[(2) - (2)].statement)); } break; - case 18: + case 20: /* Line 1806 of yacc.c */ -#line 365 "parser.y" +#line 349 "parser.y" { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), make_statement_importlib((yyvsp[(2) - (2)].str))); } break; - case 19: + case 21: /* Line 1806 of yacc.c */ -#line 366 "parser.y" +#line 350 "parser.y" { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), make_statement_library((yyvsp[(2) - (2)].typelib))); } break; - case 20: + case 22: /* Line 1806 of yacc.c */ -#line 369 "parser.y" +#line 353 "parser.y" { (yyval.stmt_list) = NULL; } break; - case 21: + case 23: /* Line 1806 of yacc.c */ -#line 370 "parser.y" +#line 354 "parser.y" { (yyval.stmt_list) = append_statement((yyvsp[(1) - (2)].stmt_list), (yyvsp[(2) - (2)].statement)); } break; - case 24: + case 26: /* Line 1806 of yacc.c */ -#line 378 "parser.y" +#line 362 "parser.y" { (yyval.statement) = make_statement_cppquote((yyvsp[(1) - (1)].str)); } break; - case 25: + case 27: /* Line 1806 of yacc.c */ -#line 379 "parser.y" +#line 363 "parser.y" { (yyval.statement) = make_statement_type_decl((yyvsp[(1) - (2)].type)); } break; - case 26: + case 28: /* Line 1806 of yacc.c */ -#line 380 "parser.y" +#line 364 "parser.y" { (yyval.statement) = make_statement_declaration((yyvsp[(1) - (2)].var)); } break; - case 27: + case 29: /* Line 1806 of yacc.c */ -#line 381 "parser.y" +#line 365 "parser.y" { (yyval.statement) = make_statement_import((yyvsp[(1) - (1)].str)); } break; - case 28: + case 30: /* Line 1806 of yacc.c */ -#line 382 "parser.y" +#line 366 "parser.y" { (yyval.statement) = (yyvsp[(1) - (2)].statement); } break; - case 30: + case 31: + +/* Line 1806 of yacc.c */ +#line 367 "parser.y" + { (yyval.statement) = make_statement_pragma((yyvsp[(1) - (1)].str)); } + break; + + case 33: /* Line 1806 of yacc.c */ -#line 387 "parser.y" +#line 372 "parser.y" { (yyval.type) = type_new_enum((yyvsp[(2) - (2)].str), FALSE, NULL); } break; - case 32: + case 35: /* Line 1806 of yacc.c */ -#line 389 "parser.y" +#line 374 "parser.y" { (yyval.type) = type_new_struct((yyvsp[(2) - (2)].str), FALSE, NULL); } break; - case 34: + case 37: /* Line 1806 of yacc.c */ -#line 391 "parser.y" +#line 376 "parser.y" { (yyval.type) = type_new_nonencapsulated_union((yyvsp[(2) - (2)].str), FALSE, NULL); } break; - case 35: + case 38: /* Line 1806 of yacc.c */ -#line 392 "parser.y" +#line 377 "parser.y" { (yyval.type) = (yyvsp[(2) - (2)].type); (yyval.type)->attrs = check_enum_attrs((yyvsp[(1) - (2)].attr_list)); } break; - case 36: + case 39: /* Line 1806 of yacc.c */ -#line 393 "parser.y" +#line 378 "parser.y" { (yyval.type) = (yyvsp[(2) - (2)].type); (yyval.type)->attrs = check_struct_attrs((yyvsp[(1) - (2)].attr_list)); } break; - case 37: + case 40: /* Line 1806 of yacc.c */ -#line 394 "parser.y" +#line 379 "parser.y" { (yyval.type) = (yyvsp[(2) - (2)].type); (yyval.type)->attrs = check_union_attrs((yyvsp[(1) - (2)].attr_list)); } break; - case 38: + case 41: /* Line 1806 of yacc.c */ -#line 397 "parser.y" +#line 382 "parser.y" { (yyval.str) = (yyvsp[(3) - (4)].str); } break; - case 39: + case 42: /* Line 1806 of yacc.c */ -#line 399 "parser.y" +#line 384 "parser.y" { assert(yychar == YYEMPTY); (yyval.import) = xmalloc(sizeof(struct _import_t)); (yyval.import)->name = (yyvsp[(2) - (3)].str); @@ -3070,81 +3147,81 @@ yyreduce: } break; - case 40: + case 43: /* Line 1806 of yacc.c */ -#line 407 "parser.y" +#line 392 "parser.y" { (yyval.str) = (yyvsp[(1) - (3)].import)->name; if ((yyvsp[(1) - (3)].import)->import_performed) pop_import(); free((yyvsp[(1) - (3)].import)); } break; - case 41: + case 44: /* Line 1806 of yacc.c */ -#line 414 "parser.y" +#line 399 "parser.y" { (yyval.str) = (yyvsp[(3) - (5)].str); if(!parse_only) add_importlib((yyvsp[(3) - (5)].str)); } break; - case 42: + case 45: /* Line 1806 of yacc.c */ -#line 417 "parser.y" +#line 402 "parser.y" { (yyval.str) = (yyvsp[(2) - (2)].str); } break; - case 43: + case 46: /* Line 1806 of yacc.c */ -#line 419 "parser.y" +#line 404 "parser.y" { (yyval.typelib) = make_library((yyvsp[(2) - (3)].str), check_library_attrs((yyvsp[(2) - (3)].str), (yyvsp[(1) - (3)].attr_list))); if (!parse_only) start_typelib((yyval.typelib)); } break; - case 44: + case 47: /* Line 1806 of yacc.c */ -#line 424 "parser.y" +#line 409 "parser.y" { (yyval.typelib) = (yyvsp[(1) - (4)].typelib); (yyval.typelib)->stmts = (yyvsp[(2) - (4)].stmt_list); if (!parse_only) end_typelib(); } break; - case 45: + case 48: /* Line 1806 of yacc.c */ -#line 430 "parser.y" +#line 415 "parser.y" { (yyval.var_list) = NULL; } break; - case 47: + case 50: /* Line 1806 of yacc.c */ -#line 434 "parser.y" +#line 419 "parser.y" { check_arg_attrs((yyvsp[(1) - (1)].var)); (yyval.var_list) = append_var( NULL, (yyvsp[(1) - (1)].var) ); } break; - case 48: + case 51: /* Line 1806 of yacc.c */ -#line 435 "parser.y" +#line 420 "parser.y" { check_arg_attrs((yyvsp[(3) - (3)].var)); (yyval.var_list) = append_var( (yyvsp[(1) - (3)].var_list), (yyvsp[(3) - (3)].var) ); } break; - case 50: + case 53: /* Line 1806 of yacc.c */ -#line 439 "parser.y" +#line 424 "parser.y" { (yyval.var_list) = append_var( (yyvsp[(1) - (3)].var_list), make_var(strdup("...")) ); } break; - case 51: + case 54: /* Line 1806 of yacc.c */ -#line 443 "parser.y" +#line 428 "parser.y" { if ((yyvsp[(2) - (3)].declspec)->stgclass != STG_NONE && (yyvsp[(2) - (3)].declspec)->stgclass != STG_REGISTER) error_loc("invalid storage class for function parameter\n"); (yyval.var) = declare_var((yyvsp[(1) - (3)].attr_list), (yyvsp[(2) - (3)].declspec), (yyvsp[(3) - (3)].declarator), TRUE); @@ -3152,10 +3229,10 @@ yyreduce: } break; - case 52: + case 55: /* Line 1806 of yacc.c */ -#line 448 "parser.y" +#line 433 "parser.y" { if ((yyvsp[(1) - (2)].declspec)->stgclass != STG_NONE && (yyvsp[(1) - (2)].declspec)->stgclass != STG_REGISTER) error_loc("invalid storage class for function parameter\n"); (yyval.var) = declare_var(NULL, (yyvsp[(1) - (2)].declspec), (yyvsp[(2) - (2)].declarator), TRUE); @@ -3163,873 +3240,880 @@ yyreduce: } break; - case 53: + case 56: /* Line 1806 of yacc.c */ -#line 455 "parser.y" +#line 440 "parser.y" { (yyval.expr) = (yyvsp[(2) - (3)].expr); if (!(yyval.expr)->is_const) error_loc("array dimension is not an integer constant\n"); } break; - case 54: + case 57: /* Line 1806 of yacc.c */ -#line 459 "parser.y" +#line 444 "parser.y" { (yyval.expr) = make_expr(EXPR_VOID); } break; - case 55: + case 58: /* Line 1806 of yacc.c */ -#line 460 "parser.y" +#line 445 "parser.y" { (yyval.expr) = make_expr(EXPR_VOID); } break; - case 56: + case 59: /* Line 1806 of yacc.c */ -#line 463 "parser.y" +#line 448 "parser.y" { (yyval.attr_list) = NULL; } break; - case 58: + case 61: /* Line 1806 of yacc.c */ -#line 468 "parser.y" +#line 453 "parser.y" { (yyval.attr_list) = (yyvsp[(2) - (3)].attr_list); } break; - case 59: + case 62: /* Line 1806 of yacc.c */ -#line 471 "parser.y" +#line 456 "parser.y" { (yyval.attr_list) = append_attr( NULL, (yyvsp[(1) - (1)].attr) ); } break; - case 60: + case 63: /* Line 1806 of yacc.c */ -#line 472 "parser.y" +#line 457 "parser.y" { (yyval.attr_list) = append_attr( (yyvsp[(1) - (3)].attr_list), (yyvsp[(3) - (3)].attr) ); } break; - case 61: + case 64: /* Line 1806 of yacc.c */ -#line 473 "parser.y" +#line 458 "parser.y" { (yyval.attr_list) = append_attr( (yyvsp[(1) - (4)].attr_list), (yyvsp[(4) - (4)].attr) ); } break; - case 62: + case 65: /* Line 1806 of yacc.c */ -#line 476 "parser.y" +#line 461 "parser.y" { (yyval.str_list) = append_str( NULL, (yyvsp[(1) - (1)].str) ); } break; - case 63: + case 66: /* Line 1806 of yacc.c */ -#line 477 "parser.y" +#line 462 "parser.y" { (yyval.str_list) = append_str( (yyvsp[(1) - (3)].str_list), (yyvsp[(3) - (3)].str) ); } break; - case 64: + case 67: /* Line 1806 of yacc.c */ -#line 480 "parser.y" +#line 465 "parser.y" { (yyval.attr) = NULL; } break; - case 65: + case 68: /* Line 1806 of yacc.c */ -#line 481 "parser.y" +#line 466 "parser.y" { (yyval.attr) = make_attr(ATTR_AGGREGATABLE); } break; - case 66: + case 69: /* Line 1806 of yacc.c */ -#line 482 "parser.y" +#line 467 "parser.y" { (yyval.attr) = make_attrp(ATTR_ANNOTATION, (yyvsp[(3) - (4)].str)); } break; - case 67: + case 70: /* Line 1806 of yacc.c */ -#line 483 "parser.y" +#line 468 "parser.y" { (yyval.attr) = make_attr(ATTR_APPOBJECT); } break; - case 68: + case 71: /* Line 1806 of yacc.c */ -#line 484 "parser.y" +#line 469 "parser.y" { (yyval.attr) = make_attr(ATTR_ASYNC); } break; - case 69: + case 72: /* Line 1806 of yacc.c */ -#line 485 "parser.y" +#line 470 "parser.y" { (yyval.attr) = make_attr(ATTR_AUTO_HANDLE); } break; - case 70: + case 73: /* Line 1806 of yacc.c */ -#line 486 "parser.y" +#line 471 "parser.y" { (yyval.attr) = make_attr(ATTR_BINDABLE); } break; - case 71: + case 74: /* Line 1806 of yacc.c */ -#line 487 "parser.y" +#line 472 "parser.y" { (yyval.attr) = make_attr(ATTR_BROADCAST); } break; - case 72: + case 75: /* Line 1806 of yacc.c */ -#line 488 "parser.y" +#line 473 "parser.y" { (yyval.attr) = make_attrp(ATTR_CALLAS, (yyvsp[(3) - (4)].var)); } break; - case 73: + case 76: /* Line 1806 of yacc.c */ -#line 489 "parser.y" +#line 474 "parser.y" { (yyval.attr) = make_attrp(ATTR_CASE, (yyvsp[(3) - (4)].expr_list)); } break; - case 74: + case 77: /* Line 1806 of yacc.c */ -#line 490 "parser.y" +#line 475 "parser.y" { (yyval.attr) = make_attr(ATTR_CODE); } break; - case 75: + case 78: /* Line 1806 of yacc.c */ -#line 491 "parser.y" +#line 476 "parser.y" { (yyval.attr) = make_attr(ATTR_COMMSTATUS); } break; - case 76: + case 79: /* Line 1806 of yacc.c */ -#line 492 "parser.y" +#line 477 "parser.y" { (yyval.attr) = make_attrv(ATTR_CONTEXTHANDLE, 0); } break; - case 77: + case 80: /* Line 1806 of yacc.c */ -#line 493 "parser.y" +#line 478 "parser.y" { (yyval.attr) = make_attrv(ATTR_CONTEXTHANDLE, 0); /* RPC_CONTEXT_HANDLE_DONT_SERIALIZE */ } break; - case 78: + case 81: /* Line 1806 of yacc.c */ -#line 494 "parser.y" +#line 479 "parser.y" { (yyval.attr) = make_attrv(ATTR_CONTEXTHANDLE, 0); /* RPC_CONTEXT_HANDLE_SERIALIZE */ } break; - case 79: + case 82: /* Line 1806 of yacc.c */ -#line 495 "parser.y" +#line 480 "parser.y" { (yyval.attr) = make_attr(ATTR_CONTROL); } break; - case 80: + case 83: /* Line 1806 of yacc.c */ -#line 496 "parser.y" +#line 481 "parser.y" { (yyval.attr) = make_attr(ATTR_DECODE); } break; - case 81: + case 84: /* Line 1806 of yacc.c */ -#line 497 "parser.y" +#line 482 "parser.y" { (yyval.attr) = make_attr(ATTR_DEFAULT); } break; - case 82: + case 85: /* Line 1806 of yacc.c */ -#line 498 "parser.y" +#line 483 "parser.y" { (yyval.attr) = make_attr(ATTR_DEFAULTBIND); } break; - case 83: + case 86: /* Line 1806 of yacc.c */ -#line 499 "parser.y" +#line 484 "parser.y" { (yyval.attr) = make_attr(ATTR_DEFAULTCOLLELEM); } break; - case 84: + case 87: /* Line 1806 of yacc.c */ -#line 500 "parser.y" +#line 485 "parser.y" { (yyval.attr) = make_attrp(ATTR_DEFAULTVALUE, (yyvsp[(3) - (4)].expr)); } break; - case 85: + case 88: /* Line 1806 of yacc.c */ -#line 501 "parser.y" +#line 486 "parser.y" { (yyval.attr) = make_attr(ATTR_DEFAULTVTABLE); } break; - case 86: + case 89: /* Line 1806 of yacc.c */ -#line 502 "parser.y" +#line 487 "parser.y" { (yyval.attr) = make_attr(ATTR_DISABLECONSISTENCYCHECK); } break; - case 87: + case 90: /* Line 1806 of yacc.c */ -#line 503 "parser.y" +#line 488 "parser.y" { (yyval.attr) = make_attr(ATTR_DISPLAYBIND); } break; - case 88: + case 91: /* Line 1806 of yacc.c */ -#line 504 "parser.y" +#line 489 "parser.y" { (yyval.attr) = make_attrp(ATTR_DLLNAME, (yyvsp[(3) - (4)].str)); } break; - case 89: + case 92: /* Line 1806 of yacc.c */ -#line 505 "parser.y" +#line 490 "parser.y" { (yyval.attr) = make_attr(ATTR_DUAL); } break; - case 90: + case 93: /* Line 1806 of yacc.c */ -#line 506 "parser.y" +#line 491 "parser.y" { (yyval.attr) = make_attr(ATTR_ENABLEALLOCATE); } break; - case 91: + case 94: /* Line 1806 of yacc.c */ -#line 507 "parser.y" +#line 492 "parser.y" { (yyval.attr) = make_attr(ATTR_ENCODE); } break; - case 92: + case 95: /* Line 1806 of yacc.c */ -#line 508 "parser.y" +#line 493 "parser.y" { (yyval.attr) = make_attrp(ATTR_ENDPOINT, (yyvsp[(3) - (4)].str_list)); } break; - case 93: + case 96: /* Line 1806 of yacc.c */ -#line 509 "parser.y" +#line 494 "parser.y" { (yyval.attr) = make_attrp(ATTR_ENTRY, (yyvsp[(3) - (4)].expr)); } break; - case 94: + case 97: /* Line 1806 of yacc.c */ -#line 510 "parser.y" +#line 495 "parser.y" { (yyval.attr) = make_attr(ATTR_EXPLICIT_HANDLE); } break; - case 95: + case 98: /* Line 1806 of yacc.c */ -#line 511 "parser.y" +#line 496 "parser.y" { (yyval.attr) = make_attr(ATTR_FAULTSTATUS); } break; - case 96: + case 99: /* Line 1806 of yacc.c */ -#line 512 "parser.y" +#line 497 "parser.y" { (yyval.attr) = make_attr(ATTR_FORCEALLOCATE); } break; - case 97: + case 100: /* Line 1806 of yacc.c */ -#line 513 "parser.y" +#line 498 "parser.y" { (yyval.attr) = make_attr(ATTR_HANDLE); } break; - case 98: + case 101: /* Line 1806 of yacc.c */ -#line 514 "parser.y" +#line 499 "parser.y" { (yyval.attr) = make_attrp(ATTR_HELPCONTEXT, (yyvsp[(3) - (4)].expr)); } break; - case 99: + case 102: /* Line 1806 of yacc.c */ -#line 515 "parser.y" +#line 500 "parser.y" { (yyval.attr) = make_attrp(ATTR_HELPFILE, (yyvsp[(3) - (4)].str)); } break; - case 100: + case 103: /* Line 1806 of yacc.c */ -#line 516 "parser.y" +#line 501 "parser.y" { (yyval.attr) = make_attrp(ATTR_HELPSTRING, (yyvsp[(3) - (4)].str)); } break; - case 101: + case 104: /* Line 1806 of yacc.c */ -#line 517 "parser.y" +#line 502 "parser.y" { (yyval.attr) = make_attrp(ATTR_HELPSTRINGCONTEXT, (yyvsp[(3) - (4)].expr)); } break; - case 102: + case 105: /* Line 1806 of yacc.c */ -#line 518 "parser.y" +#line 503 "parser.y" { (yyval.attr) = make_attrp(ATTR_HELPSTRINGDLL, (yyvsp[(3) - (4)].str)); } break; - case 103: + case 106: /* Line 1806 of yacc.c */ -#line 519 "parser.y" +#line 504 "parser.y" { (yyval.attr) = make_attr(ATTR_HIDDEN); } break; - case 104: + case 107: /* Line 1806 of yacc.c */ -#line 520 "parser.y" +#line 505 "parser.y" { (yyval.attr) = make_attrp(ATTR_ID, (yyvsp[(3) - (4)].expr)); } break; - case 105: + case 108: /* Line 1806 of yacc.c */ -#line 521 "parser.y" +#line 506 "parser.y" { (yyval.attr) = make_attr(ATTR_IDEMPOTENT); } break; - case 106: + case 109: /* Line 1806 of yacc.c */ -#line 522 "parser.y" +#line 507 "parser.y" { (yyval.attr) = make_attr(ATTR_IGNORE); } break; - case 107: + case 110: /* Line 1806 of yacc.c */ -#line 523 "parser.y" +#line 508 "parser.y" { (yyval.attr) = make_attrp(ATTR_IIDIS, (yyvsp[(3) - (4)].expr)); } break; - case 108: + case 111: /* Line 1806 of yacc.c */ -#line 524 "parser.y" +#line 509 "parser.y" { (yyval.attr) = make_attr(ATTR_IMMEDIATEBIND); } break; - case 109: + case 112: /* Line 1806 of yacc.c */ -#line 525 "parser.y" +#line 510 "parser.y" { (yyval.attr) = make_attrp(ATTR_IMPLICIT_HANDLE, (yyvsp[(3) - (4)].var)); } break; - case 110: + case 113: /* Line 1806 of yacc.c */ -#line 526 "parser.y" +#line 511 "parser.y" { (yyval.attr) = make_attr(ATTR_IN); } break; - case 111: + case 114: /* Line 1806 of yacc.c */ -#line 527 "parser.y" +#line 512 "parser.y" { (yyval.attr) = make_attr(ATTR_INPUTSYNC); } break; - case 112: + case 115: /* Line 1806 of yacc.c */ -#line 528 "parser.y" +#line 513 "parser.y" { (yyval.attr) = make_attrp(ATTR_LENGTHIS, (yyvsp[(3) - (4)].expr_list)); } break; - case 113: + case 116: /* Line 1806 of yacc.c */ -#line 529 "parser.y" +#line 514 "parser.y" { (yyval.attr) = make_attrp(ATTR_LIBLCID, (yyvsp[(3) - (4)].expr)); } break; - case 114: + case 117: /* Line 1806 of yacc.c */ -#line 530 "parser.y" +#line 515 "parser.y" { (yyval.attr) = make_attr(ATTR_PARAMLCID); } break; - case 115: + case 118: /* Line 1806 of yacc.c */ -#line 531 "parser.y" +#line 516 "parser.y" { (yyval.attr) = make_attr(ATTR_LICENSED); } break; - case 116: + case 119: /* Line 1806 of yacc.c */ -#line 532 "parser.y" +#line 517 "parser.y" { (yyval.attr) = make_attr(ATTR_LOCAL); } break; - case 117: + case 120: /* Line 1806 of yacc.c */ -#line 533 "parser.y" +#line 518 "parser.y" { (yyval.attr) = make_attr(ATTR_MAYBE); } break; - case 118: + case 121: /* Line 1806 of yacc.c */ -#line 534 "parser.y" +#line 519 "parser.y" { (yyval.attr) = make_attr(ATTR_MESSAGE); } break; - case 119: + case 122: /* Line 1806 of yacc.c */ -#line 535 "parser.y" +#line 520 "parser.y" { (yyval.attr) = make_attr(ATTR_NOCODE); } break; - case 120: + case 123: /* Line 1806 of yacc.c */ -#line 536 "parser.y" +#line 521 "parser.y" { (yyval.attr) = make_attr(ATTR_NONBROWSABLE); } break; - case 121: + case 124: /* Line 1806 of yacc.c */ -#line 537 "parser.y" +#line 522 "parser.y" { (yyval.attr) = make_attr(ATTR_NONCREATABLE); } break; - case 122: + case 125: /* Line 1806 of yacc.c */ -#line 538 "parser.y" +#line 523 "parser.y" { (yyval.attr) = make_attr(ATTR_NONEXTENSIBLE); } break; - case 123: + case 126: /* Line 1806 of yacc.c */ -#line 539 "parser.y" +#line 524 "parser.y" { (yyval.attr) = make_attr(ATTR_NOTIFY); } break; - case 124: + case 127: /* Line 1806 of yacc.c */ -#line 540 "parser.y" +#line 525 "parser.y" { (yyval.attr) = make_attr(ATTR_NOTIFYFLAG); } break; - case 125: + case 128: /* Line 1806 of yacc.c */ -#line 541 "parser.y" +#line 526 "parser.y" { (yyval.attr) = make_attr(ATTR_OBJECT); } break; - case 126: + case 129: /* Line 1806 of yacc.c */ -#line 542 "parser.y" +#line 527 "parser.y" { (yyval.attr) = make_attr(ATTR_ODL); } break; - case 127: + case 130: /* Line 1806 of yacc.c */ -#line 543 "parser.y" +#line 528 "parser.y" { (yyval.attr) = make_attr(ATTR_OLEAUTOMATION); } break; - case 128: + case 131: /* Line 1806 of yacc.c */ -#line 544 "parser.y" +#line 529 "parser.y" { (yyval.attr) = make_attrp(ATTR_OPTIMIZE, (yyvsp[(3) - (4)].str)); } break; - case 129: + case 132: /* Line 1806 of yacc.c */ -#line 545 "parser.y" +#line 530 "parser.y" { (yyval.attr) = make_attr(ATTR_OPTIONAL); } break; - case 130: + case 133: /* Line 1806 of yacc.c */ -#line 546 "parser.y" +#line 531 "parser.y" { (yyval.attr) = make_attr(ATTR_OUT); } break; - case 131: + case 134: /* Line 1806 of yacc.c */ -#line 547 "parser.y" +#line 532 "parser.y" { (yyval.attr) = make_attr(ATTR_PARTIALIGNORE); } break; - case 132: + case 135: /* Line 1806 of yacc.c */ -#line 548 "parser.y" +#line 533 "parser.y" { (yyval.attr) = make_attrv(ATTR_POINTERDEFAULT, (yyvsp[(3) - (4)].num)); } break; - case 133: + case 136: /* Line 1806 of yacc.c */ -#line 549 "parser.y" +#line 534 "parser.y" { (yyval.attr) = make_attrp(ATTR_PROGID, (yyvsp[(3) - (4)].str)); } break; - case 134: + case 137: /* Line 1806 of yacc.c */ -#line 550 "parser.y" +#line 535 "parser.y" { (yyval.attr) = make_attr(ATTR_PROPGET); } break; - case 135: + case 138: /* Line 1806 of yacc.c */ -#line 551 "parser.y" +#line 536 "parser.y" { (yyval.attr) = make_attr(ATTR_PROPPUT); } break; - case 136: + case 139: /* Line 1806 of yacc.c */ -#line 552 "parser.y" +#line 537 "parser.y" { (yyval.attr) = make_attr(ATTR_PROPPUTREF); } break; - case 137: + case 140: /* Line 1806 of yacc.c */ -#line 553 "parser.y" +#line 538 "parser.y" { (yyval.attr) = make_attr(ATTR_PROXY); } break; - case 138: + case 141: /* Line 1806 of yacc.c */ -#line 554 "parser.y" +#line 539 "parser.y" { (yyval.attr) = make_attr(ATTR_PUBLIC); } break; - case 139: + case 142: /* Line 1806 of yacc.c */ -#line 556 "parser.y" +#line 541 "parser.y" { expr_list_t *list = append_expr( NULL, (yyvsp[(3) - (6)].expr) ); list = append_expr( list, (yyvsp[(5) - (6)].expr) ); (yyval.attr) = make_attrp(ATTR_RANGE, list); } break; - case 140: + case 143: /* Line 1806 of yacc.c */ -#line 559 "parser.y" +#line 544 "parser.y" { (yyval.attr) = make_attr(ATTR_READONLY); } break; - case 141: + case 144: /* Line 1806 of yacc.c */ -#line 560 "parser.y" +#line 545 "parser.y" { (yyval.attr) = make_attrp(ATTR_REPRESENTAS, (yyvsp[(3) - (4)].type)); } break; - case 142: + case 145: /* Line 1806 of yacc.c */ -#line 561 "parser.y" +#line 546 "parser.y" { (yyval.attr) = make_attr(ATTR_REQUESTEDIT); } break; - case 143: + case 146: /* Line 1806 of yacc.c */ -#line 562 "parser.y" +#line 547 "parser.y" { (yyval.attr) = make_attr(ATTR_RESTRICTED); } break; - case 144: + case 147: /* Line 1806 of yacc.c */ -#line 563 "parser.y" +#line 548 "parser.y" { (yyval.attr) = make_attr(ATTR_RETVAL); } break; - case 145: + case 148: /* Line 1806 of yacc.c */ -#line 564 "parser.y" +#line 549 "parser.y" { (yyval.attr) = make_attrp(ATTR_SIZEIS, (yyvsp[(3) - (4)].expr_list)); } break; - case 146: + case 149: /* Line 1806 of yacc.c */ -#line 565 "parser.y" +#line 550 "parser.y" { (yyval.attr) = make_attr(ATTR_SOURCE); } break; - case 147: + case 150: /* Line 1806 of yacc.c */ -#line 566 "parser.y" +#line 551 "parser.y" { (yyval.attr) = make_attr(ATTR_STRICTCONTEXTHANDLE); } break; - case 148: + case 151: /* Line 1806 of yacc.c */ -#line 567 "parser.y" +#line 552 "parser.y" { (yyval.attr) = make_attr(ATTR_STRING); } break; - case 149: + case 152: /* Line 1806 of yacc.c */ -#line 568 "parser.y" +#line 553 "parser.y" { (yyval.attr) = make_attrp(ATTR_SWITCHIS, (yyvsp[(3) - (4)].expr)); } break; - case 150: + case 153: /* Line 1806 of yacc.c */ -#line 569 "parser.y" +#line 554 "parser.y" { (yyval.attr) = make_attrp(ATTR_SWITCHTYPE, (yyvsp[(3) - (4)].type)); } break; - case 151: + case 154: /* Line 1806 of yacc.c */ -#line 570 "parser.y" +#line 555 "parser.y" { (yyval.attr) = make_attrp(ATTR_TRANSMITAS, (yyvsp[(3) - (4)].type)); } break; - case 152: + case 155: /* Line 1806 of yacc.c */ -#line 571 "parser.y" +#line 556 "parser.y" { (yyval.attr) = make_attrv(ATTR_THREADING, (yyvsp[(3) - (4)].num)); } break; - case 153: + case 156: /* Line 1806 of yacc.c */ -#line 572 "parser.y" +#line 557 "parser.y" { (yyval.attr) = make_attr(ATTR_UIDEFAULT); } break; - case 154: + case 157: /* Line 1806 of yacc.c */ -#line 573 "parser.y" +#line 558 "parser.y" { (yyval.attr) = make_attr(ATTR_USESGETLASTERROR); } break; - case 155: + case 158: /* Line 1806 of yacc.c */ -#line 574 "parser.y" +#line 559 "parser.y" { (yyval.attr) = make_attrp(ATTR_USERMARSHAL, (yyvsp[(3) - (4)].type)); } break; - case 156: + case 159: /* Line 1806 of yacc.c */ -#line 575 "parser.y" +#line 560 "parser.y" { (yyval.attr) = make_attrp(ATTR_UUID, (yyvsp[(3) - (4)].uuid)); } break; - case 157: + case 160: + +/* Line 1806 of yacc.c */ +#line 561 "parser.y" + { (yyval.attr) = make_attrp(ATTR_ASYNCUUID, (yyvsp[(3) - (4)].uuid)); } + break; + + case 161: /* Line 1806 of yacc.c */ -#line 576 "parser.y" +#line 562 "parser.y" { (yyval.attr) = make_attr(ATTR_V1ENUM); } break; - case 158: + case 162: /* Line 1806 of yacc.c */ -#line 577 "parser.y" +#line 563 "parser.y" { (yyval.attr) = make_attr(ATTR_VARARG); } break; - case 159: + case 163: /* Line 1806 of yacc.c */ -#line 578 "parser.y" +#line 564 "parser.y" { (yyval.attr) = make_attrv(ATTR_VERSION, (yyvsp[(3) - (4)].num)); } break; - case 160: + case 164: /* Line 1806 of yacc.c */ -#line 579 "parser.y" +#line 565 "parser.y" { (yyval.attr) = make_attrp(ATTR_VIPROGID, (yyvsp[(3) - (4)].str)); } break; - case 161: + case 165: /* Line 1806 of yacc.c */ -#line 580 "parser.y" +#line 566 "parser.y" { (yyval.attr) = make_attrp(ATTR_WIREMARSHAL, (yyvsp[(3) - (4)].type)); } break; - case 162: + case 166: /* Line 1806 of yacc.c */ -#line 581 "parser.y" +#line 567 "parser.y" { (yyval.attr) = make_attrv(ATTR_POINTERTYPE, (yyvsp[(1) - (1)].num)); } break; - case 164: + case 168: /* Line 1806 of yacc.c */ -#line 586 "parser.y" +#line 572 "parser.y" { if (!is_valid_uuid((yyvsp[(1) - (1)].str))) error_loc("invalid UUID: %s\n", (yyvsp[(1) - (1)].str)); (yyval.uuid) = parse_uuid((yyvsp[(1) - (1)].str)); } break; - case 165: + case 169: /* Line 1806 of yacc.c */ -#line 591 "parser.y" +#line 577 "parser.y" { (yyval.str) = xstrdup("__cdecl"); } break; - case 166: + case 170: /* Line 1806 of yacc.c */ -#line 592 "parser.y" +#line 578 "parser.y" { (yyval.str) = xstrdup("__fastcall"); } break; - case 167: + case 171: /* Line 1806 of yacc.c */ -#line 593 "parser.y" +#line 579 "parser.y" { (yyval.str) = xstrdup("__pascal"); } break; - case 168: + case 172: /* Line 1806 of yacc.c */ -#line 594 "parser.y" +#line 580 "parser.y" { (yyval.str) = xstrdup("__stdcall"); } break; - case 169: + case 173: /* Line 1806 of yacc.c */ -#line 597 "parser.y" +#line 583 "parser.y" { (yyval.var_list) = NULL; } break; - case 170: + case 174: /* Line 1806 of yacc.c */ -#line 598 "parser.y" +#line 584 "parser.y" { (yyval.var_list) = append_var( (yyvsp[(1) - (2)].var_list), (yyvsp[(2) - (2)].var) ); } break; - case 171: + case 175: /* Line 1806 of yacc.c */ -#line 601 "parser.y" +#line 587 "parser.y" { attr_t *a = make_attrp(ATTR_CASE, append_expr( NULL, (yyvsp[(2) - (4)].expr) )); (yyval.var) = (yyvsp[(4) - (4)].var); if (!(yyval.var)) (yyval.var) = make_var(NULL); (yyval.var)->attrs = append_attr( (yyval.var)->attrs, a ); } break; - case 172: + case 176: /* Line 1806 of yacc.c */ -#line 605 "parser.y" +#line 591 "parser.y" { attr_t *a = make_attr(ATTR_DEFAULT); (yyval.var) = (yyvsp[(3) - (3)].var); if (!(yyval.var)) (yyval.var) = make_var(NULL); (yyval.var)->attrs = append_attr( (yyval.var)->attrs, a ); } break; - case 173: + case 177: /* Line 1806 of yacc.c */ -#line 611 "parser.y" +#line 597 "parser.y" { (yyval.var_list) = NULL; } break; - case 174: + case 178: /* Line 1806 of yacc.c */ -#line 612 "parser.y" +#line 598 "parser.y" { (yyval.var_list) = (yyvsp[(1) - (2)].var_list); } break; - case 176: + case 180: /* Line 1806 of yacc.c */ -#line 616 "parser.y" +#line 602 "parser.y" { if (!(yyvsp[(1) - (1)].var)->eval) (yyvsp[(1) - (1)].var)->eval = make_exprl(EXPR_NUM, 0 /* default for first enum entry */); (yyval.var_list) = append_var( NULL, (yyvsp[(1) - (1)].var) ); } break; - case 177: + case 181: /* Line 1806 of yacc.c */ -#line 620 "parser.y" +#line 606 "parser.y" { if (!(yyvsp[(3) - (3)].var)->eval) { var_t *last = LIST_ENTRY( list_tail((yyval.var_list)), var_t, entry ); @@ -4042,474 +4126,474 @@ yyreduce: } break; - case 178: + case 182: /* Line 1806 of yacc.c */ -#line 632 "parser.y" +#line 618 "parser.y" { (yyval.var) = reg_const((yyvsp[(1) - (3)].var)); (yyval.var)->eval = (yyvsp[(3) - (3)].expr); (yyval.var)->type = type_new_int(TYPE_BASIC_INT, 0); } break; - case 179: + case 183: /* Line 1806 of yacc.c */ -#line 636 "parser.y" +#line 622 "parser.y" { (yyval.var) = reg_const((yyvsp[(1) - (1)].var)); (yyval.var)->type = type_new_int(TYPE_BASIC_INT, 0); } break; - case 180: + case 184: /* Line 1806 of yacc.c */ -#line 641 "parser.y" +#line 627 "parser.y" { (yyval.type) = type_new_enum((yyvsp[(2) - (5)].str), TRUE, (yyvsp[(4) - (5)].var_list)); } break; - case 181: + case 185: /* Line 1806 of yacc.c */ -#line 644 "parser.y" +#line 630 "parser.y" { (yyval.expr_list) = append_expr( NULL, (yyvsp[(1) - (1)].expr) ); } break; - case 182: + case 186: /* Line 1806 of yacc.c */ -#line 645 "parser.y" +#line 631 "parser.y" { (yyval.expr_list) = append_expr( (yyvsp[(1) - (3)].expr_list), (yyvsp[(3) - (3)].expr) ); } break; - case 183: + case 187: /* Line 1806 of yacc.c */ -#line 648 "parser.y" +#line 634 "parser.y" { (yyval.expr) = make_expr(EXPR_VOID); } break; - case 185: + case 189: /* Line 1806 of yacc.c */ -#line 652 "parser.y" +#line 638 "parser.y" { (yyval.expr) = make_exprl(EXPR_NUM, (yyvsp[(1) - (1)].num)); } break; - case 186: + case 190: /* Line 1806 of yacc.c */ -#line 653 "parser.y" +#line 639 "parser.y" { (yyval.expr) = make_exprl(EXPR_HEXNUM, (yyvsp[(1) - (1)].num)); } break; - case 187: + case 191: /* Line 1806 of yacc.c */ -#line 654 "parser.y" +#line 640 "parser.y" { (yyval.expr) = make_exprd(EXPR_DOUBLE, (yyvsp[(1) - (1)].dbl)); } break; - case 188: + case 192: /* Line 1806 of yacc.c */ -#line 655 "parser.y" +#line 641 "parser.y" { (yyval.expr) = make_exprl(EXPR_TRUEFALSE, 0); } break; - case 189: + case 193: /* Line 1806 of yacc.c */ -#line 656 "parser.y" +#line 642 "parser.y" { (yyval.expr) = make_exprl(EXPR_NUM, 0); } break; - case 190: + case 194: /* Line 1806 of yacc.c */ -#line 657 "parser.y" +#line 643 "parser.y" { (yyval.expr) = make_exprl(EXPR_TRUEFALSE, 1); } break; - case 191: + case 195: /* Line 1806 of yacc.c */ -#line 658 "parser.y" +#line 644 "parser.y" { (yyval.expr) = make_exprs(EXPR_STRLIT, (yyvsp[(1) - (1)].str)); } break; - case 192: + case 196: /* Line 1806 of yacc.c */ -#line 659 "parser.y" +#line 645 "parser.y" { (yyval.expr) = make_exprs(EXPR_WSTRLIT, (yyvsp[(1) - (1)].str)); } break; - case 193: + case 197: /* Line 1806 of yacc.c */ -#line 660 "parser.y" +#line 646 "parser.y" { (yyval.expr) = make_exprs(EXPR_CHARCONST, (yyvsp[(1) - (1)].str)); } break; - case 194: + case 198: /* Line 1806 of yacc.c */ -#line 661 "parser.y" +#line 647 "parser.y" { (yyval.expr) = make_exprs(EXPR_IDENTIFIER, (yyvsp[(1) - (1)].str)); } break; - case 195: + case 199: /* Line 1806 of yacc.c */ -#line 662 "parser.y" +#line 648 "parser.y" { (yyval.expr) = make_expr3(EXPR_COND, (yyvsp[(1) - (5)].expr), (yyvsp[(3) - (5)].expr), (yyvsp[(5) - (5)].expr)); } break; - case 196: + case 200: /* Line 1806 of yacc.c */ -#line 663 "parser.y" +#line 649 "parser.y" { (yyval.expr) = make_expr2(EXPR_LOGOR, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } break; - case 197: + case 201: /* Line 1806 of yacc.c */ -#line 664 "parser.y" +#line 650 "parser.y" { (yyval.expr) = make_expr2(EXPR_LOGAND, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } break; - case 198: + case 202: /* Line 1806 of yacc.c */ -#line 665 "parser.y" +#line 651 "parser.y" { (yyval.expr) = make_expr2(EXPR_OR , (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } break; - case 199: + case 203: /* Line 1806 of yacc.c */ -#line 666 "parser.y" +#line 652 "parser.y" { (yyval.expr) = make_expr2(EXPR_XOR, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } break; - case 200: + case 204: /* Line 1806 of yacc.c */ -#line 667 "parser.y" +#line 653 "parser.y" { (yyval.expr) = make_expr2(EXPR_AND, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } break; - case 201: + case 205: /* Line 1806 of yacc.c */ -#line 668 "parser.y" +#line 654 "parser.y" { (yyval.expr) = make_expr2(EXPR_EQUALITY, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } break; - case 202: + case 206: /* Line 1806 of yacc.c */ -#line 669 "parser.y" +#line 655 "parser.y" { (yyval.expr) = make_expr2(EXPR_INEQUALITY, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } break; - case 203: + case 207: /* Line 1806 of yacc.c */ -#line 670 "parser.y" +#line 656 "parser.y" { (yyval.expr) = make_expr2(EXPR_GTR, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } break; - case 204: + case 208: /* Line 1806 of yacc.c */ -#line 671 "parser.y" +#line 657 "parser.y" { (yyval.expr) = make_expr2(EXPR_LESS, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } break; - case 205: + case 209: /* Line 1806 of yacc.c */ -#line 672 "parser.y" +#line 658 "parser.y" { (yyval.expr) = make_expr2(EXPR_GTREQL, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } break; - case 206: + case 210: /* Line 1806 of yacc.c */ -#line 673 "parser.y" +#line 659 "parser.y" { (yyval.expr) = make_expr2(EXPR_LESSEQL, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } break; - case 207: + case 211: /* Line 1806 of yacc.c */ -#line 674 "parser.y" +#line 660 "parser.y" { (yyval.expr) = make_expr2(EXPR_SHL, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } break; - case 208: + case 212: /* Line 1806 of yacc.c */ -#line 675 "parser.y" +#line 661 "parser.y" { (yyval.expr) = make_expr2(EXPR_SHR, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } break; - case 209: + case 213: /* Line 1806 of yacc.c */ -#line 676 "parser.y" +#line 662 "parser.y" { (yyval.expr) = make_expr2(EXPR_ADD, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } break; - case 210: + case 214: /* Line 1806 of yacc.c */ -#line 677 "parser.y" +#line 663 "parser.y" { (yyval.expr) = make_expr2(EXPR_SUB, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } break; - case 211: + case 215: /* Line 1806 of yacc.c */ -#line 678 "parser.y" +#line 664 "parser.y" { (yyval.expr) = make_expr2(EXPR_MOD, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } break; - case 212: + case 216: /* Line 1806 of yacc.c */ -#line 679 "parser.y" +#line 665 "parser.y" { (yyval.expr) = make_expr2(EXPR_MUL, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } break; - case 213: + case 217: /* Line 1806 of yacc.c */ -#line 680 "parser.y" +#line 666 "parser.y" { (yyval.expr) = make_expr2(EXPR_DIV, (yyvsp[(1) - (3)].expr), (yyvsp[(3) - (3)].expr)); } break; - case 214: + case 218: /* Line 1806 of yacc.c */ -#line 681 "parser.y" +#line 667 "parser.y" { (yyval.expr) = make_expr1(EXPR_LOGNOT, (yyvsp[(2) - (2)].expr)); } break; - case 215: + case 219: /* Line 1806 of yacc.c */ -#line 682 "parser.y" +#line 668 "parser.y" { (yyval.expr) = make_expr1(EXPR_NOT, (yyvsp[(2) - (2)].expr)); } break; - case 216: + case 220: /* Line 1806 of yacc.c */ -#line 683 "parser.y" +#line 669 "parser.y" { (yyval.expr) = make_expr1(EXPR_POS, (yyvsp[(2) - (2)].expr)); } break; - case 217: + case 221: /* Line 1806 of yacc.c */ -#line 684 "parser.y" +#line 670 "parser.y" { (yyval.expr) = make_expr1(EXPR_NEG, (yyvsp[(2) - (2)].expr)); } break; - case 218: + case 222: /* Line 1806 of yacc.c */ -#line 685 "parser.y" +#line 671 "parser.y" { (yyval.expr) = make_expr1(EXPR_ADDRESSOF, (yyvsp[(2) - (2)].expr)); } break; - case 219: + case 223: /* Line 1806 of yacc.c */ -#line 686 "parser.y" +#line 672 "parser.y" { (yyval.expr) = make_expr1(EXPR_PPTR, (yyvsp[(2) - (2)].expr)); } break; - case 220: + case 224: /* Line 1806 of yacc.c */ -#line 687 "parser.y" +#line 673 "parser.y" { (yyval.expr) = make_expr2(EXPR_MEMBER, make_expr1(EXPR_PPTR, (yyvsp[(1) - (3)].expr)), make_exprs(EXPR_IDENTIFIER, (yyvsp[(3) - (3)].str))); } break; - case 221: + case 225: /* Line 1806 of yacc.c */ -#line 688 "parser.y" +#line 674 "parser.y" { (yyval.expr) = make_expr2(EXPR_MEMBER, (yyvsp[(1) - (3)].expr), make_exprs(EXPR_IDENTIFIER, (yyvsp[(3) - (3)].str))); } break; - case 222: + case 226: /* Line 1806 of yacc.c */ -#line 690 "parser.y" +#line 676 "parser.y" { (yyval.expr) = make_exprt(EXPR_CAST, declare_var(NULL, (yyvsp[(2) - (5)].declspec), (yyvsp[(3) - (5)].declarator), 0), (yyvsp[(5) - (5)].expr)); free((yyvsp[(2) - (5)].declspec)); free((yyvsp[(3) - (5)].declarator)); } break; - case 223: + case 227: /* Line 1806 of yacc.c */ -#line 692 "parser.y" +#line 678 "parser.y" { (yyval.expr) = make_exprt(EXPR_SIZEOF, declare_var(NULL, (yyvsp[(3) - (5)].declspec), (yyvsp[(4) - (5)].declarator), 0), NULL); free((yyvsp[(3) - (5)].declspec)); free((yyvsp[(4) - (5)].declarator)); } break; - case 224: + case 228: /* Line 1806 of yacc.c */ -#line 693 "parser.y" +#line 679 "parser.y" { (yyval.expr) = make_expr2(EXPR_ARRAY, (yyvsp[(1) - (4)].expr), (yyvsp[(3) - (4)].expr)); } break; - case 225: + case 229: /* Line 1806 of yacc.c */ -#line 694 "parser.y" +#line 680 "parser.y" { (yyval.expr) = (yyvsp[(2) - (3)].expr); } break; - case 226: + case 230: /* Line 1806 of yacc.c */ -#line 697 "parser.y" +#line 683 "parser.y" { (yyval.expr_list) = append_expr( NULL, (yyvsp[(1) - (1)].expr) ); } break; - case 227: + case 231: /* Line 1806 of yacc.c */ -#line 698 "parser.y" +#line 684 "parser.y" { (yyval.expr_list) = append_expr( (yyvsp[(1) - (3)].expr_list), (yyvsp[(3) - (3)].expr) ); } break; - case 228: + case 232: /* Line 1806 of yacc.c */ -#line 701 "parser.y" +#line 687 "parser.y" { (yyval.expr) = (yyvsp[(1) - (1)].expr); if (!(yyval.expr)->is_const) error_loc("expression is not an integer constant\n"); } break; - case 229: + case 233: /* Line 1806 of yacc.c */ -#line 707 "parser.y" +#line 693 "parser.y" { (yyval.expr) = (yyvsp[(1) - (1)].expr); if (!(yyval.expr)->is_const && (yyval.expr)->type != EXPR_STRLIT && (yyval.expr)->type != EXPR_WSTRLIT) error_loc("expression is not constant\n"); } break; - case 230: + case 234: /* Line 1806 of yacc.c */ -#line 713 "parser.y" +#line 699 "parser.y" { (yyval.var_list) = NULL; } break; - case 231: + case 235: /* Line 1806 of yacc.c */ -#line 714 "parser.y" +#line 700 "parser.y" { (yyval.var_list) = append_var_list((yyvsp[(1) - (2)].var_list), (yyvsp[(2) - (2)].var_list)); } break; - case 232: + case 236: /* Line 1806 of yacc.c */ -#line 718 "parser.y" +#line 704 "parser.y" { const char *first = LIST_ENTRY(list_head((yyvsp[(3) - (4)].declarator_list)), declarator_t, entry)->var->name; check_field_attrs(first, (yyvsp[(1) - (4)].attr_list)); (yyval.var_list) = set_var_types((yyvsp[(1) - (4)].attr_list), (yyvsp[(2) - (4)].declspec), (yyvsp[(3) - (4)].declarator_list)); } break; - case 233: + case 237: /* Line 1806 of yacc.c */ -#line 722 "parser.y" +#line 708 "parser.y" { var_t *v = make_var(NULL); v->type = (yyvsp[(2) - (3)].type); v->attrs = (yyvsp[(1) - (3)].attr_list); (yyval.var_list) = append_var(NULL, v); } break; - case 234: + case 238: /* Line 1806 of yacc.c */ -#line 729 "parser.y" +#line 715 "parser.y" { (yyval.var) = (yyvsp[(1) - (2)].var); } break; - case 235: + case 239: /* Line 1806 of yacc.c */ -#line 730 "parser.y" +#line 716 "parser.y" { (yyval.var) = make_var(NULL); (yyval.var)->attrs = (yyvsp[(1) - (2)].attr_list); } break; - case 236: + case 240: /* Line 1806 of yacc.c */ -#line 733 "parser.y" +#line 719 "parser.y" { (yyval.var_list) = NULL; } break; - case 237: + case 241: /* Line 1806 of yacc.c */ -#line 734 "parser.y" +#line 720 "parser.y" { (yyval.var_list) = append_var( (yyvsp[(1) - (2)].var_list), (yyvsp[(2) - (2)].var) ); } break; - case 238: + case 242: /* Line 1806 of yacc.c */ -#line 738 "parser.y" +#line 724 "parser.y" { (yyval.var) = (yyvsp[(1) - (2)].var); } break; - case 239: + case 243: /* Line 1806 of yacc.c */ -#line 739 "parser.y" +#line 725 "parser.y" { (yyval.var) = NULL; } break; - case 240: + case 244: /* Line 1806 of yacc.c */ -#line 742 "parser.y" +#line 728 "parser.y" { (yyval.var) = declare_var(check_field_attrs((yyvsp[(3) - (3)].declarator)->var->name, (yyvsp[(1) - (3)].attr_list)), (yyvsp[(2) - (3)].declspec), (yyvsp[(3) - (3)].declarator), FALSE); free((yyvsp[(3) - (3)].declarator)); } break; - case 241: + case 245: /* Line 1806 of yacc.c */ -#line 746 "parser.y" +#line 732 "parser.y" { var_t *v = make_var(NULL); v->type = (yyvsp[(2) - (2)].type); v->attrs = (yyvsp[(1) - (2)].attr_list); (yyval.var) = v; } break; - case 242: + case 246: /* Line 1806 of yacc.c */ -#line 752 "parser.y" +#line 738 "parser.y" { (yyval.var) = (yyvsp[(1) - (1)].var); if (type_get_type((yyval.var)->type) != TYPE_FUNCTION) error_loc("only methods may be declared inside the methods section of a dispinterface\n"); @@ -4517,203 +4601,203 @@ yyreduce: } break; - case 243: + case 247: /* Line 1806 of yacc.c */ -#line 761 "parser.y" +#line 747 "parser.y" { (yyval.var) = declare_var((yyvsp[(1) - (3)].attr_list), (yyvsp[(2) - (3)].declspec), (yyvsp[(3) - (3)].declarator), FALSE); free((yyvsp[(3) - (3)].declarator)); } break; - case 244: + case 248: /* Line 1806 of yacc.c */ -#line 764 "parser.y" +#line 750 "parser.y" { (yyval.var) = declare_var(NULL, (yyvsp[(1) - (2)].declspec), (yyvsp[(2) - (2)].declarator), FALSE); free((yyvsp[(2) - (2)].declarator)); } break; - case 245: + case 249: /* Line 1806 of yacc.c */ -#line 769 "parser.y" +#line 755 "parser.y" { (yyval.var) = NULL; } break; - case 247: + case 251: /* Line 1806 of yacc.c */ -#line 773 "parser.y" +#line 759 "parser.y" { (yyval.str) = NULL; } break; - case 248: + case 252: /* Line 1806 of yacc.c */ -#line 774 "parser.y" +#line 760 "parser.y" { (yyval.str) = (yyvsp[(1) - (1)].str); } break; - case 249: + case 253: /* Line 1806 of yacc.c */ -#line 775 "parser.y" +#line 761 "parser.y" { (yyval.str) = (yyvsp[(1) - (1)].str); } break; - case 250: + case 254: /* Line 1806 of yacc.c */ -#line 778 "parser.y" +#line 764 "parser.y" { (yyval.var) = make_var((yyvsp[(1) - (1)].str)); } break; - case 251: + case 255: /* Line 1806 of yacc.c */ -#line 780 "parser.y" +#line 766 "parser.y" { (yyval.var) = make_var((yyvsp[(1) - (1)].str)); } break; - case 252: + case 256: /* Line 1806 of yacc.c */ -#line 783 "parser.y" +#line 769 "parser.y" { (yyval.type) = find_type_or_error((yyvsp[(1) - (1)].str), 0); } break; - case 253: + case 257: /* Line 1806 of yacc.c */ -#line 784 "parser.y" +#line 770 "parser.y" { (yyval.type) = find_type_or_error((yyvsp[(1) - (1)].str), 0); } break; - case 255: + case 259: /* Line 1806 of yacc.c */ -#line 786 "parser.y" +#line 772 "parser.y" { (yyval.type) = type_new_int(type_basic_get_type((yyvsp[(2) - (2)].type)), -1); } break; - case 256: + case 260: /* Line 1806 of yacc.c */ -#line 787 "parser.y" +#line 773 "parser.y" { (yyval.type) = type_new_int(type_basic_get_type((yyvsp[(2) - (2)].type)), 1); } break; - case 257: + case 261: /* Line 1806 of yacc.c */ -#line 788 "parser.y" +#line 774 "parser.y" { (yyval.type) = type_new_int(TYPE_BASIC_INT, 1); } break; - case 258: + case 262: /* Line 1806 of yacc.c */ -#line 789 "parser.y" +#line 775 "parser.y" { (yyval.type) = find_type_or_error((yyvsp[(1) - (1)].str), 0); } break; - case 259: + case 263: /* Line 1806 of yacc.c */ -#line 790 "parser.y" +#line 776 "parser.y" { (yyval.type) = find_type_or_error((yyvsp[(1) - (1)].str), 0); } break; - case 260: + case 264: /* Line 1806 of yacc.c */ -#line 791 "parser.y" +#line 777 "parser.y" { (yyval.type) = find_type_or_error((yyvsp[(1) - (1)].str), 0); } break; - case 261: + case 265: /* Line 1806 of yacc.c */ -#line 792 "parser.y" +#line 778 "parser.y" { (yyval.type) = find_type_or_error((yyvsp[(1) - (1)].str), 0); } break; - case 262: + case 266: /* Line 1806 of yacc.c */ -#line 793 "parser.y" +#line 779 "parser.y" { (yyval.type) = find_type_or_error((yyvsp[(1) - (1)].str), 0); } break; - case 265: + case 269: /* Line 1806 of yacc.c */ -#line 800 "parser.y" +#line 786 "parser.y" { (yyval.type) = type_new_int(TYPE_BASIC_INT, 0); } break; - case 266: + case 270: /* Line 1806 of yacc.c */ -#line 801 "parser.y" +#line 787 "parser.y" { (yyval.type) = type_new_int(TYPE_BASIC_INT16, 0); } break; - case 267: + case 271: /* Line 1806 of yacc.c */ -#line 802 "parser.y" +#line 788 "parser.y" { (yyval.type) = type_new_int(TYPE_BASIC_INT8, 0); } break; - case 268: + case 272: /* Line 1806 of yacc.c */ -#line 803 "parser.y" +#line 789 "parser.y" { (yyval.type) = type_new_int(TYPE_BASIC_INT32, 0); } break; - case 269: + case 273: /* Line 1806 of yacc.c */ -#line 804 "parser.y" +#line 790 "parser.y" { (yyval.type) = type_new_int(TYPE_BASIC_HYPER, 0); } break; - case 270: + case 274: /* Line 1806 of yacc.c */ -#line 805 "parser.y" +#line 791 "parser.y" { (yyval.type) = type_new_int(TYPE_BASIC_INT64, 0); } break; - case 271: + case 275: /* Line 1806 of yacc.c */ -#line 806 "parser.y" +#line 792 "parser.y" { (yyval.type) = type_new_int(TYPE_BASIC_CHAR, 0); } break; - case 272: + case 276: /* Line 1806 of yacc.c */ -#line 807 "parser.y" +#line 793 "parser.y" { (yyval.type) = type_new_int(TYPE_BASIC_INT3264, 0); } break; - case 273: + case 277: /* Line 1806 of yacc.c */ -#line 810 "parser.y" +#line 796 "parser.y" { (yyval.type) = type_new_coclass((yyvsp[(2) - (2)].str)); } break; - case 274: + case 278: /* Line 1806 of yacc.c */ -#line 811 "parser.y" +#line 797 "parser.y" { (yyval.type) = find_type((yyvsp[(2) - (2)].str), 0); if (type_get_type_detect_alias((yyval.type)) != TYPE_COCLASS) error_loc("%s was not declared a coclass at %s:%d\n", @@ -4722,62 +4806,69 @@ yyreduce: } break; - case 275: + case 279: /* Line 1806 of yacc.c */ -#line 819 "parser.y" +#line 805 "parser.y" { (yyval.type) = (yyvsp[(2) - (2)].type); check_def((yyval.type)); (yyval.type)->attrs = check_coclass_attrs((yyvsp[(2) - (2)].type)->name, (yyvsp[(1) - (2)].attr_list)); } break; - case 276: + case 280: /* Line 1806 of yacc.c */ -#line 826 "parser.y" +#line 812 "parser.y" { (yyval.type) = type_coclass_define((yyvsp[(1) - (5)].type), (yyvsp[(3) - (5)].ifref_list)); } break; - case 277: + case 281: + +/* Line 1806 of yacc.c */ +#line 815 "parser.y" + { (yyval.type) = NULL; } + break; + + case 282: /* Line 1806 of yacc.c */ -#line 829 "parser.y" +#line 818 "parser.y" { (yyval.ifref_list) = NULL; } break; - case 278: + case 283: /* Line 1806 of yacc.c */ -#line 830 "parser.y" +#line 819 "parser.y" { (yyval.ifref_list) = append_ifref( (yyvsp[(1) - (2)].ifref_list), (yyvsp[(2) - (2)].ifref) ); } break; - case 279: + case 284: /* Line 1806 of yacc.c */ -#line 834 "parser.y" +#line 823 "parser.y" { (yyval.ifref) = make_ifref((yyvsp[(2) - (2)].type)); (yyval.ifref)->attrs = (yyvsp[(1) - (2)].attr_list); } break; - case 280: + case 285: /* Line 1806 of yacc.c */ -#line 837 "parser.y" +#line 826 "parser.y" { (yyval.type) = get_type(TYPE_INTERFACE, (yyvsp[(2) - (2)].str), 0); } break; - case 281: + case 286: /* Line 1806 of yacc.c */ -#line 838 "parser.y" +#line 827 "parser.y" { (yyval.type) = get_type(TYPE_INTERFACE, (yyvsp[(2) - (2)].str), 0); } break; - case 282: + case 287: /* Line 1806 of yacc.c */ -#line 841 "parser.y" +#line 830 "parser.y" { attr_t *attrs; (yyval.type) = (yyvsp[(2) - (2)].type); check_def((yyval.type)); @@ -4787,84 +4878,84 @@ yyreduce: } break; - case 283: + case 288: /* Line 1806 of yacc.c */ -#line 850 "parser.y" +#line 839 "parser.y" { (yyval.var_list) = NULL; } break; - case 284: + case 289: /* Line 1806 of yacc.c */ -#line 851 "parser.y" +#line 840 "parser.y" { (yyval.var_list) = append_var( (yyvsp[(1) - (3)].var_list), (yyvsp[(2) - (3)].var) ); } break; - case 285: + case 290: /* Line 1806 of yacc.c */ -#line 854 "parser.y" +#line 843 "parser.y" { (yyval.var_list) = NULL; } break; - case 286: + case 291: /* Line 1806 of yacc.c */ -#line 855 "parser.y" +#line 844 "parser.y" { (yyval.var_list) = append_var( (yyvsp[(1) - (3)].var_list), (yyvsp[(2) - (3)].var) ); } break; - case 287: + case 292: /* Line 1806 of yacc.c */ -#line 861 "parser.y" +#line 850 "parser.y" { (yyval.type) = (yyvsp[(1) - (5)].type); type_dispinterface_define((yyval.type), (yyvsp[(3) - (5)].var_list), (yyvsp[(4) - (5)].var_list)); } break; - case 288: + case 293: /* Line 1806 of yacc.c */ -#line 865 "parser.y" +#line 854 "parser.y" { (yyval.type) = (yyvsp[(1) - (5)].type); type_dispinterface_define_from_iface((yyval.type), (yyvsp[(3) - (5)].type)); } break; - case 289: + case 294: /* Line 1806 of yacc.c */ -#line 870 "parser.y" +#line 859 "parser.y" { (yyval.type) = NULL; } break; - case 290: + case 295: /* Line 1806 of yacc.c */ -#line 871 "parser.y" +#line 860 "parser.y" { (yyval.type) = find_type_or_error2((yyvsp[(2) - (2)].str), 0); } break; - case 291: + case 296: /* Line 1806 of yacc.c */ -#line 874 "parser.y" +#line 863 "parser.y" { (yyval.type) = get_type(TYPE_INTERFACE, (yyvsp[(2) - (2)].str), 0); } break; - case 292: + case 297: /* Line 1806 of yacc.c */ -#line 875 "parser.y" +#line 864 "parser.y" { (yyval.type) = get_type(TYPE_INTERFACE, (yyvsp[(2) - (2)].str), 0); } break; - case 293: + case 298: /* Line 1806 of yacc.c */ -#line 878 "parser.y" +#line 867 "parser.y" { (yyval.ifinfo).interface = (yyvsp[(2) - (2)].type); (yyval.ifinfo).old_pointer_default = pointer_default; if (is_attr((yyvsp[(1) - (2)].attr_list), ATTR_POINTERDEFAULT)) @@ -4875,617 +4966,627 @@ yyreduce: } break; - case 294: + case 299: /* Line 1806 of yacc.c */ -#line 889 "parser.y" +#line 878 "parser.y" { (yyval.type) = (yyvsp[(1) - (6)].ifinfo).interface; + if((yyval.type) == (yyvsp[(2) - (6)].type)) + error_loc("Interface can't inherit from itself\n"); type_interface_define((yyval.type), (yyvsp[(2) - (6)].type), (yyvsp[(4) - (6)].stmt_list)); pointer_default = (yyvsp[(1) - (6)].ifinfo).old_pointer_default; } break; - case 295: + case 300: /* Line 1806 of yacc.c */ -#line 897 "parser.y" +#line 888 "parser.y" { (yyval.type) = (yyvsp[(1) - (8)].ifinfo).interface; type_interface_define((yyval.type), find_type_or_error2((yyvsp[(3) - (8)].str), 0), (yyvsp[(6) - (8)].stmt_list)); pointer_default = (yyvsp[(1) - (8)].ifinfo).old_pointer_default; } break; - case 296: + case 301: /* Line 1806 of yacc.c */ -#line 901 "parser.y" +#line 892 "parser.y" { (yyval.type) = (yyvsp[(1) - (2)].type); } break; - case 297: + case 302: /* Line 1806 of yacc.c */ -#line 905 "parser.y" +#line 896 "parser.y" { (yyval.type) = (yyvsp[(1) - (2)].type); } break; - case 298: + case 303: /* Line 1806 of yacc.c */ -#line 906 "parser.y" +#line 897 "parser.y" { (yyval.type) = (yyvsp[(1) - (2)].type); } break; - case 299: + case 304: /* Line 1806 of yacc.c */ -#line 909 "parser.y" +#line 900 "parser.y" { (yyval.type) = type_new_module((yyvsp[(2) - (2)].str)); } break; - case 300: + case 305: /* Line 1806 of yacc.c */ -#line 910 "parser.y" +#line 901 "parser.y" { (yyval.type) = type_new_module((yyvsp[(2) - (2)].str)); } break; - case 301: + case 306: /* Line 1806 of yacc.c */ -#line 913 "parser.y" +#line 904 "parser.y" { (yyval.type) = (yyvsp[(2) - (2)].type); (yyval.type)->attrs = check_module_attrs((yyvsp[(2) - (2)].type)->name, (yyvsp[(1) - (2)].attr_list)); } break; - case 302: + case 307: /* Line 1806 of yacc.c */ -#line 919 "parser.y" +#line 910 "parser.y" { (yyval.type) = (yyvsp[(1) - (5)].type); type_module_define((yyval.type), (yyvsp[(3) - (5)].stmt_list)); } break; - case 303: + case 308: /* Line 1806 of yacc.c */ -#line 925 "parser.y" +#line 916 "parser.y" { (yyval.stgclass) = STG_EXTERN; } break; - case 304: + case 309: /* Line 1806 of yacc.c */ -#line 926 "parser.y" +#line 917 "parser.y" { (yyval.stgclass) = STG_STATIC; } break; - case 305: + case 310: /* Line 1806 of yacc.c */ -#line 927 "parser.y" +#line 918 "parser.y" { (yyval.stgclass) = STG_REGISTER; } break; - case 306: + case 311: /* Line 1806 of yacc.c */ -#line 931 "parser.y" +#line 922 "parser.y" { (yyval.attr) = make_attr(ATTR_INLINE); } break; - case 307: + case 312: /* Line 1806 of yacc.c */ -#line 935 "parser.y" +#line 926 "parser.y" { (yyval.attr) = make_attr(ATTR_CONST); } break; - case 308: + case 313: /* Line 1806 of yacc.c */ -#line 938 "parser.y" +#line 929 "parser.y" { (yyval.attr_list) = NULL; } break; - case 309: + case 314: /* Line 1806 of yacc.c */ -#line 939 "parser.y" +#line 930 "parser.y" { (yyval.attr_list) = append_attr((yyvsp[(1) - (2)].attr_list), (yyvsp[(2) - (2)].attr)); } break; - case 310: + case 315: /* Line 1806 of yacc.c */ -#line 942 "parser.y" +#line 933 "parser.y" { (yyval.declspec) = make_decl_spec((yyvsp[(1) - (2)].type), (yyvsp[(2) - (2)].declspec), NULL, NULL, STG_NONE); } break; - case 311: + case 316: /* Line 1806 of yacc.c */ -#line 944 "parser.y" +#line 935 "parser.y" { (yyval.declspec) = make_decl_spec((yyvsp[(2) - (3)].type), (yyvsp[(1) - (3)].declspec), (yyvsp[(3) - (3)].declspec), NULL, STG_NONE); } break; - case 312: + case 317: /* Line 1806 of yacc.c */ -#line 947 "parser.y" +#line 938 "parser.y" { (yyval.declspec) = NULL; } break; - case 314: + case 319: /* Line 1806 of yacc.c */ -#line 952 "parser.y" +#line 943 "parser.y" { (yyval.declspec) = make_decl_spec(NULL, (yyvsp[(2) - (2)].declspec), NULL, (yyvsp[(1) - (2)].attr), STG_NONE); } break; - case 315: + case 320: /* Line 1806 of yacc.c */ -#line 953 "parser.y" +#line 944 "parser.y" { (yyval.declspec) = make_decl_spec(NULL, (yyvsp[(2) - (2)].declspec), NULL, (yyvsp[(1) - (2)].attr), STG_NONE); } break; - case 316: + case 321: /* Line 1806 of yacc.c */ -#line 954 "parser.y" +#line 945 "parser.y" { (yyval.declspec) = make_decl_spec(NULL, (yyvsp[(2) - (2)].declspec), NULL, NULL, (yyvsp[(1) - (2)].stgclass)); } break; - case 317: + case 322: /* Line 1806 of yacc.c */ -#line 959 "parser.y" +#line 950 "parser.y" { (yyval.declarator) = (yyvsp[(3) - (3)].declarator); (yyval.declarator)->type = append_ptrchain_type((yyval.declarator)->type, type_new_pointer(pointer_default, NULL, (yyvsp[(2) - (3)].attr_list))); } break; - case 318: + case 323: /* Line 1806 of yacc.c */ -#line 960 "parser.y" +#line 951 "parser.y" { (yyval.declarator) = (yyvsp[(2) - (2)].declarator); if ((yyval.declarator)->func_type) (yyval.declarator)->func_type->attrs = append_attr((yyval.declarator)->func_type->attrs, make_attrp(ATTR_CALLCONV, (yyvsp[(1) - (2)].str))); else if ((yyval.declarator)->type) (yyval.declarator)->type->attrs = append_attr((yyval.declarator)->type->attrs, make_attrp(ATTR_CALLCONV, (yyvsp[(1) - (2)].str))); } break; - case 320: + case 325: /* Line 1806 of yacc.c */ -#line 966 "parser.y" +#line 957 "parser.y" { (yyval.declarator) = make_declarator((yyvsp[(1) - (1)].var)); } break; - case 321: + case 326: /* Line 1806 of yacc.c */ -#line 967 "parser.y" +#line 958 "parser.y" { (yyval.declarator) = (yyvsp[(2) - (3)].declarator); } break; - case 322: + case 327: /* Line 1806 of yacc.c */ -#line 968 "parser.y" +#line 959 "parser.y" { (yyval.declarator) = (yyvsp[(1) - (2)].declarator); (yyval.declarator)->array = append_array((yyval.declarator)->array, (yyvsp[(2) - (2)].expr)); } break; - case 323: + case 328: /* Line 1806 of yacc.c */ -#line 969 "parser.y" +#line 960 "parser.y" { (yyval.declarator) = (yyvsp[(1) - (4)].declarator); (yyval.declarator)->func_type = append_ptrchain_type((yyval.declarator)->type, type_new_function((yyvsp[(3) - (4)].var_list))); (yyval.declarator)->type = NULL; } break; - case 324: + case 329: /* Line 1806 of yacc.c */ -#line 978 "parser.y" +#line 969 "parser.y" { (yyval.declarator) = (yyvsp[(3) - (3)].declarator); (yyval.declarator)->type = append_ptrchain_type((yyval.declarator)->type, type_new_pointer(pointer_default, NULL, (yyvsp[(2) - (3)].attr_list))); } break; - case 325: + case 330: /* Line 1806 of yacc.c */ -#line 979 "parser.y" +#line 970 "parser.y" { (yyval.declarator) = (yyvsp[(2) - (2)].declarator); if ((yyval.declarator)->func_type) (yyval.declarator)->func_type->attrs = append_attr((yyval.declarator)->func_type->attrs, make_attrp(ATTR_CALLCONV, (yyvsp[(1) - (2)].str))); else if ((yyval.declarator)->type) (yyval.declarator)->type->attrs = append_attr((yyval.declarator)->type->attrs, make_attrp(ATTR_CALLCONV, (yyvsp[(1) - (2)].str))); } break; - case 327: + case 332: /* Line 1806 of yacc.c */ -#line 987 "parser.y" +#line 978 "parser.y" { (yyval.declarator) = (yyvsp[(3) - (3)].declarator); (yyval.declarator)->type = append_ptrchain_type((yyval.declarator)->type, type_new_pointer(pointer_default, NULL, (yyvsp[(2) - (3)].attr_list))); } break; - case 328: + case 333: /* Line 1806 of yacc.c */ -#line 988 "parser.y" +#line 979 "parser.y" { (yyval.declarator) = (yyvsp[(2) - (2)].declarator); if ((yyval.declarator)->func_type) (yyval.declarator)->func_type->attrs = append_attr((yyval.declarator)->func_type->attrs, make_attrp(ATTR_CALLCONV, (yyvsp[(1) - (2)].str))); else if ((yyval.declarator)->type) (yyval.declarator)->type->attrs = append_attr((yyval.declarator)->type->attrs, make_attrp(ATTR_CALLCONV, (yyvsp[(1) - (2)].str))); } break; - case 329: + case 334: /* Line 1806 of yacc.c */ -#line 993 "parser.y" +#line 984 "parser.y" { (yyval.declarator) = make_declarator(NULL); } break; - case 331: + case 336: /* Line 1806 of yacc.c */ -#line 999 "parser.y" +#line 990 "parser.y" { (yyval.declarator) = (yyvsp[(2) - (3)].declarator); } break; - case 332: + case 337: /* Line 1806 of yacc.c */ -#line 1000 "parser.y" +#line 991 "parser.y" { (yyval.declarator) = (yyvsp[(1) - (2)].declarator); (yyval.declarator)->array = append_array((yyval.declarator)->array, (yyvsp[(2) - (2)].expr)); } break; - case 333: + case 338: /* Line 1806 of yacc.c */ -#line 1001 "parser.y" +#line 992 "parser.y" { (yyval.declarator) = make_declarator(NULL); (yyval.declarator)->array = append_array((yyval.declarator)->array, (yyvsp[(1) - (1)].expr)); } break; - case 334: + case 339: /* Line 1806 of yacc.c */ -#line 1003 "parser.y" +#line 994 "parser.y" { (yyval.declarator) = make_declarator(NULL); (yyval.declarator)->func_type = append_ptrchain_type((yyval.declarator)->type, type_new_function((yyvsp[(2) - (3)].var_list))); (yyval.declarator)->type = NULL; } break; - case 335: + case 340: /* Line 1806 of yacc.c */ -#line 1008 "parser.y" +#line 999 "parser.y" { (yyval.declarator) = (yyvsp[(1) - (4)].declarator); (yyval.declarator)->func_type = append_ptrchain_type((yyval.declarator)->type, type_new_function((yyvsp[(3) - (4)].var_list))); (yyval.declarator)->type = NULL; } break; - case 336: + case 341: /* Line 1806 of yacc.c */ -#line 1017 "parser.y" +#line 1008 "parser.y" { (yyval.declarator) = (yyvsp[(3) - (3)].declarator); (yyval.declarator)->type = append_ptrchain_type((yyval.declarator)->type, type_new_pointer(pointer_default, NULL, (yyvsp[(2) - (3)].attr_list))); } break; - case 337: + case 342: /* Line 1806 of yacc.c */ -#line 1018 "parser.y" +#line 1009 "parser.y" { (yyval.declarator) = (yyvsp[(2) - (2)].declarator); (yyval.declarator)->type->attrs = append_attr((yyval.declarator)->type->attrs, make_attrp(ATTR_CALLCONV, (yyvsp[(1) - (2)].str))); } break; - case 339: + case 344: /* Line 1806 of yacc.c */ -#line 1025 "parser.y" +#line 1016 "parser.y" { (yyval.declarator) = (yyvsp[(3) - (3)].declarator); (yyval.declarator)->type = append_ptrchain_type((yyval.declarator)->type, type_new_pointer(pointer_default, NULL, (yyvsp[(2) - (3)].attr_list))); } break; - case 340: + case 345: /* Line 1806 of yacc.c */ -#line 1026 "parser.y" +#line 1017 "parser.y" { (yyval.declarator) = (yyvsp[(2) - (2)].declarator); (yyval.declarator)->type->attrs = append_attr((yyval.declarator)->type->attrs, make_attrp(ATTR_CALLCONV, (yyvsp[(1) - (2)].str))); } break; - case 341: + case 346: /* Line 1806 of yacc.c */ -#line 1030 "parser.y" +#line 1021 "parser.y" { (yyval.declarator) = make_declarator(NULL); } break; - case 343: + case 348: /* Line 1806 of yacc.c */ -#line 1038 "parser.y" +#line 1029 "parser.y" { (yyval.declarator) = make_declarator((yyvsp[(1) - (1)].var)); } break; - case 344: + case 349: /* Line 1806 of yacc.c */ -#line 1039 "parser.y" +#line 1030 "parser.y" { (yyval.declarator) = (yyvsp[(2) - (3)].declarator); } break; - case 345: + case 350: /* Line 1806 of yacc.c */ -#line 1040 "parser.y" +#line 1031 "parser.y" { (yyval.declarator) = (yyvsp[(1) - (2)].declarator); (yyval.declarator)->array = append_array((yyval.declarator)->array, (yyvsp[(2) - (2)].expr)); } break; - case 346: + case 351: /* Line 1806 of yacc.c */ -#line 1041 "parser.y" +#line 1032 "parser.y" { (yyval.declarator) = make_declarator(NULL); (yyval.declarator)->array = append_array((yyval.declarator)->array, (yyvsp[(1) - (1)].expr)); } break; - case 347: + case 352: /* Line 1806 of yacc.c */ -#line 1043 "parser.y" +#line 1034 "parser.y" { (yyval.declarator) = make_declarator(NULL); (yyval.declarator)->func_type = append_ptrchain_type((yyval.declarator)->type, type_new_function((yyvsp[(2) - (3)].var_list))); (yyval.declarator)->type = NULL; } break; - case 348: + case 353: /* Line 1806 of yacc.c */ -#line 1048 "parser.y" +#line 1039 "parser.y" { (yyval.declarator) = (yyvsp[(1) - (4)].declarator); (yyval.declarator)->func_type = append_ptrchain_type((yyval.declarator)->type, type_new_function((yyvsp[(3) - (4)].var_list))); (yyval.declarator)->type = NULL; } break; - case 349: + case 354: /* Line 1806 of yacc.c */ -#line 1055 "parser.y" +#line 1046 "parser.y" { (yyval.declarator_list) = append_declarator( NULL, (yyvsp[(1) - (1)].declarator) ); } break; - case 350: + case 355: /* Line 1806 of yacc.c */ -#line 1056 "parser.y" +#line 1047 "parser.y" { (yyval.declarator_list) = append_declarator( (yyvsp[(1) - (3)].declarator_list), (yyvsp[(3) - (3)].declarator) ); } break; - case 351: + case 356: /* Line 1806 of yacc.c */ -#line 1059 "parser.y" +#line 1050 "parser.y" { (yyval.expr) = NULL; } break; - case 352: + case 357: /* Line 1806 of yacc.c */ -#line 1060 "parser.y" +#line 1051 "parser.y" { (yyval.expr) = (yyvsp[(2) - (2)].expr); } break; - case 353: + case 358: /* Line 1806 of yacc.c */ -#line 1063 "parser.y" +#line 1054 "parser.y" { (yyval.declarator) = (yyvsp[(1) - (2)].declarator); (yyval.declarator)->bits = (yyvsp[(2) - (2)].expr); if (!(yyval.declarator)->bits && !(yyval.declarator)->var->name) error_loc("unnamed fields are not allowed\n"); } break; - case 354: + case 359: /* Line 1806 of yacc.c */ -#line 1070 "parser.y" +#line 1061 "parser.y" { (yyval.declarator_list) = append_declarator( NULL, (yyvsp[(1) - (1)].declarator) ); } break; - case 355: + case 360: /* Line 1806 of yacc.c */ -#line 1072 "parser.y" +#line 1063 "parser.y" { (yyval.declarator_list) = append_declarator( (yyvsp[(1) - (3)].declarator_list), (yyvsp[(3) - (3)].declarator) ); } break; - case 356: + case 361: /* Line 1806 of yacc.c */ -#line 1076 "parser.y" +#line 1067 "parser.y" { (yyval.declarator) = (yyvsp[(1) - (1)].declarator); } break; - case 357: + case 362: /* Line 1806 of yacc.c */ -#line 1077 "parser.y" +#line 1068 "parser.y" { (yyval.declarator) = (yyvsp[(1) - (3)].declarator); (yyvsp[(1) - (3)].declarator)->var->eval = (yyvsp[(3) - (3)].expr); } break; - case 358: + case 363: /* Line 1806 of yacc.c */ -#line 1081 "parser.y" +#line 1072 "parser.y" { (yyval.num) = THREADING_APARTMENT; } break; - case 359: + case 364: /* Line 1806 of yacc.c */ -#line 1082 "parser.y" +#line 1073 "parser.y" { (yyval.num) = THREADING_NEUTRAL; } break; - case 360: + case 365: /* Line 1806 of yacc.c */ -#line 1083 "parser.y" +#line 1074 "parser.y" { (yyval.num) = THREADING_SINGLE; } break; - case 361: + case 366: /* Line 1806 of yacc.c */ -#line 1084 "parser.y" +#line 1075 "parser.y" { (yyval.num) = THREADING_FREE; } break; - case 362: + case 367: /* Line 1806 of yacc.c */ -#line 1085 "parser.y" +#line 1076 "parser.y" { (yyval.num) = THREADING_BOTH; } break; - case 363: + case 368: /* Line 1806 of yacc.c */ -#line 1089 "parser.y" +#line 1080 "parser.y" { (yyval.num) = RPC_FC_RP; } break; - case 364: + case 369: /* Line 1806 of yacc.c */ -#line 1090 "parser.y" +#line 1081 "parser.y" { (yyval.num) = RPC_FC_UP; } break; - case 365: + case 370: /* Line 1806 of yacc.c */ -#line 1091 "parser.y" +#line 1082 "parser.y" { (yyval.num) = RPC_FC_FP; } break; - case 366: + case 371: /* Line 1806 of yacc.c */ -#line 1094 "parser.y" +#line 1085 "parser.y" { (yyval.type) = type_new_struct((yyvsp[(2) - (5)].str), TRUE, (yyvsp[(4) - (5)].var_list)); } break; - case 367: + case 372: /* Line 1806 of yacc.c */ -#line 1097 "parser.y" +#line 1088 "parser.y" { (yyval.type) = type_new_void(); } break; - case 368: + case 373: /* Line 1806 of yacc.c */ -#line 1098 "parser.y" +#line 1089 "parser.y" { (yyval.type) = find_type_or_error((yyvsp[(1) - (1)].str), 0); } break; - case 369: + case 374: /* Line 1806 of yacc.c */ -#line 1099 "parser.y" +#line 1090 "parser.y" { (yyval.type) = (yyvsp[(1) - (1)].type); } break; - case 370: + case 375: /* Line 1806 of yacc.c */ -#line 1100 "parser.y" +#line 1091 "parser.y" { (yyval.type) = (yyvsp[(1) - (1)].type); } break; - case 371: + case 376: /* Line 1806 of yacc.c */ -#line 1101 "parser.y" +#line 1092 "parser.y" { (yyval.type) = type_new_enum((yyvsp[(2) - (2)].str), FALSE, NULL); } break; - case 372: + case 377: /* Line 1806 of yacc.c */ -#line 1102 "parser.y" +#line 1093 "parser.y" { (yyval.type) = (yyvsp[(1) - (1)].type); } break; - case 373: + case 378: /* Line 1806 of yacc.c */ -#line 1103 "parser.y" +#line 1094 "parser.y" { (yyval.type) = type_new_struct((yyvsp[(2) - (2)].str), FALSE, NULL); } break; - case 374: + case 379: /* Line 1806 of yacc.c */ -#line 1104 "parser.y" +#line 1095 "parser.y" { (yyval.type) = (yyvsp[(1) - (1)].type); } break; - case 375: + case 380: /* Line 1806 of yacc.c */ -#line 1105 "parser.y" +#line 1096 "parser.y" { (yyval.type) = type_new_nonencapsulated_union((yyvsp[(2) - (2)].str), FALSE, NULL); } break; - case 376: + case 381: /* Line 1806 of yacc.c */ -#line 1106 "parser.y" +#line 1097 "parser.y" { (yyval.type) = make_safearray((yyvsp[(3) - (4)].type)); } break; - case 377: + case 382: /* Line 1806 of yacc.c */ -#line 1110 "parser.y" - { reg_typedefs((yyvsp[(3) - (4)].declspec), (yyvsp[(4) - (4)].declarator_list), check_typedef_attrs((yyvsp[(2) - (4)].attr_list))); - (yyval.statement) = make_statement_typedef((yyvsp[(4) - (4)].declarator_list)); +#line 1101 "parser.y" + { (yyvsp[(1) - (5)].attr_list) = append_attribs((yyvsp[(1) - (5)].attr_list), (yyvsp[(3) - (5)].attr_list)); + reg_typedefs((yyvsp[(4) - (5)].declspec), (yyvsp[(5) - (5)].declarator_list), check_typedef_attrs((yyvsp[(1) - (5)].attr_list))); + (yyval.statement) = make_statement_typedef((yyvsp[(5) - (5)].declarator_list)); } break; - case 378: + case 383: /* Line 1806 of yacc.c */ -#line 1116 "parser.y" +#line 1108 "parser.y" { (yyval.type) = type_new_nonencapsulated_union((yyvsp[(2) - (5)].str), TRUE, (yyvsp[(4) - (5)].var_list)); } break; - case 379: + case 384: /* Line 1806 of yacc.c */ -#line 1119 "parser.y" +#line 1111 "parser.y" { (yyval.type) = type_new_encapsulated_union((yyvsp[(2) - (10)].str), (yyvsp[(5) - (10)].var), (yyvsp[(7) - (10)].var), (yyvsp[(9) - (10)].var_list)); } break; - case 380: + case 385: /* Line 1806 of yacc.c */ -#line 1123 "parser.y" +#line 1115 "parser.y" { (yyval.num) = MAKEVERSION((yyvsp[(1) - (1)].num), 0); } break; - case 381: + case 386: /* Line 1806 of yacc.c */ -#line 1124 "parser.y" +#line 1116 "parser.y" { (yyval.num) = MAKEVERSION((yyvsp[(1) - (3)].num), (yyvsp[(3) - (3)].num)); } break; + case 387: + +/* Line 1806 of yacc.c */ +#line 1117 "parser.y" + { (yyval.num) = (yyvsp[(1) - (1)].num); } + break; + /* Line 1806 of yacc.c */ -#line 5489 "parser.tab.c" +#line 5590 "parser.tab.c" default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -5716,7 +5817,7 @@ yyreturn: /* Line 2067 of yacc.c */ -#line 1127 "parser.y" +#line 1120 "parser.y" static void decl_builtin_basic(const char *name, enum type_basic_type type) @@ -6017,11 +6118,6 @@ static var_t *declare_var(attr_list_t *attrs, decl_spec_t *decl_spec, const decl array_dims_t *arr = decl ? decl->array : NULL; type_t *func_type = decl ? decl->func_type : NULL; type_t *type = decl_spec->type; - - /* In case of a range attribute, duplicate the type to keep track of - * the min/max values in the type format string */ - if(is_attr(attrs, ATTR_RANGE)) - type = duptype(type, 1); if (is_attr(type->attrs, ATTR_INLINE)) { @@ -6447,16 +6543,17 @@ static type_t *reg_typedefs(decl_spec_t *decl_spec, declarator_list_t *decls, at type_get_type_detect_alias(type) == TYPE_STRUCT || type_get_type_detect_alias(type) == TYPE_UNION || type_get_type_detect_alias(type) == TYPE_ENCAPSULATED_UNION) && - !type->name && !parse_only) + !type->name) { - if (! is_attr(attrs, ATTR_PUBLIC)) + if (! is_attr(attrs, ATTR_PUBLIC) && ! is_attr (attrs, ATTR_HIDDEN)) attrs = append_attr( attrs, make_attr(ATTR_PUBLIC) ); type->name = gen_name(); } - else if (is_attr(attrs, ATTR_UUID) && !is_attr(attrs, ATTR_PUBLIC)) + else if (is_attr(attrs, ATTR_UUID) && !is_attr(attrs, ATTR_PUBLIC) + && !is_attr(attrs, ATTR_HIDDEN)) attrs = append_attr( attrs, make_attr(ATTR_PUBLIC) ); - /* Append the SWITCHTYPE attribute to a non-encapsulated union if it does not already have it. */ + /* Append the SWITCHTYPE attribute to a union if it does not already have one. */ if (type_get_type_detect_alias(type) == TYPE_UNION && is_attr(attrs, ATTR_SWITCHTYPE) && !is_attr(type->attrs, ATTR_SWITCHTYPE)) @@ -6470,7 +6567,17 @@ static type_t *reg_typedefs(decl_spec_t *decl_spec, declarator_list_t *decls, at var_t *name; cur = find_type(decl->var->name, 0); - if (cur) + + /* + * MIDL allows shadowing types that are declared in imported files. + * We don't throw an error in this case and instead add a new type + * (which is earlier on the list in hash table, so it will be used + * instead of shadowed type). + * + * FIXME: We may consider string separated type tables for each input + * for cleaner solution. + */ + if (cur && input_name == cur->loc_info.input_name) error_loc("%s: redefinition error; original definition was at %s:%d\n", cur->name, cur->loc_info.input_name, cur->loc_info.line_number); @@ -6582,7 +6689,7 @@ static char *gen_name(void) if (! file_id) { - char *dst = dup_basename(input_name, ".idl"); + char *dst = dup_basename(input_idl_name, ".idl"); file_id = dst; for (; *dst; ++dst) @@ -6623,6 +6730,7 @@ struct allowed_attr allowed_attr[] = /* ATTR_ANNOTATION */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "annotation" }, /* ATTR_APPOBJECT */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "appobject" }, /* ATTR_ASYNC */ { 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "async" }, + /* ATTR_ASYNCUUID */ { 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, "async_uuid" }, /* ATTR_AUTO_HANDLE */ { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "auto_handle" }, /* ATTR_BINDABLE */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "bindable" }, /* ATTR_BROADCAST */ { 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "broadcast" }, @@ -6658,8 +6766,8 @@ struct allowed_attr allowed_attr[] = /* ATTR_HELPSTRING */ { 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, "helpstring" }, /* ATTR_HELPSTRINGCONTEXT */ { 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, "helpstringcontext" }, /* ATTR_HELPSTRINGDLL */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, "helpstringdll" }, - /* ATTR_HIDDEN */ { 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, "hidden" }, - /* ATTR_ID */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, "id" }, + /* ATTR_HIDDEN */ { 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, "hidden" }, + /* ATTR_ID */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, "id" }, /* ATTR_IDEMPOTENT */ { 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "idempotent" }, /* ATTR_IGNORE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, "ignore" }, /* ATTR_IIDIS */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, "iid_is" }, @@ -6667,7 +6775,7 @@ struct allowed_attr allowed_attr[] = /* ATTR_IMPLICIT_HANDLE */ { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "implicit_handle" }, /* ATTR_IN */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "in" }, /* ATTR_INLINE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "inline" }, - /* ATTR_INPUTSYNC */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "inputsync" }, + /* ATTR_INPUTSYNC */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "inputsync" }, /* ATTR_LENGTHIS */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, "length_is" }, /* ATTR_LIBLCID */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, "lcid" }, /* ATTR_LICENSED */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "licensed" }, @@ -6713,10 +6821,10 @@ struct allowed_attr allowed_attr[] = /* ATTR_UIDEFAULT */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "uidefault" }, /* ATTR_USESGETLASTERROR */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "usesgetlasterror" }, /* ATTR_USERMARSHAL */ { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "user_marshal" }, - /* ATTR_UUID */ { 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, "uuid" }, + /* ATTR_UUID */ { 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, "uuid" }, /* ATTR_V1ENUM */ { 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, "v1_enum" }, /* ATTR_VARARG */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "vararg" }, - /* ATTR_VERSION */ { 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, "version" }, + /* ATTR_VERSION */ { 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, "version" }, /* ATTR_VIPROGID */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "vi_progid" }, /* ATTR_WIREMARSHAL */ { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "wire_marshal" }, }; @@ -7345,6 +7453,13 @@ static statement_t *make_statement_library(typelib_t *typelib) return stmt; } +static statement_t *make_statement_pragma(const char *str) +{ + statement_t *stmt = make_statement(STMT_PRAGMA); + stmt->u.str = str; + return stmt; +} + static statement_t *make_statement_cppquote(const char *str) { statement_t *stmt = make_statement(STMT_CPPQUOTE); @@ -7401,6 +7516,22 @@ static statement_t *make_statement_typedef(declarator_list_t *decls) return stmt; } +static statement_list_t *append_statements(statement_list_t *l1, statement_list_t *l2) +{ + if (!l2) return l1; + if (!l1 || l1 == l2) return l2; + list_move_tail (l1, l2); + return l1; +} + +static attr_list_t *append_attribs(attr_list_t *l1, attr_list_t *l2) +{ + if (!l2) return l1; + if (!l1 || l1 == l2) return l2; + list_move_tail (l1, l2); + return l1; +} + static statement_list_t *append_statement(statement_list_t *list, statement_t *stmt) { if (!stmt) return list; diff --git a/reactos/tools/widl/parser.tab.h b/reactos/tools/widl/parser.tab.h index 8aca8fa6a6d..4a2ac12cb55 100644 --- a/reactos/tools/widl/parser.tab.h +++ b/reactos/tools/widl/parser.tab.h @@ -38,186 +38,188 @@ know about them. */ enum yytokentype { aIDENTIFIER = 258, - aKNOWNTYPE = 259, - aNUM = 260, - aHEXNUM = 261, - aDOUBLE = 262, - aSTRING = 263, - aWSTRING = 264, - aSQSTRING = 265, - aUUID = 266, - aEOF = 267, - SHL = 268, - SHR = 269, - MEMBERPTR = 270, - EQUALITY = 271, - INEQUALITY = 272, - GREATEREQUAL = 273, - LESSEQUAL = 274, - LOGICALOR = 275, - LOGICALAND = 276, - ELLIPSIS = 277, - tAGGREGATABLE = 278, - tALLOCATE = 279, - tANNOTATION = 280, - tAPPOBJECT = 281, - tASYNC = 282, - tASYNCUUID = 283, - tAUTOHANDLE = 284, - tBINDABLE = 285, - tBOOLEAN = 286, - tBROADCAST = 287, - tBYTE = 288, - tBYTECOUNT = 289, - tCALLAS = 290, - tCALLBACK = 291, - tCASE = 292, - tCDECL = 293, - tCHAR = 294, - tCOCLASS = 295, - tCODE = 296, - tCOMMSTATUS = 297, - tCONST = 298, - tCONTEXTHANDLE = 299, - tCONTEXTHANDLENOSERIALIZE = 300, - tCONTEXTHANDLESERIALIZE = 301, - tCONTROL = 302, - tCPPQUOTE = 303, - tDECODE = 304, - tDEFAULT = 305, - tDEFAULTBIND = 306, - tDEFAULTCOLLELEM = 307, - tDEFAULTVALUE = 308, - tDEFAULTVTABLE = 309, - tDISABLECONSISTENCYCHECK = 310, - tDISPLAYBIND = 311, - tDISPINTERFACE = 312, - tDLLNAME = 313, - tDOUBLE = 314, - tDUAL = 315, - tENABLEALLOCATE = 316, - tENCODE = 317, - tENDPOINT = 318, - tENTRY = 319, - tENUM = 320, - tERRORSTATUST = 321, - tEXPLICITHANDLE = 322, - tEXTERN = 323, - tFALSE = 324, - tFASTCALL = 325, - tFAULTSTATUS = 326, - tFLOAT = 327, - tFORCEALLOCATE = 328, - tHANDLE = 329, - tHANDLET = 330, - tHELPCONTEXT = 331, - tHELPFILE = 332, - tHELPSTRING = 333, - tHELPSTRINGCONTEXT = 334, - tHELPSTRINGDLL = 335, - tHIDDEN = 336, - tHYPER = 337, - tID = 338, - tIDEMPOTENT = 339, - tIGNORE = 340, - tIIDIS = 341, - tIMMEDIATEBIND = 342, - tIMPLICITHANDLE = 343, - tIMPORT = 344, - tIMPORTLIB = 345, - tIN = 346, - tIN_LINE = 347, - tINLINE = 348, - tINPUTSYNC = 349, - tINT = 350, - tINT3264 = 351, - tINT64 = 352, - tINTERFACE = 353, - tLCID = 354, - tLENGTHIS = 355, - tLIBRARY = 356, - tLICENSED = 357, - tLOCAL = 358, - tLONG = 359, - tMAYBE = 360, - tMESSAGE = 361, - tMETHODS = 362, - tMODULE = 363, - tNOCODE = 364, - tNONBROWSABLE = 365, - tNONCREATABLE = 366, - tNONEXTENSIBLE = 367, - tNOTIFY = 368, - tNOTIFYFLAG = 369, - tNULL = 370, - tOBJECT = 371, - tODL = 372, - tOLEAUTOMATION = 373, - tOPTIMIZE = 374, - tOPTIONAL = 375, - tOUT = 376, - tPARTIALIGNORE = 377, - tPASCAL = 378, - tPOINTERDEFAULT = 379, - tPROGID = 380, - tPROPERTIES = 381, - tPROPGET = 382, - tPROPPUT = 383, - tPROPPUTREF = 384, - tPROXY = 385, - tPTR = 386, - tPUBLIC = 387, - tRANGE = 388, - tREADONLY = 389, - tREF = 390, - tREGISTER = 391, - tREPRESENTAS = 392, - tREQUESTEDIT = 393, - tRESTRICTED = 394, - tRETVAL = 395, - tSAFEARRAY = 396, - tSHORT = 397, - tSIGNED = 398, - tSIZEIS = 399, - tSIZEOF = 400, - tSMALL = 401, - tSOURCE = 402, - tSTATIC = 403, - tSTDCALL = 404, - tSTRICTCONTEXTHANDLE = 405, - tSTRING = 406, - tSTRUCT = 407, - tSWITCH = 408, - tSWITCHIS = 409, - tSWITCHTYPE = 410, - tTHREADING = 411, - tTRANSMITAS = 412, - tTRUE = 413, - tTYPEDEF = 414, - tUIDEFAULT = 415, - tUNION = 416, - tUNIQUE = 417, - tUNSIGNED = 418, - tUSESGETLASTERROR = 419, - tUSERMARSHAL = 420, - tUUID = 421, - tV1ENUM = 422, - tVARARG = 423, - tVERSION = 424, - tVIPROGID = 425, - tVOID = 426, - tWCHAR = 427, - tWIREMARSHAL = 428, - tAPARTMENT = 429, - tNEUTRAL = 430, - tSINGLE = 431, - tFREE = 432, - tBOTH = 433, - ADDRESSOF = 434, - NEG = 435, - POS = 436, - PPTR = 437, - CAST = 438 + aPRAGMA = 259, + aKNOWNTYPE = 260, + aNUM = 261, + aHEXNUM = 262, + aDOUBLE = 263, + aSTRING = 264, + aWSTRING = 265, + aSQSTRING = 266, + aUUID = 267, + aEOF = 268, + SHL = 269, + SHR = 270, + MEMBERPTR = 271, + EQUALITY = 272, + INEQUALITY = 273, + GREATEREQUAL = 274, + LESSEQUAL = 275, + LOGICALOR = 276, + LOGICALAND = 277, + ELLIPSIS = 278, + tAGGREGATABLE = 279, + tALLOCATE = 280, + tANNOTATION = 281, + tAPPOBJECT = 282, + tASYNC = 283, + tASYNCUUID = 284, + tAUTOHANDLE = 285, + tBINDABLE = 286, + tBOOLEAN = 287, + tBROADCAST = 288, + tBYTE = 289, + tBYTECOUNT = 290, + tCALLAS = 291, + tCALLBACK = 292, + tCASE = 293, + tCDECL = 294, + tCHAR = 295, + tCOCLASS = 296, + tCODE = 297, + tCOMMSTATUS = 298, + tCONST = 299, + tCONTEXTHANDLE = 300, + tCONTEXTHANDLENOSERIALIZE = 301, + tCONTEXTHANDLESERIALIZE = 302, + tCONTROL = 303, + tCPPQUOTE = 304, + tDECODE = 305, + tDEFAULT = 306, + tDEFAULTBIND = 307, + tDEFAULTCOLLELEM = 308, + tDEFAULTVALUE = 309, + tDEFAULTVTABLE = 310, + tDISABLECONSISTENCYCHECK = 311, + tDISPLAYBIND = 312, + tDISPINTERFACE = 313, + tDLLNAME = 314, + tDOUBLE = 315, + tDUAL = 316, + tENABLEALLOCATE = 317, + tENCODE = 318, + tENDPOINT = 319, + tENTRY = 320, + tENUM = 321, + tERRORSTATUST = 322, + tEXPLICITHANDLE = 323, + tEXTERN = 324, + tFALSE = 325, + tFASTCALL = 326, + tFAULTSTATUS = 327, + tFLOAT = 328, + tFORCEALLOCATE = 329, + tHANDLE = 330, + tHANDLET = 331, + tHELPCONTEXT = 332, + tHELPFILE = 333, + tHELPSTRING = 334, + tHELPSTRINGCONTEXT = 335, + tHELPSTRINGDLL = 336, + tHIDDEN = 337, + tHYPER = 338, + tID = 339, + tIDEMPOTENT = 340, + tIGNORE = 341, + tIIDIS = 342, + tIMMEDIATEBIND = 343, + tIMPLICITHANDLE = 344, + tIMPORT = 345, + tIMPORTLIB = 346, + tIN = 347, + tIN_LINE = 348, + tINLINE = 349, + tINPUTSYNC = 350, + tINT = 351, + tINT3264 = 352, + tINT64 = 353, + tINTERFACE = 354, + tLCID = 355, + tLENGTHIS = 356, + tLIBRARY = 357, + tLICENSED = 358, + tLOCAL = 359, + tLONG = 360, + tMAYBE = 361, + tMESSAGE = 362, + tMETHODS = 363, + tMODULE = 364, + tNAMESPACE = 365, + tNOCODE = 366, + tNONBROWSABLE = 367, + tNONCREATABLE = 368, + tNONEXTENSIBLE = 369, + tNOTIFY = 370, + tNOTIFYFLAG = 371, + tNULL = 372, + tOBJECT = 373, + tODL = 374, + tOLEAUTOMATION = 375, + tOPTIMIZE = 376, + tOPTIONAL = 377, + tOUT = 378, + tPARTIALIGNORE = 379, + tPASCAL = 380, + tPOINTERDEFAULT = 381, + tPROGID = 382, + tPROPERTIES = 383, + tPROPGET = 384, + tPROPPUT = 385, + tPROPPUTREF = 386, + tPROXY = 387, + tPTR = 388, + tPUBLIC = 389, + tRANGE = 390, + tREADONLY = 391, + tREF = 392, + tREGISTER = 393, + tREPRESENTAS = 394, + tREQUESTEDIT = 395, + tRESTRICTED = 396, + tRETVAL = 397, + tSAFEARRAY = 398, + tSHORT = 399, + tSIGNED = 400, + tSIZEIS = 401, + tSIZEOF = 402, + tSMALL = 403, + tSOURCE = 404, + tSTATIC = 405, + tSTDCALL = 406, + tSTRICTCONTEXTHANDLE = 407, + tSTRING = 408, + tSTRUCT = 409, + tSWITCH = 410, + tSWITCHIS = 411, + tSWITCHTYPE = 412, + tTHREADING = 413, + tTRANSMITAS = 414, + tTRUE = 415, + tTYPEDEF = 416, + tUIDEFAULT = 417, + tUNION = 418, + tUNIQUE = 419, + tUNSIGNED = 420, + tUSESGETLASTERROR = 421, + tUSERMARSHAL = 422, + tUUID = 423, + tV1ENUM = 424, + tVARARG = 425, + tVERSION = 426, + tVIPROGID = 427, + tVOID = 428, + tWCHAR = 429, + tWIREMARSHAL = 430, + tAPARTMENT = 431, + tNEUTRAL = 432, + tSINGLE = 433, + tFREE = 434, + tBOTH = 435, + ADDRESSOF = 436, + NEG = 437, + POS = 438, + PPTR = 439, + CAST = 440 }; #endif @@ -228,7 +230,7 @@ typedef union YYSTYPE { /* Line 2068 of yacc.c */ -#line 153 "parser.y" +#line 129 "parser.y" attr_t *attr; attr_list_t *attr_list; @@ -258,7 +260,7 @@ typedef union YYSTYPE /* Line 2068 of yacc.c */ -#line 262 "parser.tab.h" +#line 264 "parser.tab.h" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ diff --git a/reactos/tools/widl/parser.y b/reactos/tools/widl/parser.y index 9f2ea4e4e47..2192bea4245 100644 --- a/reactos/tools/widl/parser.y +++ b/reactos/tools/widl/parser.y @@ -38,33 +38,6 @@ #include "expr.h" #include "typetree.h" -#if defined(YYBYACC) - /* Berkeley yacc (byacc) doesn't seem to know about these */ - /* Some *BSD supplied versions do define these though */ -# ifndef YYEMPTY -# define YYEMPTY (-1) /* Empty lookahead value of yychar */ -# endif -# ifndef YYLEX -# define YYLEX yylex() -# endif - -#elif defined(YYBISON) - /* Bison was used for original development */ - /* #define YYEMPTY -2 */ - /* #define YYLEX yylex() */ - -#else - /* No yacc we know yet */ -# if !defined(YYEMPTY) || !defined(YYLEX) -# error Yacc version/type unknown. This version needs to be verified for settings of YYEMPTY and YYLEX. -# elif defined(__GNUC__) /* gcc defines the #warning directive */ -# warning Yacc version/type unknown. It defines YYEMPTY and YYLEX, but is not tested - /* #else we just take a chance that it works... */ -# endif -#endif - -#define YYERROR_VERBOSE - static unsigned char pointer_default = RPC_FC_UP; typedef struct list typelist_t; @@ -141,6 +114,7 @@ static statement_t *make_statement_type_decl(type_t *type); static statement_t *make_statement_reference(type_t *type); static statement_t *make_statement_declaration(var_t *var); static statement_t *make_statement_library(typelib_t *typelib); +static statement_t *make_statement_pragma(const char *str); static statement_t *make_statement_cppquote(const char *str); static statement_t *make_statement_importlib(const char *str); static statement_t *make_statement_module(type_t *type); @@ -148,6 +122,8 @@ static statement_t *make_statement_typedef(var_list_t *names); static statement_t *make_statement_import(const char *str); static statement_t *make_statement_typedef(var_list_t *names); static statement_list_t *append_statement(statement_list_t *list, statement_t *stmt); +static statement_list_t *append_statements(statement_list_t *, statement_list_t *); +static attr_list_t *append_attribs(attr_list_t *, attr_list_t *); %} %union { @@ -177,7 +153,7 @@ static statement_list_t *append_statement(statement_list_t *list, statement_t *s enum storage_class stgclass; } -%token aIDENTIFIER +%token aIDENTIFIER aPRAGMA %token aKNOWNTYPE %token aNUM aHEXNUM %token aDOUBLE @@ -229,6 +205,7 @@ static statement_list_t *append_statement(statement_list_t *list, statement_t *s %token tMAYBE tMESSAGE %token tMETHODS %token tMODULE +%token tNAMESPACE %token tNOCODE tNONBROWSABLE %token tNONCREATABLE %token tNONEXTENSIBLE @@ -285,6 +262,7 @@ static statement_list_t *append_statement(statement_list_t *list, statement_t *s %type inherit interface interfacedef interfacedec %type dispinterface dispinterfacehdr dispinterfacedef %type module modulehdr moduledef +%type namespacedef %type base_type int_std %type enumdef structdef uniondef typedecl %type type @@ -323,6 +301,8 @@ static statement_list_t *append_statement(statement_list_t *list, statement_t *s %right '!' '~' CAST PPTR POS NEG ADDRESSOF tSIZEOF %left '.' MEMBERPTR '[' ']' +%error-verbose + %% input: gbl_statements { fix_incomplete(); @@ -340,6 +320,8 @@ input: gbl_statements { fix_incomplete(); ; gbl_statements: { $$ = NULL; } + | gbl_statements namespacedef '{' gbl_statements '}' + { $$ = append_statements($1, $4); } | gbl_statements interfacedec { $$ = append_statement($1, make_statement_reference($2)); } | gbl_statements interfacedef { $$ = append_statement($1, make_statement_type_decl($2)); } | gbl_statements coclass ';' { $$ = $1; @@ -355,6 +337,8 @@ gbl_statements: { $$ = NULL; } imp_statements: { $$ = NULL; } | imp_statements interfacedec { $$ = append_statement($1, make_statement_reference($2)); } + | imp_statements namespacedef '{' imp_statements '}' + { $$ = append_statements($1, $4); } | imp_statements interfacedef { $$ = append_statement($1, make_statement_type_decl($2)); } | imp_statements coclass ';' { $$ = $1; reg_type($2, $2->name, 0); } | imp_statements coclassdef { $$ = append_statement($1, make_statement_type_decl($2)); @@ -380,6 +364,7 @@ statement: | declaration ';' { $$ = make_statement_declaration($1); } | import { $$ = make_statement_import($1); } | typedef ';' { $$ = $1; } + | aPRAGMA { $$ = make_statement_pragma($1); } ; typedecl: @@ -573,6 +558,7 @@ attribute: { $$ = NULL; } | tUSESGETLASTERROR { $$ = make_attr(ATTR_USESGETLASTERROR); } | tUSERMARSHAL '(' type ')' { $$ = make_attrp(ATTR_USERMARSHAL, $3); } | tUUID '(' uuid_string ')' { $$ = make_attrp(ATTR_UUID, $3); } + | tASYNCUUID '(' uuid_string ')' { $$ = make_attrp(ATTR_ASYNCUUID, $3); } | tV1ENUM { $$ = make_attr(ATTR_V1ENUM); } | tVARARG { $$ = make_attr(ATTR_VARARG); } | tVERSION '(' version ')' { $$ = make_attrv(ATTR_VERSION, $3); } @@ -826,6 +812,9 @@ coclassdef: coclasshdr '{' coclass_ints '}' semicolon_opt { $$ = type_coclass_define($1, $3); } ; +namespacedef: tNAMESPACE aIDENTIFIER { $$ = NULL; } + ; + coclass_ints: { $$ = NULL; } | coclass_ints coclass_int { $$ = append_ifref( $1, $2 ); } ; @@ -887,6 +876,8 @@ interfacehdr: attributes interface { $$.interface = $2; interfacedef: interfacehdr inherit '{' int_statements '}' semicolon_opt { $$ = $1.interface; + if($$ == $2) + error_loc("Interface can't inherit from itself\n"); type_interface_define($$, $2, $4); pointer_default = $1.old_pointer_default; } @@ -1106,9 +1097,10 @@ type: tVOID { $$ = type_new_void(); } | tSAFEARRAY '(' type ')' { $$ = make_safearray($3); } ; -typedef: tTYPEDEF m_attributes decl_spec declarator_list - { reg_typedefs($3, $4, check_typedef_attrs($2)); - $$ = make_statement_typedef($4); +typedef: m_attributes tTYPEDEF m_attributes decl_spec declarator_list + { $1 = append_attribs($1, $3); + reg_typedefs($4, $5, check_typedef_attrs($1)); + $$ = make_statement_typedef($5); } ; @@ -1122,6 +1114,7 @@ uniondef: tUNION t_ident '{' ne_union_fields '}' version: aNUM { $$ = MAKEVERSION($1, 0); } | aNUM '.' aNUM { $$ = MAKEVERSION($1, $3); } + | aHEXNUM { $$ = $1; } ; %% @@ -1424,11 +1417,6 @@ static var_t *declare_var(attr_list_t *attrs, decl_spec_t *decl_spec, const decl array_dims_t *arr = decl ? decl->array : NULL; type_t *func_type = decl ? decl->func_type : NULL; type_t *type = decl_spec->type; - - /* In case of a range attribute, duplicate the type to keep track of - * the min/max values in the type format string */ - if(is_attr(attrs, ATTR_RANGE)) - type = duptype(type, 1); if (is_attr(type->attrs, ATTR_INLINE)) { @@ -1854,13 +1842,14 @@ static type_t *reg_typedefs(decl_spec_t *decl_spec, declarator_list_t *decls, at type_get_type_detect_alias(type) == TYPE_STRUCT || type_get_type_detect_alias(type) == TYPE_UNION || type_get_type_detect_alias(type) == TYPE_ENCAPSULATED_UNION) && - !type->name && !parse_only) + !type->name) { - if (! is_attr(attrs, ATTR_PUBLIC)) + if (! is_attr(attrs, ATTR_PUBLIC) && ! is_attr (attrs, ATTR_HIDDEN)) attrs = append_attr( attrs, make_attr(ATTR_PUBLIC) ); type->name = gen_name(); } - else if (is_attr(attrs, ATTR_UUID) && !is_attr(attrs, ATTR_PUBLIC)) + else if (is_attr(attrs, ATTR_UUID) && !is_attr(attrs, ATTR_PUBLIC) + && !is_attr(attrs, ATTR_HIDDEN)) attrs = append_attr( attrs, make_attr(ATTR_PUBLIC) ); /* Append the SWITCHTYPE attribute to a non-encapsulated union if it does not already have it. */ @@ -1877,7 +1866,17 @@ static type_t *reg_typedefs(decl_spec_t *decl_spec, declarator_list_t *decls, at var_t *name; cur = find_type(decl->var->name, 0); - if (cur) + + /* + * MIDL allows shadowing types that are declared in imported files. + * We don't throw an error in this case and instead add a new type + * (which is earlier on the list in hash table, so it will be used + * instead of shadowed type). + * + * FIXME: We may consider string separated type tables for each input + * for cleaner solution. + */ + if (cur && input_name == cur->loc_info.input_name) error_loc("%s: redefinition error; original definition was at %s:%d\n", cur->name, cur->loc_info.input_name, cur->loc_info.line_number); @@ -1989,7 +1988,7 @@ static char *gen_name(void) if (! file_id) { - char *dst = dup_basename(input_name, ".idl"); + char *dst = dup_basename(input_idl_name, ".idl"); file_id = dst; for (; *dst; ++dst) @@ -2030,6 +2029,7 @@ struct allowed_attr allowed_attr[] = /* ATTR_ANNOTATION */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "annotation" }, /* ATTR_APPOBJECT */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "appobject" }, /* ATTR_ASYNC */ { 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "async" }, + /* ATTR_ASYNCUUID */ { 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, "async_uuid" }, /* ATTR_AUTO_HANDLE */ { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "auto_handle" }, /* ATTR_BINDABLE */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "bindable" }, /* ATTR_BROADCAST */ { 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "broadcast" }, @@ -2065,8 +2065,8 @@ struct allowed_attr allowed_attr[] = /* ATTR_HELPSTRING */ { 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, "helpstring" }, /* ATTR_HELPSTRINGCONTEXT */ { 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, "helpstringcontext" }, /* ATTR_HELPSTRINGDLL */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, "helpstringdll" }, - /* ATTR_HIDDEN */ { 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, "hidden" }, - /* ATTR_ID */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, "id" }, + /* ATTR_HIDDEN */ { 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, "hidden" }, + /* ATTR_ID */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, "id" }, /* ATTR_IDEMPOTENT */ { 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "idempotent" }, /* ATTR_IGNORE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, "ignore" }, /* ATTR_IIDIS */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, "iid_is" }, @@ -2074,7 +2074,7 @@ struct allowed_attr allowed_attr[] = /* ATTR_IMPLICIT_HANDLE */ { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "implicit_handle" }, /* ATTR_IN */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "in" }, /* ATTR_INLINE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "inline" }, - /* ATTR_INPUTSYNC */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "inputsync" }, + /* ATTR_INPUTSYNC */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "inputsync" }, /* ATTR_LENGTHIS */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, "length_is" }, /* ATTR_LIBLCID */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, "lcid" }, /* ATTR_LICENSED */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "licensed" }, @@ -2120,10 +2120,10 @@ struct allowed_attr allowed_attr[] = /* ATTR_UIDEFAULT */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "uidefault" }, /* ATTR_USESGETLASTERROR */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "usesgetlasterror" }, /* ATTR_USERMARSHAL */ { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "user_marshal" }, - /* ATTR_UUID */ { 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, "uuid" }, + /* ATTR_UUID */ { 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, "uuid" }, /* ATTR_V1ENUM */ { 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, "v1_enum" }, /* ATTR_VARARG */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "vararg" }, - /* ATTR_VERSION */ { 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, "version" }, + /* ATTR_VERSION */ { 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, "version" }, /* ATTR_VIPROGID */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "vi_progid" }, /* ATTR_WIREMARSHAL */ { 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, "wire_marshal" }, }; @@ -2752,6 +2752,13 @@ static statement_t *make_statement_library(typelib_t *typelib) return stmt; } +static statement_t *make_statement_pragma(const char *str) +{ + statement_t *stmt = make_statement(STMT_PRAGMA); + stmt->u.str = str; + return stmt; +} + static statement_t *make_statement_cppquote(const char *str) { statement_t *stmt = make_statement(STMT_CPPQUOTE); @@ -2808,6 +2815,22 @@ static statement_t *make_statement_typedef(declarator_list_t *decls) return stmt; } +static statement_list_t *append_statements(statement_list_t *l1, statement_list_t *l2) +{ + if (!l2) return l1; + if (!l1 || l1 == l2) return l2; + list_move_tail (l1, l2); + return l1; +} + +static attr_list_t *append_attribs(attr_list_t *l1, attr_list_t *l2) +{ + if (!l2) return l1; + if (!l1 || l1 == l2) return l2; + list_move_tail (l1, l2); + return l1; +} + static statement_list_t *append_statement(statement_list_t *list, statement_t *stmt) { if (!stmt) return list; diff --git a/reactos/tools/widl/parser.yy.c b/reactos/tools/widl/parser.yy.c index f7904240587..5340952788e 100644 --- a/reactos/tools/widl/parser.yy.c +++ b/reactos/tools/widl/parser.yy.c @@ -73,7 +73,6 @@ typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; -#endif /* ! C99 */ /* Limits of integral types. */ #ifndef INT8_MIN @@ -104,6 +103,8 @@ typedef unsigned int flex_uint32_t; #define UINT32_MAX (4294967295U) #endif +#endif /* ! C99 */ + #endif /* ! FLEXINT_H */ #ifdef __cplusplus @@ -160,7 +161,15 @@ typedef unsigned int flex_uint32_t; /* Size of default input buffer. */ #ifndef YY_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k. + * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. + * Ditto for the __ia64__ case accordingly. + */ +#define YY_BUF_SIZE 32768 +#else #define YY_BUF_SIZE 16384 +#endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. @@ -379,8 +388,8 @@ static void yy_fatal_error (yyconst char msg[] ); *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; -#define YY_NUM_RULES 36 -#define YY_END_OF_BUFFER 37 +#define YY_NUM_RULES 39 +#define YY_END_OF_BUFFER 40 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -388,24 +397,27 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_accept[148] = +static yyconst flex_int16_t yy_accept[174] = { 0, - 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, - 0, 0, 37, 35, 24, 23, 35, 3, 35, 7, - 35, 35, 19, 19, 35, 35, 35, 22, 22, 22, - 14, 35, 24, 1, 13, 36, 4, 13, 6, 19, - 19, 16, 16, 16, 15, 2, 8, 13, 29, 33, - 27, 0, 0, 19, 19, 19, 0, 25, 31, 28, - 30, 26, 22, 5, 22, 32, 0, 1, 1, 12, - 10, 9, 19, 0, 16, 16, 2, 11, 34, 20, - 19, 19, 18, 22, 19, 0, 16, 0, 18, 18, - 22, 19, 0, 16, 0, 20, 18, 18, 22, 19, - - 0, 16, 22, 19, 0, 16, 22, 19, 0, 16, - 22, 19, 0, 16, 22, 0, 19, 0, 21, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, + 5, 5, 0, 0, 40, 38, 27, 26, 38, 6, + 38, 10, 38, 38, 22, 22, 38, 38, 38, 25, + 25, 25, 17, 38, 27, 2, 16, 39, 7, 16, + 9, 22, 22, 19, 19, 19, 18, 27, 2, 3, + 5, 5, 11, 16, 32, 36, 30, 0, 0, 22, + 22, 22, 0, 28, 34, 31, 33, 29, 25, 8, + 25, 35, 0, 2, 2, 0, 15, 13, 12, 22, + 0, 19, 19, 0, 2, 2, 3, 5, 5, 14, + 37, 23, 22, 22, 21, 25, 0, 22, 0, 19, + + 5, 0, 21, 21, 25, 0, 22, 0, 19, 5, + 0, 23, 21, 21, 25, 0, 22, 0, 19, 5, + 25, 0, 22, 0, 19, 5, 25, 0, 22, 0, + 19, 5, 25, 1, 22, 0, 19, 5, 25, 0, + 22, 4, 0, 24, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 17, 0 + 0, 20, 0 } ; static yyconst flex_int32_t yy_ec[256] = @@ -419,11 +431,11 @@ static yyconst flex_int32_t yy_ec[256] = 16, 17, 1, 1, 18, 19, 19, 19, 20, 21, 22, 22, 22, 22, 22, 23, 22, 22, 22, 22, 22, 24, 25, 22, 26, 22, 22, 27, 28, 22, - 29, 30, 31, 1, 22, 1, 19, 19, 19, 19, + 29, 30, 31, 1, 32, 1, 33, 19, 34, 35, - 32, 19, 22, 22, 22, 22, 22, 33, 22, 22, - 22, 22, 22, 22, 22, 22, 34, 22, 22, 35, - 22, 22, 1, 36, 1, 1, 1, 1, 1, 1, + 36, 19, 37, 38, 39, 22, 22, 40, 41, 22, + 42, 43, 22, 44, 22, 22, 45, 22, 22, 46, + 22, 22, 1, 47, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -440,182 +452,227 @@ static yyconst flex_int32_t yy_ec[256] = 1, 1, 1, 1, 1 } ; -static yyconst flex_int32_t yy_meta[37] = +static yyconst flex_int32_t yy_meta[48] = { 0, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, 1, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 1, 1, - 1, 3, 4, 4, 4, 1 + 1, 4, 3, 3, 3, 3, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 1 } ; -static yyconst flex_int16_t yy_base[184] = +static yyconst flex_int16_t yy_base[214] = { 0, - 0, 35, 35, 39, 40, 43, 61, 45, 262, 261, - 46, 47, 263, 481, 481, 481, 246, 481, 254, 481, - 243, 243, 85, 25, 41, 238, 42, 0, 248, 229, - 481, 210, 60, 243, 481, 481, 481, 34, 481, 108, - 26, 131, 154, 239, 481, 0, 481, 60, 481, 481, - 481, 231, 58, 0, 75, 77, 0, 481, 481, 481, - 481, 481, 0, 481, 220, 481, 61, 238, 236, 481, - 481, 481, 174, 0, 196, 0, 0, 481, 481, 93, - 481, 481, 113, 213, 216, 0, 238, 166, 89, 81, - 214, 258, 0, 280, 89, 169, 481, 481, 207, 300, - - 0, 322, 203, 342, 0, 364, 208, 384, 0, 406, - 197, 428, 213, 212, 115, 0, 211, 128, 481, 0, - 0, 0, 210, 0, 0, 0, 0, 209, 0, 0, - 0, 0, 208, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 481, 481, 462, 466, 468, - 472, 476, 215, 210, 209, 208, 202, 201, 200, 199, - 196, 195, 193, 188, 187, 182, 181, 178, 175, 168, - 167, 166, 159, 158, 157, 145, 135, 130, 129, 113, - 102, 88, 75 + 0, 46, 46, 50, 51, 54, 84, 56, 345, 344, + 129, 130, 131, 132, 346, 639, 639, 639, 325, 639, + 333, 639, 322, 326, 160, 124, 45, 321, 47, 0, + 331, 316, 639, 286, 63, 139, 639, 639, 639, 45, + 639, 194, 117, 228, 0, 326, 639, 64, 324, 0, + 0, 286, 639, 135, 639, 639, 639, 312, 54, 154, + 130, 119, 0, 639, 639, 639, 639, 639, 0, 639, + 296, 639, 71, 146, 147, 272, 639, 639, 639, 252, + 0, 285, 0, 72, 313, 312, 0, 0, 278, 639, + 639, 140, 639, 639, 158, 291, 277, 309, 0, 342, + + 269, 182, 152, 162, 290, 265, 366, 0, 399, 269, + 58, 196, 639, 639, 276, 255, 423, 0, 456, 259, + 270, 258, 480, 0, 513, 255, 266, 281, 537, 0, + 570, 244, 251, 275, 212, 265, 263, 227, 143, 0, + 267, 0, 149, 639, 0, 0, 0, 0, 257, 0, + 0, 0, 0, 256, 0, 0, 0, 0, 249, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 639, 639, 606, 610, 614, 616, 620, 622, 626, + 630, 256, 255, 253, 252, 251, 250, 248, 247, 634, + 242, 241, 240, 234, 233, 230, 228, 221, 219, 216, + + 215, 208, 201, 198, 188, 185, 176, 154, 152, 143, + 80, 79, 76 } ; -static yyconst flex_int16_t yy_def[184] = +static yyconst flex_int16_t yy_def[214] = { 0, - 147, 1, 148, 148, 148, 148, 1, 7, 149, 149, - 148, 148, 147, 147, 147, 147, 147, 147, 147, 147, - 147, 147, 147, 23, 147, 147, 147, 150, 150, 150, - 147, 147, 147, 147, 147, 147, 147, 151, 147, 147, - 40, 147, 42, 43, 147, 152, 147, 151, 147, 147, - 147, 147, 147, 24, 147, 147, 153, 147, 147, 147, - 147, 147, 150, 147, 150, 147, 147, 147, 147, 147, - 147, 147, 147, 154, 43, 43, 152, 147, 147, 147, - 147, 147, 153, 150, 147, 155, 43, 147, 147, 147, - 150, 147, 156, 43, 147, 147, 147, 147, 150, 147, - - 157, 43, 150, 147, 158, 43, 150, 147, 159, 43, - 150, 147, 147, 43, 150, 160, 112, 147, 147, 161, - 162, 163, 147, 164, 165, 166, 167, 147, 168, 169, - 170, 171, 147, 172, 173, 174, 175, 176, 177, 178, - 179, 180, 181, 182, 183, 147, 0, 147, 147, 147, - 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, - 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, - 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, - 147, 147, 147 + 173, 1, 174, 174, 174, 174, 173, 7, 175, 175, + 176, 176, 174, 174, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 177, + 177, 177, 173, 173, 173, 173, 173, 173, 173, 178, + 173, 173, 42, 179, 179, 179, 173, 173, 173, 180, + 181, 181, 173, 178, 173, 173, 173, 173, 173, 173, + 173, 173, 182, 173, 173, 173, 173, 173, 177, 173, + 177, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 183, 179, 179, 173, 173, 173, 180, 181, 181, 173, + 173, 173, 173, 173, 182, 177, 173, 173, 184, 179, + + 181, 173, 173, 173, 177, 173, 173, 185, 179, 181, + 173, 173, 173, 173, 177, 173, 173, 186, 179, 181, + 177, 173, 173, 187, 179, 181, 177, 173, 173, 188, + 179, 181, 177, 173, 173, 173, 179, 181, 177, 189, + 173, 190, 173, 173, 191, 190, 192, 193, 173, 194, + 195, 196, 197, 173, 198, 199, 200, 201, 173, 202, + 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, + 213, 173, 0, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, + + 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 173 } ; -static yyconst flex_int16_t yy_nxt[518] = +static yyconst flex_int16_t yy_nxt[687] = { 0, - 14, 15, 16, 17, 18, 14, 19, 20, 14, 14, - 21, 22, 23, 24, 25, 26, 27, 28, 28, 28, - 28, 28, 29, 28, 30, 28, 28, 28, 31, 14, - 14, 28, 28, 28, 28, 32, 33, 36, 71, 37, - 34, 36, 36, 37, 39, 36, 33, 39, 36, 36, - 34, 147, 147, 47, 47, 58, 59, 61, 62, 147, - 147, 67, 67, 72, 38, 68, 68, 78, 38, 38, - 80, 80, 38, 40, 41, 48, 48, 146, 42, 42, - 42, 42, 43, 44, 43, 43, 43, 43, 43, 72, - 145, 45, 42, 43, 43, 43, 53, 54, 54, 82, - - 81, 96, 96, 98, 144, 80, 80, 55, 81, 82, - 56, 57, 88, 98, 97, 143, 118, 55, 56, 57, - 73, 73, 97, 119, 88, 74, 74, 74, 74, 118, - 55, 142, 141, 56, 57, 89, 119, 140, 90, 74, - 55, 56, 57, 75, 75, 89, 90, 139, 75, 75, - 75, 75, 76, 76, 76, 76, 76, 76, 76, 138, - 137, 136, 75, 76, 76, 76, 76, 76, 135, 133, - 132, 76, 76, 76, 76, 95, 95, 131, 96, 96, - 130, 96, 96, 128, 127, 76, 85, 85, 88, 126, - 125, 86, 86, 86, 86, 123, 55, 122, 121, 56, - - 88, 120, 113, 109, 105, 86, 55, 56, 87, 87, - 101, 93, 86, 87, 87, 87, 87, 83, 134, 129, - 124, 147, 116, 116, 115, 111, 107, 87, 92, 92, - 103, 99, 91, 93, 93, 93, 93, 69, 55, 69, - 84, 56, 79, 64, 69, 66, 65, 93, 55, 56, - 94, 94, 64, 60, 52, 94, 94, 94, 94, 51, - 50, 49, 147, 36, 36, 147, 147, 147, 147, 94, - 100, 100, 147, 147, 147, 101, 101, 101, 101, 147, - 55, 147, 147, 56, 147, 147, 147, 147, 147, 101, - 55, 56, 102, 102, 147, 147, 147, 102, 102, 102, - - 102, 147, 147, 147, 147, 147, 147, 147, 147, 147, - 147, 102, 104, 104, 147, 147, 147, 105, 105, 105, - 105, 147, 55, 147, 147, 56, 147, 147, 147, 147, - 147, 105, 55, 56, 106, 106, 147, 147, 147, 106, - 106, 106, 106, 147, 147, 147, 147, 147, 147, 147, - 147, 147, 147, 106, 108, 108, 147, 147, 147, 109, - 109, 109, 109, 147, 55, 147, 147, 56, 147, 147, - 147, 147, 147, 109, 55, 56, 110, 110, 147, 147, - 147, 110, 110, 110, 110, 147, 147, 147, 147, 147, - 147, 147, 147, 147, 147, 110, 112, 112, 147, 147, - - 147, 113, 113, 113, 113, 147, 55, 147, 147, 56, - 147, 147, 147, 147, 147, 113, 55, 56, 114, 114, - 147, 147, 147, 114, 114, 114, 114, 147, 147, 147, - 147, 147, 147, 147, 147, 147, 147, 114, 116, 147, - 117, 117, 147, 147, 147, 147, 147, 147, 147, 147, - 55, 147, 147, 56, 147, 147, 147, 147, 147, 147, - 55, 56, 35, 35, 35, 35, 46, 46, 46, 46, - 63, 63, 70, 147, 70, 70, 77, 147, 77, 77, - 13, 147, 147, 147, 147, 147, 147, 147, 147, 147, - 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, - - 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, - 147, 147, 147, 147, 147, 147, 147 + 16, 17, 18, 19, 20, 16, 21, 22, 16, 16, + 23, 24, 25, 26, 27, 28, 29, 30, 30, 30, + 30, 30, 31, 30, 32, 30, 30, 30, 33, 16, + 16, 30, 30, 30, 30, 30, 30, 30, 30, 30, + 30, 30, 30, 30, 30, 30, 34, 35, 38, 78, + 39, 36, 38, 38, 39, 41, 38, 48, 41, 64, + 65, 49, 67, 68, 73, 84, 92, 92, 74, 85, + 112, 112, 73, 84, 79, 40, 74, 85, 172, 40, + 40, 171, 170, 40, 16, 17, 18, 19, 20, 16, + 21, 22, 16, 16, 23, 24, 42, 43, 27, 28, + + 29, 44, 44, 44, 44, 45, 46, 45, 45, 45, + 45, 45, 33, 16, 47, 45, 44, 44, 44, 44, + 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, + 34, 38, 38, 38, 38, 59, 60, 60, 53, 53, + 75, 94, 90, 173, 143, 169, 61, 75, 75, 62, + 143, 144, 92, 92, 168, 93, 167, 144, 94, 102, + 54, 54, 173, 61, 79, 59, 60, 60, 62, 52, + 52, 59, 60, 60, 93, 102, 61, 113, 166, 62, + 103, 76, 61, 104, 114, 62, 63, 165, 76, 76, + 164, 111, 111, 61, 112, 112, 113, 103, 62, 61, + + 163, 114, 104, 162, 62, 63, 80, 80, 112, 112, + 161, 81, 81, 81, 81, 102, 61, 159, 158, 62, + 63, 157, 140, 156, 141, 141, 81, 81, 81, 81, + 154, 102, 153, 61, 61, 152, 151, 62, 62, 63, + 82, 82, 149, 148, 147, 82, 82, 82, 82, 145, + 136, 61, 130, 124, 118, 108, 62, 99, 95, 160, + 82, 82, 82, 82, 98, 98, 155, 150, 142, 99, + 99, 99, 99, 140, 61, 140, 134, 62, 139, 141, + 141, 138, 134, 133, 99, 99, 99, 99, 132, 61, + 128, 61, 62, 127, 126, 122, 62, 100, 100, 121, + + 120, 116, 100, 100, 100, 100, 61, 115, 110, 106, + 105, 62, 101, 86, 86, 97, 96, 100, 100, 100, + 100, 107, 107, 91, 89, 86, 108, 108, 108, 108, + 70, 61, 72, 71, 62, 70, 66, 58, 57, 56, + 55, 108, 108, 108, 108, 173, 38, 38, 61, 173, + 173, 173, 173, 62, 109, 109, 173, 173, 173, 109, + 109, 109, 109, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 109, 109, 109, 109, 117, 117, + 173, 173, 173, 118, 118, 118, 118, 173, 61, 173, + 173, 62, 173, 173, 173, 173, 173, 173, 118, 118, + + 118, 118, 173, 173, 173, 61, 173, 173, 173, 173, + 62, 119, 119, 173, 173, 173, 119, 119, 119, 119, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 119, 119, 119, 119, 123, 123, 173, 173, 173, + 124, 124, 124, 124, 173, 61, 173, 173, 62, 173, + 173, 173, 173, 173, 173, 124, 124, 124, 124, 173, + 173, 173, 61, 173, 173, 173, 173, 62, 125, 125, + 173, 173, 173, 125, 125, 125, 125, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 125, 125, + 125, 125, 129, 129, 173, 173, 173, 130, 130, 130, + + 130, 173, 61, 173, 173, 62, 173, 173, 173, 173, + 173, 173, 130, 130, 130, 130, 173, 173, 173, 61, + 173, 173, 173, 173, 62, 131, 131, 173, 173, 173, + 131, 131, 131, 131, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 131, 131, 131, 131, 135, + 135, 173, 173, 173, 136, 136, 136, 136, 173, 61, + 173, 173, 62, 173, 173, 173, 173, 173, 173, 136, + 136, 136, 136, 173, 173, 173, 61, 173, 173, 173, + 173, 62, 137, 137, 173, 173, 173, 137, 137, 137, + 137, 173, 173, 173, 173, 173, 173, 173, 173, 173, + + 173, 173, 137, 137, 137, 137, 37, 37, 37, 37, + 50, 50, 50, 50, 51, 51, 51, 51, 69, 69, + 77, 173, 77, 77, 83, 83, 87, 173, 87, 87, + 88, 173, 88, 88, 146, 173, 146, 146, 15, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 173 } ; -static yyconst flex_int16_t yy_chk[518] = +static yyconst flex_int16_t yy_chk[687] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 2, 3, 38, 3, - 2, 4, 5, 4, 5, 6, 8, 6, 11, 12, - 8, 24, 41, 11, 12, 25, 25, 27, 27, 24, - 41, 33, 67, 38, 3, 33, 67, 48, 4, 5, - 53, 53, 6, 7, 7, 11, 12, 183, 7, 7, - 7, 7, 7, 7, 7, 7, 7, 7, 7, 48, - 182, 7, 7, 7, 7, 7, 23, 23, 23, 56, - - 55, 95, 95, 90, 181, 80, 80, 23, 55, 56, - 23, 23, 80, 90, 89, 180, 115, 23, 23, 23, - 40, 40, 89, 115, 80, 40, 40, 40, 40, 118, - 40, 179, 178, 40, 40, 83, 118, 177, 83, 40, - 40, 40, 40, 42, 42, 83, 83, 176, 42, 42, - 42, 42, 42, 42, 42, 42, 42, 42, 42, 175, - 174, 173, 42, 42, 42, 42, 43, 43, 172, 171, - 170, 43, 43, 43, 43, 88, 88, 169, 88, 88, - 168, 96, 96, 167, 166, 43, 73, 73, 96, 165, - 164, 73, 73, 73, 73, 163, 73, 162, 161, 73, - - 96, 160, 159, 158, 157, 73, 73, 73, 75, 75, - 156, 155, 154, 75, 75, 75, 75, 153, 133, 128, - 123, 117, 114, 113, 111, 107, 103, 75, 85, 85, - 99, 91, 84, 85, 85, 85, 85, 69, 85, 68, - 65, 85, 52, 44, 34, 32, 30, 85, 85, 85, - 87, 87, 29, 26, 22, 87, 87, 87, 87, 21, - 19, 17, 13, 10, 9, 0, 0, 0, 0, 87, - 92, 92, 0, 0, 0, 92, 92, 92, 92, 0, - 92, 0, 0, 92, 0, 0, 0, 0, 0, 92, - 92, 92, 94, 94, 0, 0, 0, 94, 94, 94, - - 94, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 94, 100, 100, 0, 0, 0, 100, 100, 100, - 100, 0, 100, 0, 0, 100, 0, 0, 0, 0, - 0, 100, 100, 100, 102, 102, 0, 0, 0, 102, - 102, 102, 102, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 102, 104, 104, 0, 0, 0, 104, - 104, 104, 104, 0, 104, 0, 0, 104, 0, 0, - 0, 0, 0, 104, 104, 104, 106, 106, 0, 0, - 0, 106, 106, 106, 106, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 106, 108, 108, 0, 0, - - 0, 108, 108, 108, 108, 0, 108, 0, 0, 108, - 0, 0, 0, 0, 0, 108, 108, 108, 110, 110, - 0, 0, 0, 110, 110, 110, 110, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 110, 112, 0, - 112, 112, 0, 0, 0, 0, 0, 0, 0, 0, - 112, 0, 0, 112, 0, 0, 0, 0, 0, 0, - 112, 112, 148, 148, 148, 148, 149, 149, 149, 149, - 150, 150, 151, 0, 151, 151, 152, 0, 152, 152, - 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, - 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, - - 147, 147, 147, 147, 147, 147, 147, 147, 147, 147, - 147, 147, 147, 147, 147, 147, 147 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 2, 3, 40, + 3, 2, 4, 5, 4, 5, 6, 8, 6, 27, + 27, 8, 29, 29, 35, 48, 59, 59, 35, 48, + 111, 111, 73, 84, 40, 3, 73, 84, 213, 4, + 5, 212, 211, 6, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, + 7, 11, 12, 13, 14, 26, 26, 26, 13, 14, + 36, 62, 54, 43, 139, 210, 26, 74, 75, 26, + 143, 139, 92, 92, 209, 61, 208, 143, 62, 92, + 13, 14, 43, 26, 54, 60, 60, 60, 26, 11, + 12, 25, 25, 25, 61, 92, 60, 103, 207, 60, + 95, 36, 25, 95, 104, 25, 25, 206, 74, 75, + 205, 102, 102, 60, 102, 102, 103, 95, 60, 25, + + 204, 104, 95, 203, 25, 25, 42, 42, 112, 112, + 202, 42, 42, 42, 42, 112, 42, 201, 200, 42, + 42, 199, 135, 198, 135, 135, 42, 42, 42, 42, + 197, 112, 196, 42, 135, 195, 194, 135, 42, 42, + 44, 44, 193, 192, 191, 44, 44, 44, 44, 189, + 188, 135, 187, 186, 185, 184, 135, 183, 182, 159, + 44, 44, 44, 44, 80, 80, 154, 149, 138, 80, + 80, 80, 80, 137, 80, 136, 134, 80, 133, 141, + 141, 132, 128, 127, 80, 80, 80, 80, 126, 141, + 122, 80, 141, 121, 120, 116, 80, 82, 82, 115, + + 110, 106, 82, 82, 82, 82, 141, 105, 101, 97, + 96, 141, 89, 86, 85, 76, 71, 82, 82, 82, + 82, 98, 98, 58, 52, 49, 98, 98, 98, 98, + 46, 98, 34, 32, 98, 31, 28, 24, 23, 21, + 19, 98, 98, 98, 98, 15, 10, 9, 98, 0, + 0, 0, 0, 98, 100, 100, 0, 0, 0, 100, + 100, 100, 100, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 100, 100, 100, 100, 107, 107, + 0, 0, 0, 107, 107, 107, 107, 0, 107, 0, + 0, 107, 0, 0, 0, 0, 0, 0, 107, 107, + + 107, 107, 0, 0, 0, 107, 0, 0, 0, 0, + 107, 109, 109, 0, 0, 0, 109, 109, 109, 109, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 109, 109, 109, 109, 117, 117, 0, 0, 0, + 117, 117, 117, 117, 0, 117, 0, 0, 117, 0, + 0, 0, 0, 0, 0, 117, 117, 117, 117, 0, + 0, 0, 117, 0, 0, 0, 0, 117, 119, 119, + 0, 0, 0, 119, 119, 119, 119, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 119, 119, + 119, 119, 123, 123, 0, 0, 0, 123, 123, 123, + + 123, 0, 123, 0, 0, 123, 0, 0, 0, 0, + 0, 0, 123, 123, 123, 123, 0, 0, 0, 123, + 0, 0, 0, 0, 123, 125, 125, 0, 0, 0, + 125, 125, 125, 125, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 125, 125, 125, 125, 129, + 129, 0, 0, 0, 129, 129, 129, 129, 0, 129, + 0, 0, 129, 0, 0, 0, 0, 0, 0, 129, + 129, 129, 129, 0, 0, 0, 129, 0, 0, 0, + 0, 129, 131, 131, 0, 0, 0, 131, 131, 131, + 131, 0, 0, 0, 0, 0, 0, 0, 0, 0, + + 0, 0, 131, 131, 131, 131, 174, 174, 174, 174, + 175, 175, 175, 175, 176, 176, 176, 176, 177, 177, + 178, 0, 178, 178, 179, 179, 180, 0, 180, 180, + 181, 0, 181, 181, 190, 0, 190, 190, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 173, 173, 173, 173, 173, + 173, 173, 173, 173, 173, 173 } ; static yy_state_type yy_last_accepting_state; @@ -658,7 +715,8 @@ char *parser_text; -#line 43 "parser.l" + +#line 44 "parser.l" #include "config.h" #include "wine/port.h" @@ -741,14 +799,15 @@ UUID *parse_uuid(const char *u) * The flexer starts here ************************************************************************** */ -#line 745 "parser.yy.c" +#line 803 "parser.yy.c" #define INITIAL 0 #define QUOTE 1 #define WSTRQUOTE 2 #define ATTR 3 #define PP_LINE 4 -#define SQUOTE 5 +#define PP_PRAGMA 5 +#define SQUOTE 6 #ifndef YY_NO_UNISTD_H /* Special case for "unistd.h", since it is non-ANSI. We include it way @@ -833,7 +892,12 @@ static int input (void ); /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE +#ifdef __ia64__ +/* On IA-64, the buffer size is 16k, not 8k */ +#define YY_READ_BUF_SIZE 16384 +#else #define YY_READ_BUF_SIZE 8192 +#endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ @@ -841,7 +905,7 @@ static int input (void ); /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO fwrite( parser_text, parser_leng, 1, parser_out ) +#define ECHO do { if (fwrite( parser_text, parser_leng, 1, parser_out )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -852,7 +916,7 @@ static int input (void ); if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ - int n; \ + size_t n; \ for ( n = 0; n < max_size && \ (c = getc( parser_in )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ @@ -937,9 +1001,9 @@ YY_DECL register char *yy_cp, *yy_bp; register int yy_act; -#line 127 "parser.l" +#line 128 "parser.l" -#line 943 "parser.yy.c" +#line 1007 "parser.yy.c" if ( !(yy_init) ) { @@ -993,13 +1057,13 @@ yy_match: while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 148 ) + if ( yy_current_state >= 174 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } - while ( yy_current_state != 147 ); + while ( yy_current_state != 173 ); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); @@ -1021,12 +1085,17 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 128 "parser.l" -yy_push_state(PP_LINE); +#line 129 "parser.l" +yy_push_state(PP_PRAGMA); YY_BREAK case 2: YY_RULE_SETUP -#line 129 "parser.l" +#line 130 "parser.l" +yy_push_state(PP_LINE); + YY_BREAK +case 3: +YY_RULE_SETUP +#line 131 "parser.l" { int lineno; char *cptr, *fname; @@ -1046,194 +1115,204 @@ YY_RULE_SETUP input_name = xstrdup(fname); } YY_BREAK -case 3: +case 4: +YY_RULE_SETUP +#line 149 "parser.l" +yyless(9); yy_pop_state(); return tCPPQUOTE; + YY_BREAK +case 5: YY_RULE_SETUP -#line 147 "parser.l" +#line 150 "parser.l" +parser_lval.str = xstrdup(parser_text); yy_pop_state(); return aPRAGMA; + YY_BREAK +case 6: +YY_RULE_SETUP +#line 151 "parser.l" yy_push_state(QUOTE); cbufidx = 0; YY_BREAK -case 4: +case 7: YY_RULE_SETUP -#line 148 "parser.l" +#line 152 "parser.l" { yy_pop_state(); parser_lval.str = get_buffered_cstring(); return aSTRING; } YY_BREAK -case 5: +case 8: YY_RULE_SETUP -#line 153 "parser.l" +#line 157 "parser.l" yy_push_state(WSTRQUOTE); cbufidx = 0; YY_BREAK -case 6: +case 9: YY_RULE_SETUP -#line 154 "parser.l" +#line 158 "parser.l" { yy_pop_state(); parser_lval.str = get_buffered_cstring(); return aWSTRING; } YY_BREAK -case 7: +case 10: YY_RULE_SETUP -#line 159 "parser.l" +#line 163 "parser.l" yy_push_state(SQUOTE); cbufidx = 0; YY_BREAK -case 8: +case 11: YY_RULE_SETUP -#line 160 "parser.l" +#line 164 "parser.l" { yy_pop_state(); parser_lval.str = get_buffered_cstring(); return aSQSTRING; } YY_BREAK -case 9: -#line 166 "parser.l" -case 10: +case 12: +#line 170 "parser.l" +case 13: YY_RULE_SETUP -#line 166 "parser.l" +#line 170 "parser.l" addcchar(parser_text[1]); YY_BREAK -case 11: +case 14: YY_RULE_SETUP -#line 167 "parser.l" +#line 171 "parser.l" addcchar(parser_text[1]); YY_BREAK -case 12: +case 15: YY_RULE_SETUP -#line 168 "parser.l" +#line 172 "parser.l" addcchar('\\'); addcchar(parser_text[1]); YY_BREAK -case 13: +case 16: YY_RULE_SETUP -#line 169 "parser.l" +#line 173 "parser.l" addcchar(parser_text[0]); YY_BREAK -case 14: +case 17: YY_RULE_SETUP -#line 170 "parser.l" +#line 174 "parser.l" yy_push_state(ATTR); return '['; YY_BREAK -case 15: +case 18: YY_RULE_SETUP -#line 171 "parser.l" +#line 175 "parser.l" yy_pop_state(); return ']'; YY_BREAK -case 16: +case 19: YY_RULE_SETUP -#line 172 "parser.l" +#line 176 "parser.l" return attr_token(parser_text); YY_BREAK -case 17: +case 20: YY_RULE_SETUP -#line 173 "parser.l" +#line 177 "parser.l" { parser_lval.uuid = parse_uuid(parser_text); return aUUID; } YY_BREAK -case 18: +case 21: YY_RULE_SETUP -#line 177 "parser.l" +#line 181 "parser.l" { parser_lval.num = xstrtoul(parser_text, NULL, 0); return aHEXNUM; } YY_BREAK -case 19: +case 22: YY_RULE_SETUP -#line 181 "parser.l" +#line 185 "parser.l" { parser_lval.num = xstrtoul(parser_text, NULL, 0); return aNUM; } YY_BREAK -case 20: +case 23: YY_RULE_SETUP -#line 185 "parser.l" +#line 189 "parser.l" { parser_lval.dbl = strtod(parser_text, NULL); return aDOUBLE; } YY_BREAK -case 21: +case 24: *yy_cp = (yy_hold_char); /* undo effects of setting up parser_text */ (yy_c_buf_p) = yy_cp -= 1; YY_DO_BEFORE_ACTION; /* set up parser_text again */ YY_RULE_SETUP -#line 189 "parser.l" +#line 193 "parser.l" return tSAFEARRAY; YY_BREAK -case 22: +case 25: YY_RULE_SETUP -#line 190 "parser.l" +#line 194 "parser.l" return kw_token(parser_text); YY_BREAK -case 23: -/* rule 23 can match eol */ +case 26: +/* rule 26 can match eol */ YY_RULE_SETUP -#line 191 "parser.l" +#line 195 "parser.l" line_number++; YY_BREAK -case 24: +case 27: YY_RULE_SETUP -#line 192 "parser.l" +#line 196 "parser.l" YY_BREAK -case 25: +case 28: YY_RULE_SETUP -#line 193 "parser.l" +#line 197 "parser.l" return SHL; YY_BREAK -case 26: +case 29: YY_RULE_SETUP -#line 194 "parser.l" +#line 198 "parser.l" return SHR; YY_BREAK -case 27: +case 30: YY_RULE_SETUP -#line 195 "parser.l" +#line 199 "parser.l" return MEMBERPTR; YY_BREAK -case 28: +case 31: YY_RULE_SETUP -#line 196 "parser.l" +#line 200 "parser.l" return EQUALITY; YY_BREAK -case 29: +case 32: YY_RULE_SETUP -#line 197 "parser.l" +#line 201 "parser.l" return INEQUALITY; YY_BREAK -case 30: +case 33: YY_RULE_SETUP -#line 198 "parser.l" +#line 202 "parser.l" return GREATEREQUAL; YY_BREAK -case 31: +case 34: YY_RULE_SETUP -#line 199 "parser.l" +#line 203 "parser.l" return LESSEQUAL; YY_BREAK -case 32: +case 35: YY_RULE_SETUP -#line 200 "parser.l" +#line 204 "parser.l" return LOGICALOR; YY_BREAK -case 33: +case 36: YY_RULE_SETUP -#line 201 "parser.l" +#line 205 "parser.l" return LOGICALAND; YY_BREAK -case 34: +case 37: YY_RULE_SETUP -#line 202 "parser.l" +#line 206 "parser.l" return ELLIPSIS; YY_BREAK -case 35: +case 38: YY_RULE_SETUP -#line 203 "parser.l" +#line 207 "parser.l" return parser_text[0]; YY_BREAK case YY_STATE_EOF(INITIAL): @@ -1241,20 +1320,21 @@ case YY_STATE_EOF(QUOTE): case YY_STATE_EOF(WSTRQUOTE): case YY_STATE_EOF(ATTR): case YY_STATE_EOF(PP_LINE): +case YY_STATE_EOF(PP_PRAGMA): case YY_STATE_EOF(SQUOTE): -#line 204 "parser.l" +#line 208 "parser.l" { if (import_stack_ptr) return aEOF; else yyterminate(); } YY_BREAK -case 36: +case 39: YY_RULE_SETUP -#line 209 "parser.l" +#line 213 "parser.l" ECHO; YY_BREAK -#line 1258 "parser.yy.c" +#line 1338 "parser.yy.c" case YY_END_OF_BUFFER: { @@ -1546,7 +1626,7 @@ static int yy_get_next_buffer (void) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 148 ) + if ( yy_current_state >= 174 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -1574,11 +1654,11 @@ static int yy_get_next_buffer (void) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 148 ) + if ( yy_current_state >= 174 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 147); + yy_is_jam = (yy_current_state == 173); return yy_is_jam ? 0 : yy_current_state; } @@ -1973,8 +2053,8 @@ YY_BUFFER_STATE parser__scan_string (yyconst char * yystr ) /** Setup the input buffer state to scan the given bytes. The next call to parser_lex() will * scan from a @e copy of @a bytes. - * @param bytes the byte buffer to scan - * @param len the number of bytes in the buffer pointed to by @a bytes. + * @param yybytes the byte buffer to scan + * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * * @return the newly allocated buffer state object. */ @@ -2253,7 +2333,7 @@ void parser_free (void * ptr ) #define YYTABLES_NAME "yytables" -#line 209 "parser.l" +#line 213 "parser.l" @@ -2310,6 +2390,7 @@ static const struct keyword keywords[] = { {"long", tLONG}, {"methods", tMETHODS}, {"module", tMODULE}, + {"namespace", tNAMESPACE}, {"pascal", tPASCAL}, {"properties", tPROPERTIES}, {"register", tREGISTER}, @@ -2463,7 +2544,7 @@ static int kw_token(const char *kw) struct keyword key, *kwp; key.kw = kw; kwp = bsearch(&key, keywords, NKEYWORDS, sizeof(keywords[0]), kw_cmp_func); - if (kwp) { + if (kwp && (do_rt_extension || kwp->token != tNAMESPACE)) { parser_lval.str = xstrdup(kwp->kw); return kwp->token; } diff --git a/reactos/tools/widl/proxy.c b/reactos/tools/widl/proxy.c index 4904e11828a..99631c9eb7f 100644 --- a/reactos/tools/widl/proxy.c +++ b/reactos/tools/widl/proxy.c @@ -796,6 +796,11 @@ int need_proxy_file(const statement_list_t *stmts) return does_any_iface(stmts, need_proxy); } +int need_proxy_delegation(const statement_list_t *stmts) +{ + return does_any_iface(stmts, need_delegation); +} + int need_inline_stubs(const type_t *iface) { const statement_t *stmt; diff --git a/reactos/tools/widl/typegen.c b/reactos/tools/widl/typegen.c index 5593a1d293e..ebfd433325d 100644 --- a/reactos/tools/widl/typegen.c +++ b/reactos/tools/widl/typegen.c @@ -85,6 +85,8 @@ static const unsigned short IsSimpleRef = 0x0100; static unsigned int field_memsize(const type_t *type, unsigned int *offset); static unsigned int fields_memsize(const var_list_t *fields, unsigned int *align); static unsigned int type_memsize_and_alignment(const type_t *t, unsigned int *align); +static unsigned int write_array_tfs(FILE *file, const attr_list_t *attrs, type_t *type, + const char *name, unsigned int *typestring_offset); static unsigned int write_struct_tfs(FILE *file, type_t *type, const char *name, unsigned int *tfsoff); static int write_embedded_types(FILE *file, const attr_list_t *attrs, type_t *type, const char *name, int write_ptr, unsigned int *tfsoff); @@ -860,7 +862,7 @@ static const char *get_context_handle_type_name(const type_t *type) do { \ if (file) \ fprintf(file, "/* %2u */\n", typestring_offset); \ - print_file((file), 2, "0x%02x, /* " #fctype " */\n", RPC_##fctype); \ + print_file((file), 2, "0x%02x,\t/* " #fctype " */\n", RPC_##fctype); \ } \ while (0) @@ -1447,8 +1449,8 @@ static void write_procformatstring_func( FILE *file, int indent, const type_t *i if (!is_new_style) { print_file(file, 0, "/* %u (void) */\n", *offset); - print_file(file, indent, "0x5b, /* FC_END */\n"); - print_file(file, indent, "0x5c, /* FC_PAD */\n"); + print_file(file, indent, "0x5b,\t/* FC_END */\n"); + print_file(file, indent, "0x5c,\t/* FC_PAD */\n"); *offset += 2; } } @@ -2316,7 +2318,7 @@ static void write_member_type(FILE *file, const type_t *cont, error("Unsupported member type %d\n", type_get_type(type)); } -static void write_array_element_type(FILE *file, const type_t *type, +static void write_array_element_type(FILE *file, const attr_list_t *attrs, const type_t *type, int cont_is_complex, unsigned int *tfsoff) { type_t *elem = type_array_get_element(type); @@ -2331,7 +2333,7 @@ static void write_array_element_type(FILE *file, const type_t *type, ref->typestring_offset, tfsoff); return; } - if (cont_is_complex && is_string_type(NULL, elem)) + if (cont_is_complex && is_string_type(attrs, elem)) { write_string_tfs(file, NULL, elem, TYPE_CONTEXT_CONTAINER, NULL, tfsoff); return; @@ -2350,10 +2352,10 @@ static void write_end(FILE *file, unsigned int *tfsoff) { if (*tfsoff % 2 == 0) { - print_file(file, 2, "0x%x,\t\t/* FC_PAD */\n", RPC_FC_PAD); + print_file(file, 2, "0x%x,\t/* FC_PAD */\n", RPC_FC_PAD); *tfsoff += 1; } - print_file(file, 2, "0x%x,\t\t/* FC_END */\n", RPC_FC_END); + print_file(file, 2, "0x%x,\t/* FC_END */\n", RPC_FC_END); *tfsoff += 1; } @@ -2728,7 +2730,7 @@ static int write_varying_array_pointer_descriptions( return pointer_count; } -static void write_pointer_description(FILE *file, type_t *type, +static void write_pointer_description(FILE *file, const attr_list_t *attrs, type_t *type, unsigned int *typestring_offset) { unsigned int offset_in_buffer; @@ -2757,7 +2759,7 @@ static void write_pointer_description(FILE *file, type_t *type, if (is_conformant_array(type) && (type_array_is_decl_as_ptr(type) || !current_structure)) write_conformant_array_pointer_descriptions( - file, NULL, type, 0, typestring_offset); + file, attrs, type, 0, typestring_offset); else if (type_get_type(type) == TYPE_STRUCT && get_struct_fc(type) == RPC_FC_CPSTRUCT) { @@ -2774,11 +2776,6 @@ static void write_pointer_description(FILE *file, type_t *type, &offset_in_memory, &offset_in_buffer, typestring_offset); } -int is_declptr(const type_t *t) -{ - return is_ptr(t) || (type_get_type(t) == TYPE_ARRAY && type_array_is_decl_as_ptr(t)); -} - static unsigned int write_string_tfs(FILE *file, const attr_list_t *attrs, type_t *type, enum type_context context, const char *name, unsigned int *typestring_offset) @@ -2814,6 +2811,9 @@ static unsigned int write_string_tfs(FILE *file, const attr_list_t *attrs, else elem_type = type_pointer_get_ref(type); + if (type_get_type(elem_type) == TYPE_POINTER && is_array(type)) + return write_array_tfs(file, attrs, type, name, typestring_offset); + if (type_get_type(elem_type) != TYPE_BASIC) { error("write_string_tfs: Unimplemented for non-basic type %s\n", name); @@ -2842,7 +2842,7 @@ static unsigned int write_string_tfs(FILE *file, const attr_list_t *attrs, WRITE_FCTYPE(file, FC_WSTRING, *typestring_offset); else WRITE_FCTYPE(file, FC_CSTRING, *typestring_offset); - print_file(file, 2, "0x%x, /* FC_PAD */\n", RPC_FC_PAD); + print_file(file, 2, "0x%x,\t/* FC_PAD */\n", RPC_FC_PAD); *typestring_offset += 2; print_file(file, 2, "NdrFcShort(0x%hx),\t/* %d */\n", (unsigned short)dim, dim); @@ -2857,7 +2857,7 @@ static unsigned int write_string_tfs(FILE *file, const attr_list_t *attrs, WRITE_FCTYPE(file, FC_C_WSTRING, *typestring_offset); else WRITE_FCTYPE(file, FC_C_CSTRING, *typestring_offset); - print_file(file, 2, "0x%x, /* FC_STRING_SIZED */\n", RPC_FC_STRING_SIZED); + print_file(file, 2, "0x%x,\t/* FC_STRING_SIZED */\n", RPC_FC_STRING_SIZED); *typestring_offset += 2; *typestring_offset += write_conf_or_var_desc( @@ -2878,7 +2878,7 @@ static unsigned int write_string_tfs(FILE *file, const attr_list_t *attrs, WRITE_FCTYPE(file, FC_C_WSTRING, *typestring_offset); else WRITE_FCTYPE(file, FC_C_CSTRING, *typestring_offset); - print_file(file, 2, "0x%x, /* FC_PAD */\n", RPC_FC_PAD); + print_file(file, 2, "0x%x,\t/* FC_PAD */\n", RPC_FC_PAD); *typestring_offset += 2; update_tfsoff(type, start_offset, file); @@ -2904,7 +2904,8 @@ static unsigned int write_array_tfs(FILE *file, const attr_list_t *attrs, type_t if (!pointer_type) pointer_type = RPC_FC_RP; - write_embedded_types(file, attrs, type_array_get_element(type), name, FALSE, typestring_offset); + if (!is_string_type(attrs, type_array_get_element(type))) + write_embedded_types(file, attrs, type_array_get_element(type), name, FALSE, typestring_offset); size = type_memsize(is_conformant_array(type) ? type_array_get_element(type) : type); align = type_buffer_alignment(is_conformant_array(type) ? type_array_get_element(type) : type); @@ -2964,15 +2965,15 @@ static unsigned int write_array_tfs(FILE *file, const attr_list_t *attrs, type_t if (type_has_pointers(type_array_get_element(type)) && (type_array_is_decl_as_ptr(type) || !current_structure)) { - print_file(file, 2, "0x%x, /* FC_PP */\n", RPC_FC_PP); - print_file(file, 2, "0x%x, /* FC_PAD */\n", RPC_FC_PAD); + print_file(file, 2, "0x%x,\t/* FC_PP */\n", RPC_FC_PP); + print_file(file, 2, "0x%x,\t/* FC_PAD */\n", RPC_FC_PAD); *typestring_offset += 2; - write_pointer_description(file, type, typestring_offset); - print_file(file, 2, "0x%x, /* FC_END */\n", RPC_FC_END); + write_pointer_description(file, is_string_type(attrs, type) ? attrs : NULL, type, typestring_offset); + print_file(file, 2, "0x%x,\t/* FC_END */\n", RPC_FC_END); *typestring_offset += 1; } - write_array_element_type(file, type, FALSE, typestring_offset); + write_array_element_type(file, is_string_type(attrs, type) ? attrs : NULL, type, FALSE, typestring_offset); write_end(file, typestring_offset); } else @@ -2987,7 +2988,7 @@ static unsigned int write_array_tfs(FILE *file, const attr_list_t *attrs, type_t += write_conf_or_var_desc(file, current_structure, baseoff, type, length_is); - write_array_element_type(file, type, TRUE, typestring_offset); + write_array_element_type(file, is_string_type(attrs, type) ? attrs : NULL, type, TRUE, typestring_offset); write_end(file, typestring_offset); } @@ -3151,11 +3152,11 @@ static unsigned int write_struct_tfs(FILE *file, type_t *type, (fc == RPC_FC_CPSTRUCT) || (fc == RPC_FC_CVSTRUCT && type_has_pointers(type))) { - print_file(file, 2, "0x%x, /* FC_PP */\n", RPC_FC_PP); - print_file(file, 2, "0x%x, /* FC_PAD */\n", RPC_FC_PAD); + print_file(file, 2, "0x%x,\t/* FC_PP */\n", RPC_FC_PP); + print_file(file, 2, "0x%x,\t/* FC_PAD */\n", RPC_FC_PAD); *tfsoff += 2; - write_pointer_description(file, type, tfsoff); - print_file(file, 2, "0x%x, /* FC_END */\n", RPC_FC_END); + write_pointer_description(file, NULL, type, tfsoff); + print_file(file, 2, "0x%x,\t/* FC_END */\n", RPC_FC_END); *tfsoff += 1; } @@ -3586,12 +3587,26 @@ static unsigned int write_type_tfs(FILE *file, int indent, case TGT_POINTER: { enum type_context ref_context; + type_t *ref = type_pointer_get_ref(type); + if (context == TYPE_CONTEXT_TOPLEVELPARAM) ref_context = TYPE_CONTEXT_PARAM; else if (context == TYPE_CONTEXT_CONTAINER_NO_POINTERS) ref_context = TYPE_CONTEXT_CONTAINER; else ref_context = context; + + if (is_string_type(attrs, ref)) + { + if (context != TYPE_CONTEXT_CONTAINER_NO_POINTERS) + write_pointer_tfs(file, attrs, type, *typeformat_offset + 4, context, typeformat_offset); + + offset = write_type_tfs(file, indent, attrs, ref, name, ref_context, typeformat_offset); + if (context == TYPE_CONTEXT_CONTAINER_NO_POINTERS) + return 0; + return offset; + } + offset = write_type_tfs( file, indent, attrs, type_pointer_get_ref(type), name, ref_context, typeformat_offset); if (context == TYPE_CONTEXT_CONTAINER_NO_POINTERS) diff --git a/reactos/tools/widl/typelib.c b/reactos/tools/widl/typelib.c index a63af091437..d28a8e7d999 100644 --- a/reactos/tools/widl/typelib.c +++ b/reactos/tools/widl/typelib.c @@ -47,16 +47,6 @@ static typelib_t *typelib; -int is_ptr(const type_t *t) -{ - return type_get_type(t) == TYPE_POINTER; -} - -int is_array(const type_t *t) -{ - return type_get_type(t) == TYPE_ARRAY; -} - /* List of oleauto types that should be recognized by name. * (most of) these seem to be intrinsic types in mktyplib. * This table MUST be alphabetically sorted on the kw field. diff --git a/reactos/tools/widl/typelib_struct.h b/reactos/tools/widl/typelib_struct.h index 79b86b91216..42faac8739f 100644 --- a/reactos/tools/widl/typelib_struct.h +++ b/reactos/tools/widl/typelib_struct.h @@ -97,12 +97,12 @@ typedef struct tagMSFT_SegDir { /*2*/MSFT_pSeg pImpInfo; /* table with info for imported types */ /*3*/MSFT_pSeg pImpFiles; /* import libraries */ /*4*/MSFT_pSeg pRefTab; /* References table */ -/*5*/MSFT_pSeg pLibtab; /* always exists, always same size (0x80) */ - /* hash table w offsets to guid????? */ +/*5*/MSFT_pSeg pGuidHashTab; /* always exists, always same size (0x80) */ + /* hash table with offsets to guid */ /*6*/MSFT_pSeg pGuidTab; /* all guids are stored here together with */ /* offset in some table???? */ -/*7*/MSFT_pSeg res07; /* always created, always same size (0x200) */ - /* purpose largely unknown */ +/*7*/MSFT_pSeg pNameHashTab; /* always created, always same size (0x200) */ + /* hash table with offsets to names */ /*8*/MSFT_pSeg pNametab; /* name tables */ /*9*/MSFT_pSeg pStringtab; /* string table */ /*A*/MSFT_pSeg pTypdescTab; /* table with type descriptors */ diff --git a/reactos/tools/widl/utils.c b/reactos/tools/widl/utils.c index dc77ae87438..90668873aac 100644 --- a/reactos/tools/widl/utils.c +++ b/reactos/tools/widl/utils.c @@ -159,8 +159,8 @@ char *dup_basename(const char *name, const char *ext) namelen = strlen(name); - /* +4 for later extension and +1 for '\0' */ - base = xmalloc(namelen +4 +1); + /* +6 for later extension (strlen("_r.rgs")) and +1 for '\0' */ + base = xmalloc(namelen +6 +1); strcpy(base, name); if(!strcasecmp(name + namelen-extlen, ext)) { diff --git a/reactos/tools/widl/widl.c b/reactos/tools/widl/widl.c index 27c35cdafb4..fb1395413b0 100644 --- a/reactos/tools/widl/widl.c +++ b/reactos/tools/widl/widl.c @@ -51,6 +51,7 @@ static const char usage[] = "Usage: widl [options...] infile.idl\n" " or: widl [options...] --dlldata-only name1 [name2...]\n" +" -app_config Ignored, present for midl compatibility\n" " -b arch Set the target architecture\n" " -c Generate client stub\n" " -d n Set debug level to 'n'\n" @@ -71,6 +72,7 @@ static const char usage[] = " --prefix-client=p Prefix names of client stubs with 'p'\n" " --prefix-server=p Prefix names of server functions with 'p'\n" " -r Generate registration script\n" +" --rt Enable WinRT's language extensions for IDL\n" " -s Generate server stub\n" " -t Generate typelib\n" " -u Generate interface identifiers file\n" @@ -112,9 +114,11 @@ int do_win32 = 1; int do_win64 = 1; int win32_packing = 8; int win64_packing = 8; +int do_rt_extension = 0; static enum stub_mode stub_mode = MODE_Os; char *input_name; +char *input_idl_name; char *header_name; char *local_stubs_name; char *header_token; @@ -151,10 +155,12 @@ enum { PREFIX_CLIENT_OPTION, PREFIX_SERVER_OPTION, PRINT_HELP, + RT_OPTION, WIN32_OPTION, WIN64_OPTION, WIN32_ALIGN_OPTION, - WIN64_ALIGN_OPTION + WIN64_ALIGN_OPTION, + APP_CONFIG_OPTION }; static const char short_options[] = @@ -169,10 +175,12 @@ static const struct option long_options[] = { { "prefix-all", 1, NULL, PREFIX_ALL_OPTION }, { "prefix-client", 1, NULL, PREFIX_CLIENT_OPTION }, { "prefix-server", 1, NULL, PREFIX_SERVER_OPTION }, + { "rt", 0, NULL, RT_OPTION }, { "win32", 0, NULL, WIN32_OPTION }, { "win64", 0, NULL, WIN64_OPTION }, { "win32-align", 1, NULL, WIN32_ALIGN_OPTION }, { "win64-align", 1, NULL, WIN64_ALIGN_OPTION }, + { "app_config", 0, NULL, APP_CONFIG_OPTION }, { NULL, 0, NULL, 0 } }; @@ -260,10 +268,9 @@ static void set_target( const char *target ) { "i786", SYS_WIN32 }, { "amd64", SYS_WIN64 }, { "x86_64", SYS_WIN64 }, - { "sparc", SYS_WIN32 }, - { "alpha", SYS_WIN32 }, { "powerpc", SYS_WIN32 }, - { "arm", SYS_WIN32 } + { "arm", SYS_WIN32 }, + { "aarch64", SYS_WIN64 } }; unsigned int i; @@ -340,7 +347,7 @@ static void free_filename_nodes(struct list *list) } } -static void write_dlldata_list(struct list *filenames) +static void write_dlldata_list(struct list *filenames, int define_proxy_delegation) { FILE *dlldata; filename_node_t *node; @@ -351,6 +358,8 @@ static void write_dlldata_list(struct list *filenames) fprintf(dlldata, "/*** Autogenerated by WIDL %s ", PACKAGE_VERSION); fprintf(dlldata, "- Do not edit ***/\n\n"); + if (define_proxy_delegation) + fprintf(dlldata, "#define PROXY_DELEGATION\n"); fprintf(dlldata, "#ifdef __REACTOS__\n"); fprintf(dlldata, "#define WIN32_NO_STATUS\n"); @@ -386,15 +395,19 @@ static char *eat_space(char *s) void write_dlldata(const statement_list_t *stmts) { struct list filenames = LIST_INIT(filenames); + int define_proxy_delegation = 0; filename_node_t *node; FILE *dlldata; if (!do_dlldata || !need_proxy_file(stmts)) return; + define_proxy_delegation = need_proxy_delegation(stmts); + dlldata = fopen(dlldata_name, "r"); if (dlldata) { - static char marker[] = "REFERENCE_PROXY_FILE"; + static const char marker[] = "REFERENCE_PROXY_FILE"; + static const char delegation_define[] = "#define PROXY_DELEGATION"; char *line = NULL; size_t len = 0; @@ -415,6 +428,8 @@ void write_dlldata(const statement_list_t *stmts) *end = '\0'; if (start < end) add_filename_node(&filenames, start); + }else if (!define_proxy_delegation && strncmp(start, delegation_define, sizeof(delegation_define)-1)) { + define_proxy_delegation = 1; } } @@ -433,10 +448,20 @@ void write_dlldata(const statement_list_t *stmts) } add_filename_node(&filenames, proxy_token); - write_dlldata_list(&filenames); + write_dlldata_list(&filenames, define_proxy_delegation); free_filename_nodes(&filenames); } +static void write_id_guid(FILE *f, const char *type, const char *guid_prefix, const char *name, const UUID *uuid) +{ + if (!uuid) return; + fprintf(f, "MIDL_DEFINE_GUID(%s, %s_%s, 0x%08x, 0x%04x, 0x%04x, 0x%02x,0x%02x, 0x%02x," + "0x%02x,0x%02x,0x%02x,0x%02x,0x%02x);\n", + type, guid_prefix, name, uuid->Data1, uuid->Data2, uuid->Data3, uuid->Data4[0], + uuid->Data4[1], uuid->Data4[2], uuid->Data4[3], uuid->Data4[4], uuid->Data4[5], + uuid->Data4[6], uuid->Data4[7]); +} + static void write_id_data_stmts(const statement_list_t *stmts) { const statement_t *stmt; @@ -451,19 +476,19 @@ static void write_id_data_stmts(const statement_list_t *stmts) if (!is_object(type) && !is_attr(type->attrs, ATTR_DISPINTERFACE)) continue; uuid = get_attrp(type->attrs, ATTR_UUID); - write_guid(idfile, is_attr(type->attrs, ATTR_DISPINTERFACE) ? "DIID" : "IID", + write_id_guid(idfile, "IID", is_attr(type->attrs, ATTR_DISPINTERFACE) ? "DIID" : "IID", type->name, uuid); } else if (type_get_type(type) == TYPE_COCLASS) { const UUID *uuid = get_attrp(type->attrs, ATTR_UUID); - write_guid(idfile, "CLSID", type->name, uuid); + write_id_guid(idfile, "CLSID", "CLSID", type->name, uuid); } } else if (stmt->type == STMT_LIBRARY) { const UUID *uuid = get_attrp(stmt->u.lib->attrs, ATTR_UUID); - write_guid(idfile, "LIBID", stmt->u.lib->name, uuid); + write_id_guid(idfile, "IID", "LIBID", stmt->u.lib->name, uuid); write_id_data_stmts(stmt->u.lib->stmts); } } @@ -480,7 +505,7 @@ void write_id_data(const statement_list_t *stmts) } fprintf(idfile, "/*** Autogenerated by WIDL %s ", PACKAGE_VERSION); - fprintf(idfile, "from %s - Do not edit ***/\n\n", input_name); + fprintf(idfile, "from %s - Do not edit ***/\n\n", input_idl_name); fprintf(idfile, "#ifdef __REACTOS__\n"); fprintf(idfile, "#define WIN32_NO_STATUS\n"); @@ -489,13 +514,33 @@ void write_id_data(const statement_list_t *stmts) fprintf(idfile, "#include \n"); fprintf(idfile, "#include \n\n"); - fprintf(idfile, "#include \n\n"); + + fprintf(idfile, "#ifdef _MIDL_USE_GUIDDEF_\n\n"); + + fprintf(idfile, "#ifndef INITGUID\n"); + fprintf(idfile, "#define INITGUID\n"); + fprintf(idfile, "#include \n"); + fprintf(idfile, "#undef INITGUID\n"); + fprintf(idfile, "#else\n"); + fprintf(idfile, "#include \n"); + fprintf(idfile, "#endif\n\n"); + + fprintf(idfile, "#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \\\n"); + fprintf(idfile, " DEFINE_GUID(name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8)\n\n"); + + fprintf(idfile, "#else\n\n"); + + fprintf(idfile, "#define MIDL_DEFINE_GUID(type,name,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) \\\n"); + fprintf(idfile, " const type name = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}\n\n"); + + fprintf(idfile, "#endif\n\n"); start_cplusplus_guard(idfile); write_id_data_stmts(stmts); fprintf(idfile, "\n"); end_cplusplus_guard(idfile); + fprintf(idfile, "#undef MIDL_DEFINE_GUID\n" ); fclose(idfile); } @@ -515,7 +560,7 @@ int main(int argc,char *argv[]) now = time(NULL); - while((optc = getopt_long(argc, argv, short_options, long_options, &opti)) != EOF) { + while((optc = getopt_long_only(argc, argv, short_options, long_options, &opti)) != EOF) { switch(optc) { case DLLDATA_OPTION: dlldata_name = xstrdup(optarg); @@ -544,6 +589,9 @@ int main(int argc,char *argv[]) case PRINT_HELP: fprintf(stderr, "%s", usage); return 0; + case RT_OPTION: + do_rt_extension = 1; + break; case WIN32_OPTION: do_win32 = 1; do_win64 = 0; @@ -562,6 +610,10 @@ int main(int argc,char *argv[]) if(win64_packing != 2 && win64_packing != 4 && win64_packing != 8) error("Packing must be one of 2, 4 or 8\n"); break; + case APP_CONFIG_OPTION: + /* widl does not distinguish between app_mode and default mode, + but we ignore this option for midl compatibility */ + break; case 'b': set_target( optarg ); break; @@ -595,7 +647,6 @@ int main(int argc,char *argv[]) case 'm': if (!strcmp( optarg, "32" )) typelib_kind = SYS_WIN32; else if (!strcmp( optarg, "64" )) typelib_kind = SYS_WIN64; - else error( "Invalid -m argument '%s'\n", optarg ); break; case 'N': no_preprocess = 1; @@ -659,14 +710,30 @@ int main(int argc,char *argv[]) wpp_add_include_path(DEFAULT_INCLUDE_DIR); #endif + /* if nothing specified, try to guess output type from the output file name */ + if (output_name && do_everything && !do_header && !do_typelib && !do_proxies && + !do_client && !do_server && !do_regscript && !do_idfile && !do_dlldata) + { + do_everything = 0; + if (strendswith( output_name, ".h" )) do_header = 1; + else if (strendswith( output_name, ".tlb" )) do_typelib = 1; + else if (strendswith( output_name, "_p.c" )) do_proxies = 1; + else if (strendswith( output_name, "_c.c" )) do_client = 1; + else if (strendswith( output_name, "_s.c" )) do_server = 1; + else if (strendswith( output_name, "_i.c" )) do_idfile = 1; + else if (strendswith( output_name, "_r.res" )) do_regscript = 1; + else if (strendswith( output_name, "_t.res" )) do_typelib = 1; + else if (strendswith( output_name, "dlldata.c" )) do_dlldata = 1; + else do_everything = 1; + } + if(do_everything) { set_everything(TRUE); } if (!output_name) output_name = dup_basename(input_name, ".idl"); - if (!do_everything && - do_header + do_typelib + do_proxies + do_client + + if (do_header + do_typelib + do_proxies + do_client + do_server + do_regscript + do_idfile + do_dlldata == 1) { if (do_header) header_name = output_name; @@ -688,7 +755,7 @@ int main(int argc,char *argv[]) for ( ; optind < argc; ++optind) add_filename_node(&filenames, argv[optind]); - write_dlldata_list(&filenames); + write_dlldata_list(&filenames, 0 /* FIXME */ ); free_filename_nodes(&filenames); return 0; } @@ -697,7 +764,7 @@ int main(int argc,char *argv[]) return 1; } else - input_name = xstrdup(argv[optind]); + input_idl_name = input_name = xstrdup(argv[optind]); } else { fprintf(stderr, "%s", usage); diff --git a/reactos/tools/widl/widl.h b/reactos/tools/widl/widl.h index 6551fa07fbe..9e09f76d116 100644 --- a/reactos/tools/widl/widl.h +++ b/reactos/tools/widl/widl.h @@ -49,8 +49,10 @@ extern int do_win32; extern int do_win64; extern int win32_packing; extern int win64_packing; +extern int do_rt_extension; extern char *input_name; +extern char *input_idl_name; extern char *header_name; extern char *header_token; extern char *local_stubs_name; diff --git a/reactos/tools/widl/widltypes.h b/reactos/tools/widl/widltypes.h index 8447a15ba7f..159b4e2e71d 100644 --- a/reactos/tools/widl/widltypes.h +++ b/reactos/tools/widl/widltypes.h @@ -79,6 +79,7 @@ enum attr_type ATTR_ANNOTATION, ATTR_APPOBJECT, ATTR_ASYNC, + ATTR_ASYNCUUID, ATTR_AUTO_HANDLE, ATTR_BINDABLE, ATTR_BROADCAST, @@ -251,6 +252,7 @@ enum statement_type STMT_TYPEDEF, STMT_IMPORT, STMT_IMPORTLIB, + STMT_PRAGMA, STMT_CPPQUOTE }; @@ -551,9 +553,6 @@ type_t *alloc_type(void); void set_all_tfswrite(int val); void clear_all_offsets(void); -int is_ptr(const type_t *t); -int is_array(const type_t *t); - #define tsENUM 1 #define tsSTRUCT 2 #define tsUNION 3 diff --git a/reactos/tools/widl/write_msft.c b/reactos/tools/widl/write_msft.c index c5b9aa0d559..a191bef92c4 100644 --- a/reactos/tools/widl/write_msft.c +++ b/reactos/tools/widl/write_msft.c @@ -172,7 +172,7 @@ static void ctl2_init_segdir( segdir = &typelib->typelib_segdir[MSFT_SEG_TYPEINFO]; - for (i = 0; i < 15; i++) { + for (i = 0; i < MSFT_SEG_MAX; i++) { segdir[i].offset = -1; segdir[i].length = 0; segdir[i].res08 = -1; @@ -825,7 +825,6 @@ static int encode_type( case VT_UI4: case VT_R4: case VT_ERROR: - case VT_BSTR: case VT_HRESULT: *encoded_type = default_type; *width = 4; @@ -861,8 +860,9 @@ static int encode_type( case VT_UNKNOWN: case VT_DISPATCH: + case VT_BSTR: *encoded_type = default_type; - *width = 4; + *width = pointer_size; *alignment = 4; break; @@ -873,7 +873,7 @@ static int encode_type( case VT_LPSTR: case VT_LPWSTR: *encoded_type = 0xfffe0000 | vt; - *width = 4; + *width = pointer_size; *alignment = 4; break; @@ -896,7 +896,7 @@ static int encode_type( if(next_vt == VT_DISPATCH || next_vt == VT_UNKNOWN) { chat("encode_type: skipping ptr\n"); *encoded_type = target_type; - *width = 4; + *width = pointer_size; *alignment = 4; *decoded_size = child_size; break; @@ -926,13 +926,12 @@ static int encode_type( *encoded_type = typeoffset; - *width = 4; + *width = pointer_size; *alignment = 4; *decoded_size = 8 /*sizeof(TYPEDESC)*/ + child_size; break; } - case VT_SAFEARRAY: { type_t *element_type = type_alias_get_aliasee(type_array_get_element(type)); @@ -964,13 +963,12 @@ static int encode_type( *encoded_type = typeoffset; - *width = 4; + *width = pointer_size; *alignment = 4; *decoded_size = 8 /*sizeof(TYPEDESC)*/ + child_size; break; } - case VT_USERDEFINED: { int typeinfo_offset; @@ -1117,7 +1115,7 @@ static int encode_var( chat("encode_var: skipping ptr\n"); *encoded_type = target_type; *decoded_size = child_size; - *width = 4; + *width = pointer_size; *alignment = 4; return 0; } @@ -1146,7 +1144,7 @@ static int encode_var( *encoded_type = typeoffset; - *width = 4; + *width = pointer_size; *alignment = 4; *decoded_size = 8 /*sizeof(TYPEDESC)*/ + child_size; return 0; @@ -1191,6 +1189,8 @@ static void write_value(msft_typelib_t* typelib, int *out, int vt, const void *v case VT_UINT: case VT_HRESULT: case VT_PTR: + case VT_UNKNOWN: + case VT_DISPATCH: { const unsigned int lv = get_ulong_val(*(const unsigned int *)value, vt); if((lv & 0x3ffffff) == lv) { @@ -1230,7 +1230,7 @@ static void write_value(msft_typelib_t* typelib, int *out, int vt, const void *v } static HRESULT set_custdata(msft_typelib_t *typelib, REFGUID guid, - int vt, int value, int *offset) + int vt, const void *value, int *offset) { MSFT_GuidEntry guidentry; int guidoffset; @@ -1244,7 +1244,7 @@ static HRESULT set_custdata(msft_typelib_t *typelib, REFGUID guid, guidentry.next_hash = -1; guidoffset = ctl2_alloc_guid(typelib, &guidentry); - write_value(typelib, &data_out, vt, &value); + write_value(typelib, &data_out, vt, value); custoffset = ctl2_alloc_segment(typelib, MSFT_SEG_CUSTDATAGUID, 12, 0); @@ -1257,6 +1257,33 @@ static HRESULT set_custdata(msft_typelib_t *typelib, REFGUID guid, return S_OK; } +/* It's possible to have a default value for pointer arguments too. + In this case default value has a referenced type, e.g. + 'LONG*' argument gets VT_I4, 'DOUBLE*' - VT_R8. IUnknown* and IDispatch* + are recognised too and stored as VT_UNKNOWN and VT_DISPATCH. + But IUnknown/IDispatch arguments can only have default value of 0 + (or expression that resolves to zero) while other pointers can have + any default value. */ +static int get_defaultvalue_vt(type_t *type) +{ + int vt = get_type_vt(type); + if (type_get_type(type) == TYPE_ENUM) + vt = VT_I4; + else + { + vt = get_type_vt(type); + if (vt == VT_PTR && is_ptr(type)) { + vt = get_type_vt(type_pointer_get_ref(type)); + /* The only acceptable value for pointers to non-basic types + is NULL, it's stored as VT_I4 for both 32 and 64 bit typelibs. */ + if (vt == VT_USERDEFINED) + vt = VT_I4; + } + } + + return vt; +} + static HRESULT add_func_desc(msft_typeinfo_t* typeinfo, var_t *func, int index) { int offset, name_offset; @@ -1481,10 +1508,7 @@ static HRESULT add_func_desc(msft_typeinfo_t* typeinfo, var_t *func, int index) { int vt; expr_t *expr = (expr_t *)attr->u.pval; - if (type_get_type(arg->type) == TYPE_ENUM) - vt = VT_INT; - else - vt = get_type_vt(arg->type); + vt = get_defaultvalue_vt(arg->type); paramflags |= 0x30; /* PARAMFLAG_FHASDEFAULT | PARAMFLAG_FOPT */ if (expr->type == EXPR_STRLIT || expr->type == EXPR_WSTRLIT) { @@ -1726,7 +1750,7 @@ static HRESULT add_var_desc(msft_typeinfo_t *typeinfo, UINT index, var_t* var) break; case TKIND_DISPATCH: var_kind = 3; /* VAR_DISPATCH */ - typeinfo->datawidth = 4; + typeinfo->datawidth = pointer_size; var_alignment = 4; break; default: @@ -1979,7 +2003,7 @@ static void add_dispinterface_typeinfo(msft_typelib_t *typelib, type_t *dispinte msft_typeinfo = create_msft_typeinfo(typelib, TKIND_DISPATCH, dispinterface->name, dispinterface->attrs); - msft_typeinfo->typeinfo->size = 4; + msft_typeinfo->typeinfo->size = pointer_size; msft_typeinfo->typeinfo->typekind |= 0x2100; msft_typeinfo->typeinfo->flags |= 0x1000; /* TYPEFLAG_FDISPATCHABLE */ @@ -2024,8 +2048,7 @@ static void add_interface_typeinfo(msft_typelib_t *typelib, type_t *interface) return; } - if (is_attr(interface->attrs, ATTR_DISPINTERFACE)) - { + if (is_attr(interface->attrs, ATTR_DISPINTERFACE)) { add_dispinterface_typeinfo(typelib, interface); return; } @@ -2045,7 +2068,7 @@ static void add_interface_typeinfo(msft_typelib_t *typelib, type_t *interface) interface->typelib_idx = typelib->typelib_header.nrtypeinfos; msft_typeinfo = create_msft_typeinfo(typelib, TKIND_INTERFACE, interface->name, interface->attrs); - msft_typeinfo->typeinfo->size = 4; + msft_typeinfo->typeinfo->size = pointer_size; msft_typeinfo->typeinfo->typekind |= 0x2200; for (derived = inherit; derived; derived = type_iface_get_inherit(derived)) @@ -2102,6 +2125,9 @@ static void add_enum_typeinfo(msft_typelib_t *typelib, type_t *enumeration) var_t *cur; msft_typeinfo_t *msft_typeinfo; + if (-1 < enumeration->typelib_idx) + return; + enumeration->typelib_idx = typelib->typelib_header.nrtypeinfos; msft_typeinfo = create_msft_typeinfo(typelib, TKIND_ENUM, enumeration->name, enumeration->attrs); msft_typeinfo->typeinfo->size = 0; @@ -2209,7 +2235,7 @@ static void add_coclass_typeinfo(msft_typelib_t *typelib, type_t *cls) first_source->flags |= 0x1; msft_typeinfo->typeinfo->cImplTypes = num_ifaces; - msft_typeinfo->typeinfo->size = 4; + msft_typeinfo->typeinfo->size = pointer_size; msft_typeinfo->typeinfo->typekind |= 0x2200; } @@ -2265,6 +2291,7 @@ static void add_entry(msft_typelib_t *typelib, const statement_t *stmt) switch(stmt->type) { case STMT_LIBRARY: case STMT_IMPORT: + case STMT_PRAGMA: case STMT_CPPQUOTE: case STMT_DECLARATION: /* not included in typelib */ @@ -2546,7 +2573,12 @@ static void save_all_changes(msft_typelib_t *typelib) if (strendswith( typelib_name, ".res" )) /* create a binary resource file */ { - add_output_to_resources( "TYPELIB", "#1" ); + char typelib_id[13] = "#1"; + + expr_t *expr = get_attrp( typelib->typelib->attrs, ATTR_ID ); + if (expr) + sprintf( typelib_id, "#%d", expr->cval ); + add_output_to_resources( "TYPELIB", typelib_id ); output_typelib_regscript( typelib->typelib ); flush_output_resources( typelib_name ); } @@ -2560,9 +2592,11 @@ int create_msft_typelib(typelib_t *typelib) const statement_t *stmt; time_t cur_time; char *time_override; - unsigned int version = 5 << 24 | 1 << 16 | 164; /* 5.01.0164 */ - GUID midl_time_guid = {0xde77ba63,0x517c,0x11d1,{0xa2,0xda,0x00,0x00,0xf8,0x77,0x3c,0xe9}}; - GUID midl_version_guid = {0xde77ba64,0x517c,0x11d1,{0xa2,0xda,0x00,0x00,0xf8,0x77,0x3c,0xe9}}; + unsigned int version = 7 << 24 | 555; /* 7.00.0555 */ + GUID midl_time_guid = {0xde77ba63,0x517c,0x11d1,{0xa2,0xda,0x00,0x00,0xf8,0x77,0x3c,0xe9}}; + GUID midl_version_guid = {0xde77ba64,0x517c,0x11d1,{0xa2,0xda,0x00,0x00,0xf8,0x77,0x3c,0xe9}}; + GUID midl_info_guid = {0xde77ba65,0x517c,0x11d1,{0xa2,0xda,0x00,0x00,0xf8,0x77,0x3c,0xe9}}; + char info_string[128]; pointer_size = (typelib_kind == SYS_WIN64) ? 8 : 4; @@ -2609,8 +2643,10 @@ int create_msft_typelib(typelib_t *typelib) and midl's version number */ time_override = getenv( "WIDL_TIME_OVERRIDE"); cur_time = time_override ? atol( time_override) : time(NULL); - set_custdata(msft, &midl_time_guid, VT_UI4, cur_time, &msft->typelib_header.CustomDataOffset); - set_custdata(msft, &midl_version_guid, VT_UI4, version, &msft->typelib_header.CustomDataOffset); + sprintf(info_string, "Created by WIDL version %s at %s\n", PACKAGE_VERSION, ctime(&cur_time)); + set_custdata(msft, &midl_info_guid, VT_BSTR, info_string, &msft->typelib_header.CustomDataOffset); + set_custdata(msft, &midl_time_guid, VT_UI4, &cur_time, &msft->typelib_header.CustomDataOffset); + set_custdata(msft, &midl_version_guid, VT_UI4, &version, &msft->typelib_header.CustomDataOffset); if (typelib->stmts) LIST_FOR_EACH_ENTRY( stmt, typelib->stmts, const statement_t, entry ) diff --git a/reactos/tools/wpp/preproc.c b/reactos/tools/wpp/preproc.c index fd99167d9e6..33f69c8ed2d 100644 --- a/reactos/tools/wpp/preproc.c +++ b/reactos/tools/wpp/preproc.c @@ -209,7 +209,7 @@ static void wpp_default_write( const char *buffer, unsigned int len ) { fwrite(buffer, 1, len, ppy_out); } -/* Don't comment on the hash, its primitive but functional... */ +/* Don't comment on the hash, it's primitive but functional... */ static int pphash(const char *str) { int sum = 0;