Skip to content

Instantly share code, notes, and snippets.

@Googulator
Created April 14, 2024 22:18
Show Gist options
  • Select an option

  • Save Googulator/3ef74f629f74f2705ed267bdcdbbf196 to your computer and use it in GitHub Desktop.

Select an option

Save Googulator/3ef74f629f74f2705ed267bdcdbbf196 to your computer and use it in GitHub Desktop.

Revisions

  1. Googulator created this gist Apr 14, 2024.
    2,016 changes: 2,016 additions & 0 deletions parse-preprocessed.c
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2016 @@
    # 1 "parse.c"
    # 74 "parse.c"
    # 1 "flexdef.h" 1
    # 37 "flexdef.h"
    # 1 "/usr/include/stdio.h" 1







    # 1 "/usr/include/features.h" 1
    # 9 "/usr/include/stdio.h" 2
    # 26 "/usr/include/stdio.h"
    # 1 "/usr/include/bits/alltypes.h" 1





    typedef char *__builtin_va_list;
    # 19 "/usr/include/bits/alltypes.h"
    typedef __builtin_va_list va_list;




    typedef __builtin_va_list __isoc_va_list;
    # 148 "/usr/include/bits/alltypes.h"
    typedef unsigned int size_t;
    # 163 "/usr/include/bits/alltypes.h"
    typedef int ssize_t;
    # 250 "/usr/include/bits/alltypes.h"
    typedef long long off_t;
    # 403 "/usr/include/bits/alltypes.h"
    struct _IO_FILE { char __x; };




    typedef struct _IO_FILE FILE;
    # 27 "/usr/include/stdio.h" 2
    # 54 "/usr/include/stdio.h"
    typedef union _G_fpos64_t {
    char __opaque[16];
    long long __lldata;
    double __align;
    } fpos_t;

    extern FILE *const stdin;
    extern FILE *const stdout;
    extern FILE *const stderr;





    FILE *fopen(const char *restrict, const char *restrict);
    FILE *freopen(const char *restrict, const char *restrict, FILE *restrict);
    int fclose(FILE *);

    int remove(const char *);
    int rename(const char *, const char *);

    int feof(FILE *);
    int ferror(FILE *);
    int fflush(FILE *);
    void clearerr(FILE *);

    int fseek(FILE *, long, int);
    long ftell(FILE *);
    void rewind(FILE *);

    int fgetpos(FILE *restrict, fpos_t *restrict);
    int fsetpos(FILE *, const fpos_t *);

    size_t fread(void *restrict, size_t, size_t, FILE *restrict);
    size_t fwrite(const void *restrict, size_t, size_t, FILE *restrict);

    int fgetc(FILE *);
    int getc(FILE *);
    int getchar(void);
    int ungetc(int, FILE *);

    int fputc(int, FILE *);
    int putc(int, FILE *);
    int putchar(int);

    char *fgets(char *restrict, int, FILE *restrict);

    char *gets(char *);


    int fputs(const char *restrict, FILE *restrict);
    int puts(const char *);

    int printf(const char *restrict, ...);
    int fprintf(FILE *restrict, const char *restrict, ...);
    int sprintf(char *restrict, const char *restrict, ...);
    int snprintf(char *restrict, size_t, const char *restrict, ...);

    int vprintf(const char *restrict, __isoc_va_list);
    int vfprintf(FILE *restrict, const char *restrict, __isoc_va_list);
    int vsprintf(char *restrict, const char *restrict, __isoc_va_list);
    int vsnprintf(char *restrict, size_t, const char *restrict, __isoc_va_list);

    int scanf(const char *restrict, ...);
    int fscanf(FILE *restrict, const char *restrict, ...);
    int sscanf(const char *restrict, const char *restrict, ...);
    int vscanf(const char *restrict, __isoc_va_list);
    int vfscanf(FILE *restrict, const char *restrict, __isoc_va_list);
    int vsscanf(const char *restrict, const char *restrict, __isoc_va_list);

    void perror(const char *);

    int setvbuf(FILE *restrict, char *restrict, int, size_t);
    void setbuf(FILE *restrict, char *restrict);

    char *tmpnam(char *);
    FILE *tmpfile(void);




    FILE *fmemopen(void *restrict, size_t, const char *restrict);
    FILE *open_memstream(char **, size_t *);
    FILE *fdopen(int, const char *);
    FILE *popen(const char *, const char *);
    int pclose(FILE *);
    int fileno(FILE *);
    int fseeko(FILE *, off_t, int);
    off_t ftello(FILE *);
    int dprintf(int, const char *restrict, ...);
    int vdprintf(int, const char *restrict, __isoc_va_list);
    void flockfile(FILE *);
    int ftrylockfile(FILE *);
    void funlockfile(FILE *);
    int getc_unlocked(FILE *);
    int getchar_unlocked(void);
    int putc_unlocked(int, FILE *);
    int putchar_unlocked(int);
    ssize_t getdelim(char **restrict, size_t *restrict, int, FILE *restrict);
    ssize_t getline(char **restrict, size_t *restrict, FILE *restrict);
    int renameat(int, const char *, int, const char *);
    char *ctermid(char *);







    char *tempnam(const char *, const char *);




    char *cuserid(char *);
    void setlinebuf(FILE *);
    void setbuffer(FILE *, char *, size_t);
    int fgetc_unlocked(FILE *);
    int fputc_unlocked(int, FILE *);
    int fflush_unlocked(FILE *);
    size_t fread_unlocked(void *, size_t, size_t, FILE *);
    size_t fwrite_unlocked(const void *, size_t, size_t, FILE *);
    void clearerr_unlocked(FILE *);
    int feof_unlocked(FILE *);
    int ferror_unlocked(FILE *);
    int fileno_unlocked(FILE *);
    int getw(FILE *);
    int putw(int, FILE *);
    char *fgetln(FILE *, size_t *);
    int asprintf(char **, const char *, ...);
    int vasprintf(char **, const char *, __isoc_va_list);
    # 38 "flexdef.h" 2
    # 1 "/usr/include/ctype.h" 1
    # 10 "/usr/include/ctype.h"
    int isalnum(int);
    int isalpha(int);
    int isblank(int);
    int iscntrl(int);
    int isdigit(int);
    int isgraph(int);
    int islower(int);
    int isprint(int);
    int ispunct(int);
    int isspace(int);
    int isupper(int);
    int isxdigit(int);
    int tolower(int);
    int toupper(int);


    static inline int __isspace(int _c)
    {
    return _c == ' ' || (unsigned)_c-'\t' < 5;
    }
    # 46 "/usr/include/ctype.h"
    # 1 "/usr/include/bits/alltypes.h" 1





    typedef char *__builtin_va_list;
    # 420 "/usr/include/bits/alltypes.h"
    typedef struct __locale_struct * locale_t;
    # 47 "/usr/include/ctype.h" 2

    int isalnum_l(int, locale_t);
    int isalpha_l(int, locale_t);
    int isblank_l(int, locale_t);
    int iscntrl_l(int, locale_t);
    int isdigit_l(int, locale_t);
    int isgraph_l(int, locale_t);
    int islower_l(int, locale_t);
    int isprint_l(int, locale_t);
    int ispunct_l(int, locale_t);
    int isspace_l(int, locale_t);
    int isupper_l(int, locale_t);
    int isxdigit_l(int, locale_t);
    int tolower_l(int, locale_t);
    int toupper_l(int, locale_t);

    int isascii(int);
    int toascii(int);
    # 39 "flexdef.h" 2
    # 1 "/usr/include/limits.h" 1







    # 1 "/usr/include/bits/limits.h" 1
    # 9 "/usr/include/limits.h" 2
    # 40 "flexdef.h" 2
    # 1 "/usr/include/setjmp.h" 1
    # 10 "/usr/include/setjmp.h"
    # 1 "/usr/include/bits/setjmp.h" 1
    typedef unsigned long __jmp_buf[6];
    # 11 "/usr/include/setjmp.h" 2

    typedef struct __jmp_buf_tag {
    __jmp_buf __jb;
    unsigned long __fl;
    unsigned long __ss[128/sizeof(long)];
    } jmp_buf[1];




    typedef jmp_buf sigjmp_buf;
    int sigsetjmp (sigjmp_buf, int);
    void siglongjmp (sigjmp_buf, int);




    int _setjmp (jmp_buf);
    void _longjmp (jmp_buf, int);


    int setjmp (jmp_buf);
    void longjmp (jmp_buf, int);
    # 41 "flexdef.h" 2

    # 1 "config.h" 1
    # 43 "flexdef.h" 2
    # 61 "flexdef.h"
    # 1 "/usr/include/strings.h" 1
    # 11 "/usr/include/strings.h"
    # 1 "/usr/include/bits/alltypes.h" 1





    typedef char *__builtin_va_list;
    # 12 "/usr/include/strings.h" 2




    int bcmp (const void *, const void *, size_t);
    void bcopy (const void *, void *, size_t);
    void bzero (void *, size_t);
    char *index (const char *, int);
    char *rindex (const char *, int);



    int ffs (int);
    int ffsl (long);
    int ffsll (long long);


    int strcasecmp (const char *, const char *);
    int strncasecmp (const char *, const char *, size_t);

    int strcasecmp_l (const char *, const char *, locale_t);
    int strncasecmp_l (const char *, const char *, size_t, locale_t);
    # 62 "flexdef.h" 2
    # 76 "flexdef.h"
    # 1 "gettext.h" 1
    # 77 "flexdef.h" 2
    # 378 "flexdef.h"
    extern int printstats, syntaxerror, eofseen, ddebug, trace, nowarn, spprdflt;
    extern int interactive, caseins, lex_compat, posix_compat, do_yylineno;
    extern int useecs, fulltbl, usemecs, fullspd;
    extern int gen_line_dirs, performance_report, backing_up_report;
    extern int reentrant, reentrant_bison_pure;
    extern int C_plus_plus, long_align, use_read, yytext_is_array, do_yywrap;
    extern int csize;
    extern int yymore_used, reject, real_reject, continued_action, in_rule;

    extern int yymore_really_used, reject_really_used;
    # 423 "flexdef.h"
    extern int datapos, dataline, linenum, out_linenum;
    extern FILE *skelfile, *backing_up_file;
    extern const char *skel[];
    extern int skel_ind;
    extern char *infilename, *outfilename, *headerfilename;
    extern int did_outfilename;
    extern char *prefix, *yyclass;
    extern int do_stdinit, use_stdout;
    extern char **input_files;
    extern int num_input_files;
    extern char *program_name;


    extern FILE* yyin;


    extern char *action_array;
    extern int action_size;
    extern int defs1_offset, prolog_offset, action_offset, action_index;
    # 452 "flexdef.h"
    extern int onestate[500], onesym[500];
    extern int onenext[500], onedef[500], onesp;
    # 489 "flexdef.h"
    extern int maximum_mns, current_mns, current_max_rules;
    extern int num_rules, num_eof_rules, default_rule, lastnfa;
    extern int *firstst, *lastst, *finalst, *transchar, *trans1, *trans2;
    extern int *accptnum, *assoc_rule, *state_type;
    extern int *rule_type, *rule_linenum, *rule_useful;
    extern int *rule_has_nl, *ccl_has_nl;
    extern int nlch;
    # 505 "flexdef.h"
    extern int current_state_type;
    # 514 "flexdef.h"
    extern int variable_trailing_context_rules;
    # 529 "flexdef.h"
    extern int numtemps, numprots, protprev[50], protnext[50], prottbl[50];
    extern int protcomst[50], firstprot, lastprot, protsave[2000];
    # 548 "flexdef.h"
    extern int numecs, nextecm[256 + 1], ecgroup[256 + 1], nummecs;






    extern int tecfwd[256 + 1], tecbck[256 + 1];
    # 568 "flexdef.h"
    extern int lastsc, *scset, *scbol, *scxclu, *sceof;
    extern int current_max_scs;
    extern char **scname;
    # 603 "flexdef.h"
    extern int current_max_dfa_size, current_max_xpairs;
    extern int current_max_template_xpairs, current_max_dfas;
    extern int lastdfa, *nxt, *chk, *tnxt;
    extern int *base, *def, *nultrans, NUL_ec, tblend, firstfree, **dss, *dfasiz;
    extern union dfaacc_union
    {
    int *dfaacc_set;
    int dfaacc_state;
    } *dfaacc;
    extern int *accsiz, *dhash, numas;
    extern int numsnpairs, jambase, jamstate;
    extern int end_of_buffer_state;
    # 628 "flexdef.h"
    extern int lastccl, *cclmap, *ccllen, *cclng, cclreuse;
    extern int current_maxccls, current_max_ccl_tbl_size;
    extern unsigned char *ccltbl;
    # 653 "flexdef.h"
    extern char nmstr[2048];
    extern int sectnum, nummt, hshcol, dfaeql, numeps, eps2, num_reallocs;
    extern int tmpuses, totnst, peakpairs, numuniq, numdup, hshsave;
    extern int num_backing_up, bol_needed;

    void *allocate_array (int, size_t);
    void *reallocate_array (void*, int, size_t);

    void *flex_alloc (size_t);
    void *flex_realloc (void*, size_t);
    void flex_free (void*);
    # 713 "flexdef.h"
    extern int yylval;







    extern void ccladd (int, int);
    extern int cclinit (void);
    extern void cclnegate (int);


    extern void list_character_set (FILE*, int[]);





    extern void check_for_backing_up (int, int[]);


    extern void check_trailing_context (int*, int, int*, int);


    extern int *epsclosure (int*, int*, int[], int*, int*);


    extern void increase_max_dfas (void);

    extern void ntod (void);


    extern int snstods (int[], int, int[], int, int, int*);





    extern void ccl2ecl (void);


    extern int cre8ecs (int[], int[], int);


    extern void mkeccl (unsigned char[], int, int[], int[], int, int);


    extern void mkechar (int, int[], int[]);




    extern void do_indent (void);


    extern void gen_backing_up (void);


    extern void gen_bu_action (void);


    extern void genctbl (void);


    extern void gen_find_action (void);

    extern void genftbl (void);


    extern void gen_next_compressed_state (char*);


    extern void gen_next_match (void);


    extern void gen_next_state (int);


    extern void gen_NUL_trans (void);


    extern void gen_start_state (void);


    extern void gentabs (void);


    extern void indent_put2s (const char *, const char *);


    extern void indent_puts (const char *);

    extern void make_tables (void);




    extern void check_options (void);
    extern void flexend (int);
    extern void usage (void);





    extern void action_define ( const char *defname, int value );


    extern void add_action ( char *new_text );


    extern int all_lower (register char *);


    extern int all_upper (register char *);


    extern void bubble (int [], int);


    extern void check_char (int c);


    extern unsigned char clower (int);


    extern char *copy_string (register const char *);


    extern unsigned char *copy_unsigned_string (register unsigned char *);


    extern void cshell (unsigned char [], int, int);


    extern void dataend (void);


    extern void dataflush (void);


    extern void flexerror (const char *);


    extern void flexfatal (const char *);


    extern int htoi (unsigned char[]);


    extern void lerrif (const char *, int);


    extern void lerrsf (const char *, const char *);


    extern void line_directive_out (FILE*, int);




    extern void mark_defs1 (void);


    extern void mark_prolog (void);


    extern void mk2data (int);

    extern void mkdata (int);


    extern int myctoi (const char *);


    extern unsigned char myesc (unsigned char[]);


    extern int otoi (unsigned char [] );


    extern void out (const char *);
    extern void out_dec (const char *, int);
    extern void out_dec2 (const char *, int, int);
    extern void out_hex (const char *, unsigned int);
    extern void out_line_count (const char *);
    extern void out_str (const char *, const char *);
    extern void out_str3
    (const char *, const char *, const char *, const char *);
    extern void out_str_dec (const char *, const char *, int);
    extern void outc (int);
    extern void outn (const char *);




    extern char *readable_form (int);


    extern void skelout (void);


    extern void transition_struct_out (int, int);


    extern void *yy_flex_xmalloc ( int );


    extern void zero_out (char *, size_t);





    extern void add_accept (int, int);


    extern int copysingl (int, int);


    extern void dumpnfa (int);


    extern void finish_rule (int, int, int, int, int);


    extern int link_machines (int, int);




    extern void mark_beginning_as_normal (register int);


    extern int mkbranch (int, int);

    extern int mkclos (int);
    extern int mkopt (int);


    extern int mkor (int, int);


    extern int mkposcl (int);

    extern int mkrep (int, int, int);


    extern int mkstate (int);

    extern void new_rule (void);





    extern void build_eof_action (void);


    extern void format_pinpoint_message (const char *, const char *);


    extern void pinpoint_message (const char *);


    extern void line_warning ( const char *, int );


    extern void line_pinpoint ( const char *, int );


    extern void format_synerr (const char *, const char *);
    extern void synerr (const char *);
    extern void format_warn (const char *, const char *);
    extern void warn (const char *);
    extern void yyerror (const char *);
    extern int yyparse (void);





    extern int flexscan (void);


    extern void set_input_file (char*);


    extern int yywrap (void);





    extern void cclinstal (unsigned char [], int);


    extern int ccllookup (unsigned char []);

    extern void ndinstal (const char *, unsigned char[]);
    extern unsigned char *ndlookup (const char *);


    extern void scextend (void);
    extern void scinstal (const char *, int);


    extern int sclookup (const char *);





    extern void bldtbl (int[], int, int, int, int);

    extern void cmptmps (void);
    extern void expand_nxt_chk (void);

    extern int find_table_space (int*, int);
    extern void inittbl (void);

    extern void mkdeftbl (void);




    extern void mk1tbl (int, int, int, int);


    extern void place_state (int*, int, int);


    extern void stack1 (int, int, int, int);




    extern int yylex (void);


    struct Buf {
    void * elts;
    int nelts;
    size_t elt_size;
    int nmax;
    };

    extern void buf_init (struct Buf* buf, size_t elem_size);
    extern void buf_destroy (struct Buf* buf);
    extern struct Buf* buf_append (struct Buf* buf, const void* ptr, int n_elem);
    extern struct Buf* buf_strappend (struct Buf*, const char* str);
    extern struct Buf* buf_strnappend (struct Buf*, const char* str, int nchars);
    extern struct Buf* buf_strdefine (struct Buf* buf, const char* str, const char* def);


    extern struct Buf userdef_buf;


    extern struct Buf defs_buf;






    extern jmp_buf flex_main_jmp_buf;



    extern char* chomp(char* str);
    # 75 "parse.c" 2
    # 104 "parse.c"
    int pat, scnum, eps, headcnt, trailcnt, anyccl, lastchar, i, rulelen;
    int trlcontxt, xcluflg, currccl, cclsorted, varlength, variable_trail_rule;

    int *scon_stk;
    int scon_stk_ptr;

    static int madeany = 0;
    int previous_continued_action;
    # 135 "parse.c"
    # 1 "/usr/include/stdlib.h" 1
    # 19 "/usr/include/stdlib.h"
    # 1 "/usr/include/bits/alltypes.h" 1





    typedef char *__builtin_va_list;
    # 44 "/usr/include/bits/alltypes.h"
    typedef int wchar_t;
    # 20 "/usr/include/stdlib.h" 2

    int atoi (const char *);
    long atol (const char *);
    long long atoll (const char *);
    double atof (const char *);

    float strtof (const char *restrict, char **restrict);
    double strtod (const char *restrict, char **restrict);
    long double strtold (const char *restrict, char **restrict);

    long strtol (const char *restrict, char **restrict, int);
    unsigned long strtoul (const char *restrict, char **restrict, int);
    long long strtoll (const char *restrict, char **restrict, int);
    unsigned long long strtoull (const char *restrict, char **restrict, int);

    int rand (void);
    void srand (unsigned);

    void *malloc (size_t);
    void *calloc (size_t, size_t);
    void *realloc (void *, size_t);
    void free (void *);
    void *aligned_alloc(size_t, size_t);

    void abort (void);
    int atexit (void (*) (void));
    void exit (int);
    void _Exit (int);
    int at_quick_exit (void (*) (void));
    void quick_exit (int);

    char *getenv (const char *);

    int system (const char *);

    void *bsearch (const void *, const void *, size_t, size_t, int (*)(const void *, const void *));
    void qsort (void *, size_t, size_t, int (*)(const void *, const void *));

    int abs (int);
    long labs (long);
    long long llabs (long long);

    typedef struct { int quot, rem; } div_t;
    typedef struct { long quot, rem; } ldiv_t;
    typedef struct { long long quot, rem; } lldiv_t;

    div_t div (int, int);
    ldiv_t ldiv (long, long);
    lldiv_t lldiv (long long, long long);

    int mblen (const char *, size_t);
    int mbtowc (wchar_t *restrict, const char *restrict, size_t);
    int wctomb (char *, wchar_t);
    size_t mbstowcs (wchar_t *restrict, const char *restrict, size_t);
    size_t wcstombs (char *restrict, const wchar_t *restrict, size_t);




    size_t __ctype_get_mb_cur_max(void);
    # 99 "/usr/include/stdlib.h"
    int posix_memalign (void **, size_t, size_t);
    int setenv (const char *, const char *, int);
    int unsetenv (const char *);
    int mkstemp (char *);
    int mkostemp (char *, int);
    char *mkdtemp (char *);
    int getsubopt (char **, char *const *, char **);
    int rand_r (unsigned *);






    char *realpath (const char *restrict, char *restrict);
    long int random (void);
    void srandom (unsigned int);
    char *initstate (unsigned int, char *, size_t);
    char *setstate (char *);
    int putenv (char *);
    int posix_openpt (int);
    int grantpt (int);
    int unlockpt (int);
    char *ptsname (int);
    char *l64a (long);
    long a64l (const char *);
    void setkey (const char *);
    double drand48 (void);
    double erand48 (unsigned short [3]);
    long int lrand48 (void);
    long int nrand48 (unsigned short [3]);
    long mrand48 (void);
    long jrand48 (unsigned short [3]);
    void srand48 (long);
    unsigned short *seed48 (unsigned short [3]);
    void lcong48 (unsigned short [7]);



    # 1 "/usr/include/alloca.h" 1
    # 9 "/usr/include/alloca.h"
    # 1 "/usr/include/bits/alltypes.h" 1





    typedef char *__builtin_va_list;
    # 10 "/usr/include/alloca.h" 2

    void *alloca(size_t);
    # 139 "/usr/include/stdlib.h" 2
    char *mktemp (char *);
    int mkstemps (char *, int);
    int mkostemps (char *, int, int);
    void *valloc (size_t);
    void *memalign(size_t, size_t);
    int getloadavg(double *, int);
    int clearenv(void);
    # 136 "parse.c" 2
    # 1 "/usr/include/string.h" 1
    # 23 "/usr/include/string.h"
    # 1 "/usr/include/bits/alltypes.h" 1





    typedef char *__builtin_va_list;
    # 24 "/usr/include/string.h" 2

    void *memcpy (void *restrict, const void *restrict, size_t);
    void *memmove (void *, const void *, size_t);
    void *memset (void *, int, size_t);
    int memcmp (const void *, const void *, size_t);
    void *memchr (const void *, int, size_t);

    char *strcpy (char *restrict, const char *restrict);
    char *strncpy (char *restrict, const char *restrict, size_t);

    char *strcat (char *restrict, const char *restrict);
    char *strncat (char *restrict, const char *restrict, size_t);

    int strcmp (const char *, const char *);
    int strncmp (const char *, const char *, size_t);

    int strcoll (const char *, const char *);
    size_t strxfrm (char *restrict, const char *restrict, size_t);

    char *strchr (const char *, int);
    char *strrchr (const char *, int);

    size_t strcspn (const char *, const char *);
    size_t strspn (const char *, const char *);
    char *strpbrk (const char *, const char *);
    char *strstr (const char *, const char *);
    char *strtok (char *restrict, const char *restrict);

    size_t strlen (const char *);

    char *strerror (int);
    # 63 "/usr/include/string.h"
    char *strtok_r (char *restrict, const char *restrict, char **restrict);
    int strerror_r (int, char *, size_t);
    char *stpcpy(char *restrict, const char *restrict);
    char *stpncpy(char *restrict, const char *restrict, size_t);
    size_t strnlen (const char *, size_t);
    char *strdup (const char *);
    char *strndup (const char *, size_t);
    char *strsignal(int);
    char *strerror_l (int, locale_t);
    int strcoll_l (const char *, const char *, locale_t);
    size_t strxfrm_l (char *restrict, const char *restrict, size_t, locale_t);




    void *memccpy (void *restrict, const void *restrict, int, size_t);



    char *strsep(char **, const char *);
    size_t strlcat (char *, const char *, size_t);
    size_t strlcpy (char *, const char *, size_t);
    void explicit_bzero (void *, size_t);
    # 137 "parse.c" 2
    # 155 "parse.c"
    int yylex(void);

    int yyparse(void);
    # 166 "parse.c"
    extern int yychar;
    extern int yyerrflag;



    int yylval;
    int yyval;
    typedef int yytabelem;




    int yy_yys[150], *yys = yy_yys;
    int yy_yyv[150], *yyv = yy_yyv;




    static int yymaxdepth = 150;
    # 195 "parse.c"
    void build_eof_action()
    {
    register int i;
    char action_text[2048];

    for ( i = 1; i <= scon_stk_ptr; ++i )
    {
    if ( sceof[scon_stk[i]] )
    format_pinpoint_message(
    "multiple <<EOF>> rules for start condition %s",
    scname[scon_stk[i]] );

    else
    {
    sceof[scon_stk[i]] = 1;
    sprintf( action_text, "case YY_STATE_EOF(%s):\n",
    scname[scon_stk[i]] );
    add_action( action_text );
    }
    }

    line_directive_out( (FILE *) 0, 1 );






    --num_rules;
    ++num_eof_rules;
    }




    void format_synerr( msg, arg )
    const char *msg, arg[];
    {
    char errmsg[2048];

    (void) sprintf( errmsg, msg, arg );
    synerr( errmsg );
    }




    void synerr( str )
    const char *str;
    {
    syntaxerror = 1;
    pinpoint_message( str );
    }




    void format_warn( msg, arg )
    const char *msg, arg[];
    {
    char warn_msg[2048];

    (void) sprintf( warn_msg, msg, arg );
    warn( warn_msg );
    }




    void warn( str )
    const char *str;
    {
    line_warning( str, linenum );
    }





    void format_pinpoint_message( msg, arg )
    const char *msg, arg[];
    {
    char errmsg[2048];

    (void) sprintf( errmsg, msg, arg );
    pinpoint_message( errmsg );
    }




    void pinpoint_message( str )
    const char *str;
    {
    line_pinpoint( str, linenum );
    }




    void line_warning( str, line )
    const char *str;
    int line;
    {
    char warning[2048];

    if ( ! nowarn )
    {
    sprintf( warning, "warning, %s", str );
    line_pinpoint( warning, line );
    }
    }




    void line_pinpoint( str, line )
    const char *str;
    int line;
    {
    fprintf( (stderr), "%s: %d: %s\n", infilename, line, str );
    }






    void yyerror( msg )
    const char *msg;
    {
    }
    static const yytabelem yyexca[] ={
    -1, 1,
    0, -1,
    -2, 0,
    -1, 2,
    259, 5,
    260, 5,
    261, 5,
    265, 5,
    -2, 0,
    -1, 12,
    0, 23,
    -2, 31,
    };


    static const yytabelem yyact[]={

    108, 46, 68, 69, 111, 105, 115, 47, 109, 103,
    114, 54, 86, 43, 22, 23, 24, 25, 46, 8,
    9, 10, 83, 70, 47, 11, 53, 59, 46, 15,
    43, 112, 54, 110, 47, 14, 58, 57, 56, 20,
    43, 82, 81, 113, 4, 19, 63, 85, 79, 27,
    75, 42, 52, 74, 41, 78, 33, 65, 49, 55,
    32, 31, 30, 19, 40, 107, 29, 36, 12, 60,
    17, 88, 72, 77, 44, 49, 39, 51, 28, 34,
    18, 21, 16, 7, 13, 49, 6, 5, 35, 26,
    3, 2, 1, 66, 0, 0, 50, 0, 0, 0,
    0, 0, 0, 61, 62, 0, 0, 0, 0, 0,
    76, 0, 73, 0, 0, 0, 0, 0, 0, 80,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 101,
    64, 102, 66, 0, 64, 0, 64, 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, 87, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 87, 89, 90, 91,
    92, 93, 94, 95, 96, 97, 98, 99, 100, 89,
    90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
    100, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 48, 0, 0, 0, 0, 0,
    45, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 48, 0, 0, 71, 84, 106, 45, 104, 67,
    38, 48, 0, 0, 0, 0, 0, 45, 37 };
    static const yytabelem yypact[]={

    -10000000,-10000000, -212, -240,-10000000,-10000000, -227,-10000000,-10000000,-10000000,
    -10000000,-10000000, 3, -223,-10000000,-10000000, -252,-10000000, -74, 24,
    -10000000,-10000000, 1, 0, -1, -5, -6,-10000000, -230, -3,
    -224, -225, -226, -235, 59, -16,-10000000,-10000000,-10000000, -16,
    10, -33, -40,-10000000,-10000000,-10000000,-10000000, -16,-10000000, -44,
    -15, 11,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,
    -10000000,-10000000, 12,-10000000, -16,-10000000, -40, -216,-10000000,-10000000,
    -10000000, -217, -12, 6, -81,-10000000,-10000000,-10000000, -251,-10000000,
    -33, -35, -39,-10000000,-10000000,-10000000,-10000000, 20,-10000000,-10000000,
    -10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,
    -10000000, -93,-10000000, -250,-10000000, -254,-10000000, -214,-10000000, -273,
    -10000000, -279,-10000000,-10000000,-10000000,-10000000 };
    static const yytabelem yypgo[]={

    0, 92, 91, 90, 87, 68, 70, 86, 84, 83,
    82, 81, 80, 79, 67, 78, 77, 52, 76, 64,
    54, 51, 74, 72, 53, 71 };
    static const yytabelem yyr1[]={

    0, 1, 2, 3, 3, 3, 3, 4, 7, 7,
    8, 8, 8, 9, 10, 10, 11, 11, 11, 11,
    5, 5, 5, 6, 13, 13, 13, 13, 15, 12,
    12, 12, 16, 16, 16, 17, 14, 14, 14, 14,
    19, 19, 18, 20, 20, 20, 20, 20, 21, 21,
    21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
    22, 22, 24, 24, 24, 24, 25, 25, 25, 25,
    25, 25, 25, 25, 25, 25, 25, 25, 23, 23 };
    static const yytabelem yyr2[]={

    0, 11, 1, 6, 4, 0, 3, 3, 3, 3,
    5, 3, 3, 4, 4, 0, 7, 7, 7, 7,
    11, 11, 0, 1, 5, 3, 3, 3, 1, 9,
    7, 1, 6, 2, 3, 3, 5, 7, 5, 3,
    7, 3, 5, 5, 3, 13, 11, 9, 5, 5,
    5, 13, 11, 9, 3, 3, 3, 7, 7, 3,
    7, 9, 9, 5, 5, 1, 3, 3, 3, 3,
    3, 3, 3, 3, 3, 3, 3, 3, 5, 1 };
    static const yytabelem yychk[]={

    -10000000, -1, -2, -3, 256, -4, -7, -9, 259, 260,
    261, 265, -5, -8, 262, 256, -10, -6, -12, 60,
    262, -11, 266, 267, 268, 269, -6, 123, -15, 42,
    61, 61, 61, 61, -13, 94, -14, 264, 256, -18,
    -19, -20, -21, 46, -22, 263, 34, 40, 257, 91,
    -5, -16, -17, 256, 262, 62, 262, 262, 262, 262,
    10, -14, -19, 36, 124, 47, -21, 282, 42, 43,
    63, 284, -23, -19, -24, 94, 125, 62, 44, 36,
    -20, 258, 258, 34, 257, 41, 93, 257, -25, 270,
    271, 272, 273, 274, 275, 276, 277, 278, 279, 280,
    281, -24, -17, 44, 283, 44, 285, 45, 93, 258,
    283, 258, 285, 257, 283, 285 };
    static const yytabelem yydef[]={

    2, -2, -2, 0, 6, 22, 0, 4, 7, 8,
    9, 15, -2, 3, 11, 12, 13, 1, 23, 28,
    10, 14, 0, 0, 0, 0, 0, 22, 0, 0,
    0, 0, 0, 0, 0, 0, 25, 26, 27, 0,
    39, 41, 44, 54, 55, 56, 79, 0, 59, 65,
    31, 0, 33, 34, 35, 30, 16, 17, 18, 19,
    20, 24, 36, 38, 0, 42, 43, 0, 48, 49,
    50, 0, 0, 0, 0, 65, 21, 29, 0, 37,
    40, 0, 0, 57, 78, 58, 60, 63, 64, 66,
    67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
    77, 0, 32, 0, 47, 0, 53, 0, 61, 0,
    46, 0, 52, 62, 45, 51 };
    typedef struct



    {



    char *t_name; int t_val; } yytoktype;
    # 1083 "parse.c"
    yytmp = yy_n;
    yypvt = yy_pv;
    # 1097 "parse.c"
    {

    register int yy_len = yyr2[ yy_n ];

    if ( !( yy_len & 01 ) )
    {
    yy_len >>= 1;
    yyval = ( yy_pv -= yy_len )[1];
    yy_state = yypgo[ yy_n = yyr1[ yy_n ] ] +
    *( yy_ps -= yy_len ) + 1;
    if ( yy_state >= 259 ||
    yychk[ yy_state =
    yyact[ yy_state ] ] != -yy_n )
    {
    yy_state = yyact[ yypgo[ yy_n ] ];
    }
    goto yy_stack;
    }
    yy_len >>= 1;
    yyval = ( yy_pv -= yy_len )[1];
    yy_state = yypgo[ yy_n = yyr1[ yy_n ] ] +
    *( yy_ps -= yy_len ) + 1;
    if ( yy_state >= 259 ||
    yychk[ yy_state = yyact[ yy_state ] ] != -yy_n )
    {
    yy_state = yyact[ yypgo[ yy_n ] ];
    }
    }

    yystate = yy_state;
    yyps = yy_ps;
    yypv = yy_pv;
    }



    switch( yytmp )
    {

    case 1:

    {
    int def_rule;

    pat = cclinit();
    cclnegate( pat );

    def_rule = mkstate( -pat );




    default_rule = num_rules;

    finish_rule( def_rule, 0, 0, 0, 0);

    for ( i = 1; i <= lastsc; ++i )
    scset[i] = mkbranch( scset[i], def_rule );

    if ( spprdflt )
    add_action(
    "YY_FATAL_ERROR( \"flex scanner jammed\" )" );
    else
    add_action( "ECHO" );

    add_action( ";\n\tYY_BREAK\n" );
    } break;
    case 2:

    {


    scinstal( "INITIAL", 0 );
    } break;
    case 6:

    { synerr( ((const char *) ("unknown error processing section 1")) ); } break;
    case 7:

    {
    check_options();
    scon_stk = (int *) allocate_array( lastsc + 1, sizeof( int ) );
    scon_stk_ptr = 0;
    } break;
    case 8:

    { xcluflg = 0; } break;
    case 9:

    { xcluflg = 1; } break;
    case 10:

    { scinstal( nmstr, xcluflg ); } break;
    case 11:

    { scinstal( nmstr, xcluflg ); } break;
    case 12:

    { synerr( ((const char *) ("bad start condition list")) ); } break;
    case 16:

    {
    outfilename = copy_string( nmstr );
    did_outfilename = 1;
    } break;
    case 17:

    { prefix = copy_string( nmstr ); } break;
    case 18:

    { yyclass = copy_string( nmstr ); } break;
    case 19:

    { headerfilename = copy_string( nmstr ); } break;
    case 20:

    { scon_stk_ptr = yypvt[-3]; } break;
    case 21:

    { scon_stk_ptr = yypvt[-3]; } break;
    case 23:

    {

    trlcontxt = variable_trail_rule = varlength = 0;
    trailcnt = headcnt = rulelen = 0;
    current_state_type = 0x1;
    previous_continued_action = continued_action;
    in_rule = 1;

    new_rule();
    } break;
    case 24:

    {
    pat = yypvt[-0];
    finish_rule( pat, variable_trail_rule,
    headcnt, trailcnt , previous_continued_action);

    if ( scon_stk_ptr > 0 )
    {
    for ( i = 1; i <= scon_stk_ptr; ++i )
    scbol[scon_stk[i]] =
    mkbranch( scbol[scon_stk[i]],
    pat );
    }

    else
    {




    for ( i = 1; i <= lastsc; ++i )
    if ( ! scxclu[i] )
    scbol[i] = mkbranch( scbol[i],
    pat );
    }

    if ( ! bol_needed )
    {
    bol_needed = 1;

    if ( performance_report > 1 )
    pinpoint_message(
    "'^' operator results in sub-optimal performance" );
    }
    } break;
    case 25:

    {
    pat = yypvt[-0];
    finish_rule( pat, variable_trail_rule,
    headcnt, trailcnt , previous_continued_action);

    if ( scon_stk_ptr > 0 )
    {
    for ( i = 1; i <= scon_stk_ptr; ++i )
    scset[scon_stk[i]] =
    mkbranch( scset[scon_stk[i]],
    pat );
    }

    else
    {
    for ( i = 1; i <= lastsc; ++i )
    if ( ! scxclu[i] )
    scset[i] =
    mkbranch( scset[i],
    pat );
    }
    } break;
    case 26:

    {
    if ( scon_stk_ptr > 0 )
    build_eof_action();

    else
    {



    for ( i = 1; i <= lastsc; ++i )
    if ( ! sceof[i] )
    scon_stk[++scon_stk_ptr] = i;

    if ( scon_stk_ptr == 0 )
    warn(
    "all start conditions already have <<EOF>> rules" );

    else
    build_eof_action();
    }
    } break;
    case 27:

    { synerr( ((const char *) ("unrecognized rule")) ); } break;
    case 28:

    { yyval = scon_stk_ptr; } break;
    case 29:

    { yyval = yypvt[-2]; } break;
    case 30:

    {
    yyval = scon_stk_ptr;

    for ( i = 1; i <= lastsc; ++i )
    {
    int j;

    for ( j = 1; j <= scon_stk_ptr; ++j )
    if ( scon_stk[j] == i )
    break;

    if ( j > scon_stk_ptr )
    scon_stk[++scon_stk_ptr] = i;
    }
    } break;
    case 31:

    { yyval = scon_stk_ptr; } break;
    case 34:

    { synerr( ((const char *) ("bad start condition list")) ); } break;
    case 35:

    {
    if ( (scnum = sclookup( nmstr )) == 0 )
    format_pinpoint_message(
    "undeclared start condition %s",
    nmstr );
    else
    {
    for ( i = 1; i <= scon_stk_ptr; ++i )
    if ( scon_stk[i] == scnum )
    {
    format_warn(
    "<%s> specified twice",
    scname[scnum] );
    break;
    }

    if ( i > scon_stk_ptr )
    scon_stk[++scon_stk_ptr] = scnum;
    }
    } break;
    case 36:

    {
    if ( transchar[lastst[yypvt[-0]]] != (256 + 1) )




    yypvt[-0] = link_machines( yypvt[-0],
    mkstate( (256 + 1) ) );

    mark_beginning_as_normal( yypvt[-0] );
    current_state_type = 0x1;

    if ( previous_continued_action )
    {
    # 1390 "parse.c"
    if ( ! varlength || headcnt != 0 )
    warn(
    "trailing context made variable due to preceding '|' action" );


    varlength = 1;
    headcnt = 0;

    }

    if ( lex_compat || (varlength && headcnt == 0) )
    {
    # 1412 "parse.c"
    add_accept( yypvt[-1],
    num_rules | 0x4000 );
    variable_trail_rule = 1;
    }

    else
    trailcnt = rulelen;

    yyval = link_machines( yypvt[-1], yypvt[-0] );
    } break;
    case 37:

    { synerr( ((const char *) ("trailing context used twice")) ); } break;
    case 38:

    {
    headcnt = 0;
    trailcnt = 1;
    rulelen = 1;
    varlength = 0;

    current_state_type = 0x2;

    if ( trlcontxt )
    {
    synerr( ((const char *) ("trailing context used twice")) );
    yyval = mkstate( (256 + 1) );
    }

    else if ( previous_continued_action )
    {



    warn(
    "trailing context made variable due to preceding '|' action" );

    varlength = 1;
    }

    if ( lex_compat || varlength )
    {



    add_accept( yypvt[-1],
    num_rules | 0x4000 );
    variable_trail_rule = 1;
    }

    trlcontxt = 1;

    eps = mkstate( (256 + 1) );
    yyval = link_machines( yypvt[-1],
    link_machines( eps, mkstate( '\n' ) ) );
    } break;
    case 39:

    {
    yyval = yypvt[-0];

    if ( trlcontxt )
    {
    if ( lex_compat || (varlength && headcnt == 0) )



    variable_trail_rule = 1;
    else
    trailcnt = rulelen;
    }
    } break;
    case 40:

    {
    varlength = 1;
    yyval = mkor( yypvt[-2], yypvt[-0] );
    } break;
    case 41:

    { yyval = yypvt[-0]; } break;
    case 42:

    {





    if ( trlcontxt )
    synerr( ((const char *) ("trailing context used twice")) );
    else
    trlcontxt = 1;

    if ( varlength )



    varlength = 0;
    else
    headcnt = rulelen;

    rulelen = 0;

    current_state_type = 0x2;
    yyval = yypvt[-1];
    } break;
    case 43:

    {



    yyval = link_machines( yypvt[-1], yypvt[-0] );
    } break;
    case 44:

    { yyval = yypvt[-0]; } break;
    case 45:

    {
    varlength = 1;

    if ( yypvt[-3] > yypvt[-1] || yypvt[-3] < 0 )
    {
    synerr( ((const char *) ("bad iteration values")) );
    yyval = yypvt[-5];
    }
    else
    {
    if ( yypvt[-3] == 0 )
    {
    if ( yypvt[-1] <= 0 )
    {
    synerr(
    ((const char *) ("bad iteration values")) );
    yyval = yypvt[-5];
    }
    else
    yyval = mkopt(
    mkrep( yypvt[-5], 1, yypvt[-1] ) );
    }
    else
    yyval = mkrep( yypvt[-5], yypvt[-3], yypvt[-1] );
    }
    } break;
    case 46:

    {
    varlength = 1;

    if ( yypvt[-2] <= 0 )
    {
    synerr( ((const char *) ("iteration value must be positive")) );
    yyval = yypvt[-4];
    }

    else
    yyval = mkrep( yypvt[-4], yypvt[-2], -1 );
    } break;
    case 47:

    {




    varlength = 1;

    if ( yypvt[-1] <= 0 )
    {
    synerr( ((const char *) ("iteration value must be positive"))
    );
    yyval = yypvt[-3];
    }

    else
    yyval = link_machines( yypvt[-3],
    copysingl( yypvt[-3], yypvt[-1] - 1 ) );
    } break;
    case 48:

    {
    varlength = 1;

    yyval = mkclos( yypvt[-1] );
    } break;
    case 49:

    {
    varlength = 1;
    yyval = mkposcl( yypvt[-1] );
    } break;
    case 50:

    {
    varlength = 1;
    yyval = mkopt( yypvt[-1] );
    } break;
    case 51:

    {
    varlength = 1;

    if ( yypvt[-3] > yypvt[-1] || yypvt[-3] < 0 )
    {
    synerr( ((const char *) ("bad iteration values")) );
    yyval = yypvt[-5];
    }
    else
    {
    if ( yypvt[-3] == 0 )
    {
    if ( yypvt[-1] <= 0 )
    {
    synerr(
    ((const char *) ("bad iteration values")) );
    yyval = yypvt[-5];
    }
    else
    yyval = mkopt(
    mkrep( yypvt[-5], 1, yypvt[-1] ) );
    }
    else
    yyval = mkrep( yypvt[-5], yypvt[-3], yypvt[-1] );
    }
    } break;
    case 52:

    {
    varlength = 1;

    if ( yypvt[-2] <= 0 )
    {
    synerr( ((const char *) ("iteration value must be positive")) );
    yyval = yypvt[-4];
    }

    else
    yyval = mkrep( yypvt[-4], yypvt[-2], -1 );
    } break;
    case 53:

    {




    varlength = 1;

    if ( yypvt[-1] <= 0 )
    {
    synerr( ((const char *) ("iteration value must be positive")) );
    yyval = yypvt[-3];
    }

    else
    yyval = link_machines( yypvt[-3],
    copysingl( yypvt[-3], yypvt[-1] - 1 ) );
    } break;
    case 54:

    {
    if ( ! madeany )
    {

    anyccl = cclinit();
    ccladd( anyccl, '\n' );
    cclnegate( anyccl );

    if ( useecs )
    mkeccl( ccltbl + cclmap[anyccl],
    ccllen[anyccl], nextecm,
    ecgroup, csize, csize );

    madeany = 1;
    }

    ++rulelen;

    yyval = mkstate( -anyccl );
    } break;
    case 55:

    {
    if ( ! cclsorted )




    cshell( ccltbl + cclmap[yypvt[-0]], ccllen[yypvt[-0]], 1 );

    if ( useecs )
    mkeccl( ccltbl + cclmap[yypvt[-0]], ccllen[yypvt[-0]],
    nextecm, ecgroup, csize, csize );

    ++rulelen;

    if (ccl_has_nl[yypvt[-0]])
    rule_has_nl[num_rules] = 1;

    yyval = mkstate( -yypvt[-0] );
    } break;
    case 56:

    {
    ++rulelen;

    if (ccl_has_nl[yypvt[-0]])
    rule_has_nl[num_rules] = 1;

    yyval = mkstate( -yypvt[-0] );
    } break;
    case 57:

    { yyval = yypvt[-1]; } break;
    case 58:

    { yyval = yypvt[-1]; } break;
    case 59:

    {
    ++rulelen;

    if ( caseins && yypvt[-0] >= 'A' && yypvt[-0] <= 'Z' )
    yypvt[-0] = clower( yypvt[-0] );

    if (yypvt[-0] == nlch)
    rule_has_nl[num_rules] = 1;

    yyval = mkstate( yypvt[-0] );
    } break;
    case 60:

    { yyval = yypvt[-1]; } break;
    case 61:

    {
    cclnegate( yypvt[-1] );
    yyval = yypvt[-1];
    } break;
    case 62:

    {
    if ( caseins )
    {
    if ( yypvt[-2] >= 'A' && yypvt[-2] <= 'Z' )
    yypvt[-2] = clower( yypvt[-2] );
    if ( yypvt[-0] >= 'A' && yypvt[-0] <= 'Z' )
    yypvt[-0] = clower( yypvt[-0] );
    }

    if ( yypvt[-2] > yypvt[-0] )
    synerr( ((const char *) ("negative range in character class")) );

    else
    {
    for ( i = yypvt[-2]; i <= yypvt[-0]; ++i )
    ccladd( yypvt[-3], i );




    cclsorted = cclsorted && (yypvt[-2] > lastchar);
    lastchar = yypvt[-0];
    }

    yyval = yypvt[-3];
    } break;
    case 63:

    {
    if ( caseins && yypvt[-0] >= 'A' && yypvt[-0] <= 'Z' )
    yypvt[-0] = clower( yypvt[-0] );

    ccladd( yypvt[-1], yypvt[-0] );
    cclsorted = cclsorted && (yypvt[-0] > lastchar);
    lastchar = yypvt[-0];
    yyval = yypvt[-1];
    } break;
    case 64:

    {

    cclsorted = 0;
    yyval = yypvt[-1];
    } break;
    case 65:

    {
    cclsorted = 1;
    lastchar = 0;
    currccl = yyval = cclinit();
    } break;
    case 66:

    { do{ int c; for ( c = 0; c < csize; ++c ) if ( (0 ? isascii(c) : (unsigned)(c) < 128) && isalnum(c) ) ccladd( currccl, c ); }while(0); } break;
    case 67:

    { do{ int c; for ( c = 0; c < csize; ++c ) if ( (0 ? isascii(c) : (unsigned)(c) < 128) && (0 ? isalpha(c) : (((unsigned)(c)|32)-'a') < 26) ) ccladd( currccl, c ); }while(0); } break;
    case 68:

    { do{ int c; for ( c = 0; c < csize; ++c ) if ( (0 ? isascii(c) : (unsigned)(c) < 128) && ((c) == ' ' || (c) == '\t') ) ccladd( currccl, c ); }while(0); } break;
    case 69:

    { do{ int c; for ( c = 0; c < csize; ++c ) if ( (0 ? isascii(c) : (unsigned)(c) < 128) && iscntrl(c) ) ccladd( currccl, c ); }while(0); } break;
    case 70:

    { do{ int c; for ( c = 0; c < csize; ++c ) if ( (0 ? isascii(c) : (unsigned)(c) < 128) && (0 ? isdigit(c) : ((unsigned)(c)-'0') < 10) ) ccladd( currccl, c ); }while(0); } break;
    case 71:

    { do{ int c; for ( c = 0; c < csize; ++c ) if ( (0 ? isascii(c) : (unsigned)(c) < 128) && (0 ? isgraph(c) : ((unsigned)(c)-0x21) < 0x5e) ) ccladd( currccl, c ); }while(0); } break;
    case 72:

    { do{ int c; for ( c = 0; c < csize; ++c ) if ( (0 ? isascii(c) : (unsigned)(c) < 128) && (0 ? islower(c) : ((unsigned)(c)-'a') < 26) ) ccladd( currccl, c ); }while(0); } break;
    case 73:

    { do{ int c; for ( c = 0; c < csize; ++c ) if ( (0 ? isascii(c) : (unsigned)(c) < 128) && (0 ? isprint(c) : ((unsigned)(c)-0x20) < 0x5f) ) ccladd( currccl, c ); }while(0); } break;
    case 74:

    { do{ int c; for ( c = 0; c < csize; ++c ) if ( (0 ? isascii(c) : (unsigned)(c) < 128) && ispunct(c) ) ccladd( currccl, c ); }while(0); } break;
    case 75:

    { do{ int c; for ( c = 0; c < csize; ++c ) if ( (0 ? isascii(c) : (unsigned)(c) < 128) && __isspace(c) ) ccladd( currccl, c ); }while(0); } break;
    case 76:

    {
    if ( caseins )
    do{ int c; for ( c = 0; c < csize; ++c ) if ( (0 ? isascii(c) : (unsigned)(c) < 128) && (0 ? islower(c) : ((unsigned)(c)-'a') < 26) ) ccladd( currccl, c ); }while(0);
    else
    do{ int c; for ( c = 0; c < csize; ++c ) if ( (0 ? isascii(c) : (unsigned)(c) < 128) && (0 ? isupper(c) : ((unsigned)(c)-'A') < 26) ) ccladd( currccl, c ); }while(0);
    } break;
    case 77:

    { do{ int c; for ( c = 0; c < csize; ++c ) if ( (0 ? isascii(c) : (unsigned)(c) < 128) && isxdigit(c) ) ccladd( currccl, c ); }while(0); } break;
    case 78:

    {
    if ( caseins && yypvt[-0] >= 'A' && yypvt[-0] <= 'Z' )
    yypvt[-0] = clower( yypvt[-0] );

    if ( yypvt[-0] == nlch )
    rule_has_nl[num_rules] = 1;

    ++rulelen;

    yyval = link_machines( yypvt[-1], mkstate( yypvt[-0] ) );
    } break;
    case 79:

    { yyval = mkstate( (256 + 1) ); } break;

    }
    goto yystack;
    }
    1,867 changes: 1,867 additions & 0 deletions parse.c
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,1867 @@
    # define CHAR 257
    # define NUMBER 258
    # define SECTEND 259
    # define SCDECL 260
    # define XSCDECL 261
    # define NAME 262
    # define PREVCCL 263
    # define EOF_OP 264
    # define OPTION_OP 265
    # define OPT_OUTFILE 266
    # define OPT_PREFIX 267
    # define OPT_YYCLASS 268
    # define OPT_HEADER 269
    # define CCE_ALNUM 270
    # define CCE_ALPHA 271
    # define CCE_BLANK 272
    # define CCE_CNTRL 273
    # define CCE_DIGIT 274
    # define CCE_GRAPH 275
    # define CCE_LOWER 276
    # define CCE_PRINT 277
    # define CCE_PUNCT 278
    # define CCE_SPACE 279
    # define CCE_UPPER 280
    # define CCE_XDIGIT 281
    # define BEGIN_REPEAT_POSIX 282
    # define END_REPEAT_POSIX 283
    # define BEGIN_REPEAT_FLEX 284
    # define END_REPEAT_FLEX 285

    //line 29 "parse.y"
    /* Copyright (c) 1990 The Regents of the University of California. */
    /* All rights reserved. */

    /* This code is derived from software contributed to Berkeley by */
    /* Vern Paxson. */

    /* The United States Government has rights in this work pursuant */
    /* to contract no. DE-AC03-76SF00098 between the United States */
    /* Department of Energy and the University of California. */

    /* This file is part of flex. */

    /* Redistribution and use in source and binary forms, with or without */
    /* modification, are permitted provided that the following conditions */
    /* are met: */

    /* 1. Redistributions of source code must retain the above copyright */
    /* notice, this list of conditions and the following disclaimer. */
    /* 2. Redistributions in binary form must reproduce the above copyright */
    /* notice, this list of conditions and the following disclaimer in the */
    /* documentation and/or other materials provided with the distribution. */

    /* Neither the name of the University nor the names of its contributors */
    /* may be used to endorse or promote products derived from this software */
    /* without specific prior written permission. */

    /* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR */
    /* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED */
    /* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
    /* PURPOSE. */

    /* Some versions of bison are broken in that they use alloca() but don't
    * declare it properly. The following is the patented (just kidding!)
    * #ifdef chud to fix the problem, courtesy of Francois Pinard.
    */
    #ifdef YYBISON
    /* AIX requires this to be the first thing in the file. What a piece. */
    # ifdef _AIX
    #pragma alloca
    # endif
    #endif

    #include "flexdef.h"

    /* The remainder of the alloca() cruft has to come after including flexdef.h,
    * so HAVE_ALLOCA_H is (possibly) defined.
    */
    #ifdef YYBISON
    # ifdef __GNUC__
    # ifndef alloca
    # define alloca __builtin_alloca
    # endif
    # else
    # if HAVE_ALLOCA_H
    # include <alloca.h>
    # else
    # ifdef __hpux
    void *alloca ();
    # else
    # ifdef __TURBOC__
    # include <malloc.h>
    # else
    char *alloca ();
    # endif
    # endif
    # endif
    # endif
    #endif

    /* Bletch, ^^^^ that was ugly! */


    int pat, scnum, eps, headcnt, trailcnt, anyccl, lastchar, i, rulelen;
    int trlcontxt, xcluflg, currccl, cclsorted, varlength, variable_trail_rule;

    int *scon_stk;
    int scon_stk_ptr;

    static int madeany = false; /* whether we've made the '.' character class */
    int previous_continued_action; /* whether the previous rule's action was '|' */

    /* Expand a POSIX character class expression. */
    #define CCL_EXPR(func) \
    do{ \
    int c; \
    for ( c = 0; c < csize; ++c ) \
    if ( isascii(c) && func(c) ) \
    ccladd( currccl, c ); \
    }while(0)

    /* While POSIX defines isblank(), it's not ANSI C. */
    #define IS_BLANK(c) ((c) == ' ' || (c) == '\t')

    /* On some over-ambitious machines, such as DEC Alpha's, the default
    * token type is "long" instead of "int"; this leads to problems with
    * declaring yylval in flexdef.h. But so far, all the yacc's I've seen
    * wrap their definitions of YYSTYPE with "#ifndef YYSTYPE"'s, so the
    * following should ensure that the default token type is "int".
    */
    #define YYSTYPE int


    #ifdef __STDC__
    #include <stdlib.h>
    #include <string.h>
    #define YYCONST const
    #else
    #include <malloc.h>
    #include <memory.h>
    #define YYCONST
    #endif

    #if defined(__cplusplus) || defined(__STDC__)

    #if defined(__cplusplus) && defined(__EXTERN_C__)
    extern "C" {
    #endif
    #ifndef yyerror
    #if defined(__cplusplus)
    void yyerror(YYCONST char *);
    #endif
    #endif
    #ifndef yylex
    int yylex(void);
    #endif
    int yyparse(void);
    #if defined(__cplusplus) && defined(__EXTERN_C__)
    }
    #endif

    #endif

    #define yyclearin yychar = -1
    #define yyerrok yyerrflag = 0
    extern int yychar;
    extern int yyerrflag;
    #ifndef YYSTYPE
    #define YYSTYPE int
    #endif
    YYSTYPE yylval;
    YYSTYPE yyval;
    typedef int yytabelem;
    #ifndef YYMAXDEPTH
    #define YYMAXDEPTH 150
    #endif
    #if YYMAXDEPTH > 0
    int yy_yys[YYMAXDEPTH], *yys = yy_yys;
    YYSTYPE yy_yyv[YYMAXDEPTH], *yyv = yy_yyv;
    #else /* user does initial allocation */
    int *yys;
    YYSTYPE *yyv;
    #endif
    static int yymaxdepth = YYMAXDEPTH;
    # define YYERRCODE 256

    //line 874 "parse.y"



    /* build_eof_action - build the "<<EOF>>" action for the active start
    * conditions
    */

    void build_eof_action()
    {
    register int i;
    char action_text[MAXLINE];

    for ( i = 1; i <= scon_stk_ptr; ++i )
    {
    if ( sceof[scon_stk[i]] )
    format_pinpoint_message(
    "multiple <<EOF>> rules for start condition %s",
    scname[scon_stk[i]] );

    else
    {
    sceof[scon_stk[i]] = true;
    sprintf( action_text, "case YY_STATE_EOF(%s):\n",
    scname[scon_stk[i]] );
    add_action( action_text );
    }
    }

    line_directive_out( (FILE *) 0, 1 );

    /* This isn't a normal rule after all - don't count it as
    * such, so we don't have any holes in the rule numbering
    * (which make generating "rule can never match" warnings
    * more difficult.
    */
    --num_rules;
    ++num_eof_rules;
    }


    /* format_synerr - write out formatted syntax error */

    void format_synerr( msg, arg )
    const char *msg, arg[];
    {
    char errmsg[MAXLINE];

    (void) sprintf( errmsg, msg, arg );
    synerr( errmsg );
    }


    /* synerr - report a syntax error */

    void synerr( str )
    const char *str;
    {
    syntaxerror = true;
    pinpoint_message( str );
    }


    /* format_warn - write out formatted warning */

    void format_warn( msg, arg )
    const char *msg, arg[];
    {
    char warn_msg[MAXLINE];

    (void) sprintf( warn_msg, msg, arg );
    warn( warn_msg );
    }


    /* warn - report a warning, unless -w was given */

    void warn( str )
    const char *str;
    {
    line_warning( str, linenum );
    }

    /* format_pinpoint_message - write out a message formatted with one string,
    * pinpointing its location
    */

    void format_pinpoint_message( msg, arg )
    const char *msg, arg[];
    {
    char errmsg[MAXLINE];

    (void) sprintf( errmsg, msg, arg );
    pinpoint_message( errmsg );
    }


    /* pinpoint_message - write out a message, pinpointing its location */

    void pinpoint_message( str )
    const char *str;
    {
    line_pinpoint( str, linenum );
    }


    /* line_warning - report a warning at a given line, unless -w was given */

    void line_warning( str, line )
    const char *str;
    int line;
    {
    char warning[MAXLINE];

    if ( ! nowarn )
    {
    sprintf( warning, "warning, %s", str );
    line_pinpoint( warning, line );
    }
    }


    /* line_pinpoint - write out a message, pinpointing it at the given line */

    void line_pinpoint( str, line )
    const char *str;
    int line;
    {
    fprintf( stderr, "%s: %d: %s\n", infilename, line, str );
    }


    /* yyerror - eat up an error message from the parser;
    * currently, messages are ignore
    */

    void yyerror( msg )
    const char *msg;
    {
    }
    static YYCONST yytabelem yyexca[] ={
    -1, 1,
    0, -1,
    -2, 0,
    -1, 2,
    259, 5,
    260, 5,
    261, 5,
    265, 5,
    -2, 0,
    -1, 12,
    0, 23,
    -2, 31,
    };
    # define YYNPROD 80
    # define YYLAST 259
    static YYCONST yytabelem yyact[]={

    108, 46, 68, 69, 111, 105, 115, 47, 109, 103,
    114, 54, 86, 43, 22, 23, 24, 25, 46, 8,
    9, 10, 83, 70, 47, 11, 53, 59, 46, 15,
    43, 112, 54, 110, 47, 14, 58, 57, 56, 20,
    43, 82, 81, 113, 4, 19, 63, 85, 79, 27,
    75, 42, 52, 74, 41, 78, 33, 65, 49, 55,
    32, 31, 30, 19, 40, 107, 29, 36, 12, 60,
    17, 88, 72, 77, 44, 49, 39, 51, 28, 34,
    18, 21, 16, 7, 13, 49, 6, 5, 35, 26,
    3, 2, 1, 66, 0, 0, 50, 0, 0, 0,
    0, 0, 0, 61, 62, 0, 0, 0, 0, 0,
    76, 0, 73, 0, 0, 0, 0, 0, 0, 80,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 101,
    64, 102, 66, 0, 64, 0, 64, 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, 87, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 87, 89, 90, 91,
    92, 93, 94, 95, 96, 97, 98, 99, 100, 89,
    90, 91, 92, 93, 94, 95, 96, 97, 98, 99,
    100, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 48, 0, 0, 0, 0, 0,
    45, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 48, 0, 0, 71, 84, 106, 45, 104, 67,
    38, 48, 0, 0, 0, 0, 0, 45, 37 };
    static YYCONST yytabelem yypact[]={

    -10000000,-10000000, -212, -240,-10000000,-10000000, -227,-10000000,-10000000,-10000000,
    -10000000,-10000000, 3, -223,-10000000,-10000000, -252,-10000000, -74, 24,
    -10000000,-10000000, 1, 0, -1, -5, -6,-10000000, -230, -3,
    -224, -225, -226, -235, 59, -16,-10000000,-10000000,-10000000, -16,
    10, -33, -40,-10000000,-10000000,-10000000,-10000000, -16,-10000000, -44,
    -15, 11,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,
    -10000000,-10000000, 12,-10000000, -16,-10000000, -40, -216,-10000000,-10000000,
    -10000000, -217, -12, 6, -81,-10000000,-10000000,-10000000, -251,-10000000,
    -33, -35, -39,-10000000,-10000000,-10000000,-10000000, 20,-10000000,-10000000,
    -10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,-10000000,
    -10000000, -93,-10000000, -250,-10000000, -254,-10000000, -214,-10000000, -273,
    -10000000, -279,-10000000,-10000000,-10000000,-10000000 };
    static YYCONST yytabelem yypgo[]={

    0, 92, 91, 90, 87, 68, 70, 86, 84, 83,
    82, 81, 80, 79, 67, 78, 77, 52, 76, 64,
    54, 51, 74, 72, 53, 71 };
    static YYCONST yytabelem yyr1[]={

    0, 1, 2, 3, 3, 3, 3, 4, 7, 7,
    8, 8, 8, 9, 10, 10, 11, 11, 11, 11,
    5, 5, 5, 6, 13, 13, 13, 13, 15, 12,
    12, 12, 16, 16, 16, 17, 14, 14, 14, 14,
    19, 19, 18, 20, 20, 20, 20, 20, 21, 21,
    21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
    22, 22, 24, 24, 24, 24, 25, 25, 25, 25,
    25, 25, 25, 25, 25, 25, 25, 25, 23, 23 };
    static YYCONST yytabelem yyr2[]={

    0, 11, 1, 6, 4, 0, 3, 3, 3, 3,
    5, 3, 3, 4, 4, 0, 7, 7, 7, 7,
    11, 11, 0, 1, 5, 3, 3, 3, 1, 9,
    7, 1, 6, 2, 3, 3, 5, 7, 5, 3,
    7, 3, 5, 5, 3, 13, 11, 9, 5, 5,
    5, 13, 11, 9, 3, 3, 3, 7, 7, 3,
    7, 9, 9, 5, 5, 1, 3, 3, 3, 3,
    3, 3, 3, 3, 3, 3, 3, 3, 5, 1 };
    static YYCONST yytabelem yychk[]={

    -10000000, -1, -2, -3, 256, -4, -7, -9, 259, 260,
    261, 265, -5, -8, 262, 256, -10, -6, -12, 60,
    262, -11, 266, 267, 268, 269, -6, 123, -15, 42,
    61, 61, 61, 61, -13, 94, -14, 264, 256, -18,
    -19, -20, -21, 46, -22, 263, 34, 40, 257, 91,
    -5, -16, -17, 256, 262, 62, 262, 262, 262, 262,
    10, -14, -19, 36, 124, 47, -21, 282, 42, 43,
    63, 284, -23, -19, -24, 94, 125, 62, 44, 36,
    -20, 258, 258, 34, 257, 41, 93, 257, -25, 270,
    271, 272, 273, 274, 275, 276, 277, 278, 279, 280,
    281, -24, -17, 44, 283, 44, 285, 45, 93, 258,
    283, 258, 285, 257, 283, 285 };
    static YYCONST yytabelem yydef[]={

    2, -2, -2, 0, 6, 22, 0, 4, 7, 8,
    9, 15, -2, 3, 11, 12, 13, 1, 23, 28,
    10, 14, 0, 0, 0, 0, 0, 22, 0, 0,
    0, 0, 0, 0, 0, 0, 25, 26, 27, 0,
    39, 41, 44, 54, 55, 56, 79, 0, 59, 65,
    31, 0, 33, 34, 35, 30, 16, 17, 18, 19,
    20, 24, 36, 38, 0, 42, 43, 0, 48, 49,
    50, 0, 0, 0, 0, 65, 21, 29, 0, 37,
    40, 0, 0, 57, 78, 58, 60, 63, 64, 66,
    67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
    77, 0, 32, 0, 47, 0, 53, 0, 61, 0,
    46, 0, 52, 62, 45, 51 };
    typedef struct
    #ifdef __cplusplus
    yytoktype
    #endif
    {
    #ifdef __cplusplus
    const
    #endif
    char *t_name; int t_val; } yytoktype;
    #ifndef YYDEBUG
    # define YYDEBUG 0 /* don't allow debugging */
    #endif

    #if YYDEBUG

    yytoktype yytoks[] =
    {
    "CHAR", 257,
    "NUMBER", 258,
    "SECTEND", 259,
    "SCDECL", 260,
    "XSCDECL", 261,
    "NAME", 262,
    "PREVCCL", 263,
    "EOF_OP", 264,
    "OPTION_OP", 265,
    "OPT_OUTFILE", 266,
    "OPT_PREFIX", 267,
    "OPT_YYCLASS", 268,
    "OPT_HEADER", 269,
    "CCE_ALNUM", 270,
    "CCE_ALPHA", 271,
    "CCE_BLANK", 272,
    "CCE_CNTRL", 273,
    "CCE_DIGIT", 274,
    "CCE_GRAPH", 275,
    "CCE_LOWER", 276,
    "CCE_PRINT", 277,
    "CCE_PUNCT", 278,
    "CCE_SPACE", 279,
    "CCE_UPPER", 280,
    "CCE_XDIGIT", 281,
    "BEGIN_REPEAT_POSIX", 282,
    "END_REPEAT_POSIX", 283,
    "BEGIN_REPEAT_FLEX", 284,
    "END_REPEAT_FLEX", 285,
    "-unknown-", -1 /* ends search */
    };

    #ifdef __cplusplus
    const
    #endif
    char * yyreds[] =
    {
    "-no such reduction-",
    " "goal : initlex sect1 sect1end sect2 initforrule",
    "initlex : /* empty */",
    "sect1 : sect1 startconddecl namelist1",
    "sect1 : sect1 options",
    "sect1 : /* empty */",
    "sect1 : error",
    "sect1end : SECTEND",
    "startconddecl : SCDECL",
    "startconddecl : XSCDECL",
    "namelist1 : namelist1 NAME",
    "namelist1 : NAME",
    "namelist1 : error",
    "options : OPTION_OP optionlist",
    "optionlist : optionlist option",
    "optionlist : /* empty */",
    "option : OPT_OUTFILE '=' NAME",
    "option : OPT_PREFIX '=' NAME",
    "option : OPT_YYCLASS '=' NAME",
    "option : OPT_HEADER '=' NAME",
    "sect2 : sect2 scon initforrule flexrule '\n'",
    "sect2 : sect2 scon '{' sect2 '}'",
    "sect2 : /* empty */",
    "initforrule : /* empty */",
    "flexrule : '^' rule",
    "flexrule : rule",
    "flexrule : EOF_OP",
    "flexrule : error",
    "scon_stk_ptr : /* empty */",
    "scon : '<' scon_stk_ptr namelist2 '>'",
    "scon : '<' '*' '>'",
    "scon : /* empty */",
    "namelist2 : namelist2 ',' sconname",
    "namelist2 : sconname",
    "namelist2 : error",
    "sconname : NAME",
    "rule : re2 re",
    "rule : re2 re '$'",
    "rule : re '$'",
    "rule : re",
    "re : re '|' series",
    "re : series",
    "re2 : re '/'",
    "series : series singleton",
    "series : singleton",
    "series : series BEGIN_REPEAT_POSIX NUMBER ',' NUMBER END_REPEAT_POSIX",
    "series : series BEGIN_REPEAT_POSIX NUMBER ',' END_REPEAT_POSIX",
    "series : series BEGIN_REPEAT_POSIX NUMBER END_REPEAT_POSIX",
    "singleton : singleton '*'",
    "singleton : singleton '+'",
    "singleton : singleton '?'",
    "singleton : singleton BEGIN_REPEAT_FLEX NUMBER ',' NUMBER END_REPEAT_FLEX",
    "singleton : singleton BEGIN_REPEAT_FLEX NUMBER ',' END_REPEAT_FLEX",
    "singleton : singleton BEGIN_REPEAT_FLEX NUMBER END_REPEAT_FLEX",
    "singleton : '.'",
    "singleton : fullccl",
    "singleton : PREVCCL",
    "singleton : '\"' string '\"'",
    "singleton : '(' re ')'",
    "singleton : CHAR",
    "fullccl : '[' ccl ']'",
    "fullccl : '[' '^' ccl ']'",
    "ccl : ccl CHAR '-' CHAR",
    "ccl : ccl CHAR",
    "ccl : ccl ccl_expr",
    "ccl : /* empty */",
    "ccl_expr : CCE_ALNUM",
    "ccl_expr : CCE_ALPHA",
    "ccl_expr : CCE_BLANK",
    "ccl_expr : CCE_CNTRL",
    "ccl_expr : CCE_DIGIT",
    "ccl_expr : CCE_GRAPH",
    "ccl_expr : CCE_LOWER",
    "ccl_expr : CCE_PRINT",
    "ccl_expr : CCE_PUNCT",
    "ccl_expr : CCE_SPACE",
    "ccl_expr : CCE_UPPER",
    "ccl_expr : CCE_XDIGIT",
    "string : string CHAR",
    "string : /* empty */",
    };
    #endif /* YYDEBUG */
    //line 1 "/usr/lib/i386-unknown-linux-musl/yaccpar"
    /*
    * CDDL HEADER START
    *
    * The contents of this file are subject to the terms of the
    * Common Development and Distribution License, Version 1.0 only
    * (the "License"). You may not use this file except in compliance
    * with the License.
    *
    * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
    * or http://www.opensolaris.org/os/licensing.
    * See the License for the specific language governing permissions
    * and limitations under the License.
    *
    * When distributing Covered Code, include this CDDL HEADER in each
    * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
    * If applicable, add the following below this CDDL HEADER, with the
    * fields enclosed by brackets "[]" replaced with your own identifying
    * information: Portions Copyright [yyyy] [name of copyright owner]
    *
    * CDDL HEADER END
    */
    /*
    * Copyright 1993 Sun Microsystems, Inc. All rights reserved.
    * Use is subject to license terms.
    */

    /* Copyright (c) 1988 AT&T */
    /* All Rights Reserved */

    /* from OpenSolaris "yaccpar 6.18 05/06/08 SMI" */

    /*
    * Portions Copyright (c) 2005 Gunnar Ritter, Freiburg i. Br., Germany
    *
    * Sccsid @(#)yaccpar 1.5 (gritter) 11/26/05
    */

    /*
    ** Skeleton parser driver for yacc output
    */

    /*
    ** yacc user known macros and defines
    */
    #define YYERROR goto yyerrlab
    #define YYACCEPT return(0)
    #define YYABORT return(1)
    #define YYBACKUP( newtoken, newvalue )\
    {\
    if ( yychar >= 0 || ( yyr2[ yytmp ] >> 1 ) != 1 )\
    {\
    yyerror( "syntax error - cannot backup" );\
    goto yyerrlab;\
    }\
    yychar = newtoken;\
    yystate = *yyps;\
    yylval = newvalue;\
    goto yynewstate;\
    }
    #define YYRECOVERING() (!!yyerrflag)
    #define YYNEW(type) malloc(sizeof(type) * yynewmax)
    #define YYCOPY(to, from, type) \
    (type *) memcpy(to, (char *) from, yymaxdepth * sizeof (type))
    #define YYENLARGE( from, type) \
    (type *) realloc((char *) from, yynewmax * sizeof(type))
    #ifndef YYDEBUG
    # define YYDEBUG 1 /* make debugging available */
    #endif

    /*
    ** user known globals
    */
    int yydebug; /* set to 1 to get debugging */

    /*
    ** driver internal defines
    */
    #define YYFLAG (-10000000)

    /*
    ** global variables used by the parser
    */
    YYSTYPE *yypv; /* top of value stack */
    int *yyps; /* top of state stack */

    int yystate; /* current state */
    int yytmp; /* extra var (lasts between blocks) */

    int yynerrs; /* number of errors */
    int yyerrflag; /* error recovery flag */
    int yychar; /* current input token number */



    #ifdef YYNMBCHARS
    #define YYLEX() yycvtok(yylex())
    /*
    ** yycvtok - return a token if i is a wchar_t value that exceeds 255.
    ** If i<255, i itself is the token. If i>255 but the neither
    ** of the 30th or 31st bit is on, i is already a token.
    */
    #if defined(__STDC__) || defined(__cplusplus)
    int yycvtok(int i)
    #else
    int yycvtok(i) int i;
    #endif
    {
    int first = 0;
    int last = YYNMBCHARS - 1;
    int mid;
    wchar_t j;

    if(i&0x60000000){/*Must convert to a token. */
    if( yymbchars[last].character < i ){
    return i;/*Giving up*/
    }
    while ((last>=first)&&(first>=0)) {/*Binary search loop*/
    mid = (first+last)/2;
    j = yymbchars[mid].character;
    if( j==i ){/*Found*/
    return yymbchars[mid].tvalue;
    }else if( j<i ){
    first = mid + 1;
    }else{
    last = mid -1;
    }
    }
    /*No entry in the table.*/
    return i;/* Giving up.*/
    }else{/* i is already a token. */
    return i;
    }
    }
    #else/*!YYNMBCHARS*/
    #define YYLEX() yylex()
    #endif/*!YYNMBCHARS*/

    /*
    ** yyparse - return 0 if worked, 1 if syntax error not recovered from
    */
    #if defined(__STDC__) || defined(__cplusplus)
    int yyparse(void)
    #else
    int yyparse()
    #endif
    {
    register YYSTYPE *yypvt = 0; /* top of value stack for $vars */

    #if defined(__cplusplus) || defined(lint) || defined(__GNUC__)
    /*
    hacks to please C++, lint, and gcc - goto's inside
    switch should never be executed
    */
    static int _yaccpar_lint_hack = -1;
    switch (_yaccpar_lint_hack)
    {
    case 1: goto yyerrlab;
    case 2: goto yynewstate;
    }
    #endif

    /*
    ** Initialize externals - yyparse may be called more than once
    */
    yypv = &yyv[-1];
    yyps = &yys[-1];
    yystate = 0;
    yytmp = 0;
    yynerrs = 0;
    yyerrflag = 0;
    yychar = -1;

    #if YYMAXDEPTH <= 0
    if (yymaxdepth <= 0)
    {
    if ((yymaxdepth = YYEXPAND(0)) <= 0)
    {
    yyerror("yacc initialization error");
    YYABORT;
    }
    }
    #endif

    {
    register YYSTYPE *yy_pv; /* top of value stack */
    register int *yy_ps; /* top of state stack */
    register int yy_state; /* current state */
    register int yy_n; /* internal state number info */
    goto yystack; /* moved from 6 lines above to here to please C++ */

    /*
    ** get globals into registers.
    ** branch to here only if YYBACKUP was called.
    */
    yynewstate:
    yy_pv = yypv;
    yy_ps = yyps;
    yy_state = yystate;
    goto yy_newstate;

    /*
    ** get globals into registers.
    ** either we just started, or we just finished a reduction
    */
    yystack:
    yy_pv = yypv;
    yy_ps = yyps;
    yy_state = yystate;

    /*
    ** top of for (;;) loop while no reductions done
    */
    yy_stack:
    /*
    ** put a state and value onto the stacks
    */
    #if YYDEBUG
    /*
    ** if debugging, look up token value in list of value vs.
    ** name pairs. 0 and negative (-1) are special values.
    ** Note: linear search is used since time is not a real
    ** consideration while debugging.
    */
    if ( yydebug )
    {
    register int yy_i;

    printf( "State %d, token ", yy_state );
    if ( yychar == 0 )
    printf( "end-of-file\n" );
    else if ( yychar < 0 )
    printf( "-none-\n" );
    else
    {
    for ( yy_i = 0; yytoks[yy_i].t_val >= 0;
    yy_i++ )
    {
    if ( yytoks[yy_i].t_val == yychar )
    break;
    }
    printf( "%s\n", yytoks[yy_i].t_name );
    }
    }
    #endif /* YYDEBUG */
    if ( ++yy_ps >= &yys[ yymaxdepth ] ) /* room on stack? */
    {
    /*
    ** reallocate and recover. Note that pointers
    ** have to be reset, or bad things will happen
    */
    long yyps_index = (yy_ps - yys);
    long yypv_index = (yy_pv - yyv);
    long yypvt_index = (yypvt - yyv);
    int yynewmax;
    #ifdef YYEXPAND
    yynewmax = YYEXPAND(yymaxdepth);
    #else
    yynewmax = 2 * yymaxdepth; /* double table size */
    if (yymaxdepth == YYMAXDEPTH) /* first time growth */
    {
    char *newyys = (char *)YYNEW(int);
    char *newyyv = (char *)YYNEW(YYSTYPE);
    if (newyys != 0 && newyyv != 0)
    {
    yys = YYCOPY(newyys, yys, int);
    yyv = YYCOPY(newyyv, yyv, YYSTYPE);
    }
    else
    yynewmax = 0; /* failed */
    }
    else /* not first time */
    {
    yys = YYENLARGE(yys, int);
    yyv = YYENLARGE(yyv, YYSTYPE);
    if (yys == 0 || yyv == 0)
    yynewmax = 0; /* failed */
    }
    #endif
    if (yynewmax <= yymaxdepth) /* tables not expanded */
    {
    yyerror( "yacc stack overflow" );
    YYABORT;
    }
    yymaxdepth = yynewmax;

    yy_ps = yys + yyps_index;
    yy_pv = yyv + yypv_index;
    yypvt = yyv + yypvt_index;
    }
    *yy_ps = yy_state;
    *++yy_pv = yyval;

    /*
    ** we have a new state - find out what to do
    */
    yy_newstate:
    if ( ( yy_n = yypact[ yy_state ] ) <= YYFLAG )
    goto yydefault; /* simple state */
    #if YYDEBUG
    /*
    ** if debugging, need to mark whether new token grabbed
    */
    yytmp = yychar < 0;
    #endif
    if ( ( yychar < 0 ) && ( ( yychar = YYLEX() ) < 0 ) )
    yychar = 0; /* reached EOF */
    #if YYDEBUG
    if ( yydebug && yytmp )
    {
    register int yy_i;

    printf( "Received token " );
    if ( yychar == 0 )
    printf( "end-of-file\n" );
    else if ( yychar < 0 )
    printf( "-none-\n" );
    else
    {
    for ( yy_i = 0; yytoks[yy_i].t_val >= 0;
    yy_i++ )
    {
    if ( yytoks[yy_i].t_val == yychar )
    break;
    }
    printf( "%s\n", yytoks[yy_i].t_name );
    }
    }
    #endif /* YYDEBUG */
    if ( ( ( yy_n += yychar ) < 0 ) || ( yy_n >= YYLAST ) )
    goto yydefault;
    if ( yychk[ yy_n = yyact[ yy_n ] ] == yychar ) /*valid shift*/
    {
    yychar = -1;
    yyval = yylval;
    yy_state = yy_n;
    if ( yyerrflag > 0 )
    yyerrflag--;
    goto yy_stack;
    }

    yydefault:
    if ( ( yy_n = yydef[ yy_state ] ) == -2 )
    {
    #if YYDEBUG
    yytmp = yychar < 0;
    #endif
    if ( ( yychar < 0 ) && ( ( yychar = YYLEX() ) < 0 ) )
    yychar = 0; /* reached EOF */
    #if YYDEBUG
    if ( yydebug && yytmp )
    {
    register int yy_i;

    printf( "Received token " );
    if ( yychar == 0 )
    printf( "end-of-file\n" );
    else if ( yychar < 0 )
    printf( "-none-\n" );
    else
    {
    for ( yy_i = 0;
    yytoks[yy_i].t_val >= 0;
    yy_i++ )
    {
    if ( yytoks[yy_i].t_val
    == yychar )
    {
    break;
    }
    }
    printf( "%s\n", yytoks[yy_i].t_name );
    }
    }
    #endif /* YYDEBUG */
    /*
    ** look through exception table
    */
    {
    register YYCONST int *yyxi = yyexca;

    while ( ( *yyxi != -1 ) ||
    ( yyxi[1] != yy_state ) )
    {
    yyxi += 2;
    }
    while ( ( *(yyxi += 2) >= 0 ) &&
    ( *yyxi != yychar ) )
    ;
    if ( ( yy_n = yyxi[1] ) < 0 )
    YYACCEPT;
    }
    }

    /*
    ** check for syntax error
    */
    if ( yy_n == 0 ) /* have an error */
    {
    /* no worry about speed here! */
    switch ( yyerrflag )
    {
    case 0: /* new error */
    yyerror( "syntax error" );
    goto skip_init;
    yyerrlab:
    /*
    ** get globals into registers.
    ** we have a user generated syntax type error
    */
    yy_pv = yypv;
    yy_ps = yyps;
    yy_state = yystate;
    skip_init:
    yynerrs++;
    /* FALLTHRU */
    case 1:
    case 2: /* incompletely recovered error */
    /* try again... */
    yyerrflag = 3;
    /*
    ** find state where "error" is a legal
    ** shift action
    */
    while ( yy_ps >= yys )
    {
    yy_n = yypact[ *yy_ps ] + YYERRCODE;
    if ( yy_n >= 0 && yy_n < YYLAST &&
    yychk[yyact[yy_n]] == YYERRCODE) {
    /*
    ** simulate shift of "error"
    */
    yy_state = yyact[ yy_n ];
    goto yy_stack;
    }
    /*
    ** current state has no shift on
    ** "error", pop stack
    */
    #if YYDEBUG
    # define _POP_ "Error recovery pops state %d, uncovers state %d\n"
    if ( yydebug )
    printf( _POP_, *yy_ps,
    yy_ps[-1] );
    # undef _POP_
    #endif
    yy_ps--;
    yy_pv--;
    }
    /*
    ** there is no state on stack with "error" as
    ** a valid shift. give up.
    */
    YYABORT;
    case 3: /* no shift yet; eat a token */
    #if YYDEBUG
    /*
    ** if debugging, look up token in list of
    ** pairs. 0 and negative shouldn't occur,
    ** but since timing doesn't matter when
    ** debugging, it doesn't hurt to leave the
    ** tests here.
    */
    if ( yydebug )
    {
    register int yy_i;

    printf( "Error recovery discards " );
    if ( yychar == 0 )
    printf( "token end-of-file\n" );
    else if ( yychar < 0 )
    printf( "token -none-\n" );
    else
    {
    for ( yy_i = 0;
    yytoks[yy_i].t_val >= 0;
    yy_i++ )
    {
    if ( yytoks[yy_i].t_val
    == yychar )
    {
    break;
    }
    }
    printf( "token %s\n",
    yytoks[yy_i].t_name );
    }
    }
    #endif /* YYDEBUG */
    if ( yychar == 0 ) /* reached EOF. quit */
    YYABORT;
    yychar = -1;
    goto yy_newstate;
    }
    }/* end if ( yy_n == 0 ) */
    /*
    ** reduction by production yy_n
    ** put stack tops, etc. so things right after switch
    */
    #if YYDEBUG
    /*
    ** if debugging, print the string that is the user's
    ** specification of the reduction which is just about
    ** to be done.
    */
    if ( yydebug )
    printf( "Reduce by (%d) \"%s\"\n",
    yy_n, yyreds[ yy_n ] );
    #endif
    yytmp = yy_n; /* value to switch over */
    yypvt = yy_pv; /* $vars top of value stack */
    /*
    ** Look in goto table for next state
    ** Sorry about using yy_state here as temporary
    ** register variable, but why not, if it works...
    ** If yyr2[ yy_n ] doesn't have the low order bit
    ** set, then there is no action to be done for
    ** this reduction. So, no saving & unsaving of
    ** registers done. The only difference between the
    ** code just after the if and the body of the if is
    ** the goto yy_stack in the body. This way the test
    ** can be made before the choice of what to do is needed.
    */
    {
    /* length of production doubled with extra bit */
    register int yy_len = yyr2[ yy_n ];

    if ( !( yy_len & 01 ) )
    {
    yy_len >>= 1;
    yyval = ( yy_pv -= yy_len )[1]; /* $$ = $1 */
    yy_state = yypgo[ yy_n = yyr1[ yy_n ] ] +
    *( yy_ps -= yy_len ) + 1;
    if ( yy_state >= YYLAST ||
    yychk[ yy_state =
    yyact[ yy_state ] ] != -yy_n )
    {
    yy_state = yyact[ yypgo[ yy_n ] ];
    }
    goto yy_stack;
    }
    yy_len >>= 1;
    yyval = ( yy_pv -= yy_len )[1]; /* $$ = $1 */
    yy_state = yypgo[ yy_n = yyr1[ yy_n ] ] +
    *( yy_ps -= yy_len ) + 1;
    if ( yy_state >= YYLAST ||
    yychk[ yy_state = yyact[ yy_state ] ] != -yy_n )
    {
    yy_state = yyact[ yypgo[ yy_n ] ];
    }
    }
    /* save until reenter driver code */
    yystate = yy_state;
    yyps = yy_ps;
    yypv = yy_pv;
    }
    /*
    ** code supplied by user is placed in this switch
    */
    switch( yytmp )
    {

    case 1:
    //line 134 "parse.y"
    { /* add default rule */
    int def_rule;

    pat = cclinit();
    cclnegate( pat );

    def_rule = mkstate( -pat );

    /* Remember the number of the default rule so we
    * don't generate "can't match" warnings for it.
    */
    default_rule = num_rules;

    finish_rule( def_rule, false, 0, 0, 0);

    for ( i = 1; i <= lastsc; ++i )
    scset[i] = mkbranch( scset[i], def_rule );

    if ( spprdflt )
    add_action(
    "YY_FATAL_ERROR( \"flex scanner jammed\" )" );
    else
    add_action( "ECHO" );

    add_action( ";\n\tYY_BREAK\n" );
    } break;
    case 2:
    //line 163 "parse.y"
    { /* initialize for processing rules */

    /* Create default DFA start condition. */
    scinstal( "INITIAL", false );
    } break;
    case 6:
    //line 174 "parse.y"
    { synerr( _("unknown error processing section 1") ); } break;
    case 7:
    //line 178 "parse.y"
    {
    check_options();
    scon_stk = allocate_integer_array( lastsc + 1 );
    scon_stk_ptr = 0;
    } break;
    case 8:
    //line 186 "parse.y"
    { xcluflg = false; } break;
    case 9:
    //line 189 "parse.y"
    { xcluflg = true; } break;
    case 10:
    //line 193 "parse.y"
    { scinstal( nmstr, xcluflg ); } break;
    case 11:
    //line 196 "parse.y"
    { scinstal( nmstr, xcluflg ); } break;
    case 12:
    //line 199 "parse.y"
    { synerr( _("bad start condition list") ); } break;
    case 16:
    //line 210 "parse.y"
    {
    outfilename = copy_string( nmstr );
    did_outfilename = 1;
    } break;
    case 17:
    //line 215 "parse.y"
    { prefix = copy_string( nmstr ); } break;
    case 18:
    //line 217 "parse.y"
    { yyclass = copy_string( nmstr ); } break;
    case 19:
    //line 219 "parse.y"
    { headerfilename = copy_string( nmstr ); } break;
    case 20:
    //line 223 "parse.y"
    { scon_stk_ptr = yypvt[-3]; } break;
    case 21:
    //line 225 "parse.y"
    { scon_stk_ptr = yypvt[-3]; } break;
    case 23:
    //line 230 "parse.y"
    {
    /* Initialize for a parse of one rule. */
    trlcontxt = variable_trail_rule = varlength = false;
    trailcnt = headcnt = rulelen = 0;
    current_state_type = STATE_NORMAL;
    previous_continued_action = continued_action;
    in_rule = true;

    new_rule();
    } break;
    case 24:
    //line 243 "parse.y"
    {
    pat = yypvt[-0];
    finish_rule( pat, variable_trail_rule,
    headcnt, trailcnt , previous_continued_action);

    if ( scon_stk_ptr > 0 )
    {
    for ( i = 1; i <= scon_stk_ptr; ++i )
    scbol[scon_stk[i]] =
    mkbranch( scbol[scon_stk[i]],
    pat );
    }

    else
    {
    /* Add to all non-exclusive start conditions,
    * including the default (0) start condition.
    */

    for ( i = 1; i <= lastsc; ++i )
    if ( ! scxclu[i] )
    scbol[i] = mkbranch( scbol[i],
    pat );
    }

    if ( ! bol_needed )
    {
    bol_needed = true;

    if ( performance_report > 1 )
    pinpoint_message(
    "'^' operator results in sub-optimal performance" );
    }
    } break;
    case 25:
    //line 279 "parse.y"
    {
    pat = yypvt[-0];
    finish_rule( pat, variable_trail_rule,
    headcnt, trailcnt , previous_continued_action);

    if ( scon_stk_ptr > 0 )
    {
    for ( i = 1; i <= scon_stk_ptr; ++i )
    scset[scon_stk[i]] =
    mkbranch( scset[scon_stk[i]],
    pat );
    }

    else
    {
    for ( i = 1; i <= lastsc; ++i )
    if ( ! scxclu[i] )
    scset[i] =
    mkbranch( scset[i],
    pat );
    }
    } break;
    case 26:
    //line 303 "parse.y"
    {
    if ( scon_stk_ptr > 0 )
    build_eof_action();

    else
    {
    /* This EOF applies to all start conditions
    * which don't already have EOF actions.
    */
    for ( i = 1; i <= lastsc; ++i )
    if ( ! sceof[i] )
    scon_stk[++scon_stk_ptr] = i;

    if ( scon_stk_ptr == 0 )
    warn(
    "all start conditions already have <<EOF>> rules" );

    else
    build_eof_action();
    }
    } break;
    case 27:
    //line 326 "parse.y"
    { synerr( _("unrecognized rule") ); } break;
    case 28:
    //line 330 "parse.y"
    { yyval = scon_stk_ptr; } break;
    case 29:
    //line 334 "parse.y"
    { yyval = yypvt[-2]; } break;
    case 30:
    //line 337 "parse.y"
    {
    yyval = scon_stk_ptr;

    for ( i = 1; i <= lastsc; ++i )
    {
    int j;

    for ( j = 1; j <= scon_stk_ptr; ++j )
    if ( scon_stk[j] == i )
    break;

    if ( j > scon_stk_ptr )
    scon_stk[++scon_stk_ptr] = i;
    }
    } break;
    case 31:
    //line 354 "parse.y"
    { yyval = scon_stk_ptr; } break;
    case 34:
    //line 362 "parse.y"
    { synerr( _("bad start condition list") ); } break;
    case 35:
    //line 366 "parse.y"
    {
    if ( (scnum = sclookup( nmstr )) == 0 )
    format_pinpoint_message(
    "undeclared start condition %s",
    nmstr );
    else
    {
    for ( i = 1; i <= scon_stk_ptr; ++i )
    if ( scon_stk[i] == scnum )
    {
    format_warn(
    "<%s> specified twice",
    scname[scnum] );
    break;
    }

    if ( i > scon_stk_ptr )
    scon_stk[++scon_stk_ptr] = scnum;
    }
    } break;
    case 36:
    //line 389 "parse.y"
    {
    if ( transchar[lastst[yypvt[-0]]] != SYM_EPSILON )
    /* Provide final transition \now/ so it
    * will be marked as a trailing context
    * state.
    */
    yypvt[-0] = link_machines( yypvt[-0],
    mkstate( SYM_EPSILON ) );

    mark_beginning_as_normal( yypvt[-0] );
    current_state_type = STATE_NORMAL;

    if ( previous_continued_action )
    {
    /* We need to treat this as variable trailing
    * context so that the backup does not happen
    * in the action but before the action switch
    * statement. If the backup happens in the
    * action, then the rules "falling into" this
    * one's action will *also* do the backup,
    * erroneously.
    */
    if ( ! varlength || headcnt != 0 )
    warn(
    "trailing context made variable due to preceding '|' action" );

    /* Mark as variable. */
    varlength = true;
    headcnt = 0;

    }

    if ( lex_compat || (varlength && headcnt == 0) )
    { /* variable trailing context rule */
    /* Mark the first part of the rule as the
    * accepting "head" part of a trailing
    * context rule.
    *
    * By the way, we didn't do this at the
    * beginning of this production because back
    * then current_state_type was set up for a
    * trail rule, and add_accept() can create
    * a new state ...
    */
    add_accept( yypvt[-1],
    num_rules | YY_TRAILING_HEAD_MASK );
    variable_trail_rule = true;
    }

    else
    trailcnt = rulelen;

    yyval = link_machines( yypvt[-1], yypvt[-0] );
    } break;
    case 37:
    //line 445 "parse.y"
    { synerr( _("trailing context used twice") ); } break;
    case 38:
    //line 448 "parse.y"
    {
    headcnt = 0;
    trailcnt = 1;
    rulelen = 1;
    varlength = false;

    current_state_type = STATE_TRAILING_CONTEXT;

    if ( trlcontxt )
    {
    synerr( _("trailing context used twice") );
    yyval = mkstate( SYM_EPSILON );
    }

    else if ( previous_continued_action )
    {
    /* See the comment in the rule for "re2 re"
    * above.
    */
    warn(
    "trailing context made variable due to preceding '|' action" );

    varlength = true;
    }

    if ( lex_compat || varlength )
    {
    /* Again, see the comment in the rule for
    * "re2 re" above.
    */
    add_accept( yypvt[-1],
    num_rules | YY_TRAILING_HEAD_MASK );
    variable_trail_rule = true;
    }

    trlcontxt = true;

    eps = mkstate( SYM_EPSILON );
    yyval = link_machines( yypvt[-1],
    link_machines( eps, mkstate( '\n' ) ) );
    } break;
    case 39:
    //line 491 "parse.y"
    {
    yyval = yypvt[-0];

    if ( trlcontxt )
    {
    if ( lex_compat || (varlength && headcnt == 0) )
    /* Both head and trail are
    * variable-length.
    */
    variable_trail_rule = true;
    else
    trailcnt = rulelen;
    }
    } break;
    case 40:
    //line 509 "parse.y"
    {
    varlength = true;
    yyval = mkor( yypvt[-2], yypvt[-0] );
    } break;
    case 41:
    //line 515 "parse.y"
    { yyval = yypvt[-0]; } break;
    case 42:
    //line 520 "parse.y"
    {
    /* This rule is written separately so the
    * reduction will occur before the trailing
    * series is parsed.
    */

    if ( trlcontxt )
    synerr( _("trailing context used twice") );
    else
    trlcontxt = true;

    if ( varlength )
    /* We hope the trailing context is
    * fixed-length.
    */
    varlength = false;
    else
    headcnt = rulelen;

    rulelen = 0;

    current_state_type = STATE_TRAILING_CONTEXT;
    yyval = yypvt[-1];
    } break;
    case 43:
    //line 547 "parse.y"
    {
    /* This is where concatenation of adjacent patterns
    * gets done.
    */
    yyval = link_machines( yypvt[-1], yypvt[-0] );
    } break;
    case 44:
    //line 555 "parse.y"
    { yyval = yypvt[-0]; } break;
    case 45:
    //line 558 "parse.y"
    {
    varlength = true;

    if ( yypvt[-3] > yypvt[-1] || yypvt[-3] < 0 )
    {
    synerr( _("bad iteration values") );
    yyval = yypvt[-5];
    }
    else
    {
    if ( yypvt[-3] == 0 )
    {
    if ( yypvt[-1] <= 0 )
    {
    synerr(
    _("bad iteration values") );
    yyval = yypvt[-5];
    }
    else
    yyval = mkopt(
    mkrep( yypvt[-5], 1, yypvt[-1] ) );
    }
    else
    yyval = mkrep( yypvt[-5], yypvt[-3], yypvt[-1] );
    }
    } break;
    case 46:
    //line 586 "parse.y"
    {
    varlength = true;

    if ( yypvt[-2] <= 0 )
    {
    synerr( _("iteration value must be positive") );
    yyval = yypvt[-4];
    }

    else
    yyval = mkrep( yypvt[-4], yypvt[-2], INFINITY );
    } break;
    case 47:
    //line 600 "parse.y"
    {
    /* The series could be something like "(foo)",
    * in which case we have no idea what its length
    * is, so we punt here.
    */
    varlength = true;

    if ( yypvt[-1] <= 0 )
    {
    synerr( _("iteration value must be positive")
    );
    yyval = yypvt[-3];
    }

    else
    yyval = link_machines( yypvt[-3],
    copysingl( yypvt[-3], yypvt[-1] - 1 ) );
    } break;
    case 48:
    //line 622 "parse.y"
    {
    varlength = true;

    yyval = mkclos( yypvt[-1] );
    } break;
    case 49:
    //line 629 "parse.y"
    {
    varlength = true;
    yyval = mkposcl( yypvt[-1] );
    } break;
    case 50:
    //line 635 "parse.y"
    {
    varlength = true;
    yyval = mkopt( yypvt[-1] );
    } break;
    case 51:
    //line 641 "parse.y"
    {
    varlength = true;

    if ( yypvt[-3] > yypvt[-1] || yypvt[-3] < 0 )
    {
    synerr( _("bad iteration values") );
    yyval = yypvt[-5];
    }
    else
    {
    if ( yypvt[-3] == 0 )
    {
    if ( yypvt[-1] <= 0 )
    {
    synerr(
    _("bad iteration values") );
    yyval = yypvt[-5];
    }
    else
    yyval = mkopt(
    mkrep( yypvt[-5], 1, yypvt[-1] ) );
    }
    else
    yyval = mkrep( yypvt[-5], yypvt[-3], yypvt[-1] );
    }
    } break;
    case 52:
    //line 669 "parse.y"
    {
    varlength = true;

    if ( yypvt[-2] <= 0 )
    {
    synerr( _("iteration value must be positive") );
    yyval = yypvt[-4];
    }

    else
    yyval = mkrep( yypvt[-4], yypvt[-2], INFINITY );
    } break;
    case 53:
    //line 683 "parse.y"
    {
    /* The singleton could be something like "(foo)",
    * in which case we have no idea what its length
    * is, so we punt here.
    */
    varlength = true;

    if ( yypvt[-1] <= 0 )
    {
    synerr( _("iteration value must be positive") );
    yyval = yypvt[-3];
    }

    else
    yyval = link_machines( yypvt[-3],
    copysingl( yypvt[-3], yypvt[-1] - 1 ) );
    } break;
    case 54:
    //line 702 "parse.y"
    {
    if ( ! madeany )
    {
    /* Create the '.' character class. */
    anyccl = cclinit();
    ccladd( anyccl, '\n' );
    cclnegate( anyccl );

    if ( useecs )
    mkeccl( ccltbl + cclmap[anyccl],
    ccllen[anyccl], nextecm,
    ecgroup, csize, csize );

    madeany = true;
    }

    ++rulelen;

    yyval = mkstate( -anyccl );
    } break;
    case 55:
    //line 724 "parse.y"
    {
    if ( ! cclsorted )
    /* Sort characters for fast searching. We
    * use a shell sort since this list could
    * be large.
    */
    cshell( ccltbl + cclmap[yypvt[-0]], ccllen[yypvt[-0]], true );

    if ( useecs )
    mkeccl( ccltbl + cclmap[yypvt[-0]], ccllen[yypvt[-0]],
    nextecm, ecgroup, csize, csize );

    ++rulelen;

    if (ccl_has_nl[yypvt[-0]])
    rule_has_nl[num_rules] = true;

    yyval = mkstate( -yypvt[-0] );
    } break;
    case 56:
    //line 745 "parse.y"
    {
    ++rulelen;

    if (ccl_has_nl[yypvt[-0]])
    rule_has_nl[num_rules] = true;

    yyval = mkstate( -yypvt[-0] );
    } break;
    case 57:
    //line 755 "parse.y"
    { yyval = yypvt[-1]; } break;
    case 58:
    //line 758 "parse.y"
    { yyval = yypvt[-1]; } break;
    case 59:
    //line 761 "parse.y"
    {
    ++rulelen;

    if ( caseins && yypvt[-0] >= 'A' && yypvt[-0] <= 'Z' )
    yypvt[-0] = clower( yypvt[-0] );

    if (yypvt[-0] == nlch)
    rule_has_nl[num_rules] = true;

    yyval = mkstate( yypvt[-0] );
    } break;
    case 60:
    //line 775 "parse.y"
    { yyval = yypvt[-1]; } break;
    case 61:
    //line 778 "parse.y"
    {
    cclnegate( yypvt[-1] );
    yyval = yypvt[-1];
    } break;
    case 62:
    //line 785 "parse.y"
    {
    if ( caseins )
    {
    if ( yypvt[-2] >= 'A' && yypvt[-2] <= 'Z' )
    yypvt[-2] = clower( yypvt[-2] );
    if ( yypvt[-0] >= 'A' && yypvt[-0] <= 'Z' )
    yypvt[-0] = clower( yypvt[-0] );
    }

    if ( yypvt[-2] > yypvt[-0] )
    synerr( _("negative range in character class") );

    else
    {
    for ( i = yypvt[-2]; i <= yypvt[-0]; ++i )
    ccladd( yypvt[-3], i );

    /* Keep track if this ccl is staying in
    * alphabetical order.
    */
    cclsorted = cclsorted && (yypvt[-2] > lastchar);
    lastchar = yypvt[-0];
    }

    yyval = yypvt[-3];
    } break;
    case 63:
    //line 813 "parse.y"
    {
    if ( caseins && yypvt[-0] >= 'A' && yypvt[-0] <= 'Z' )
    yypvt[-0] = clower( yypvt[-0] );

    ccladd( yypvt[-1], yypvt[-0] );
    cclsorted = cclsorted && (yypvt[-0] > lastchar);
    lastchar = yypvt[-0];
    yyval = yypvt[-1];
    } break;
    case 64:
    //line 824 "parse.y"
    {
    /* Too hard to properly maintain cclsorted. */
    cclsorted = false;
    yyval = yypvt[-1];
    } break;
    case 65:
    //line 831 "parse.y"
    {
    cclsorted = true;
    lastchar = 0;
    currccl = yyval = cclinit();
    } break;
    case 66:
    //line 838 "parse.y"
    { CCL_EXPR(isalnum); } break;
    case 67:
    //line 839 "parse.y"
    { CCL_EXPR(isalpha); } break;
    case 68:
    //line 840 "parse.y"
    { CCL_EXPR(IS_BLANK); } break;
    case 69:
    //line 841 "parse.y"
    { CCL_EXPR(iscntrl); } break;
    case 70:
    //line 842 "parse.y"
    { CCL_EXPR(isdigit); } break;
    case 71:
    //line 843 "parse.y"
    { CCL_EXPR(isgraph); } break;
    case 72:
    //line 844 "parse.y"
    { CCL_EXPR(islower); } break;
    case 73:
    //line 845 "parse.y"
    { CCL_EXPR(isprint); } break;
    case 74:
    //line 846 "parse.y"
    { CCL_EXPR(ispunct); } break;
    case 75:
    //line 847 "parse.y"
    { CCL_EXPR(isspace); } break;
    case 76:
    //line 848 "parse.y"
    {
    if ( caseins )
    CCL_EXPR(islower);
    else
    CCL_EXPR(isupper);
    } break;
    case 77:
    //line 854 "parse.y"
    { CCL_EXPR(isxdigit); } break;
    case 78:
    //line 858 "parse.y"
    {
    if ( caseins && yypvt[-0] >= 'A' && yypvt[-0] <= 'Z' )
    yypvt[-0] = clower( yypvt[-0] );

    if ( yypvt[-0] == nlch )
    rule_has_nl[num_rules] = true;

    ++rulelen;

    yyval = link_machines( yypvt[-1], mkstate( yypvt[-0] ) );
    } break;
    case 79:
    //line 871 "parse.y"
    { yyval = mkstate( SYM_EPSILON ); } break;
    //line 562 "/usr/lib/i386-unknown-linux-musl/yaccpar"
    }
    goto yystack; /* reset registers in driver code */
    }