:TM      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~              !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKL&ghc experimentalbenedikt.huber@gmail.comNone MNOPQRSTUVWX MNOPQRSTUVWX MNOPQRSTUVWXghc experimentalbenedikt.huber@gmail.comNoneC unary operator (K& R A7.3-4) logical negation one' s complement  prefix minus  prefix plus indirection operator address operator postfix decrement operator postfix increment operator prefix decrement operator prefix increment operator C binary operators (K& R A7.6-15)  logical or  logical and inclusive bitwise or exclusive bitwise or  bitwise and  not equal equal greater or equal less or equal greater less  shift right  shift left remainder of division C assignment operators (K& R A7.17) &remainder and assignment 0  !"#$%&'()*+,-./0  !"#$%&'()*+,-./0)('&%$#"! *  +,-. /    )('&%$#"! *+,-./ghc experimentalbenedikt.huber@gmail.comNone05class of type which aggregate a source code location 2Position and length of a token 30uniform representation of source file positions 4)absolute offset in the preprocessed file 5 source file 6.row (line) in the original file. Affected by #LINE pragmas. 7Ccolumn in the preprocessed file. Inaccurate w.r.t. to the original 0 file in the presence of preprocessor macros. 88position absoluteOffset fileName lineNumber columnNumber initializes a Position using the given arguments 9Vinitialize a Position to the start of the translation unit starting in the given file :returns True7 if the given position refers to an actual source file ;/no position (for unknown position information) <returns True3 if the there is no position information available =&position attached to built-in objects >returns True6 if the given position refers to a builtin definition ?"position used for internal errors @returns True# if the given position is internal Aadvance column Badvance to next line CTadjust position: change file and line number, reseting column to 1. This is usually  used for #DLINE pragmas. The absolute offset is not changed - this can be done  by /adjustPos newFile line . incPos (length pragma). Dadvance just the offset 0123456789:;<=>?@ABCDY0123456789:;<=>?@ABCD345678256749:;<=>?@ABCD010123456789:;<=>?@ABCDYghc experimentalbenedikt.huber@gmail.comNoneEName is a unique identifier Hreturn an infinite stream of Es starting with nameId 0 IHget the infinite stream of unique names starting from the given integer EFGHIZEFGHIEFGHIEFGHIZghc experimentalbenedikt.huber@gmail.comNone JHa class for convenient access to the attributes of an attributed object LParsed entity attribute O/get the number of characters an AST node spans P.get the position and length of the last token Tequality by name V;create a node with neither name nor positional information WHreturn True if the node carries neither name nor positional information X<| Given only a source position, create a new node attribute YcGiven a source position and the position and length of the last token, create a new node attribute ZBGiven a source position and a unique name, create a new attribute  identifier [mGiven a source position, the position and length of the last token and a unique name, create a new attribute  identifier. Strict in JKLMNOPQRSTUVWXYZ[[\]^_`JKLMNOPQRSTUVWXYZ[LNMVWXYZ[UJKSRQPOTJKLNMOPQRSTUVWXYZ[[\]^_`ghc experimentalbenedikt.huber@gmail.comNone^C String literals ` Floats (represented as strings) d.datatype representing type flags for integers i9datatype for memorizing the representation of an integer mC char constants (abstract) pshowCharConst cG prepends _a_ String representing the C char constant corresponding to c. : If necessary uses octal or hexadecimal escape sequences. q2get the haskell representation of a char constant r'get integer value of a C char constant 0 undefined result for multi-char char constants sreturn true if the character constant is wide. t.construct a character constant from a haskell a  Use cchar_w( if you want a wide character constant. u&construct a wide chararacter constant v,create a multi-character character constant yIconstruct a integer constant (without type flags) from a haskell integer (concatenate a list of C string literals showStringLiteral sF prepends a String representing the C string literal corresponding to s. = If necessary it uses octal or hexadecimal escape sequences. 1\]^_`abcdefghijklmnopqrstuvwxyz{|}~bcdef,\]^_`abcdefghijklmnopqrstuvwxyz{|}~,\]tuvmonqrspdhgfeilkjybcxwz`a{|}^_~$\]^_`abcdhgfeilkjmonpqrstuvwxyz{|}~bcdefghc experimentalbenedikt.huber@gmail.comNone C identifiers >References uniquely determining a struct, union or enum type. E Those are either identified by an string identifier, or by a unique  name (anonymous types). Return true if the struct/union/enum reference is anonymous. #build an identifier from a string. I only minimal error checking, e.g., the characters of the identifier are G not checked for being alphanumerical only; the correct lexis of the B identifier should be ensured by the caller, e.g., the scanner. : for reasons of simplicity the complete lexeme is hashed.  returns an internal7 identifier (has internal position and no unique name)  return an internal identifier with position info  returns a builtin6 identifier (has builtin position and no unique name) return True if the given identifier is internal string of an identifier Ddump the identifier string and its positions for debugging purposes ghijkl ghijklghc experimentalbenedikt.huber@gmail.comNonePAttributed string literals  C constant (K&R A2.5 & A7.2)  (type,type) (type, designator-list)  (expr, type)+GNU Builtins, which cannot be typed in C99 builtin expressions, see  GNU C address of label !GNU C compound statement as expr C99 compound literal 8integer, character, floating point and string constants C expression (K&R A7) 7 these can be arbitrary expression, as the argument of sizeof can be 9 arbitrary, even if appearing in a constant expression  GNU C extensions: alignof, __real, __imag, ({ stmt-expr }), && label and built-ins  __attribute__ annotations Those are of the form )CAttr attribute-name attribute-parameters, ? and serve as generic properties of some syntax tree elements. array range designator CRangeDesig from to _ (GNU C) member designator array position designator  Designators VA designator specifies a member of an object, either an element or range of an array, ! or the named member of a struct / union. Initializer List 3The members of an initializer list are of the form (designator-list,initializer).  The designator-listA specifies one member of the compound type which is initialized. H It is allowed to be empty - in this case the initializer refers to the  ''next''. member of the compound type (see C99 6.7.8). 3Examples (simplified expressions and identifiers):  . -- int x[3][4] = { [0][3] = 4, [2] = 5, 8 }; % -- corresponds to the assignments + -- x[0][3] = 4; x[2][0] = 5; x[2][1] = 8; 7 let init1 = ([CArrDesig 0, CArrDesig 3], CInitExpr 4) 7 init2 = ([CArrDesig 2] , CInitExpr 5) 7 init3 = ([] , CInitExpr 8) % in CInitList [init1, init2, init3] _ -- struct { struct { int a[2]; int b[2]; int c[2]; } s; } x = { .s = { {2,3} , .c[0] = 1 } }; % -- corresponds to the assignments . -- x.s.a[0] = 2; x.s.a[1] = 3; x.s.c[0] = 1; B let init_s_0 = CInitList [ ([], CInitExpr 2), ([], CInitExpr 3)]  init_s = CInitList [ , ([], init_s_0), K ([CMemberDesig "c", CArrDesig 0], CInitExpr 1)  ] , in CInitList [(CMemberDesig "s", init_s)] initialization list (see ) assignment expression C initialization (K&R A8.7, C99 6.7.8) DInitializers are either assignment expressions or initializer lists = (surrounded in curly braces), whose elements are themselves < initializers, paired with an optional list of designators. C enumeration specifier (K&R A8.4, C99 6.7.2.2) &CEnum identifier enumerator-list attrs represent as enum specifier L Either the identifier or the enumerator-list (or both) have to be present.  If enumerator-list% is present, it has to be non-empty. $ The enumerator list is of the form *(enumeration-constant, enumeration-value?), where the latter 1 is an optional constant integral expression.  attrs is a list of  __attribute__7 annotations associated with the enumeration specifier (A tag to determine wheter we refer to a struct or union, see . "C structure or union specifiers (K&R A8.3, C99 6.7.2.1) +CStruct tag identifier struct-decls c-attrs6 represents a struct or union specifier (depending on tag).  either  identifier or the declaration list  struct-decls (or both) have to be present.  Example: in  struct foo x; , the identifier is present, in struct { int y; } x the declaration list, and  in struct foo { int y; } x; both of them.  c-attrs is a list of  __attribute__; annotations associated with the struct or union specifier C type qualifiers (K&ER A8.2, C99 6.7.3), function specifiers (C99 6.7.4), and attributes. const, volatile and restrict type qualifiers and inline function specifier.  Additionally,  __attribute__/ annotations for declarations and declarators.  typeof(type)  typeof(expr) Typedef name Enumeration specifier Struct or Union specifier C type specifier (K&R A8.2, C99 6.7.2) /Type specifiers are either basic types such as char or int,  struct, union or enum specifiers or typedef names. As a GNU extension, a typeof& expression also is a type specifier. GNUC thread local storage typedef extern static  register auto +C storage class specifier (and typedefs) (K&R A8.1, C99 6.7.1) type qualifier  type name #storage-class specifier or typedef (C declaration specifiers and qualifiers PDeclaration specifiers include at most one storage-class specifier (C99 6.7.1), 6 type specifiers (6.7.2) and type qualifiers (6.7.3). A nested function (GNU C) A local declaration  A statement C99 Block items OThings that may appear in compound statements: either statements, declarations # or nested function definitions. Assembler operand 'CAsmOperand argName? constraintExpr arg' specifies an operand for an assembler  statement. GNU Assembler statement  B CAssemblyStatement type-qual? asm-expr out-ops in-ops clobbers _ "is an inline assembler statement. - The only type-qualifier (if any) allowed is volatile.  asm-expr0 is the actual assembler epxression (a string), out-ops and in-ops are the input ' and output operands of the statement.  clobbersS is a list of registers which are clobbered when executing the assembler statement assembly statement return statement CReturn returnExpr break statement continue statement computed goto CGotoPtr labelExpr goto statement  CGoto label  for statement CFor init expr-2 expr-3 stmt, where init is 1 either a declaration or initializing expression  while or do-while statement CWhile guard stmt isDoWhile at  switch statement CSwitch selectorExpr switchStmt, where   switchStmt usually includes case, break and default  statements  conditional statement $CIf ifExpr thenStmt maybeElseStmt at  compound statement #CCompound localLabels blockItems at @A simple statement, that is in C: evaluating an expression with + side-effects and discarding the result. The default case default : stmt A case range of the form case lower ... upper : stmt A statement of the form case expr : stmt .An (attributed) label followed by a statement C statement (K&R A9, C99 6.8)  CArrSize isStatic expr CUnknownSize isCompleteTypeSize of an array Function declarator =CFunDeclr declr (old-style-params | new-style-params) c-attrs Array declarator "CArrDeclr declr tyquals size-expr? Pointer declarator CPtrDeclr tyquals declr Derived declarators, see  ZIndirections are qualified using type-qualifiers and generic attributes, and additionally H The size of an array is either a constant expression, variable length (m$) or missing; in the last case, the t type of the array is incomplete. The qualifier static is allowed for function arguments only, indicating that D the supplied argument is an array of at least the given size. ) New style parameter lists have the form  Right (declarations, isVariadic)%, old style parameter lists have the  form Left (parameter-names) C declarator (K&-R A8.5, C99 6.7.5) and abstract declarator (K&R A8.8, C99 6.7.6) WA declarator declares a single object, function, or type. It is always associated with  a declaration (""), which specifies the declaration'1s type and the additional storage qualifiers and 1 attributes, which apply to the declared object. A declarator is of the form +CDeclr name? indirections asm-name? attrs _, where  nameH is the name of the declared object (missing for abstract declarators),   declquals0 is a set of additional declaration specifiers,  asm-name; is the optional assembler name and attributes is a set of  attrs is a set of  __attribute__& annotations for the declared object.  indirectionsf is a set of pointer, array and function declarators, which modify the type of the declared object as  described below. If the  declaration specifies the non-derived type T,  and we have indirections = [D1, D2, ..., Dn]# than the declared object has type  (D1 indirect (D2 indirect ... (Dn indirect T))), where  (CPtrDeclr attrs) indirect T is attributed pointer to T  (CFunDeclr attrs) indirect T is attributed function returning T  (CArrayDeclr attrs) indirect T is (attributed array of elemements of type T "Examples (simplified attributes):  x is an int   int x;  CDeclr "x" []  x1 is a restrict pointer to a const pointer to int  ! const int * const * restrict x; 6 CDeclr "x" [CPtrDeclr [restrict], CPtrDeclr [const]]  f1 is an function return a constant pointer to int   int* const f(); - CDeclr "f" [CFunDeclr [],CPtrDeclr [const]]  f3 is a constant pointer to a function returning int  int (* const f)(); ==> . CDeclr "f" [CPtrDeclr [const], CFunDeclr []] "C declarations (K&<R A8, C99 6.7), including structure declarations, parameter  declarations and type names. A declaration is of the form %CDecl specifiers init-declarator-list', where the form of the declarator list's / elements depends on the kind of declaration: 1) Toplevel declarations (K&R A8, C99 6.7 declaration) b C99 requires that there is at least one specifier, though this is merely a syntactic restriction @ at most one storage class specifier is allowed per declaration  the elements of the non-empty init-declarator-list are of the form (Just declr, init?, Nothing).  The declarator declrI has to be present and non-abstract and the initialization expression is  optional. 2) Structure declarations (K&(R A8.3, C99 6.7.2.1 struct-declaration) )Those are the declarations of a structure' s members. ! do not allow storage specifiers < in strict C99, the list of declarators has to be non-empty  the elements of init-declarator-list are either of the form (Just declr, Nothing, size?), H representing a member with optional bit-field size, or of the form (Nothing, Nothing, Just size),  for unnamed bitfields. declr has to be non-abstract. 5 no member of a structure shall have incomplete type 3) Parameter declarations (K&+R A8.6.3, C99 6.7.5 parameter-declaration)  init-declarator-list- must contain at most one triple of the form (Just declr, Nothing, Nothing), Z i.e. consist of a single declarator, which is allowed to be abstract (i.e. unnamed).  4) Type names (A8.8, C99 6.7.6) ! do not allow storage specifiers  init-declarator-list- must contain at most one triple of the form (Just declr, Nothing, Nothing).  where declr& is an abstract declarator (i.e. doesn'!t contain a declared identifier) %#C function definition (C99 6.9.1, K& R A10.1) %A function definition is of the form ,CFunDef specifiers declarator decllist? stmt.   specifiers< are the type and storage-class specifiers of the function. 1 The only storage-class specifiers allowed are extern and static.  The  declarator/ must be such that the declared identifier has  function type. J The return type shall be void or an object type other than array type.  The optional declaration list decllist) is for old-style function declarations.  The statement stmt is a compound statement. *"External C declaration (C99 6.9, K&R A10) JEither a toplevel declaration, function definition or external assembler. -'Complete C tranlsation unit (C99 6.9, K&R A10) SA complete C translation unit, for example representing a C header or source file. A It consists of a list of external (i.e. toplevel) declarations. .$Separate the declaration specifiers Note that inline isn'7t actually a type qualifier, but a function specifier.   __attribute__G of a declaration qualify declarations or declarators (but not types), & and are therefore separated as well. /returns True2 if the given typespec is a struct, union or enum  definition 1&Lift a string literal to a C constant       !"#$%&'()*+,-./01nopqrstuvwxyz{|}~  !"#$%&'()      !"#$%&'()*+,-./01-*+,&)('%"#$ !./     )('&%$#"!   01      !"#$%&)('*+,-./01nopqrstuvwxyz{|}~None2345234523452345portablebenedikt.huber@gmail.comNone666 portablealphabenedikt.huber@gmail.comNone 7NameSpaceMap a is a Map from identifiers to a, which manages  global and local name spaces. ;create a name space <Add global definition (ns'!,oldDef) = defGlobal ns ident def  adds a global definition  ident := def to the namespace. % It returns the modified namespace ns'. If the identifier is K already declared in the global namespace, the definition is overwritten  and the old definition oldDef is returned. =Enter new local scope ns' = enterNewScope ns' creates and enters a new local scope. >Leave innermost local scope (ns',defs) = leaveScope ns( pops leaves the innermost local scope.  and returns its definitions ?Add local definition (ns' ,oldDef) = defLocal ns ident def adds the local definition   ident := def: to the innermost local scope, if there is a local scope, ( and to the global scope otherwise. & It returns the modified name space ns' and the old binding of  the identifier oldDef, which is overwritten. @Search for a definition def = find ns ident8 returns the definition in some scope (inner to outer),  if there is one. C&flatten a namespace into a assoc list [nameSpaceToList ns = (localDefInnermost ns ++ .. ++ localDefsOutermost ns) ++ globalDefs nsD;Merge two namespaces. If they disagree on the types of any  variables, all bets are off. 789:;<=>?@ABCD789:;<=>?@ABCD7;C8:9<=>?@ABD789:;<=>?@ABCD %portable C Tokens for the C lexer.benedikt.huber@gmail.comNonek      !"#$%&'()*+,-./012345i      !"#$%&'()*+,-./0123_210/.-,+*)('&%$#"!      345 ghc experimentalbenedikt.huber@gmail.comNoneEOunspecified error raised by the user (in case the user does not want to define  her own error types). FTerror raised if a operation requires an unsupported or not yet implemented feature. G%errors in Language.C are instance of G H(obtain source location etc. of an error Iwrap error in L Jtry to cast a generic L to the specific error type Kmodify the error level L supertype of all errors N2information attached to every error in Language.C PError levels (severity) Treturn True6 when the given error makes it impossible to continue  analysis or compilation. Vposition of an Error Wseverity level of an Error Xmessage lines of an Error ]5converts an error into a string using a fixed format U either the lines of the long error message or the short message has to be non-empty  the format is . <fname>:<row>: (column <col>) [<err lvl>]  >>> <line_1>  <line_2>  ...  <line_n> ^>raise a fatal internal error; message may have multiple lines #EFGHIJKLMNOPQRSTUVWXYZ[\]^6789:;<=>EFGHIJKLMNOPQRSTUVWXYZ[\]^PSRQTGHIJKVWXLMNO\]UFYZE[^EFGHIJKLMNOPSRQTUVWXYZ[\]^6789:;<=> ghc experimentalbenedikt.huber@gmail.comNone`(b,is') = takeByte is reads and removes  the first byte b from the _ is a(c,is') = takeChar is reads and removes  the first character c from the _ is breturn True$ if the given input stream is empty cstr = takeChars n is returns the first n characters 2 of the given input stream, without removing them dread a file into an _ econvert _ to ? f convert a ? to an _ g countLines* returns the number of text lines in the  given _ _`abcdefg _`abcdefg _def`abcg _`abcdefg!portablebenedikt.huber@gmail.comNonek7execute the given parser on the supplied input stream.  returns i% if the parser failed, and a pair of . result and remaining name supply otherwise  Synopsis: JexecParser parser inputStream initialPos predefinedTypedefs uniqNameSupply @ setLastToken modifyCache tokA1handle an End-Of-File token (changes savedToken) hijkBCDEFGHIJKLMN@AOPQhijkBCDEFGHIJKLMN@AOhijkBCDEFGHIJKLMN@AOPQ"NoneRSTRSRST portable experimentalbenedikt.huber@gmail.comNone l'Generic arguments for the preprocessor s%Generic Options for the preprocessor xxB encapsulates the abstract interface for invoking C preprocessors yZparse the given command line arguments, and return a pair of parsed and ignored arguments zrun the preprocessor {<use the given preprocessor arguments without analyzing them |7add a typed option to the given preprocessor arguments }8add a string option to the given preprocessor arguments ~#run the preprocessor and return an _ if preprocesssing succeeded 8guess whether a file is preprocessed (file end with .i) lmnopqrstuvwxyz{|}~lmnopqrstuvwxyz{|}~xyzswvutlmnopqr{|}~lmnopqrswvutxyz{|}~portable experimentalbenedikt.huber@gmail.comNoneGCC, represents a reference to the gcc compiler create a reference to gcc UU#ghc experimentalbenedikt.huber@gmail.comNone  !"#$%&'()\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./01$NoneparseC input initialPos] parses the given preprocessed C-source input and returns the AST or a list of parse errors.  translUnitP\ provides a parser for a complete C translation unit, i.e. a list of external declarations. extDeclP< provides a parser for an external (file-scope) declaration  statementP$ provides a parser for C statements  expressionP% provides a parser for C expressions VWXYZ VWXYZ%ghc experimentalbenedikt.huber@gmail.comNoneK01345679:;=>?@EFGHJKLMNQRSUVXZEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefg(EFGH34567019;=?:>@LNMJKSRQVXZUportable experimentalbenedikt.huber@gmail.comNone-A class of types which can be pretty printed pretty print the given value prettyPrec prec p pretty prints p assuming 2 that the surrounding context has a precedence of  prec XPretty print the given tranlation unit, but replace declarations from header files with #include directives. 7The resulting file may not compile (because of missing #define4 directives and similar things), but is very useful l for testing, as otherwise the pretty printed file will be cluttered with declarations from system headers. [\]^_`abcdefghijklmnopqrstu[\]^_`abcdefghijklmnopqrstu ghc experimentalbenedikt.huber@gmail.comNoneBrun the given parser using a new name supply and builtin typedefs  see k  Synopsis: 'runParser parser inputStream initialPos  6hijk hk6ijghcalphabenedikt.huber@gmail.comNoneU is currently an alias for  (Syntax)  is an alias for  (Syntax)  __attribute__ annotations Those are of the form (Attr attribute-name attribute-parameters, ? and serve as generic properties of some syntax tree elements. Some examples:  labels can be attributed with unused! to indicate that their not used + struct definitions can be attributed with packed= to tell the compiler to use the most compact representation % declarations can be attributed with  deprecated . function declarations can be attributes with noreturn; to tell the compiler that the function will never return,  or with const( to indicate that it is a pure function TODON: ultimatively, we want to parse attributes and represent them in a typed way Assembler name (alias for CStrLit) %Top level assembler block (alias for CStrLit) VarName name assembler-name! is a name of an declared object  is currently an alias for . We'Sre planning a normalized representation, but this depends on the implementation of  constant expression evaluation 1Type qualifiers: constant, volatile and restrict YAn Enumerator consists of an identifier, a constant expressions and the link to its type &Representation of C enumeration types  .EnumType name enumeration-constants attrs node(a tag to determine wheter we refer to a struct or union, see . "Composite type (struct or union). composite type declarations "floating point type (C99 6.7.2.2) integral types (C99 6.7.2.2) typdef references = If the actual type is known, it is attached for convenience !Builtin type (va_list, anything) normalized type representation nAn array type may either have unknown size or a specified array size, the latter either variable or constant. O Furthermore, when used as a function parameters, the size may be qualified as static. * In a function prototype, the size may be `Unspecified variable size' ([*]).  "FixedSizeArray is-static size-expr UnknownArraySize is-starredFunction types are of the form %FunType return-type params isVariadic. If the parameter types aren'#t yet known, the function has type FunTypeIncomplete type attrs. types of C objects a defined type function type  array type  pointer type a non-derived type ILinkage: Either no linkage, internal to the translation unit or external +Storage duration and linkage of a variable .function, either internal or external linkage @static storage, linkage spec and thread local specifier (gnu c) 'automatic storage (optional: register)  no storage #Declaration attributes of the form 0DeclAttrs isInlineFunction storage linkage attrs ;They specify the storage and linkage of a declared object.  DeclAttrs inline storage attrsGeneric variable declarations typedef definitions. 1The identifier is a new name for the given type. Struct/Union member declaration  AnonBitField typ size $MemberDecl vardecl bitfieldsize nodeParameter declaration Function definitions VA function definition is a declaration together with a statement (the function body). Object Definitions DAn object definition is a declaration together with an initializer. DIf the initializer is missing, it is a tentative definition, i.e. a / definition which might be overriden later on. Declarations, which aren't definitions Declaration events QThose events are reported to callbacks, which are executed during the traversal. assembler block a type definition )local variable declaration or definition parameter declaration %file-scope declaration or definition file-scope struct/union/ enum event global declaration/*definition table returned by the analysis @identifiers, typedefs and enumeration constants (namespace sum) definition of an enumerator function definition object definition object or function declaration 9All datatypes aggregating a declaration are instances of  Declaration Mget the name, type and declaration attributes of a declaration or definition "Composite type definitions (tags) 7accessor class : composite type tags (struct or union) accessor class : struct/union/ enum names  2return the type corresponding to a tag definition  ?get the variable identifier of a declaration (only safe if the - the declaration is known to have a name)  get the variable name of a  Declaration  get the type of a  Declaration $get the declaration attributes of a  Declaration -textual description of the kind of an object splitIdentDecls includeAllDecls[ splits a map of object, function and enumerator declarations and definitions into one map o holding declarations, and three maps for object definitions, enumerator definitions and function definitions.  If includeAllDecls is Trueg all declarations are present in the first map, otherwise only those where no corresponding definition  is available. empty global declaration table filter global declarations merge global declarations Returns True. if the given object definition is tentative. return the idenitifier of a typedef get the  of a declaration return True if the object has linkage  Get the linkage of a definition /return the type of a composite type definition &return the type of an enum definition no type qualifiers merge (&&) two type qualifier sets  Empty attribute list !Merge attribute lists  TODO': currently does not remove duplicates       !vwxyz{|}~      !      !u       !vwxyz{|}~ghcalphabenedikt.huber@gmail.comNone,ORedefError is caused by an invalid redefinition of the same identifier or type .DBadSpecifierError is caused by an invalid combination of specifiers 0FInvalidASTError is caused by the violation of an invariant in the AST "#$%&'()*+,-./012345"#$%&'()*+,-./012345012./3"#4,-*+$)('&%5"#$)('&%*+,-./012345None6(Constructor for a simple integral type. 7.Constructor for a simple floating-point type. 8$A simple pointer with no qualifiers 9<The type returned by sizeof (size_t). For now, this is just int. :CThe type of pointer differences (ptrdiff_t). For now, this is just int. ;The type of comparisons/guards. This is always just int. <Simple void type. =An unqualified void pointer. >A const -qualified void pointer. ?An unqualified char pointer. @A const -qualified char pointer. AThe type of a constant string. B4The builtin type of variable-length argument lists. C8Check whether a type is an integral type. This includes enum 4 types. This function does not attempt to resolve typedef types. D<Check whether a type is a floating-point numeric type. This ( function does not attempt to resolve typedef types. E=Check whether a type is an pointer type. This includes array 4 types. This function does not attempt to resolve typedef types. F<Check whether a type is a scalar type. Scalar types include ' arithmetic types and pointer types. Greturn True& if the given type is a function type :Result is undefined in the presence of undefined typeDefs H!Return the qualifiers of a type. J!Return the attributes of a type. L@Return the base type of a pointer or array type. It is an error E to call this function with a type that is not in one of those two  categories. Mresolve typedefs, if possible N$Attempt to remove all references to typedef types from a given type. G Note that this does not dereference the types of structure or union C fields, so there are still cases where further dereferencing is  needed. 6789:;<=>?@ABCDEFGHIJKLMNOPQ6789:;<=>?@ABCDEFGHIJKLMNOPQ6789:;<=>?@ABCDEFGHIJKLMNOPQ6789:;<=>?@ABCDEFGHIJKLMNOPQNoneR>For an arithmetic operator, if the arguments are of the given 2 types, return the type of the full expression. RSTRSTRSTRSTghc prototypebenedikt.huber@gmail.comNoneUExport Declarator  Synopsis: 5exportDeclr other_specs type attributes variable-name XExport a type to syntax UVWXYZ[\]^_ UVWXYZ[\]^_ UXVYW\Z]^[_ UVWXYZ[\]^_ghcalphabenedikt.huber@gmail.comNone$`Status of a declaration akind mismatch b#new def shadows one in outer scope cnew def was discarded dold def was overwritten e new entry f"Table holding current definitions h declared `ordinary identifiers' ideclared structunion enum tags jdefined labels k!member declarations (only local) llink names with definitions n>Tag names map to forward declarations or definitions of struct/union/ enum types r All ordinary identifiers map to  IdenTyDecl: either a typedef or a object/function/ enumerator tAempty definition table, with all name space maps in global scope u7get the globally defined entries of a definition table w9Enter function scope (AND the corresponding block scope) x:Leave function scope, and return the associated DefTable. # Error if not in function scope. yEnter new block scope zLeave innermost block scope {#Enter new member declaration scope |)Leave innermost member declaration scope declare/define a global object/function/typeDef returns Redeclared def if there is already an object/function/typeDef  in global scope, or DifferentKindRedec def0 if the old declaration is of a different kind. declare/define a object/function/typeDef with lexical scope returns Redeclared def or DifferentKindRedec def if there is already an object/function/typeDef  in the same scope. declare/define a object/function/DtypeDef with lexical scope, if the given predicate holds on the old  entry. returns  Keep old_def if the old definition shouldn' t be overwritten, and otherwise Redeclared def or  DifferentKindRedecl def if there is already an object/function/typeDef in the same scope. 3declare a tag (fwd decl in case the struct name isn't defined yet)  define a tag define a label ? Return the old label if it is already defined in this function's scope :lookup identifier (object, function, typeDef, enumerator)  lookup tag  lookup label (lookup an object in the innermost scope ,lookup an identifier in the innermost scope Record the type of a node. Lookup the type of a node. AMerge two DefTables. If both tables contain an entry for a given & key, they must agree on its value. 0`abcdefghijklmnopqrstuvwxyz{|}~-`abcdefghijklmnopqrstuvwxyz{|}~-rsnoqpfghijklmtuvwxyz{|`edcba}~"`edcbafghijklmnoqprstuvwxyz{|}~ghc prototypebenedikt.huber@gmail.comNone  Noneghcalphabenedikt.huber@gmail.comNoneIThe variety of the C language to accept. Note: this is not yet enforced. ;simple traversal monad, providing user state and callbacks Traversal monad &handling declarations and definitions  throw an G  catch an G3 (we could implement dynamically-typed catch here) remember that an G occurred (without throwing it) #return the list of recorded errors return the definition table 1perform an action modifying the definition table unique name generation Zforward declaration of a tag. Only necessary for name analysis, but otherwise no semantic  consequences. /define the given composite type or enumeration F If there is a declaration visible, overwrite it with the definition. = Otherwise, enter a new definition in the current namespace. K If there is already a definition present, yield an error (redeclaration). Thandle variable declarations (external object declarations and function prototypes) ^ variable declarations are either function prototypes, or external declarations, and not very U interesting on their own. we only put them in the symbol table and call the handle. ) declarations never override definitions Vhandle parameter declaration. The interesting part is that parameters can be abstract y (if they are part of a type). If they have a name, we enter the name (usually in function prototype or function scope), . checking if there are duplicate definitions. _ FIXME: I think it would be more transparent to handle parameter declarations in a special way handle function definitions +handle object defintions (maybe tentative) lookup a type definition  the 'wrong kind of object' is an internal error here, : because the parser should distinguish typeDefs and other  objects )lookup an object, function or enumerator create a reference to a struct/union/enum MThis currently depends on the fact the structs are tagged with unique names. R We could use the name generation of TravMonad as well, which might be the better . choice when dealing with autogenerated code. -check wheter non-recoverable errors occurred )raise an error caused by a malformed AST +raise an error based on an Either argument ?:;0ghcalphabenedikt.huber@gmail.comNoneanalyse declarators get the type of a type declaration A type declaration T may appear in thre forms:   typeof(T)7 as abstract declarator in a function prototype, as in f(int) - in a declaration without declarators, as in struct x { int a } ;  Currently, analyseTypeDecl/ is exlusively used for analysing types for GNU's  typeof(T). TWe move attributes to the type, as they have no meaning for the abstract declarator translate a type 2translate a type without (syntactic) indirections  Due to the GNU typeof7 extension and typeDefs, this can be an arbitrary type VMapping from num type specs to C types (C99 6.7.2-2), ignoring the complex qualifier. convert old style parameters VThis requires matching parameter names and declarations, as in the following example:   int f(d,c,a,b)  char a,*b;  int c;  { } is converted to  & int f(int d, int c, char a, char* b) DTODO: This could be moved to syntax, as it operates on the AST only  translate  __attribute__ annotations & TODO: This is a unwrap and wrap stub  construct a name for a variable  TODO: more or less bogus 7 7 7  None "Determine the type of a constant. ,Determine whether two types are compatible. 6Determine the composite type of two compatible types.  HDetermine whether two types are compatible in an assignment expression. !*Determine the type of a binary operation. "0Determine the type of a conditional expression. %Get the type of field m of type t &8Get all members of a struct, union, or enum, with their 0 types. Collapse fields of anonymous members. '?Expand an anonymous composite type into a list of member names  and their associated types. "     !"#$%&'()*+"     !"#$%&'()*+"     !"#$%&'()*+"     !"#$%&'()*+None,-./0123456789:;<=>?@A,-./0123456789:;<=>?@A,-./0123456789:;<=>?@A , -./0123456789:;<=>?@Aghcalphabenedikt.huber@gmail.comNoneBAnalyse the given AST analyseAST ast- results in global declaration dictionaries. Y If you want to perform specific actions on declarations or definitions, you may provide  callbacks in the  MonadTrav m. \Returns the set of global declarations and definitions which where successfully translated. K It is the users responsibility to check whether any hard errors occurred (runTrav does this for you). C!Analyse an top-level declaration DAnalyse a function definition E7Analyse a declaration other than a function definition H@Typecheck a statement, given a statement context. The type of a  statement is usually void', but expression statements and blocks # can sometimes have other types. BCDEFGHIJBCDEFGHIJBCDEGFHJI BCDEFGHIJ&ghcalphabenedikt.huber@gmail.comNone/      !"#$%&'()*+,-./012345 BCDEFGHIJghc experimentalbenedikt.huber@gmail.comNoneK4preprocess (if necessary) and parse a C source file ; Synopsis: parseCFile preprocesssor tmp-dir? cpp-opts file V Example: parseCFile (newGCC "gcc") Nothing ["-I/usr/include/gtk-2.0"] my-gtk-exts.c L%parse an already preprocessed C file  Synopsis: parseCFilePre file.i KLO  !"#$%&'()01345679:;=>?@EFGHJKLMNQRSUVXZ\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./016EFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijkKLKLKL'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOEPQRSTUVWXYZ[\]^_`abcdefghijkklmnopqqrstuvwxyz{|}~       !"#$%&'(')*+,-.//011233456789::;<=>?@ABC D E F G H I J K L M N O P Q R S T U V W X Y Y Z Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r!s!t!t!u v v w x y z { | } ~          $$$$$       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~efgh      !"#$%&'()*+,-./01234456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                                                                                               ! " # $ % &'(!)!*!+!,!-!.!/!0!1!2!K!3!4!5!6!7!8!9":";"<=$>$?$@$A$BCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~language-c-0.4.2Language.C.Syntax.OpsLanguage.C.Data.PositionLanguage.C.Data.NameLanguage.C.Data.NodeLanguage.C.Syntax.ConstantsLanguage.C.Data.IdentLanguage.C.Syntax.ASTLanguage.C.Syntax.UtilsLanguage.C.Parser Language.C.Analysis.NameSpaceMapLanguage.C.Data.ErrorLanguage.C.Data.InputStreamLanguage.C.System.PreprocessLanguage.C.System.GCCLanguage.C.PrettyLanguage.C.Analysis.SemRepLanguage.C.Analysis.SemErrorLanguage.C.Analysis.TypeUtils#Language.C.Analysis.TypeConversionsLanguage.C.Analysis.ExportLanguage.C.Analysis.DefTableLanguage.C.Analysis.DebugLanguage.C.Analysis.BuiltinsLanguage.C.Analysis.TravMonadLanguage.C.Analysis.AstAnalysis Language.C.Analysis.DeclAnalysisLanguage.C.Analysis.TypeCheckLanguage.C.Analysis.ConstEval Language.CLanguage.C.Data.RListLanguage.C.Parser.BuiltinLanguage.C.Parser.TokensLanguage.C.Parser.ParserMonadLanguage.C.Parser.LexerLanguage.C.SyntaxLanguage.C.Parser.ParserLanguage.C.DataLanguage.C.AnalysisCUnaryOpCNegOpCCompOpCMinOpCPlusOpCIndOpCAdrOp CPostDecOp CPostIncOp CPreDecOp CPreIncOp CBinaryOpCLorOpCLndOpCOrOpCXorOpCAndOpCNeqOpCEqOpCGeqOpCLeqOpCGrOpCLeOpCShrOpCShlOpCSubOpCAddOpCRmdOpCDivOpCMulOp CAssignOpCOrAssOp CXorAssOp CAndAssOp CShrAssOp CShlAssOp CSubAssOp CAddAssOp CRmdAssOp CDivAssOp CMulAssOp assignBinopisCmpOpisPtrOpisBitOp isLogicOp isEffectfulOpPosposOf PosLengthPosition posOffsetposFileposRow posColumnpositioninitPos isSourcePosnoposisNoPos builtinPos isBuiltinPos internalPos isInternalPosincPosretPos adjustPos incOffsetNamenameId newNameSupplynamesStartingFromCNodenodeInfoNodeInfoOnlyPos lengthOfNodegetLastTokenPos nameOfNode posOfNode fileOfNodeeqByName internalNode undefNode isUndefNodemkNodeInfoOnlyPosmkNodeInfoPosLen mkNodeInfo mkNodeInfo'FlagsCStringCFloatCIntegerCIntFlagFlagImag FlagLongLongFlagLong FlagUnsignedCIntRepr OctalReprHexReprDecReprCCharCChars showCharConstgetCChar getCCharAsInt isWideCharcCharcChar_wcChars readCInteger getCIntegercIntegercFloat readCFloatcString cString_w getCStringconcatCStrings showStringLit escapeChar unescapeCharunescapeStringnoFlagssetFlag clearFlagtestFlagIdentSUERefNamedRef AnonymousRefisAnonymousRefmkIdent internalIdentinternalIdentAt builtinIdentisInternalIdent identToString dumpIdentCStringLiteralCStrLit CConstant CStrConst CFloatConst CCharConst CIntConstCConst CBuiltinThingCBuiltinTypesCompatibleCBuiltinOffsetOf CBuiltinVaArgCBuiltin CExpression CBuiltinExpr CLabAddrExpr CStatExpr CCompoundLitCVarCMemberCCallCIndex CComplexImag CComplexReal CAlignofType CAlignofExpr CSizeofType CSizeofExprCUnaryCCastCBinaryCCondCAssignCCommaCExpr CAttributeCAttrCPartDesignator CRangeDesig CMemberDesig CArrDesig CDesignatorCInitializerList CInitList CInitializer CInitExprCInit CEnumerationCEnum CStructTag CUnionTagCStructureUnionCStruct CStructUnionCTypeQualifier CAttrQual CInlineQual CRestrQual CVolatQual CConstQual CTypeQualCTypeSpecifier CTypeOfType CTypeOfExprCTypeDef CEnumTypeCSUType CComplexType CBoolType CUnsigType CSignedType CDoubleType CFloatType CLongTypeCIntType CShortType CCharType CVoidType CTypeSpecCStorageSpecifierCThreadCTypedefCExternCStatic CRegisterCAuto CStorageSpecCDeclarationSpecifier CDeclSpecCCompoundBlockItem CNestedFunDef CBlockDecl CBlockStmt CBlockItemCAssemblyOperand CAsmOperandCAssemblyStatementCAsmStmt CStatementCAsmCReturnCBreakCContCGotoPtrCGotoCForCWhileCSwitchCIf CCompoundCDefaultCCasesCCaseCLabelCStat CArraySizeCArrSize CNoArrSizeCDerivedDeclarator CFunDeclr CArrDeclr CPtrDeclr CDerivedDeclr CDeclaratorCDeclr CDeclarationCDecl CFunctionDefCFunDefCExternalDeclarationCAsmExtCFDefExtCDeclExtCExtDeclCTranslationUnit CTranslUnitpartitionDeclSpecsisSUEDef cstringOfLit liftStrLit getSubStmts mapSubStmtsmapBlockItemStmts getLabelsbuiltinTypeNames NameSpaceMap globalNames hasLocalNames localNames nameSpaceMap defGlobal enterNewScope leaveScopedefLocal lookupName lookupGloballookupInnermostScope nsMapToListmergeNameSpace UserErrorUnsupportedFeatureError errorInfotoError fromErrorchangeErrorLevelCError ErrorInfo ErrorLevel LevelFatal LevelError LevelWarn isHardError mkErrorInfoerrorPos errorLevel errorMsgsunsupportedFeatureunsupportedFeature_userErr showError showErrorInfo internalErr InputStreamtakeBytetakeCharinputStreamEmpty takeCharsreadInputStreaminputStreamToStringinputStreamFromString countLinesP ParseError execParserCppArgs cppOptions extraOptions cppTmpDir inputFile outputFile CppOption IncludeFileUndefineDefine IncludeDir Preprocessor parseCPPArgsrunCPP rawCppArgs addCppOptionaddExtraOptionrunPreprocessorisPreprocessedGCCnewGCCparseC translUnitPextDeclP statementP expressionPPrettypretty prettyPrecprettyUsingInclude execParser_ExprStmt AttributesAttrAsmNameAsmBlockVarNameNoName Initializer TypeQualsconstantvolatilerestrict EnumeratorEnumType CompTyKindUnionTag StructTagCompType EnumTypeRef CompTypeRef FloatType TyLDoubleTyDoubleTyFloatIntTypeTyULLongTyLLongTyULongTyLongTyUIntTyIntTyUShortTyShortTyUCharTySCharTyCharTyBool TypeDefRef BuiltinTypeTyAnyTyVaListTypeName TyBuiltinTyEnumTyComp TyComplex TyFloating TyIntegralTyVoid ArraySizeUnknownArraySizeFunTypeFunTypeIncompleteType TypeDefType FunctionType ArrayTypePtrType DirectTypeLinkageExternalLinkageInternalLinkage NoLinkageRegister ThreadLocalStorage FunLinkageStaticAuto NoStorage DeclAttrsVarDeclTypeDef MemberDecl AnonBitField ParamDeclAbstractParamDeclFunDefObjDefDecl DeclEventAsmEvent TypeDefEvent LocalEvent ParamEventTagEvent GlobalDeclsgObjsgTags gTypeDefs IdentDecl EnumeratorDef FunctionDef ObjectDef Declaration getVarDeclTagDefEnumDefCompDef HasCompTyKindcompTag HasSUERefsueRef typeOfTagDef declIdentdeclNamedeclType declAttrs objKindDescrsplitIdentDeclsemptyGlobalDeclsfilterGlobalDeclsmergeGlobalDecls isTentativeidentOfTypeDef isExtDecl declStorage hasLinkage declLinkage typeOfCompDef typeOfEnumDef noTypeQualsmergeTypeQualsidentOfVarNameisNoName noAttributesmergeAttributes TypeMismatch RedefKind NoLinkageOldDisagreeLinkage ShadowedDefDiffKindRedecl DuplicateDef RedefInfo RedefErrorBadSpecifierErrorInvalidASTError InvalidAST invalidASTbadSpecifierError typeMismatch redefinitionintegralfloating simplePtr size_tType ptrDiffTypeboolTypevoidTypevoidPtr constVoidPtrcharPtr constCharPtr stringType valistTypeisIntegralTypeisFloatingType isPointerType isScalarTypeisFunctionType typeQuals typeQualsUpd typeAttrs typeAttrsUpdbaseType derefTypeDefdeepDerefTypeDef canonicalType getIntType getFloatTypearithmeticConversionfloatConversion intConversion exportDeclrexportTypeDecl exportTypeDef exportTypeexportTypeSpecexportCompTypeDeclexportEnumTypeDeclexportCompTypeexportCompTypeRefexportEnumTypeexportEnumTypeRefDeclarationStatus KindMismatchShadowedKeepDef RedeclaredNewDeclDefTable identDeclstagDecls labelDefs memberDeclsrefTable typeTableTagEntry TagFwdDeclEnumDeclCompDecl IdentEntry identOfTyDecl emptyDefTable globalDefs inFileScopeenterFunctionScopeleaveFunctionScopeenterBlockScopeleaveBlockScopeenterMemberDeclleaveMemberDecldeclStatusDescr defineTypeDefdefineGlobalIdentdefineScopedIdentdefineScopedIdentWhen declareTag defineTag defineLabel lookupIdent lookupTag lookupLabellookupIdentInnerlookupTagInner insertType lookupType mergeDefTable prettyAssocsprettyAssocsWithglobalDeclStatsbuiltins TravState userState TravOptionslanguage CLanguageGNU99GNU89C99C89Trav MonadTrav handleDecl MonadCErrorthrowTravErrorcatchTravError recordError getErrors MonadSymtab getDefTable withDefTable MonadNamegenName handleTagDecl handleTagDefhandleEnumeratorDef handleTypeDefhandleAsmBlock handleVarDeclhandleParamDecl handleFunDefhandleObjectDefenterPrototypeScopeleavePrototypeScope lookupTypeDef lookupObject createSUERefhandleTravError hadHardErrorsastError throwOnLeftwarnrunTravrunTrav_withExtDeclHandler travErrors initTravStatemodifyUserState getUserState modifyOptions mapMaybeMmaybeMmapSndM concatMapMExprSideRValueLValueStmtCtx SwitchCtxLoopCtxFunCtxtExprTypeSpecAnalysis TSNonBasicTSType TSTypeDefTSNumTSBoolTSVoidTSNone NumTypeSpecbasesignSpecsizeMod isComplexSizeMod LongLongModLongModShortMod NoSizeModSignSpecUnsignedSigned NoSignSpec NumBaseType BaseDouble BaseFloatBaseIntBaseChar NoBaseType VarDeclInfo StorageSpec ExternSpec StaticSpec ThreadSpecRegSpecAutoSpec NoStorageSpechasThreadLocalSpecanalyseVarDecl'analyseVarDecl isTypeDefanalyseTypeDecltType tDirectTypetNumType tArraySize tTypeQualscanonicalTypeSpeccanonicalStorageSpec mergeOldStyletAttr mkVarName nameOfDecl getOnlyDeclrpTypetypeErrorOnLeft typeErrornotFound checkScalar'checkIntegral'assignCompatible' binopType'conditionalType' checkScalar checkIntegral constType compatible compositeType compositeSize sizeEqual mergeAttrscompositeParamDeclcompositeParamDecl'compositeVarDeclcompositeDeclAttrscastCompatibleassignCompatible binopTypeconditionalType derefType varAddrType fieldType tagMembersexpandAnonymous lookupSUE deepTypeAttrs typeDefAttrssueAttrs MachineDesciSizefSize builtinSizeptrSizevoidSizeiAlignfAlign builtinAlignptrAlign voidAlignintExpr sizeofType alignofTypecompSizeintOpintUnOp withWordBytes boolValueintValue constEval analyseAST analyseExt analyseFunDef analyseDecl defineParamsanalyseFunctionBodytStmt defaultMD tDesignator parseCFile parseCFilePreRListReversedempty singletonsnocrappendappendrrappendrrmapreverseviewr$fShowPosition $fEnumName $fCNodeEither$fCNodeNodeInfo $fPosNodeInfo $fOrdNodeInfo $fEqNodeInfo$fShowNodeInfoghc-prim GHC.TypesChar $fShowCString $fShowCFloat$fShowCInteger$fShowCIntFlag $fShowCChar $fPosIdent $fCNodeIdent $fShowIdent $fOrdIdent $fEqIdent $fShowSUERefGHC.Num*$fAnnotatedCStringLiteral$fFunctorCStringLiteral$fPosCStringLiteral$fCNodeCStringLiteral$fAnnotatedCConstant$fFunctorCConstant$fPosCConstant$fCNodeCConstant$fAnnotatedCBuiltinThing$fFunctorCBuiltinThing$fPosCBuiltinThing$fCNodeCBuiltinThing$fAnnotatedCExpression$fPosCExpression$fCNodeCExpression$fAnnotatedCAttribute$fFunctorCAttribute$fPosCAttribute$fCNodeCAttribute$fAnnotatedCPartDesignator$fFunctorCPartDesignator$fPosCPartDesignator$fCNodeCPartDesignator$fAnnotatedCInitializer$fPosCInitializer$fCNodeCInitializer$fAnnotatedCEnumeration$fFunctorCEnumeration$fPosCEnumeration$fCNodeCEnumeration$fAnnotatedCStructureUnion$fFunctorCStructureUnion$fPosCStructureUnion$fCNodeCStructureUnion$fAnnotatedCTypeQualifier$fFunctorCTypeQualifier$fPosCTypeQualifier$fCNodeCTypeQualifier$fAnnotatedCTypeSpecifier$fFunctorCTypeSpecifier$fPosCTypeSpecifier$fCNodeCTypeSpecifier$fAnnotatedCStorageSpecifier$fFunctorCStorageSpecifier$fPosCStorageSpecifier$fCNodeCStorageSpecifier $fAnnotatedCDeclarationSpecifier$fFunctorCDeclarationSpecifier$fPosCDeclarationSpecifier$fCNodeCDeclarationSpecifier$fAnnotatedCCompoundBlockItem$fFunctorCCompoundBlockItem$fPosCCompoundBlockItem$fCNodeCCompoundBlockItem$fAnnotatedCAssemblyOperand$fFunctorCAssemblyOperand$fPosCAssemblyOperand$fCNodeCAssemblyOperand$fAnnotatedCAssemblyStatement$fFunctorCAssemblyStatement$fPosCAssemblyStatement$fCNodeCAssemblyStatement$fAnnotatedCStatement$fPosCStatement$fCNodeCStatement$fFunctorCArraySize$fAnnotatedCDerivedDeclarator$fPosCDerivedDeclarator$fCNodeCDerivedDeclarator$fAnnotatedCDeclarator$fFunctorCDeclarator$fPosCDeclarator$fCNodeCDeclarator$fAnnotatedCDeclaration$fPosCDeclaration$fCNodeCDeclaration$fAnnotatedCFunctionDef$fFunctorCFunctionDef$fPosCFunctionDef$fCNodeCFunctionDef$fAnnotatedCExternalDeclaration$fFunctorCExternalDeclaration$fPosCExternalDeclaration$fCNodeCExternalDeclaration$fAnnotatedCTranslationUnit$fFunctorCTranslationUnit$fPosCTranslationUnit$fCNodeCTranslationUnit$fFunctorCExpression$fFunctorCInitializer$fFunctorCStatement$fFunctorCDerivedDeclarator$fFunctorCDeclarationGnuCTokGnuCComplexImagGnuCComplexReal GnuCTyCompat GnuCOffsetof GnuCVaArg GnuCExtTok GnuCAttrTokCTokenCTokEofCTokGnuC CTokTyIdent CTokIdentCTokSLitCTokFLitCTokILitCTokCLit CTokWhile CTokVolatileCTokVoid CTokUnsigned CTokUnion CTokThread CTokTypeof CTokTypedef CTokSwitch CTokStruct CTokStatic CTokSizeof CTokSigned CTokShort CTokReturn CTokRestrict CTokRegister CTokLabelCTokLongCTokInt CTokInlineCTokIfCTokGotoCTokFor CTokFloat CTokExternCTokEnumCTokElse CTokDoubleCTokDo CTokDefault CTokComplex CTokContinue CTokConstCTokCharCTokCaseCTokBool CTokBreakCTokAutoCTokAsm CTokAlignof CTokEllipsis CTokRBrace CTokLBrace CTokSemic CTokComma CTokSRAss CTokSLAss CTokBarAss CTokHatAss CTokAmpAss CTokPercAss CTokSlashAss CTokStarAss CTokMinusAss CTokPlusAss CTokAssign CTokColon CTokQuestCTokOrCTokAndCTokBarCTokHat CTokUnequal CTokEqual CTokHighEqCTokHigh CTokLessEqCTokLess CTokShiftR CTokShiftL CTokAmper CTokPercent CTokSlashCTokStar CTokMinusCTokPlusCTokDecCTokInc CTokTilde CTokExclamCTokDot CTokArrow CTokRBracket CTokLBracket CTokRParen CTokLParen posLenOfTok $fShowCToken $fPosCToken$fShowUserError$fErrorUserError$fShowUnsupportedFeature$fErrorUnsupportedFeature $fErrorCError $fShowCError$fErrorErrorInfo$fShowErrorInfo$fShowErrorLevelGHC.BaseString setLastTokenhandleEofTokenfailP getNewNamesetPosgetPos addTypedef shadowTypedef isTypeIdent enterScopegetInputsetInput getLastToken getSavedTokengetCurrentPosition$fMonadP$fShowParseError parseErrorlexC$fFunctorAlexLastAcc$fPreprocessorGCC $fPosReversed$fPos[] $fPosCDeclrR$fCNodeCDeclrR $fPosLocated$fPrettyCStringLiteral$fPrettyCConstant$fPrettyCUnaryOp$fPrettyCBinaryOp$fPrettyCAssignOp$fPrettyCBuiltinThing$fPrettyCExpression$fPrettyCAttribute$fPrettyCPartDesignator$fPrettyCInitializer$fPrettyCArraySize$fPrettyCDeclarator$fPrettyCEnumeration$fPrettyCStructTag$fPrettyCStructureUnion$fPrettyCTypeQualifier$fPrettyCTypeSpecifier$fPrettyCStorageSpecifier$fPrettyCDeclarationSpecifier$fPrettyCDeclaration$fPrettyCCompoundBlockItem$fPrettyCAssemblyOperand$fPrettyCAssemblyStatement$fPrettyCStatement$fPrettyCFunctionDef$fPrettyCExternalDeclaration$fPrettyCTranslationUnit $fPosAttr $fCNodeAttr$fPosEnumerator$fCNodeEnumerator $fPosEnumType$fCNodeEnumType $fPosCompType$fCNodeCompType$fPosEnumTypeRef$fCNodeEnumTypeRef$fPosCompTypeRef$fCNodeCompTypeRef$fPosTypeDefRef$fCNodeTypeDefRef $fPosTypeDef$fCNodeTypeDef$fPosMemberDecl$fCNodeMemberDecl$fPosParamDecl$fCNodeParamDecl $fPosFunDef $fCNodeFunDef $fPosObjDef $fCNodeObjDef $fPosDecl $fCNodeDecl$fPosDeclEvent$fCNodeDeclEvent$fPosIdentDecl$fCNodeIdentDecl $fPosTagDef $fCNodeTagDef$fDeclarationEnumerator$fHasSUERefEnumType$fShowCompTyKind$fHasCompTyKindCompType$fHasSUERefCompType$fHasSUERefEnumTypeRef$fHasCompTyKindCompTypeRef$fHasSUERefCompTypeRef$fShowFloatType $fShowIntType$fDeclarationVarDecl$fDeclarationMemberDecl$fDeclarationParamDecl$fDeclarationFunDef$fDeclarationObjDef$fDeclarationDecl$fDeclarationIdentDecl$fDeclarationEither$fHasSUERefTagDef$fErrorRedefError$fShowRedefError$fErrorTypeMismatch$fShowTypeMismatch$fShowBadSpecifierError$fShowInvalidASTError$fOrdTypeQuals $fEqTypeQuals$fShowTagEntryKind$fCNodeTagFwdDecl$fHasSUERefTagFwdDecl $fPrettyAttr $fPretty[]$fPrettyVarName$fPrettyLinkage$fPrettyStorage$fPrettyEnumerator$fPrettyEnumType$fPrettyMemberDecl$fPrettyCompType$fPrettyTypeQuals $fPrettyType$fPrettyDeclAttrs$fPrettyParamDecl$fPrettyVarDecl$fPrettyFunDef$fPrettyObjDef$fPrettyTypeDef $fPrettyDecl$fPrettyIdentDecl$fPrettyTagDef$fPrettySUERef $fPrettyIdent$fPrettyEnumTypeRef$fPrettyCompTypeRef$fPrettyCompTyKind$fPrettyTagFwdDecl$fPrettyEither$fPrettyGlobalDecls$fPrettyDefTable$fMonadTravTrav$fMonadCErrorTrav$fMonadSymtabTrav$fMonadNameTrav $fMonadTrav