1*4887Schin# 2*4887Schin# Glenn Fowler 3*4887Schin# AT&T Research 4*4887Schin# 5*4887Schin# @(#)pp.tab (AT&T Labs Research) 2006-05-09 6*4887Schin# 7*4887Schin# C preprocessor tables and states 8*4887Schin# 9*4887Schin# + marks extensions to the standard 10*4887Schin# 11*4887Schin 12*4887Schin%keywords "static struct ppkeyword directives" 13*4887Schin 14*4887Schin define 15*4887Schin elif 16*4887Schin else 17*4887Schin endif 18*4887Schin +endmac 19*4887Schin error 20*4887Schin if 21*4887Schin ifdef 22*4887Schin ifndef 23*4887Schin include 24*4887Schin +let 25*4887Schin line 26*4887Schin +macdef 27*4887Schin pragma 28*4887Schin +rename 29*4887Schin undef 30*4887Schin +warning 31*4887Schin 32*4887Schin%keywords "static struct ppkeyword options" prefix=X_ index=optindex last=last_option 33*4887Schin 34*4887Schin allmultiple 35*4887Schin allpossible 36*4887Schin builtin 37*4887Schin catliteral 38*4887Schin cdir 39*4887Schin checkpoint 40*4887Schin chop 41*4887Schin compatibility 42*4887Schin debug 43*4887Schin elseif 44*4887Schin externalize 45*4887Schin final 46*4887Schin hide 47*4887Schin headerexpand 48*4887Schin headerexpandall 49*4887Schin hosted 50*4887Schin hostedtransition 51*4887Schin hostdir 52*4887Schin id 53*4887Schin ignore 54*4887Schin include 55*4887Schin initial 56*4887Schin keyargs 57*4887Schin line 58*4887Schin linebase 59*4887Schin linefile 60*4887Schin lineid 61*4887Schin linetype 62*4887Schin macref 63*4887Schin map 64*4887Schin mapinclude 65*4887Schin modern 66*4887Schin multiple 67*4887Schin native 68*4887Schin note 69*4887Schin opspace 70*4887Schin passthrough 71*4887Schin pedantic 72*4887Schin pluscomment 73*4887Schin plusplus 74*4887Schin plussplice 75*4887Schin pragmaflags 76*4887Schin pragmaexpand 77*4887Schin predefined 78*4887Schin prefix 79*4887Schin preserve 80*4887Schin proto 81*4887Schin prototyped 82*4887Schin quote 83*4887Schin readonly 84*4887Schin reguard 85*4887Schin reserved 86*4887Schin spaceout 87*4887Schin splicecat 88*4887Schin splicespace 89*4887Schin standard 90*4887Schin statement 91*4887Schin strict 92*4887Schin stringspan 93*4887Schin stringsplit 94*4887Schin system_header 95*4887Schin test 96*4887Schin text 97*4887Schin transition 98*4887Schin truncate 99*4887Schin vendor 100*4887Schin version 101*4887Schin warn 102*4887Schin zeof 103*4887Schin 104*4887Schin%keywords "static struct ppkeyword predicates" prefix=X_ index=optindex 105*4887Schin 106*4887Schin defined 107*4887Schin +exists 108*4887Schin +included 109*4887Schin +match 110*4887Schin +noticed 111*4887Schin +option 112*4887Schin sizeof 113*4887Schin +strcmp 114*4887Schin 115*4887Schin%keywords "static struct ppkeyword readonlys" prefix=R_ 116*4887Schin 117*4887Schin defined 118*4887Schin 119*4887Schin%flags # state : coupled, high frequency 120*4887Schin 121*4887Schin ADD # add pp.addbuf into output buffer 122*4887Schin COLLECTING # collecting macro call arguments 123*4887Schin COMPATIBILITY # compatibility (Reiser) dialect 124*4887Schin COMPILE # tokenize for compiler 125*4887Schin CONDITIONAL # processing #[el]if directive 126*4887Schin DEFINITION # processing macro definition 127*4887Schin DIRECTIVE # processing directive 128*4887Schin DISABLE # disable macro evaluation 129*4887Schin EOF2NL # pass eof as newline token 130*4887Schin ESCAPE # \ -> \\ in QUOTE|SQUOTE 131*4887Schin FILEPOP # 0 on IN_FILE pop - no popin 132*4887Schin HEADER # processing include statement 133*4887Schin HIDDEN # hidden lines encountered 134*4887Schin JOINING # joining adjacent strings 135*4887Schin NEWLINE # last non-space was newline 136*4887Schin NOEXPAND # no macro expansions or disables 137*4887Schin NOSPACE # don't pass space+ as token 138*4887Schin NOTEXT # don't output text 139*4887Schin NOVERTICAL # vertical space invalid 140*4887Schin PASSEOF # pass EOF as 0 without pop 141*4887Schin PASSTHROUGH # ppcpp expands # lines only 142*4887Schin QUOTE # processing "..." token 143*4887Schin SKIPCONTROL # skip until # control or EOF 144*4887Schin SKIPMACRO # disable next macro 145*4887Schin SPACEOUT # output spaces in STANDALONE 146*4887Schin SQUOTE # processing '...' token 147*4887Schin STANDALONE # output tokens on stdout 148*4887Schin STRICT # strict implementation 149*4887Schin STRIP # strip quotes from T_STRING and T_CHARCONST 150*4887Schin SYNCLINE # output line sync soon 151*4887Schin TRANSITION # on the COMPATIBILITY boundary 152*4887Schin WARN # note obnoxious incompatibilities 153*4887Schin 154*4887Schin%flags # mode : coupled, low frequency 155*4887Schin 156*4887Schin ALLMULTIPLE # all files can be included more than once 157*4887Schin BUILTIN # mark macro definitions builtin 158*4887Schin CATLITERAL # concatenate adjacent "..." 159*4887Schin DUMP # do a checkpoint dump 160*4887Schin EXPOSE # expose hidden macros 161*4887Schin EXTERNALIZE # set PROTO_EXTERNALIZE 162*4887Schin FILEDEPS # output file dependencies 163*4887Schin GENDEPS # missings FILEDEPS are generated 164*4887Schin HEADERDEPS # <...> too for FILEDEPS 165*4887Schin HOSTED # hosted include file 166*4887Schin HOSTEDTRANSITION # hosted include files get __STDC__=0 167*4887Schin INACTIVE # inactive conditional branch 168*4887Schin INIT # initialization phase 169*4887Schin LOADING # loading a checkpoint file 170*4887Schin MARKC # last ppsearch() file was in C language 171*4887Schin MARKHOSTED # last ppsearch() file was hosted 172*4887Schin MARKMACRO # mark macro to disable later 173*4887Schin PEDANTIC # pedantic non-hosted non-standard warnings 174*4887Schin READONLY # mark macro definitions readonly 175*4887Schin RELAX # relax complaints for this directive 176*4887Schin 177*4887Schin%flags # options : uncoupled, low frequency 178*4887Schin 179*4887Schin ALLPOSSIBLE # ignore top level conditionals 180*4887Schin DEFINITIONS # output macro definitions 181*4887Schin ELSEIF # #else if|ifdef|ifndef ok 182*4887Schin FINAL # final hosted macro value 183*4887Schin HEADEREXPAND # HEADEREXPANDALL but macro args not expanded 184*4887Schin HEADEREXPANDALL # expanded < does not quote #include macros 185*4887Schin IGNORELINE # ignore #line until first file arg 186*4887Schin INITIAL # initial hosted macro value 187*4887Schin KEEPNOTEXT # keep NOTEXT setting 188*4887Schin KEYARGS # name=value macro arguments 189*4887Schin MODERN # generate modern output (\a instead of \007) 190*4887Schin NATIVE # report native paths 191*4887Schin NOHASH # don't hash PP_COMPILE T_ID's 192*4887Schin NOISE # convert T_X_* to T_NOISES 193*4887Schin NOISEFILTER # filter (ignore) NOISE 194*4887Schin NOPROTO # disable ppproto() 195*4887Schin PLUSCOMMENT # enable C++ comments 196*4887Schin PLUSPLUS # preprocess for C++ 197*4887Schin PLUSSPLICE # C++ // \<newline> does not splice 198*4887Schin PRAGMAEXPAND # expand #pragma args 199*4887Schin PREDEFINED # mark macro definitions predefined 200*4887Schin PREDEFINITIONS # output predefined macro definitions 201*4887Schin PREFIX # prefix include for compatibility 202*4887Schin PRESERVE # preserve input layout 203*4887Schin PROTOTYPED # force all input to be prototyped 204*4887Schin REGUARD # emit header guard define at file pop 205*4887Schin SPLICECAT # \<newline> ok for COMPATIBILITY catenation 206*4887Schin SPLICESPACE # \<space>+<newline> == \<newline> for jcl 207*4887Schin STRINGSPAN # <newline> in string ok 208*4887Schin STRINGSPLIT # "...\\n..." => "..."\n"..." 209*4887Schin TRUNCATE # truncate identifiers 210*4887Schin ZEOF # ^Z anywhere in file => EOF 211*4887Schin 212*4887Schin%keywords "static struct ppkeyword variables" prefix=V_ index=optindex 213*4887Schin 214*4887Schin _Pragma 215*4887Schin +ARGC 216*4887Schin +BASE 217*4887Schin DATE 218*4887Schin FILE 219*4887Schin +FUNCTION 220*4887Schin LINE 221*4887Schin +PATH 222*4887Schin +SOURCE 223*4887Schin -STDC 224*4887Schin TIME 225*4887Schin +VERSION 226*4887Schin -default 227*4887Schin -directive 228*4887Schin -empty 229*4887Schin -getenv 230*4887Schin -getmac 231*4887Schin -getopt 232*4887Schin -getprd 233*4887Schin -iterate 234