OpenSolaris_b135/lib/libpp/common/pp.tab

#
# Glenn Fowler
# AT&T Research
#
# @(#)pp.tab (AT&T Labs Research) 2006-05-09
#
# C preprocessor tables and states
#
# + marks extensions to the standard
#

%keywords "static struct ppkeyword directives"

	define
	elif
	else
	endif
	+endmac
	error
	if
	ifdef
	ifndef
	include
	+let
	line
	+macdef
	pragma
	+rename
	undef
	+warning

%keywords "static struct ppkeyword options" prefix=X_ index=optindex last=last_option

	allmultiple
	allpossible
	builtin
	catliteral
	cdir
	checkpoint
	chop
	compatibility
	debug
	elseif
	externalize
	final
	hide
	headerexpand
	headerexpandall
	hosted
	hostedtransition
	hostdir
	id
	ignore
	include
	initial
	keyargs
	line
	linebase
	linefile
	lineid
	linetype
	macref
	map
	mapinclude
	modern
	multiple
	native
	note
	opspace
	passthrough
	pedantic
	pluscomment
	plusplus
	plussplice
	pragmaflags
	pragmaexpand
	predefined
	prefix
	preserve
	proto
	prototyped
	quote
	readonly
	reguard
	reserved
	spaceout
	splicecat
	splicespace
	standard
	statement
	strict
	stringspan
	stringsplit
	system_header
	test
	text
	transition
	truncate
	vendor
	version
	warn
	zeof

%keywords "static struct ppkeyword predicates" prefix=X_ index=optindex

	defined
	+exists
	+included
	+match
	+noticed
	+option
	sizeof
	+strcmp

%keywords "static struct ppkeyword readonlys" prefix=R_

	defined

%flags	# state : coupled, high frequency

	ADD			# add pp.addbuf into output buffer
	COLLECTING		# collecting macro call arguments
	COMPATIBILITY		# compatibility (Reiser) dialect
	COMPILE			# tokenize for compiler
	CONDITIONAL		# processing #[el]if directive
	DEFINITION		# processing macro definition
	DIRECTIVE		# processing directive
	DISABLE			# disable macro evaluation
	EOF2NL			# pass eof as newline token
	ESCAPE			# \ -> \\ in QUOTE|SQUOTE
	FILEPOP			# 0 on IN_FILE pop - no popin
	HEADER			# processing include statement
	HIDDEN			# hidden lines encountered
	JOINING			# joining adjacent strings
	NEWLINE			# last non-space was newline
	NOEXPAND		# no macro expansions or disables
	NOSPACE			# don't pass space+ as token
	NOTEXT			# don't output text
	NOVERTICAL		# vertical space invalid
	PASSEOF			# pass EOF as 0 without pop
	PASSTHROUGH		# ppcpp expands # lines only
	QUOTE			# processing "..." token
	SKIPCONTROL		# skip until # control or EOF
	SKIPMACRO		# disable next macro
	SPACEOUT		# output spaces in STANDALONE
	SQUOTE			# processing '...' token
	STANDALONE		# output tokens on stdout
	STRICT			# strict implementation
	STRIP			# strip quotes from T_STRING and T_CHARCONST
	SYNCLINE		# output line sync soon
	TRANSITION		# on the COMPATIBILITY boundary
	WARN			# note obnoxious incompatibilities

%flags	# mode : coupled, low frequency

	ALLMULTIPLE		# all files can be included more than once
	BUILTIN			# mark macro definitions builtin
	CATLITERAL		# concatenate adjacent "..."
	DUMP			# do a checkpoint dump
	EXPOSE			# expose hidden macros
	EXTERNALIZE		# set PROTO_EXTERNALIZE
	FILEDEPS		# output file dependencies
	GENDEPS			# missings FILEDEPS are generated
	HEADERDEPS		# <...> too for FILEDEPS
	HOSTED			# hosted include file
	HOSTEDTRANSITION	# hosted include files get __STDC__=0
	INACTIVE		# inactive conditional branch
	INIT			# initialization phase
	LOADING			# loading a checkpoint file
	MARKC			# last ppsearch() file was in C language
	MARKHOSTED		# last ppsearch() file was hosted
	MARKMACRO		# mark macro to disable later
	PEDANTIC		# pedantic non-hosted non-standard warnings
	READONLY		# mark macro definitions readonly
	RELAX			# relax complaints for this directive

%flags # options : uncoupled, low frequency

	ALLPOSSIBLE		# ignore top level conditionals
	DEFINITIONS		# output macro definitions
	ELSEIF			# #else if|ifdef|ifndef ok
	FINAL			# final hosted macro value
	HEADEREXPAND		# HEADEREXPANDALL but macro args not expanded
	HEADEREXPANDALL		# expanded < does not quote #include macros
	IGNORELINE		# ignore #line until first file arg
	INITIAL			# initial hosted macro value
	KEEPNOTEXT		# keep NOTEXT setting
	KEYARGS			# name=value macro arguments
	MODERN			# generate modern output (\a instead of \007)
	NATIVE			# report native paths
	NOHASH			# don't hash PP_COMPILE T_ID's
	NOISE			# convert T_X_* to T_NOISES
	NOISEFILTER		# filter (ignore) NOISE
	NOPROTO			# disable ppproto()
	PLUSCOMMENT		# enable C++ comments
	PLUSPLUS		# preprocess for C++
	PLUSSPLICE		# C++ // \<newline> does not splice
	PRAGMAEXPAND		# expand #pragma args
	PREDEFINED		# mark macro definitions predefined
	PREDEFINITIONS		# output predefined macro definitions
	PREFIX			# prefix include for compatibility
	PRESERVE		# preserve input layout
	PROTOTYPED		# force all input to be prototyped
	REGUARD			# emit header guard define at file pop
	SPLICECAT		# \<newline> ok for COMPATIBILITY catenation
	SPLICESPACE		# \<space>+<newline> == \<newline> for jcl
	STRINGSPAN		# <newline> in string ok
	STRINGSPLIT		# "...\\n..." => "..."\n"..."
	TRUNCATE		# truncate identifiers
	ZEOF			# ^Z anywhere in file => EOF

%keywords "static struct ppkeyword variables" prefix=V_ index=optindex

	_Pragma
	+ARGC
	+BASE
	DATE
	FILE
	+FUNCTION
	LINE
	+PATH
	+SOURCE
	-STDC
	TIME
	+VERSION
	-default
	-directive
	-empty
	-getenv
	-getmac
	-getopt
	-getprd
	-iterate