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