/* parser.dlg -- DLG Description of scanner * * Generated from: t1.g * * Terence Parr, Will Cohen, and Hank Dietz: 1989-1999 * Purdue University Electrical Engineering * With AHPCRC, University of Minnesota * ANTLR Version 1.33MR22 */ #define ANTLR_VERSION 13322 #include "pcctscfg.h" #include "pccts_stdio.h" extern int numtokens; #include "antlr.h" #include "tokens.h" #include "dlgdef.h" LOOKAHEAD void #ifdef __USE_PROTOS zzerraction(void) #else zzerraction() #endif { (*zzerr)("invalid token"); zzadvance(); zzskip(); } /* * D L G tables * * Generated from: parser.dlg * * 1989-1999 by Will Cohen, Terence Parr, and Hank Dietz * Purdue University Electrical Engineering * DLG Version 1.33MR22 */ #include "mode.h" static void act1() { NLA = ENDOFFILE; printf ( "Total tokens: %d\n", numtokens ); } static void act2() { NLA = WS; } static void act3() { NLA = ALLELSE; numtokens++; } static unsigned char shift0[257] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 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, 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, 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, 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, 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, 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, 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 }; #define DfaStates 4 typedef unsigned char DfaState; static DfaState st0[4] = { 1, 2, 3, 4 }; static DfaState st1[4] = { 4, 4, 4, 4 }; static DfaState st2[4] = { 4, 2, 4, 4 }; static DfaState st3[4] = { 4, 4, 3, 4 }; DfaState *dfa[4] = { st0, st1, st2, st3 }; DfaState accepts[5] = { 2, 1, 2, 3, 0 }; void (*actions[4])() = { zzerraction, act1, act2, act3 }; static DfaState dfa_base[] = { 0 }; static unsigned char *b_class_no[] = { shift0 }; #define ZZINTERACTIVE static unsigned char zzalternatives[DfaStates+1] = { 1, 0, 1, 1, /* must have 0 for zzalternatives[DfaStates] */ 0 }; #define ZZSHIFT(c) (b_class_no[zzauto][1+c]) #define MAX_MODE 1 #include "dlgauto.h"