public class HeaderParser extends antlr.TreeParser implements HeaderParserTokenTypes
Modifier and Type | Field and Description |
---|---|
static String[] |
_tokenNames |
static BitSet |
_tokenSet_0 |
static BitSet |
_tokenSet_1 |
static BitSet |
_tokenSet_2 |
static BitSet |
_tokenSet_3 |
static BitSet |
_tokenSet_4 |
static String |
ANONYMOUS_ENUM_NAME
Name assigned to a anonymous EnumType (e.g., "enum { ...
|
ASSIGN, BadStringLiteral, BAND, BAND_ASSIGN, BNOT, BOR, BOR_ASSIGN, BXOR, BXOR_ASSIGN, CharLiteral, COLON, COMMA, Comment, CPPComment, DEC, DefineExpr, DefineExpr2, Digit, DIV, DIV_ASSIGN, DOT, DoubleDoubleConst, EOF, EQUAL, Escape, Exponent, FloatDoubleConst, FloatSuffix, GT, GTE, ID, INC, IntHexConst, IntIntConst, IntOctalConst, LAND, LBRACKET, LCURLY, LineDirective, LITERAL___alignof, LITERAL___attribute, LITERAL___complex, LITERAL___imag, LITERAL___label__, LITERAL___real, LITERAL_asm, LITERAL_auto, LITERAL_break, LITERAL_case, LITERAL_char, LITERAL_const, LITERAL_continue, LITERAL_default, LITERAL_do, LITERAL_double, LITERAL_else, LITERAL_enum, LITERAL_extern, LITERAL_float, LITERAL_for, LITERAL_goto, LITERAL_if, LITERAL_inline, LITERAL_int, LITERAL_intptr_t, LITERAL_long, LITERAL_ptrdiff_t, LITERAL_register, LITERAL_return, LITERAL_short, LITERAL_signed, LITERAL_size_t, LITERAL_sizeof, LITERAL_static, LITERAL_struct, LITERAL_switch, LITERAL_typedef, LITERAL_typeof, LITERAL_uintptr_t, LITERAL_union, LITERAL_unsigned, LITERAL_void, LITERAL_volatile, LITERAL_wchar_t, LITERAL_while, LNOT, LongDoubleConst, LongHexConst, LongIntConst, LongOctalConst, LongSuffix, LOR, LPAREN, LSHIFT, LSHIFT_ASSIGN, LT, LTE, MINUS, MINUS_ASSIGN, MOD, MOD_ASSIGN, NAsmAttribute, NCast, NCommaExpr, NCompoundStatement, NDeclaration, NDeclarator, NEmptyExpression, NExpressionGroup, NFunctionCallArgs, NFunctionDef, NGnuAsmExpr, NInitDecl, NInitializer, NInitializerElementLabel, NLabel, NLcurlyInitializer, NNonemptyAbstractDeclarator, NonWhitespace, NOT_EQUAL, NParameterDeclaration, NParameterTypeList, NPointerGroup, NPostfixExpr, NRangeExpr, NStatementExpr, NStringSeq, NStructDeclarator, NTypedefName, NTypeMissing, NULL_TREE_LOOKAHEAD, Number, NUnaryExpr, PLUS, PLUS_ASSIGN, PREPROC_DIRECTIVE, PTR, QUESTION, RBRACKET, RCURLY, RPAREN, RSHIFT, RSHIFT_ASSIGN, SEMI, Space, STAR, STAR_ASSIGN, StringLiteral, UnsignedHexConst, UnsignedIntConst, UnsignedOctalConst, UnsignedSuffix, VARARGS, Vocabulary, Whitespace
Constructor and Description |
---|
HeaderParser() |
Modifier and Type | Method and Description |
---|---|
void |
additiveExpr(AST _t) |
void |
argExprList(AST _t) |
void |
asm_expr(AST _t) |
void |
assignExpr(AST _t) |
void |
attributeDecl(AST _t) |
void |
bitAndExpr(AST _t) |
void |
castExpr(AST _t) |
protected void |
charConst(AST _t) |
void |
clearParsedFunctions()
Clears the list of functions this HeaderParser has parsed.
|
void |
commaExpr(AST _t) |
void |
compoundStatement(AST _t) |
void |
compoundStatementExpr(AST _t) |
void |
conditionalExpr(AST _t) |
void |
declaration(AST _t) |
void |
declarationList(AST _t) |
String |
declarator(AST _t,
com.jogamp.gluegen.cgram.HeaderParser.TypeBox tb) |
com.jogamp.gluegen.cgram.HeaderParser.TypeBox |
declSpecifiers(AST _t) |
void |
emptyExpr(AST _t) |
long |
enumerator(AST _t,
EnumType enumeration,
long defaultValue) |
void |
enumList(AST _t,
EnumType enumeration) |
Type |
enumSpecifier(AST _t,
int cvAttrs) |
void |
equalityExpr(AST _t) |
void |
exclusiveOrExpr(AST _t) |
void |
expr(AST _t) |
void |
externalDef(AST _t) |
void |
externalList(AST _t) |
protected void |
floatConst(AST _t) |
void |
functionDeclSpecifiers(AST _t) |
void |
functionDef(AST _t) |
int |
functionStorageClassSpecifier(AST _t) |
Map |
getCanonMap()
Get the canonicalization map, which is a regular HashMap
mapping Type to Type and which is used for looking up the unique
instances of e.g.
|
boolean |
getDebug() |
List |
getEnums()
Returns the EnumTypes this HeaderParser processed.
|
List |
getParsedFunctions()
Returns the list of FunctionSymbols this HeaderParser has parsed.
|
TypeDictionary |
getStructDictionary()
Returns the struct name dictionary this HeaderParser uses.
|
TypeDictionary |
getTypedefDictionary()
Returns the typedef dictionary this HeaderParser uses.
|
void |
gnuAsmExpr(AST _t) |
void |
idList(AST _t) |
void |
inclusiveOrExpr(AST _t) |
void |
initDecl(AST _t,
com.jogamp.gluegen.cgram.HeaderParser.TypeBox tb) |
void |
initDeclList(AST _t,
com.jogamp.gluegen.cgram.HeaderParser.TypeBox tb) |
void |
initializer(AST _t) |
void |
initializerElementLabel(AST _t) |
void |
initializerList(AST _t) |
protected void |
intConst(AST _t) |
int |
intConstExpr(AST _t) |
void |
lcurlyInitializer(AST _t) |
void |
localLabelDecl(AST _t) |
void |
logicalAndExpr(AST _t) |
void |
logicalOrExpr(AST _t) |
void |
multExpr(AST _t) |
void |
nonemptyAbstractDeclarator(AST _t,
com.jogamp.gluegen.cgram.HeaderParser.TypeBox tb) |
com.jogamp.gluegen.cgram.HeaderParser.ParameterDeclaration |
parameterDeclaration(AST _t) |
List |
parameterTypeList(AST _t) |
void |
pointerGroup(AST _t,
com.jogamp.gluegen.cgram.HeaderParser.TypeBox tb) |
void |
postfixExpr(AST _t) |
void |
primaryExpr(AST _t) |
void |
rangeExpr(AST _t) |
void |
relationalExpr(AST _t) |
void |
setDebug(boolean debug) |
void |
setEnums(List enumTypes)
Pre-define the list of EnumTypes for this HeaderParser.
|
void |
setStructDictionary(TypeDictionary dict)
Set the dictionary mapping struct names (i.e., the "foo" in
"struct foo { ...
|
void |
setTypedefDictionary(TypeDictionary dict)
Set the dictionary mapping typedef names to types for this
HeaderParser.
|
void |
shiftExpr(AST _t) |
Type |
specifierQualifierList(AST _t) |
void |
statement(AST _t) |
void |
statementBody(AST _t) |
void |
statementList(AST _t) |
int |
storageClassSpecifier(AST _t) |
protected void |
stringConst(AST _t) |
void |
strOptExprPair(AST _t) |
void |
structDeclaration(AST _t,
CompoundType containingType) |
void |
structDeclarationList(AST _t,
CompoundType t) |
boolean |
structDeclarator(AST _t,
CompoundType containingType,
Type t) |
boolean |
structDeclaratorList(AST _t,
CompoundType containingType,
Type t) |
CompoundType |
structOrUnionBody(AST _t,
CompoundTypeKind kind,
int cvAttrs) |
Type |
structSpecifier(AST _t,
int cvAttrs) |
void |
translationUnit(AST _t) |
Type |
typedefName(AST _t,
int cvAttrs) |
void |
typelessDeclaration(AST _t) |
void |
typeName(AST _t) |
int |
typeQualifier(AST _t) |
Type |
typeSpecifier(AST _t,
int attributes) |
void |
unaryExpr(AST _t) |
void |
unaryOperator(AST _t) |
Type |
unionSpecifier(AST _t,
int cvAttrs) |
public static final String ANONYMOUS_ENUM_NAME
public static final String[] _tokenNames
public static final BitSet _tokenSet_0
public static final BitSet _tokenSet_1
public static final BitSet _tokenSet_2
public static final BitSet _tokenSet_3
public static final BitSet _tokenSet_4
public boolean getDebug()
public void setDebug(boolean debug)
public void setTypedefDictionary(TypeDictionary dict)
public TypeDictionary getTypedefDictionary()
public void setStructDictionary(TypeDictionary dict)
public TypeDictionary getStructDictionary()
public Map getCanonMap()
public void setEnums(List enumTypes)
public List getEnums()
public void clearParsedFunctions()
public List getParsedFunctions()
public final String declarator(AST _t, com.jogamp.gluegen.cgram.HeaderParser.TypeBox tb) throws RecognitionException
RecognitionException
public final void pointerGroup(AST _t, com.jogamp.gluegen.cgram.HeaderParser.TypeBox tb) throws RecognitionException
RecognitionException
public final List parameterTypeList(AST _t) throws RecognitionException
RecognitionException
public final void idList(AST _t) throws RecognitionException
RecognitionException
public final void expr(AST _t) throws RecognitionException
RecognitionException
public final void typelessDeclaration(AST _t) throws RecognitionException
RecognitionException
public final void initDeclList(AST _t, com.jogamp.gluegen.cgram.HeaderParser.TypeBox tb) throws RecognitionException
RecognitionException
public final void declaration(AST _t) throws RecognitionException
RecognitionException
public final com.jogamp.gluegen.cgram.HeaderParser.TypeBox declSpecifiers(AST _t) throws RecognitionException
RecognitionException
public final com.jogamp.gluegen.cgram.HeaderParser.ParameterDeclaration parameterDeclaration(AST _t) throws RecognitionException
RecognitionException
public final void nonemptyAbstractDeclarator(AST _t, com.jogamp.gluegen.cgram.HeaderParser.TypeBox tb) throws RecognitionException
RecognitionException
public final void functionDef(AST _t) throws RecognitionException
RecognitionException
public final void functionDeclSpecifiers(AST _t) throws RecognitionException
RecognitionException
public final void compoundStatement(AST _t) throws RecognitionException
RecognitionException
public final int storageClassSpecifier(AST _t) throws RecognitionException
RecognitionException
public final int typeQualifier(AST _t) throws RecognitionException
RecognitionException
public final Type typeSpecifier(AST _t, int attributes) throws RecognitionException
RecognitionException
public final int functionStorageClassSpecifier(AST _t) throws RecognitionException
RecognitionException
public final Type structSpecifier(AST _t, int cvAttrs) throws RecognitionException
RecognitionException
public final void attributeDecl(AST _t) throws RecognitionException
RecognitionException
public final Type unionSpecifier(AST _t, int cvAttrs) throws RecognitionException
RecognitionException
public final Type enumSpecifier(AST _t, int cvAttrs) throws RecognitionException
RecognitionException
public final Type typedefName(AST _t, int cvAttrs) throws RecognitionException
RecognitionException
public final void typeName(AST _t) throws RecognitionException
RecognitionException
public final CompoundType structOrUnionBody(AST _t, CompoundTypeKind kind, int cvAttrs) throws RecognitionException
RecognitionException
public final void structDeclarationList(AST _t, CompoundType t) throws RecognitionException
RecognitionException
public final void structDeclaration(AST _t, CompoundType containingType) throws RecognitionException
RecognitionException
public final Type specifierQualifierList(AST _t) throws RecognitionException
RecognitionException
public final boolean structDeclaratorList(AST _t, CompoundType containingType, Type t) throws RecognitionException
RecognitionException
public final boolean structDeclarator(AST _t, CompoundType containingType, Type t) throws RecognitionException
RecognitionException
public final void enumList(AST _t, EnumType enumeration) throws RecognitionException
RecognitionException
public final long enumerator(AST _t, EnumType enumeration, long defaultValue) throws RecognitionException
RecognitionException
public final void initDecl(AST _t, com.jogamp.gluegen.cgram.HeaderParser.TypeBox tb) throws RecognitionException
RecognitionException
public final void initializer(AST _t) throws RecognitionException
RecognitionException
public final int intConstExpr(AST _t) throws RecognitionException
RecognitionException
public final void translationUnit(AST _t) throws RecognitionException
RecognitionException
public final void externalList(AST _t) throws RecognitionException
RecognitionException
public final void externalDef(AST _t) throws RecognitionException
RecognitionException
public final void asm_expr(AST _t) throws RecognitionException
RecognitionException
public final void initializerElementLabel(AST _t) throws RecognitionException
RecognitionException
public final void lcurlyInitializer(AST _t) throws RecognitionException
RecognitionException
public final void initializerList(AST _t) throws RecognitionException
RecognitionException
public final void declarationList(AST _t) throws RecognitionException
RecognitionException
public final void localLabelDecl(AST _t) throws RecognitionException
RecognitionException
public final void statementList(AST _t) throws RecognitionException
RecognitionException
public final void statement(AST _t) throws RecognitionException
RecognitionException
public final void statementBody(AST _t) throws RecognitionException
RecognitionException
public final void assignExpr(AST _t) throws RecognitionException
RecognitionException
public final void conditionalExpr(AST _t) throws RecognitionException
RecognitionException
public final void logicalOrExpr(AST _t) throws RecognitionException
RecognitionException
public final void logicalAndExpr(AST _t) throws RecognitionException
RecognitionException
public final void inclusiveOrExpr(AST _t) throws RecognitionException
RecognitionException
public final void exclusiveOrExpr(AST _t) throws RecognitionException
RecognitionException
public final void bitAndExpr(AST _t) throws RecognitionException
RecognitionException
public final void equalityExpr(AST _t) throws RecognitionException
RecognitionException
public final void relationalExpr(AST _t) throws RecognitionException
RecognitionException
public final void shiftExpr(AST _t) throws RecognitionException
RecognitionException
public final void additiveExpr(AST _t) throws RecognitionException
RecognitionException
public final void multExpr(AST _t) throws RecognitionException
RecognitionException
public final void castExpr(AST _t) throws RecognitionException
RecognitionException
public final void unaryExpr(AST _t) throws RecognitionException
RecognitionException
public final void postfixExpr(AST _t) throws RecognitionException
RecognitionException
public final void primaryExpr(AST _t) throws RecognitionException
RecognitionException
public final void commaExpr(AST _t) throws RecognitionException
RecognitionException
public final void emptyExpr(AST _t) throws RecognitionException
RecognitionException
public final void compoundStatementExpr(AST _t) throws RecognitionException
RecognitionException
public final void rangeExpr(AST _t) throws RecognitionException
RecognitionException
public final void gnuAsmExpr(AST _t) throws RecognitionException
RecognitionException
protected final void stringConst(AST _t) throws RecognitionException
RecognitionException
public final void strOptExprPair(AST _t) throws RecognitionException
RecognitionException
public final void unaryOperator(AST _t) throws RecognitionException
RecognitionException
public final void argExprList(AST _t) throws RecognitionException
RecognitionException
protected final void charConst(AST _t) throws RecognitionException
RecognitionException
protected final void intConst(AST _t) throws RecognitionException
RecognitionException
protected final void floatConst(AST _t) throws RecognitionException
RecognitionException