#----------------------------------------------------------------- | |
# pycparser: _c_ast.cfg | |
# | |
# Defines the AST Node classes used in pycparser. | |
# | |
# Each entry is a Node sub-class name, listing the attributes | |
# and child nodes of the class: | |
# <name>* - a child node | |
# <name>** - a sequence of child nodes | |
# <name> - an attribute | |
# | |
# Eli Bendersky [https://eli.thegreenplace.net/] | |
# License: BSD | |
#----------------------------------------------------------------- | |
# ArrayDecl is a nested declaration of an array with the given type. | |
# dim: the dimension (for example, constant 42) | |
# dim_quals: list of dimension qualifiers, to support C99's allowing 'const' | |
# and 'static' within the array dimension in function declarations. | |
ArrayDecl: | |
ArrayRef: | |
# op: =, +=, /= etc. | |
# | |
Assignment: | |
Alignas: | |
BinaryOp: | |
Break: | |
Case: | |
Cast: | |
# Compound statement in C99 is a list of block items (declarations or | |
# statements). | |
# | |
Compound: | |
# Compound literal (anonymous aggregate) for C99. | |
# (type-name) {initializer_list} | |
# type: the typename | |
# init: InitList for the initializer list | |
# | |
CompoundLiteral: | |
# type: int, char, float, string, etc. | |
# | |
Constant: | |
Continue: | |
# name: the variable being declared | |
# quals: list of qualifiers (const, volatile) | |
# funcspec: list function specifiers (i.e. inline in C99) | |
# storage: list of storage specifiers (extern, register, etc.) | |
# type: declaration type (probably nested with all the modifiers) | |
# init: initialization value, or None | |
# bitsize: bit field size, or None | |
# | |
Decl: | |
DeclList: | |
Default: | |
DoWhile: | |
# Represents the ellipsis (...) parameter in a function | |
# declaration | |
# | |
EllipsisParam: | |
# An empty statement (a semicolon ';' on its own) | |
# | |
EmptyStatement: | |
# Enumeration type specifier | |
# name: an optional ID | |
# values: an EnumeratorList | |
# | |
Enum: | |
# A name/value pair for enumeration values | |
# | |
Enumerator: | |
# A list of enumerators | |
# | |
EnumeratorList: | |
# A list of expressions separated by the comma operator. | |
# | |
ExprList: | |
# This is the top of the AST, representing a single C file (a | |
# translation unit in K&R jargon). It contains a list of | |
# "external-declaration"s, which is either declarations (Decl), | |
# Typedef or function definitions (FuncDef). | |
# | |
FileAST: | |
# for (init; cond; next) stmt | |
# | |
For: | |
# name: Id | |
# args: ExprList | |
# | |
FuncCall: | |
# type <decl>(args) | |
# | |
FuncDecl: | |
# Function definition: a declarator for the function name and | |
# a body, which is a compound statement. | |
# There's an optional list of parameter declarations for old | |
# K&R-style definitions | |
# | |
FuncDef: | |
Goto: | |
ID: | |
# Holder for types that are a simple identifier (e.g. the built | |
# ins void, char etc. and typedef-defined types) | |
# | |
IdentifierType: | |
If: | |
# An initialization list used for compound literals. | |
# | |
InitList: | |
Label: | |
# A named initializer for C99. | |
# The name of a NamedInitializer is a sequence of Nodes, because | |
# names can be hierarchical and contain constant expressions. | |
# | |
NamedInitializer: | |
# a list of comma separated function parameter declarations | |
# | |
ParamList: | |
PtrDecl: | |
Return: | |
StaticAssert: | |
# name: struct tag name | |
# decls: declaration of members | |
# | |
Struct: | |
# type: . or -> | |
# name.field or name->field | |
# | |
StructRef: | |
Switch: | |
# cond ? iftrue : iffalse | |
# | |
TernaryOp: | |
# A base type declaration | |
# | |
TypeDecl: | |
# A typedef declaration. | |
# Very similar to Decl, but without some attributes | |
# | |
Typedef: | |
Typename: | |
UnaryOp: | |
# name: union tag name | |
# decls: declaration of members | |
# | |
Union: | |
While: | |
Pragma: | |