Package relaxngcc.javabody
Class JavaBodyParser
java.lang.Object
relaxngcc.javabody.JavaBodyParser
- All Implemented Interfaces:
JavaBodyParserConstants
Parses Java code fragment inside <cc:java-body>
and records all field declarations.
-
Field Summary
FieldsFields inherited from interface relaxngcc.javabody.JavaBodyParserConstants
_DEFAULT, ABSTRACT, ANDASSIGN, ASSERT, ASSIGN, BANG, BIT_AND, BIT_OR, BOOLEAN, BREAK, BYTE, CASE, CATCH, CHAR, CHARACTER_LITERAL, CLASS, COLON, COMMA, CONST, CONTINUE, DECIMAL_LITERAL, DECR, DEFAULT, DIGIT, DO, DOT, DOUBLE, ELSE, EOF, EQ, EXPONENT, EXTENDS, FALSE, FINAL, FINALLY, FLOAT, FLOATING_POINT_LITERAL, FOR, FORMAL_COMMENT, GE, GOTO, GT, HEX_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, LPAREN, LSHIFT, LSHIFTASSIGN, LT, MINUS, MINUSASSIGN, MULTI_LINE_COMMENT, NATIVE, NE, NEW, NULL, OCTAL_LITERAL, ORASSIGN, PACKAGE, PLUS, PLUSASSIGN, PRIVATE, PROTECTED, PUBLIC, RBRACE, RBRACKET, REM, REMASSIGN, RETURN, RPAREN, RSIGNEDSHIFT, RSIGNEDSHIFTASSIGN, RUNSIGNEDSHIFT, RUNSIGNEDSHIFTASSIGN, 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
ConstructorsConstructorDescriptionJavaBodyParser
(InputStream stream) Constructor with InputStream.JavaBodyParser
(InputStream stream, String encoding) Constructor with InputStream and supplied encodingJavaBodyParser
(Reader stream) Constructor.Constructor with generated Token Manager. -
Method Summary
Modifier and TypeMethodDescriptionfinal void
final void
final void
final void
final void
final void
final void
final void
final void
final void
Block()
final void
final void
final void
final void
final void
final void
final void
final void
final void
THE JAVA LANGUAGE GRAMMAR STARTS HERE *final void
final void
final void
final void
final void
final void
Disable tracing.final void
final void
final void
Enable tracing.final void
final void
final void
final void
final void
final void
ForInit()
final void
final void
final void
final void
Generate ParseException.final Token
Get the next Token.final Token
getToken
(int index) Get the specific Token.final void
final void
final void
final void
final void
final void
final void
final void
JavaBody()
final void
final void
Literal()
final void
static void
final void
final void
final void
final void
final void
Name()
final void
NameList()
final void
final void
final void
final void
final void
final void
final void
final void
final void
final void
final void
void
ReInit
(InputStream stream) Reinitialise.void
ReInit
(InputStream stream, String encoding) Reinitialise.void
Reinitialise.void
Reinitialise.final void
final void
final void
final void
final void
final void
final void
final void
final void
final void
final void
final void
final boolean
Trace enabled.final void
final void
Type()
final void
final void
final void
final void
final void
final String
final String
final void
final void
-
Field Details
-
fields
-
token_source
Generated Token Manager. -
token
Current token. -
jj_nt
Next token.
-
-
Constructor Details
-
JavaBodyParser
Constructor with InputStream. -
JavaBodyParser
Constructor with InputStream and supplied encoding -
JavaBodyParser
Constructor. -
JavaBodyParser
Constructor with generated Token Manager.
-
-
Method Details
-
main
-
CompilationUnit
THE JAVA LANGUAGE GRAMMAR STARTS HERE *- Throws:
ParseException
-
PackageDeclaration
- Throws:
ParseException
-
ImportDeclaration
- Throws:
ParseException
-
TypeDeclaration
- Throws:
ParseException
-
ClassDeclaration
- Throws:
ParseException
-
UnmodifiedClassDeclaration
- Throws:
ParseException
-
ClassBody
- Throws:
ParseException
-
NestedClassDeclaration
- Throws:
ParseException
-
ClassBodyDeclaration
- Throws:
ParseException
-
MethodDeclarationLookahead
- Throws:
ParseException
-
InterfaceDeclaration
- Throws:
ParseException
-
NestedInterfaceDeclaration
- Throws:
ParseException
-
UnmodifiedInterfaceDeclaration
- Throws:
ParseException
-
InterfaceMemberDeclaration
- Throws:
ParseException
-
FieldDeclaration
- Throws:
ParseException
-
VariableDeclarator
- Throws:
ParseException
-
VariableDeclaratorId
- Throws:
ParseException
-
VariableInitializer
- Throws:
ParseException
-
ArrayInitializer
- Throws:
ParseException
-
MethodDeclaration
- Throws:
ParseException
-
MethodDeclarator
- Throws:
ParseException
-
FormalParameters
- Throws:
ParseException
-
FormalParameter
- Throws:
ParseException
-
ConstructorDeclaration
- Throws:
ParseException
-
ExplicitConstructorInvocation
- Throws:
ParseException
-
Initializer
- Throws:
ParseException
-
Type
- Throws:
ParseException
-
PrimitiveType
- Throws:
ParseException
-
ResultType
- Throws:
ParseException
-
Name
- Throws:
ParseException
-
NameList
- Throws:
ParseException
-
Expression
- Throws:
ParseException
-
AssignmentOperator
- Throws:
ParseException
-
ConditionalExpression
- Throws:
ParseException
-
ConditionalOrExpression
- Throws:
ParseException
-
ConditionalAndExpression
- Throws:
ParseException
-
InclusiveOrExpression
- Throws:
ParseException
-
ExclusiveOrExpression
- Throws:
ParseException
-
AndExpression
- Throws:
ParseException
-
EqualityExpression
- Throws:
ParseException
-
InstanceOfExpression
- Throws:
ParseException
-
RelationalExpression
- Throws:
ParseException
-
ShiftExpression
- Throws:
ParseException
-
AdditiveExpression
- Throws:
ParseException
-
MultiplicativeExpression
- Throws:
ParseException
-
UnaryExpression
- Throws:
ParseException
-
PreIncrementExpression
- Throws:
ParseException
-
PreDecrementExpression
- Throws:
ParseException
-
UnaryExpressionNotPlusMinus
- Throws:
ParseException
-
CastLookahead
- Throws:
ParseException
-
PostfixExpression
- Throws:
ParseException
-
CastExpression
- Throws:
ParseException
-
PrimaryExpression
- Throws:
ParseException
-
PrimaryPrefix
- Throws:
ParseException
-
PrimarySuffix
- Throws:
ParseException
-
Literal
- Throws:
ParseException
-
BooleanLiteral
- Throws:
ParseException
-
NullLiteral
- Throws:
ParseException
-
Arguments
- Throws:
ParseException
-
Semicolon
- Throws:
ParseException
-
ArgumentList
- Throws:
ParseException
-
AllocationExpression
- Throws:
ParseException
-
ArrayDimsAndInits
- Throws:
ParseException
-
Statement
- Throws:
ParseException
-
LabeledStatement
- Throws:
ParseException
-
Block
- Throws:
ParseException
-
BlockStatement
- Throws:
ParseException
-
LocalVariableDeclaration
- Throws:
ParseException
-
EmptyStatement
- Throws:
ParseException
-
StatementExpression
- Throws:
ParseException
-
SwitchStatement
- Throws:
ParseException
-
SwitchLabel
- Throws:
ParseException
-
IfStatement
- Throws:
ParseException
-
WhileStatement
- Throws:
ParseException
-
DoStatement
- Throws:
ParseException
-
ForStatement
- Throws:
ParseException
-
ForInit
- Throws:
ParseException
-
StatementExpressionList
- Throws:
ParseException
-
ForUpdate
- Throws:
ParseException
-
BreakStatement
- Throws:
ParseException
-
ContinueStatement
- Throws:
ParseException
-
ReturnStatement
- Throws:
ParseException
-
ThrowStatement
- Throws:
ParseException
-
SynchronizedStatement
- Throws:
ParseException
-
TryStatement
- Throws:
ParseException
-
AssertStatement
- Throws:
ParseException
-
JavaBody
- Throws:
ParseException
-
ReInit
Reinitialise. -
ReInit
Reinitialise. -
ReInit
Reinitialise. -
ReInit
Reinitialise. -
getNextToken
Get the next Token. -
getToken
Get the specific Token. -
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.
-