Package EDU.purdue.jtb.parser
Class JTBParser
- java.lang.Object
-
- EDU.purdue.jtb.parser.JavaCCGlobals
-
- EDU.purdue.jtb.parser.JavaCCParserInternals
-
- EDU.purdue.jtb.parser.JTBParser
-
- All Implemented Interfaces:
JTBParserConstants
public class JTBParser extends JavaCCParserInternals implements JTBParserConstants
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JTBParser.ModifierSet
-
Field Summary
Fields Modifier and Type Field Description java.lang.String
grammarPackage
Token
jj_nt
Next token.Options
opt
Token
token
Current token.JTBParserTokenManager
token_source
Generated Token Manager.-
Fields inherited from class EDU.purdue.jtb.parser.JavaCCGlobals
bnfproductions, ccol, cline, cu_from_insertion_point_2, cu_name, cu_to_insertion_point_1, cu_to_insertion_point_2, fileName, jj2index, jjtreeGenerated, lexstate_I2S, lexstate_S2I, lookaheadNeeded, maskindex, maskVals, named_tokens_table, names_of_tokens, ordered_named_tokens, origFileName, production_table, rexprlist, rexps_of_tokens, simple_tokens_table, token_mgr_decls, tokenCount, toolName, toolNames
-
Fields inherited from interface EDU.purdue.jtb.parser.JTBParserConstants
_DEFAULT, _EOF, _IGNORE_CASE, _JAVACODE, _LOOKAHEAD, _MORE, _PARSER_BEGIN, _PARSER_END, _SKIP, _SPECIAL_TOKEN, _TOKEN, _TOKEN_MGR_DECLS, ABSTRACT, AFTER_EGEN, ANDASSIGN, ASSERT, ASSIGN, BANG, BIT_AND, BIT_OR, BOOLEAN, BREAK, BYTE, CASE, CATCH, CHAR, CHARACTER_LITERAL, CLASS, COLON, COMMA, CONST, CONTINUE, DEC_DIGIT, DECIMAL_EXPONENT, DECIMAL_FLOATING_POINT_LITERAL, DECIMAL_LITERAL, DECR, DEFAULT, DO, DOT, DOUBLE, ELSE, ENUM, EOF, EQ, ESCAPED_CHARACTER, EXTENDS, FALSE, FINAL, FINALLY, FLOAT, FLOATING_POINT_LETTER, FLOATING_POINT_LITERAL, FOR, FORMAL_COMMENT, GE, GOTO, GT, HEX_DIGIT, HEX_LITERAL, HEXADECIMAL_EXPONENT, HEXADECIMAL_FLOATING_POINT_LITERAL, HOOK, IDENTIFIER, IF, IMPLEMENTS, IMPORT, IN_FORMAL_COMMENT, IN_MULTI_LINE_COMMENT, IN_SINGLE_LINE_COMMENT, INCR, INSTANCEOF, INT, INTEGER_LITERAL, INTERFACE, LBRACE, LBRACKET, LE, LETTER, LONG, LONG_LETTER, LPAREN, LT, MINUS, MINUSASSIGN, MULTI_LINE_COMMENT, NATIVE, NE, NEW, NULL, OCTAL_DIGIT, OCTAL_FIRST_DIGIT, OCTAL_LITERAL, ORASSIGN, PACKAGE, PART_LETTER, PLUS, PLUSASSIGN, PRIVATE, PROTECTED, PUBLIC, RBRACE, RBRACKET, REM, REMASSIGN, RETURN, RPAREN, SC_AND, SC_OR, SEMICOLON, SHORT, SINGLE_LINE_COMMENT, SLASH, SLASHASSIGN, STAR, STARASSIGN, STATIC, STRICTFP, STRING_LITERAL, SUPER, SWITCH, SYNCHRONIZED, THIS, THROW, THROWS, TILDE, tokenImage, TRANSIENT, TRUE, TRY, VOID, VOLATILE, WHILE, XOR, XORASSIGN
-
-
Constructor Summary
Constructors Constructor Description JTBParser(JTBParserTokenManager tm)
Constructor with generated Token Manager.JTBParser(java.io.InputStream stream)
Constructor with InputStream.JTBParser(java.io.InputStream stream, java.lang.String encoding)
Constructor with InputStream and supplied encodingJTBParser(java.io.Reader stream)
Constructor.
-
Method Summary
-
Methods inherited from class EDU.purdue.jtb.parser.JavaCCParserInternals
add_inline_regexpr, add_token_manager_decls, addcuname, addproduction, addregexpr, character_descriptor_assign, character_descriptor_assign, compare, hexchar, hexval, initialize, insertionpointerrors, makeTryBlock, production_addexpansion, reInit, remove_escapes_and_quotes, set_initial_cu_token, setinsertionpoint
-
Methods inherited from class EDU.purdue.jtb.parser.JavaCCGlobals
add_escapes, addUnicodeEscapes, bannerLine, createOutputDir, getIdString, getIdString, getToolNames, isGeneratedBy, printLeadingComments, printLeadingComments, printToken, printToken, printTokenList, printTokenOnly, printTokenOnly, printTokenSetup, printTrailingComments, printTrailingComments
-
-
-
-
Field Detail
-
opt
public Options opt
-
grammarPackage
public java.lang.String grammarPackage
-
token_source
public JTBParserTokenManager token_source
Generated Token Manager.
-
token
public Token token
Current token.
-
jj_nt
public Token jj_nt
Next token.
-
-
Constructor Detail
-
JTBParser
public JTBParser(java.io.InputStream stream)
Constructor with InputStream.
-
JTBParser
public JTBParser(java.io.InputStream stream, java.lang.String encoding)
Constructor with InputStream and supplied encoding
-
JTBParser
public JTBParser(java.io.Reader stream)
Constructor.
-
JTBParser
public JTBParser(JTBParserTokenManager tm)
Constructor with generated Token Manager.
-
-
Method Detail
-
JavaCCInput
public final JavaCCInput JavaCCInput(Options aOptions) throws ParseException
- Throws:
ParseException
-
JavaCCOptions
public final JavaCCOptions JavaCCOptions() throws ParseException
- Throws:
ParseException
-
OptionBinding
public final OptionBinding OptionBinding() throws ParseException
- Throws:
ParseException
-
Production
public final Production Production() throws ParseException
- Throws:
ParseException
-
JavaCodeProduction
public final JavaCodeProduction JavaCodeProduction() throws ParseException
- Throws:
ParseException
-
BNFProduction
public final BNFProduction BNFProduction() throws ParseException
- Throws:
ParseException
-
AccessModifier
public final AccessModifier AccessModifier(NormalProduction p) throws ParseException
- Throws:
ParseException
-
RegularExprProduction
public final RegularExprProduction RegularExprProduction() throws ParseException
- Throws:
ParseException
-
TokenManagerDecls
public final TokenManagerDecls TokenManagerDecls() throws ParseException
- Throws:
ParseException
-
RegExprKind
public final RegExprKind RegExprKind(TokenProduction p) throws ParseException
- Throws:
ParseException
-
RegExprSpec
public final RegExprSpec RegExprSpec(TokenProduction p) throws ParseException
- Throws:
ParseException
-
ExpansionChoices
public final ExpansionChoices ExpansionChoices(Container c1) throws ParseException
- Throws:
ParseException
-
Expansion
public final Expansion Expansion(Container c1) throws ParseException
- Throws:
ParseException
-
LocalLookahead
public final LocalLookahead LocalLookahead() throws ParseException
- Throws:
ParseException
-
ExpansionUnit
public final ExpansionUnit ExpansionUnit(Container c) throws ParseException
- Throws:
ParseException
-
ExpansionUnitTCF
public final ExpansionUnitTCF ExpansionUnitTCF(Container c) throws ParseException
- Throws:
ParseException
-
RegularExpression
public final RegularExpression RegularExpression(Container c) throws ParseException
- Throws:
ParseException
-
ComplexRegularExpressionChoices
public final ComplexRegularExpressionChoices ComplexRegularExpressionChoices(Container c1) throws ParseException
- Throws:
ParseException
-
ComplexRegularExpression
public final ComplexRegularExpression ComplexRegularExpression(Container c1) throws ParseException
- Throws:
ParseException
-
ComplexRegularExpressionUnit
public final ComplexRegularExpressionUnit ComplexRegularExpressionUnit(Container c) throws ParseException
- Throws:
ParseException
-
CharacterList
public final CharacterList CharacterList(Container c1) throws ParseException
- Throws:
ParseException
-
CharacterDescriptor
public final CharacterDescriptor CharacterDescriptor(Container c) throws ParseException
- Throws:
ParseException
-
IdentifierAsString
public final IdentifierAsString IdentifierAsString() throws ParseException
- Throws:
ParseException
-
JavaIdentifier
public final JavaIdentifier JavaIdentifier() throws ParseException
- Throws:
ParseException
-
CompilationUnit
public final CompilationUnit CompilationUnit() throws ParseException
- Throws:
ParseException
-
PackageDeclaration
public final PackageDeclaration PackageDeclaration() throws ParseException
- Throws:
ParseException
-
ImportDeclaration
public final ImportDeclaration ImportDeclaration() throws ParseException
- Throws:
ParseException
-
Modifiers
public final Modifiers Modifiers() throws ParseException
- Throws:
ParseException
-
TypeDeclaration
public final TypeDeclaration TypeDeclaration() throws ParseException
- Throws:
ParseException
-
ClassOrInterfaceDeclaration
public final ClassOrInterfaceDeclaration ClassOrInterfaceDeclaration() throws ParseException
- Throws:
ParseException
-
ExtendsList
public final ExtendsList ExtendsList(boolean isInterface) throws ParseException
- Throws:
ParseException
-
ImplementsList
public final ImplementsList ImplementsList(boolean isInterface) throws ParseException
- Throws:
ParseException
-
EnumDeclaration
public final EnumDeclaration EnumDeclaration() throws ParseException
- Throws:
ParseException
-
EnumBody
public final EnumBody EnumBody() throws ParseException
- Throws:
ParseException
-
EnumConstant
public final EnumConstant EnumConstant() throws ParseException
- Throws:
ParseException
-
TypeParameters
public final TypeParameters TypeParameters() throws ParseException
- Throws:
ParseException
-
TypeParameter
public final TypeParameter TypeParameter() throws ParseException
- Throws:
ParseException
-
TypeBound
public final TypeBound TypeBound() throws ParseException
- Throws:
ParseException
-
ClassOrInterfaceBody
public final ClassOrInterfaceBody ClassOrInterfaceBody(boolean isInterface, java.util.List<Token> tokens) throws ParseException
- Throws:
ParseException
-
ClassOrInterfaceBodyDeclaration
public final ClassOrInterfaceBodyDeclaration ClassOrInterfaceBodyDeclaration(boolean isInterface) throws ParseException
- Throws:
ParseException
-
FieldDeclaration
public final FieldDeclaration FieldDeclaration() throws ParseException
- Throws:
ParseException
-
VariableDeclarator
public final VariableDeclarator VariableDeclarator() throws ParseException
- Throws:
ParseException
-
VariableDeclaratorId
public final VariableDeclaratorId VariableDeclaratorId() throws ParseException
- Throws:
ParseException
-
VariableInitializer
public final VariableInitializer VariableInitializer() throws ParseException
- Throws:
ParseException
-
ArrayInitializer
public final ArrayInitializer ArrayInitializer() throws ParseException
- Throws:
ParseException
-
MethodDeclaration
public final MethodDeclaration MethodDeclaration() throws ParseException
- Throws:
ParseException
-
MethodDeclarator
public final MethodDeclarator MethodDeclarator() throws ParseException
- Throws:
ParseException
-
FormalParameters
public final FormalParameters FormalParameters(java.util.List<Token> tokens) throws ParseException
- Throws:
ParseException
-
FormalParameter
public final FormalParameter FormalParameter() throws ParseException
- Throws:
ParseException
-
ConstructorDeclaration
public final ConstructorDeclaration ConstructorDeclaration() throws ParseException
- Throws:
ParseException
-
ExplicitConstructorInvocation
public final ExplicitConstructorInvocation ExplicitConstructorInvocation() throws ParseException
- Throws:
ParseException
-
Initializer
public final Initializer Initializer() throws ParseException
- Throws:
ParseException
-
Type
public final Type Type() throws ParseException
- Throws:
ParseException
-
ReferenceType
public final ReferenceType ReferenceType() throws ParseException
- Throws:
ParseException
-
ClassOrInterfaceType
public final ClassOrInterfaceType ClassOrInterfaceType() throws ParseException
- Throws:
ParseException
-
TypeArguments
public final TypeArguments TypeArguments() throws ParseException
- Throws:
ParseException
-
EmptyTypeArguments
public final EmptyTypeArguments EmptyTypeArguments() throws ParseException
- Throws:
ParseException
-
TypeArgument
public final TypeArgument TypeArgument() throws ParseException
- Throws:
ParseException
-
WildcardBounds
public final WildcardBounds WildcardBounds() throws ParseException
- Throws:
ParseException
-
PrimitiveType
public final PrimitiveType PrimitiveType() throws ParseException
- Throws:
ParseException
-
ResultType
public final ResultType ResultType(java.util.List<Token> tokens) throws ParseException
- Throws:
ParseException
-
Name
public final Name Name(java.util.List<Token> tokens) throws ParseException
- Throws:
ParseException
-
NameList
public final NameList NameList() throws ParseException
- Throws:
ParseException
-
Expression
public final Expression Expression(java.util.List<Token> tokens) throws ParseException
- Throws:
ParseException
-
AssignmentOperator
public final AssignmentOperator AssignmentOperator() throws ParseException
- Throws:
ParseException
-
ConditionalExpression
public final ConditionalExpression ConditionalExpression() throws ParseException
- Throws:
ParseException
-
ConditionalOrExpression
public final ConditionalOrExpression ConditionalOrExpression() throws ParseException
- Throws:
ParseException
-
ConditionalAndExpression
public final ConditionalAndExpression ConditionalAndExpression() throws ParseException
- Throws:
ParseException
-
InclusiveOrExpression
public final InclusiveOrExpression InclusiveOrExpression() throws ParseException
- Throws:
ParseException
-
ExclusiveOrExpression
public final ExclusiveOrExpression ExclusiveOrExpression() throws ParseException
- Throws:
ParseException
-
AndExpression
public final AndExpression AndExpression() throws ParseException
- Throws:
ParseException
-
EqualityExpression
public final EqualityExpression EqualityExpression() throws ParseException
- Throws:
ParseException
-
InstanceOfExpression
public final InstanceOfExpression InstanceOfExpression() throws ParseException
- Throws:
ParseException
-
RelationalExpression
public final RelationalExpression RelationalExpression() throws ParseException
- Throws:
ParseException
-
ShiftExpression
public final ShiftExpression ShiftExpression() throws ParseException
- Throws:
ParseException
-
RSignedShift
public final RSignedShift RSignedShift() throws ParseException
- Throws:
ParseException
-
RUnsignedShift
public final RUnsignedShift RUnsignedShift() throws ParseException
- Throws:
ParseException
-
AdditiveExpression
public final AdditiveExpression AdditiveExpression() throws ParseException
- Throws:
ParseException
-
MultiplicativeExpression
public final MultiplicativeExpression MultiplicativeExpression() throws ParseException
- Throws:
ParseException
-
UnaryExpression
public final UnaryExpression UnaryExpression() throws ParseException
- Throws:
ParseException
-
PreIncrementExpression
public final PreIncrementExpression PreIncrementExpression() throws ParseException
- Throws:
ParseException
-
PreDecrementExpression
public final PreDecrementExpression PreDecrementExpression() throws ParseException
- Throws:
ParseException
-
UnaryExpressionNotPlusMinus
public final UnaryExpressionNotPlusMinus UnaryExpressionNotPlusMinus() throws ParseException
- Throws:
ParseException
-
CastLookahead
public final CastLookahead CastLookahead() throws ParseException
- Throws:
ParseException
-
PostfixExpression
public final PostfixExpression PostfixExpression() throws ParseException
- Throws:
ParseException
-
CastExpression
public final CastExpression CastExpression() throws ParseException
- Throws:
ParseException
-
PrimaryExpression
public final PrimaryExpression PrimaryExpression() throws ParseException
- Throws:
ParseException
-
MemberSelector
public final MemberSelector MemberSelector() throws ParseException
- Throws:
ParseException
-
PrimaryPrefix
public final PrimaryPrefix PrimaryPrefix() throws ParseException
- Throws:
ParseException
-
PrimarySuffix
public final PrimarySuffix PrimarySuffix() throws ParseException
- Throws:
ParseException
-
Literal
public final Literal Literal() throws ParseException
- Throws:
ParseException
-
IntegerLiteral
public final IntegerLiteral IntegerLiteral() throws ParseException
- Throws:
ParseException
-
BooleanLiteral
public final BooleanLiteral BooleanLiteral() throws ParseException
- Throws:
ParseException
-
StringLiteral
public final StringLiteral StringLiteral() throws ParseException
- Throws:
ParseException
-
NullLiteral
public final NullLiteral NullLiteral() throws ParseException
- Throws:
ParseException
-
Arguments
public final Arguments Arguments(java.util.List<Token> tokens) throws ParseException
- Throws:
ParseException
-
ArgumentList
public final ArgumentList ArgumentList() throws ParseException
- Throws:
ParseException
-
AllocationExpression
public final AllocationExpression AllocationExpression() throws ParseException
- Throws:
ParseException
-
ArrayDimsAndInits
public final ArrayDimsAndInits ArrayDimsAndInits() throws ParseException
- Throws:
ParseException
-
Statement
public final Statement Statement() throws ParseException
- Throws:
ParseException
-
AssertStatement
public final AssertStatement AssertStatement() throws ParseException
- Throws:
ParseException
-
LabeledStatement
public final LabeledStatement LabeledStatement() throws ParseException
- Throws:
ParseException
-
Block
public final Block Block(java.util.List<Token> tokens) throws ParseException
- Throws:
ParseException
-
BlockStatement
public final BlockStatement BlockStatement() throws ParseException
- Throws:
ParseException
-
LocalVariableDeclaration
public final LocalVariableDeclaration LocalVariableDeclaration() throws ParseException
- Throws:
ParseException
-
VariableModifiers
public final VariableModifiers VariableModifiers() throws ParseException
- Throws:
ParseException
-
EmptyStatement
public final EmptyStatement EmptyStatement() throws ParseException
- Throws:
ParseException
-
StatementExpression
public final StatementExpression StatementExpression() throws ParseException
- Throws:
ParseException
-
SwitchStatement
public final SwitchStatement SwitchStatement() throws ParseException
- Throws:
ParseException
-
SwitchLabel
public final SwitchLabel SwitchLabel() throws ParseException
- Throws:
ParseException
-
IfStatement
public final IfStatement IfStatement() throws ParseException
- Throws:
ParseException
-
WhileStatement
public final WhileStatement WhileStatement() throws ParseException
- Throws:
ParseException
-
DoStatement
public final DoStatement DoStatement() throws ParseException
- Throws:
ParseException
-
ForStatement
public final ForStatement ForStatement() throws ParseException
- Throws:
ParseException
-
ForInit
public final ForInit ForInit() throws ParseException
- Throws:
ParseException
-
StatementExpressionList
public final StatementExpressionList StatementExpressionList() throws ParseException
- Throws:
ParseException
-
ForUpdate
public final ForUpdate ForUpdate() throws ParseException
- Throws:
ParseException
-
BreakStatement
public final BreakStatement BreakStatement() throws ParseException
- Throws:
ParseException
-
ContinueStatement
public final ContinueStatement ContinueStatement() throws ParseException
- Throws:
ParseException
-
ReturnStatement
public final ReturnStatement ReturnStatement() throws ParseException
- Throws:
ParseException
-
ThrowStatement
public final ThrowStatement ThrowStatement() throws ParseException
- Throws:
ParseException
-
SynchronizedStatement
public final SynchronizedStatement SynchronizedStatement() throws ParseException
- Throws:
ParseException
-
TryStatement
public final TryStatement TryStatement() throws ParseException
- Throws:
ParseException
-
Annotation
public final Annotation Annotation() throws ParseException
- Throws:
ParseException
-
NormalAnnotation
public final NormalAnnotation NormalAnnotation() throws ParseException
- Throws:
ParseException
-
MarkerAnnotation
public final MarkerAnnotation MarkerAnnotation() throws ParseException
- Throws:
ParseException
-
SingleMemberAnnotation
public final SingleMemberAnnotation SingleMemberAnnotation() throws ParseException
- Throws:
ParseException
-
MemberValuePairs
public final MemberValuePairs MemberValuePairs() throws ParseException
- Throws:
ParseException
-
MemberValuePair
public final MemberValuePair MemberValuePair() throws ParseException
- Throws:
ParseException
-
MemberValue
public final MemberValue MemberValue() throws ParseException
- Throws:
ParseException
-
MemberValueArrayInitializer
public final MemberValueArrayInitializer MemberValueArrayInitializer() throws ParseException
- Throws:
ParseException
-
AnnotationTypeDeclaration
public final AnnotationTypeDeclaration AnnotationTypeDeclaration() throws ParseException
- Throws:
ParseException
-
AnnotationTypeBody
public final AnnotationTypeBody AnnotationTypeBody() throws ParseException
- Throws:
ParseException
-
AnnotationTypeMemberDeclaration
public final AnnotationTypeMemberDeclaration AnnotationTypeMemberDeclaration() throws ParseException
- Throws:
ParseException
-
DefaultValue
public final DefaultValue DefaultValue() throws ParseException
- Throws:
ParseException
-
ReInit
public void ReInit(java.io.InputStream stream)
Reinitialise.
-
ReInit
public void ReInit(java.io.InputStream stream, java.lang.String encoding)
Reinitialise.
-
ReInit
public void ReInit(java.io.Reader stream)
Reinitialise.
-
ReInit
public void ReInit(JTBParserTokenManager tm)
Reinitialise.
-
getNextToken
public final Token getNextToken()
Get the next Token.
-
getToken
public final Token getToken(int index)
Get the specific Token.
-
generateParseException
public ParseException generateParseException()
Generate ParseException.
-
trace_enabled
public final boolean trace_enabled()
Trace enabled.
-
enable_tracing
public final void enable_tracing()
Enable tracing.
-
disable_tracing
public final void disable_tracing()
Disable tracing.
-
-