org.ejen.ext.parsers.java_1_2
Class JavaParser

java.lang.Object
  |
  +--org.ejen.ext.parsers.java_1_2.JavaParser
All Implemented Interfaces:
JavaParserConstants, JavaParserTreeConstants

public class JavaParser
extends Object
implements JavaParserTreeConstants, JavaParserConstants


Field Summary
static Token jj_nt
           
protected static org.ejen.ext.parsers.java_1_2.JJTJavaParserState jjtree
           
static boolean lookingAhead
           
static Token token
           
static JavaParserTokenManager token_source
           
 
Fields inherited from interface org.ejen.ext.parsers.java_1_2.JavaParserTreeConstants
JJTADDITIVEEXPRESSION, JJTALLOCATIONEXPRESSION, JJTANDEXPRESSION, JJTARGUMENTLIST, JJTARGUMENTS, JJTARRAYDIMSANDINITS, JJTARRAYINITIALIZER, JJTASSIGNMENTOPERATOR, JJTBLOCK, JJTBLOCKSTATEMENT, JJTBOOLEANLITERAL, JJTBREAKSTATEMENT, JJTCASTEXPRESSION, JJTCASTLOOKAHEAD, JJTCLASSBODY, JJTCLASSBODYDECLARATION, JJTCLASSDECLARATION, JJTCOMPILATIONUNIT, JJTCONDITIONALANDEXPRESSION, JJTCONDITIONALEXPRESSION, JJTCONDITIONALOREXPRESSION, JJTCONSTRUCTORDECLARATION, JJTCONTINUESTATEMENT, JJTDOSTATEMENT, JJTEMPTYSTATEMENT, JJTEQUALITYEXPRESSION, JJTEXCLUSIVEOREXPRESSION, JJTEXPLICITCONSTRUCTORINVOCATION, JJTEXPRESSION, JJTFIELDDECLARATION, JJTFORINIT, JJTFORMALPARAMETER, JJTFORMALPARAMETERS, JJTFORSTATEMENT, JJTFORUPDATE, JJTIFSTATEMENT, JJTIMPORTDECLARATION, JJTINCLUSIVEOREXPRESSION, JJTINITIALIZER, JJTINSTANCEOFEXPRESSION, JJTINTERFACEDECLARATION, JJTINTERFACEMEMBERDECLARATION, JJTLABELEDSTATEMENT, JJTLITERAL, JJTLOCALVARIABLEDECLARATION, JJTMETHODDECLARATION, JJTMETHODDECLARATIONLOOKAHEAD, JJTMETHODDECLARATOR, JJTMULTIPLICATIVEEXPRESSION, JJTNAME, JJTNAMELIST, JJTNESTEDCLASSDECLARATION, JJTNESTEDINTERFACEDECLARATION, jjtNodeName, JJTNULLLITERAL, JJTPACKAGEDECLARATION, JJTPOSTFIXEXPRESSION, JJTPREDECREMENTEXPRESSION, JJTPREINCREMENTEXPRESSION, JJTPRIMARYEXPRESSION, JJTPRIMARYPREFIX, JJTPRIMARYSUFFIX, JJTPRIMITIVETYPE, JJTRELATIONALEXPRESSION, JJTRESULTTYPE, JJTRETURNSTATEMENT, JJTSHIFTEXPRESSION, JJTSTATEMENT, JJTSTATEMENTEXPRESSION, JJTSTATEMENTEXPRESSIONLIST, JJTSWITCHLABEL, JJTSWITCHSTATEMENT, JJTSYNCHRONIZEDSTATEMENT, JJTTHROWSTATEMENT, JJTTRYSTATEMENT, JJTTYPE, JJTTYPEDECLARATION, JJTUNARYEXPRESSION, JJTUNARYEXPRESSIONNOTPLUSMINUS, JJTUNMODIFIEDCLASSDECLARATION, JJTUNMODIFIEDINTERFACEDECLARATION, JJTVARIABLEDECLARATOR, JJTVARIABLEDECLARATORID, JJTVARIABLEINITIALIZER, JJTWHILESTATEMENT
 
Fields inherited from interface org.ejen.ext.parsers.java_1_2.JavaParserConstants
_DEFAULT, ABSTRACT, ANDASSIGN, 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
JavaParser(InputStream stream)
           
JavaParser(JavaParserTokenManager tm)
           
JavaParser(Reader stream)
           
 
Method Summary
static void AdditiveExpression()
           
static void AllocationExpression()
           
static void AndExpression()
           
static void ArgumentList()
           
static void Arguments()
           
static void ArrayDimsAndInits()
           
static void ArrayInitializer()
           
static void AssignmentOperator()
           
static void Block()
           
static void BlockStatement()
           
static void BooleanLiteral()
           
static void BreakStatement()
           
static void CastExpression()
           
static void CastLookahead()
           
static void ClassBody()
           
static void ClassBodyDeclaration()
           
static void ClassDeclaration()
           
static SimpleNode CompilationUnit()
          THE JAVA LANGUAGE GRAMMAR STARTS HERE *
static void ConditionalAndExpression()
           
static void ConditionalExpression()
           
static void ConditionalOrExpression()
           
static void ConstructorDeclaration()
           
static void ContinueStatement()
           
static void disable_tracing()
           
static void DoStatement()
           
static void EmptyStatement()
           
static void enable_tracing()
           
static void EqualityExpression()
           
static void ExclusiveOrExpression()
           
static void ExplicitConstructorInvocation()
           
static void Expression()
           
static void FieldDeclaration()
           
static void ForInit()
           
static void FormalParameter()
           
static void FormalParameters()
           
static void ForStatement()
           
static void ForUpdate()
           
static ParseException generateParseException()
           
static Token getNextToken()
           
static Token getToken(int index)
           
static void IfStatement()
           
static void ImportDeclaration()
           
static void InclusiveOrExpression()
           
static void Initializer()
           
static void InstanceOfExpression()
           
static void InterfaceDeclaration()
           
static void InterfaceMemberDeclaration()
           
static void LabeledStatement()
           
static void Literal()
           
static void LocalVariableDeclaration()
           
static void MethodDeclaration()
           
static void MethodDeclarationLookahead()
           
static void MethodDeclarator()
           
static void MultiplicativeExpression()
           
static void Name()
           
static void NameList()
           
static void NestedClassDeclaration()
           
static void NestedInterfaceDeclaration()
           
static void NullLiteral()
           
static void PackageDeclaration()
           
static void PostfixExpression()
           
static void PreDecrementExpression()
           
static void PreIncrementExpression()
           
static void PrimaryExpression()
           
static void PrimaryPrefix()
           
static void PrimarySuffix()
           
static void PrimitiveType()
           
static void ReInit(InputStream stream)
           
 void ReInit(JavaParserTokenManager tm)
           
static void ReInit(Reader stream)
           
static void RelationalExpression()
           
static void ResultType()
           
static void ReturnStatement()
           
static void ShiftExpression()
           
static void Statement()
           
static void StatementExpression()
           
static void StatementExpressionList()
           
static void SwitchLabel()
           
static void SwitchStatement()
           
static void SynchronizedStatement()
           
static void ThrowStatement()
           
static void TryStatement()
           
static void Type()
           
static void TypeDeclaration()
           
static void UnaryExpression()
           
static void UnaryExpressionNotPlusMinus()
           
static void UnmodifiedClassDeclaration()
           
static void UnmodifiedInterfaceDeclaration()
           
static void VariableDeclarator()
           
static void VariableDeclaratorId()
           
static void VariableInitializer()
           
static void WhileStatement()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

jjtree

protected static org.ejen.ext.parsers.java_1_2.JJTJavaParserState jjtree

token_source

public static JavaParserTokenManager token_source

token

public static Token token

jj_nt

public static Token jj_nt

lookingAhead

public static boolean lookingAhead
Constructor Detail

JavaParser

public JavaParser(InputStream stream)

JavaParser

public JavaParser(Reader stream)

JavaParser

public JavaParser(JavaParserTokenManager tm)
Method Detail

CompilationUnit

public static final SimpleNode CompilationUnit()
                                        throws ParseException
THE JAVA LANGUAGE GRAMMAR STARTS HERE *

ParseException

PackageDeclaration

public static final void PackageDeclaration()
                                     throws ParseException
ParseException

ImportDeclaration

public static final void ImportDeclaration()
                                    throws ParseException
ParseException

TypeDeclaration

public static final void TypeDeclaration()
                                  throws ParseException
ParseException

ClassDeclaration

public static final void ClassDeclaration()
                                   throws ParseException
ParseException

UnmodifiedClassDeclaration

public static final void UnmodifiedClassDeclaration()
                                             throws ParseException
ParseException

ClassBody

public static final void ClassBody()
                            throws ParseException
ParseException

NestedClassDeclaration

public static final void NestedClassDeclaration()
                                         throws ParseException
ParseException

ClassBodyDeclaration

public static final void ClassBodyDeclaration()
                                       throws ParseException
ParseException

MethodDeclarationLookahead

public static final void MethodDeclarationLookahead()
                                             throws ParseException
ParseException

InterfaceDeclaration

public static final void InterfaceDeclaration()
                                       throws ParseException
ParseException

NestedInterfaceDeclaration

public static final void NestedInterfaceDeclaration()
                                             throws ParseException
ParseException

UnmodifiedInterfaceDeclaration

public static final void UnmodifiedInterfaceDeclaration()
                                                 throws ParseException
ParseException

InterfaceMemberDeclaration

public static final void InterfaceMemberDeclaration()
                                             throws ParseException
ParseException

FieldDeclaration

public static final void FieldDeclaration()
                                   throws ParseException
ParseException

VariableDeclarator

public static final void VariableDeclarator()
                                     throws ParseException
ParseException

VariableDeclaratorId

public static final void VariableDeclaratorId()
                                       throws ParseException
ParseException

VariableInitializer

public static final void VariableInitializer()
                                      throws ParseException
ParseException

ArrayInitializer

public static final void ArrayInitializer()
                                   throws ParseException
ParseException

MethodDeclaration

public static final void MethodDeclaration()
                                    throws ParseException
ParseException

MethodDeclarator

public static final void MethodDeclarator()
                                   throws ParseException
ParseException

FormalParameters

public static final void FormalParameters()
                                   throws ParseException
ParseException

FormalParameter

public static final void FormalParameter()
                                  throws ParseException
ParseException

ConstructorDeclaration

public static final void ConstructorDeclaration()
                                         throws ParseException
ParseException

ExplicitConstructorInvocation

public static final void ExplicitConstructorInvocation()
                                                throws ParseException
ParseException

Initializer

public static final void Initializer()
                              throws ParseException
ParseException

Type

public static final void Type()
                       throws ParseException
ParseException

PrimitiveType

public static final void PrimitiveType()
                                throws ParseException
ParseException

ResultType

public static final void ResultType()
                             throws ParseException
ParseException

Name

public static final void Name()
                       throws ParseException
ParseException

NameList

public static final void NameList()
                           throws ParseException
ParseException

Expression

public static final void Expression()
                             throws ParseException
ParseException

AssignmentOperator

public static final void AssignmentOperator()
                                     throws ParseException
ParseException

ConditionalExpression

public static final void ConditionalExpression()
                                        throws ParseException
ParseException

ConditionalOrExpression

public static final void ConditionalOrExpression()
                                          throws ParseException
ParseException

ConditionalAndExpression

public static final void ConditionalAndExpression()
                                           throws ParseException
ParseException

InclusiveOrExpression

public static final void InclusiveOrExpression()
                                        throws ParseException
ParseException

ExclusiveOrExpression

public static final void ExclusiveOrExpression()
                                        throws ParseException
ParseException

AndExpression

public static final void AndExpression()
                                throws ParseException
ParseException

EqualityExpression

public static final void EqualityExpression()
                                     throws ParseException
ParseException

InstanceOfExpression

public static final void InstanceOfExpression()
                                       throws ParseException
ParseException

RelationalExpression

public static final void RelationalExpression()
                                       throws ParseException
ParseException

ShiftExpression

public static final void ShiftExpression()
                                  throws ParseException
ParseException

AdditiveExpression

public static final void AdditiveExpression()
                                     throws ParseException
ParseException

MultiplicativeExpression

public static final void MultiplicativeExpression()
                                           throws ParseException
ParseException

UnaryExpression

public static final void UnaryExpression()
                                  throws ParseException
ParseException

PreIncrementExpression

public static final void PreIncrementExpression()
                                         throws ParseException
ParseException

PreDecrementExpression

public static final void PreDecrementExpression()
                                         throws ParseException
ParseException

UnaryExpressionNotPlusMinus

public static final void UnaryExpressionNotPlusMinus()
                                              throws ParseException
ParseException

CastLookahead

public static final void CastLookahead()
                                throws ParseException
ParseException

PostfixExpression

public static final void PostfixExpression()
                                    throws ParseException
ParseException

CastExpression

public static final void CastExpression()
                                 throws ParseException
ParseException

PrimaryExpression

public static final void PrimaryExpression()
                                    throws ParseException
ParseException

PrimaryPrefix

public static final void PrimaryPrefix()
                                throws ParseException
ParseException

PrimarySuffix

public static final void PrimarySuffix()
                                throws ParseException
ParseException

Literal

public static final void Literal()
                          throws ParseException
ParseException

BooleanLiteral

public static final void BooleanLiteral()
                                 throws ParseException
ParseException

NullLiteral

public static final void NullLiteral()
                              throws ParseException
ParseException

Arguments

public static final void Arguments()
                            throws ParseException
ParseException

ArgumentList

public static final void ArgumentList()
                               throws ParseException
ParseException

AllocationExpression

public static final void AllocationExpression()
                                       throws ParseException
ParseException

ArrayDimsAndInits

public static final void ArrayDimsAndInits()
                                    throws ParseException
ParseException

Statement

public static final void Statement()
                            throws ParseException
ParseException

LabeledStatement

public static final void LabeledStatement()
                                   throws ParseException
ParseException

Block

public static final void Block()
                        throws ParseException
ParseException

BlockStatement

public static final void BlockStatement()
                                 throws ParseException
ParseException

LocalVariableDeclaration

public static final void LocalVariableDeclaration()
                                           throws ParseException
ParseException

EmptyStatement

public static final void EmptyStatement()
                                 throws ParseException
ParseException

StatementExpression

public static final void StatementExpression()
                                      throws ParseException
ParseException

SwitchStatement

public static final void SwitchStatement()
                                  throws ParseException
ParseException

SwitchLabel

public static final void SwitchLabel()
                              throws ParseException
ParseException

IfStatement

public static final void IfStatement()
                              throws ParseException
ParseException

WhileStatement

public static final void WhileStatement()
                                 throws ParseException
ParseException

DoStatement

public static final void DoStatement()
                              throws ParseException
ParseException

ForStatement

public static final void ForStatement()
                               throws ParseException
ParseException

ForInit

public static final void ForInit()
                          throws ParseException
ParseException

StatementExpressionList

public static final void StatementExpressionList()
                                          throws ParseException
ParseException

ForUpdate

public static final void ForUpdate()
                            throws ParseException
ParseException

BreakStatement

public static final void BreakStatement()
                                 throws ParseException
ParseException

ContinueStatement

public static final void ContinueStatement()
                                    throws ParseException
ParseException

ReturnStatement

public static final void ReturnStatement()
                                  throws ParseException
ParseException

ThrowStatement

public static final void ThrowStatement()
                                 throws ParseException
ParseException

SynchronizedStatement

public static final void SynchronizedStatement()
                                        throws ParseException
ParseException

TryStatement

public static final void TryStatement()
                               throws ParseException
ParseException

ReInit

public static void ReInit(InputStream stream)

ReInit

public static void ReInit(Reader stream)

ReInit

public void ReInit(JavaParserTokenManager tm)

getNextToken

public static final Token getNextToken()

getToken

public static final Token getToken(int index)

generateParseException

public static final ParseException generateParseException()

enable_tracing

public static final void enable_tracing()

disable_tracing

public static final void disable_tracing()