5 # @(#)pp.tab (AT&T Labs Research) 2006-05-09
7 # C preprocessor tables and states
9 # + marks extensions to the standard
12 %keywords "static struct ppkeyword directives"
32 %keywords "static struct ppkeyword options" prefix=X_ index=optindex last=last_option
104 %keywords "static struct ppkeyword predicates" prefix=X_ index=optindex
115 %keywords "static struct ppkeyword readonlys" prefix=R_
119 %flags # state : coupled, high frequency
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
154 %flags # mode : coupled, low frequency
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
177 %flags # options : uncoupled, low frequency
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
212 %keywords "static struct ppkeyword variables" prefix=V_ index=optindex