Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## xjavadoc
Class SimpleParser

    java.lang.Object
      xjavadoc.SimpleParser

All Implemented Interfaces:
  JavaParser, SimpleParserConstants

public class SimpleParser
extends Object
implements JavaParser, SimpleParserConstants

Nested Class Summary
`(package private) static class` | `SimpleParser.JJCalls`

Field Summary
`(package private) JavaCharStream` | `jj_input_stream`
`Token` | `jj_nt`
`boolean` | `lookingAhead`
`Token` | `token`
`SimpleParserTokenManager` | `token_source`

Fields inherited from interface xjavadoc.SimpleParserConstants
`_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
`SimpleParser(InputStream stream)`
`SimpleParser(Reader stream)`
`SimpleParser(SimpleParserTokenManager tm)`
`SimpleParser(XJavaDoc xJavaDoc, XTagFactory tagFactory)` This constructor was added to allow the re-use of parsers.

Method Summary
`void` | `AdditiveExpression()`
`void` | `AllocationExpression()`
`void` | `AndExpression()`
`void` | `ArgumentList()`
`void` | `Arguments()`
`void` | `ArrayDimsAndInits()`
`void` | `ArrayInitializer()`
`void` | `AssertStatement()`
`void` | `AssignmentOperator()`
`void` | `Block()`
`void` | `BlockStatement()`
`void` | `BooleanLiteral()`
`void` | `BreakStatement()`
`void` | `CastExpression()`
`void` | `CastLookahead()`
`void` | `ClassBody()`
`void` | `ClassBodyDeclaration()`
`void` | `ClassDeclaration()`
`void` | `CompilationUnit(SourceClass sourceClass)` THE JAVA LANGUAGE GRAMMAR STARTS HERE *
`void` | `ConditionalAndExpression()`
`void` | `ConditionalExpression()`
`void` | `ConditionalOrExpression()`
`void` | `ConstructorDeclaration()`
`void` | `ContinueStatement()`
`void` | `disable_tracing()`
`void` | `DoStatement()`
`void` | `EmptyStatement()`
`void` | `enable_tracing()`
`void` | `EqualityExpression()`
`void` | `ExclusiveOrExpression()`
`void` | `ExecutableMemberThrows_Name(AbstractExecutableMember member)`
`void` | `ExecutableMemberThrows_NameList(AbstractExecutableMember member)`
`void` | `ExplicitConstructorInvocation()`
`void` | `Expression()`
`void` | `Field_Type(FieldImpl fieldImpl)`
`void` | `Field_VariableDeclaratorId(FieldImpl fieldImpl)`
`void` | `FieldDeclaration()`
`void` | `FieldDeclarator(FieldImpl fieldImpl)`
`void` | `ForInit()`
`void` | `FormalParameter(AbstractExecutableMember member)`
`void` | `FormalParameters(AbstractExecutableMember member)`
`void` | `ForStatement()`
`void` | `ForUpdate()`
`ParseException` | `generateParseException()`
`Token` | `getNextToken()`
`Token` | `getToken(int index)` Gets the Token attribute of the JavaParser object.
`void` | `IfStatement()`
`void` | `ImportDeclaration()`
`void` | `InclusiveOrExpression()`
`void` | `Initializer()`
`void` | `InstanceOfExpression()`
`void` | `InterfaceDeclaration()`
`void` | `InterfaceMemberDeclaration()`
`void` | `Interfaces_Name()`
`void` | `Interfaces_NameList()`
`void` | `LabeledStatement()`
`void` | `Literal()`
`void` | `LocalVariableDeclaration()`
`void` | `Method_Block()`
`void` | `Method_BlockStatement()`
`void` | `MethodDeclaration()`
`void` | `MethodDeclarationLookahead()`
`void` | `MethodDeclarator(MethodImpl methodImpl)`
`void` | `MethodResult_Type(MethodImpl methodImpl)`
`void` | `MultiplicativeExpression()`
`String` | `Name()`
`void` | `NameList()`
`void` | `NestedClassDeclaration()`
`void` | `NestedInterfaceDeclaration()`
`void` | `NullLiteral()`
`void` | `PackageDeclaration()`
`void` | `Parameter_Type()`
`void` | `Parameter_VariableDeclaratorId()`
`void` | `populate(SourceClass sourceClass)` This was also added to allow parsers to be re-usable.
`void` | `PostfixExpression()`
`void` | `PreDecrementExpression()`
`void` | `PreIncrementExpression()`
`void` | `PrimaryExpression()`
`void` | `PrimaryPrefix()`
`void` | `PrimarySuffix()`
`Token` | `PrimitiveType()`
`void` | `ReInit(InputStream stream)`
`void` | `ReInit(Reader stream)`
`void` | `ReInit(SimpleParserTokenManager tm)`
`void` | `RelationalExpression()`
`void` | `ResultType(MethodImpl methodImpl)`
`void` | `ReturnStatement()`
`void` | `ShiftExpression()`
`void` | `Statement()`
`void` | `StatementExpression()`
`void` | `StatementExpressionList()`
`void` | `SwitchLabel()`
`void` | `SwitchStatement()`
`void` | `SynchronizedStatement()`
`void` | `ThrowStatement()`
`void` | `TryStatement()`
`void` | `Type()`
`void` | `TypeDeclaration()`
`void` | `UnaryExpression()`
`void` | `UnaryExpressionNotPlusMinus()`
`void` | `UnmodifiedClassDeclaration()`
`void` | `UnmodifiedInterfaceDeclaration()`
`void` | `VariableDeclarator()`
`void` | `VariableDeclaratorId()`
`void` | `VariableInitializer()`
`void` | `WhileStatement()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### token_source

    public SimpleParserTokenManager token_source

### jj_input_stream

    JavaCharStream jj_input_stream

### token

    public Token token

### jj_nt

    public Token jj_nt

### lookingAhead

    public boolean lookingAhead

Constructor Detail

### SimpleParser

    public SimpleParser(XJavaDoc xJavaDoc,
                        XTagFactory tagFactory)

  This constructor was added to allow the re-use of parsers. The normal constructor takes a single argument which an InputStream. This simply creates a re-usable parser object, we satisfy the requirement of an InputStream by using a newline character as an input stream.

### SimpleParser

    public SimpleParser(InputStream stream)

### SimpleParser

    public SimpleParser(Reader stream)

### SimpleParser

    public SimpleParser(SimpleParserTokenManager tm)

Method Detail

### populate

    public void populate(SourceClass sourceClass)
                  throws ParseException

  This was also added to allow parsers to be re-usable. Normal JavaCC use entails passing an input stream to the constructor and the parsing process is carried out once. We want to be able to re-use parsers: we do this by adding this method and re-initializing the lexer with the new stream that we want parsed.

  Specified by:
    `populate` in interface `JavaParser`
  Parameters:
    `sourceClass` - the XClass object to populate
  Throws:
    `ParseException` - if the parsed file is not compliant with the Java grammar

### CompilationUnit

    public final void CompilationUnit(SourceClass sourceClass)
                               throws ParseException

  THE JAVA LANGUAGE GRAMMAR STARTS HERE *

  Throws:
    `ParseException`

### PackageDeclaration

    public final void PackageDeclaration()
                                  throws ParseException

  Throws:
    `ParseException`

### ImportDeclaration

    public final void ImportDeclaration()
                                 throws ParseException

  Throws:
    `ParseException`

### TypeDeclaration

    public final void TypeDeclaration()
                               throws ParseException

  Throws:
    `ParseException`

### ClassDeclaration

    public final void ClassDeclaration()
                                throws ParseException

  Throws:
    `ParseException`

### UnmodifiedClassDeclaration

    public final void UnmodifiedClassDeclaration()
                                          throws ParseException

  Throws:
    `ParseException`

### ClassBody

    public final void ClassBody()
                         throws ParseException

  Throws:
    `ParseException`

### NestedClassDeclaration

    public final void NestedClassDeclaration()
                                      throws ParseException

  Throws:
    `ParseException`

### ClassBodyDeclaration

    public final void ClassBodyDeclaration()
                                    throws ParseException

  Throws:
    `ParseException`

### MethodDeclarationLookahead

    public final void MethodDeclarationLookahead()
                                          throws ParseException

  Throws:
    `ParseException`

### InterfaceDeclaration

    public final void InterfaceDeclaration()
                                    throws ParseException

  Throws:
    `ParseException`

### NestedInterfaceDeclaration

    public final void NestedInterfaceDeclaration()
                                          throws ParseException

  Throws:
    `ParseException`

### UnmodifiedInterfaceDeclaration

    public final void UnmodifiedInterfaceDeclaration()
                                              throws ParseException

  Throws:
    `ParseException`

### InterfaceMemberDeclaration

    public final void InterfaceMemberDeclaration()
                                          throws ParseException

  Throws:
    `ParseException`

### FieldDeclaration

    public final void FieldDeclaration()
                                throws ParseException

  Throws:
    `ParseException`

### FieldDeclarator

    public final void FieldDeclarator(FieldImpl fieldImpl)
                               throws ParseException

  Throws:
    `ParseException`

### VariableDeclarator

    public final void VariableDeclarator()
                                  throws ParseException

  Throws:
    `ParseException`

### Field_VariableDeclaratorId

    public final void Field_VariableDeclaratorId(FieldImpl fieldImpl)
                                          throws ParseException

  Throws:
    `ParseException`

### Parameter_VariableDeclaratorId

    public final void Parameter_VariableDeclaratorId()
                                              throws ParseException

  Throws:
    `ParseException`

### VariableDeclaratorId

    public final void VariableDeclaratorId()
                                    throws ParseException

  Throws:
    `ParseException`

### VariableInitializer

    public final void VariableInitializer()
                                   throws ParseException

  Throws:
    `ParseException`

### ArrayInitializer

    public final void ArrayInitializer()
                                throws ParseException

  Throws:
    `ParseException`

### MethodDeclaration

    public final void MethodDeclaration()
                                 throws ParseException

  Throws:
    `ParseException`

### MethodDeclarator

    public final void MethodDeclarator(MethodImpl methodImpl)
                                throws ParseException

  Throws:
    `ParseException`

### FormalParameters

    public final void FormalParameters(AbstractExecutableMember member)
                                throws ParseException

  Throws:
    `ParseException`

### FormalParameter

    public final void FormalParameter(AbstractExecutableMember member)
                               throws ParseException

  Throws:
    `ParseException`

### ConstructorDeclaration

    public final void ConstructorDeclaration()
                                      throws ParseException

  Throws:
    `ParseException`

### ExplicitConstructorInvocation

    public final void ExplicitConstructorInvocation()
                                             throws ParseException

  Throws:
    `ParseException`

### Initializer

    public final void Initializer()
                           throws ParseException

  Throws:
    `ParseException`

### Field_Type

    public final void Field_Type(FieldImpl fieldImpl)
                          throws ParseException

  Throws:
    `ParseException`

### MethodResult_Type

    public final void MethodResult_Type(MethodImpl methodImpl)
                                 throws ParseException

  Throws:
    `ParseException`

### Parameter_Type

    public final void Parameter_Type()
                              throws ParseException

  Throws:
    `ParseException`

### Type

    public final void Type()
                    throws ParseException

  Throws:
    `ParseException`

### PrimitiveType

    public final Token PrimitiveType()
                              throws ParseException

  Throws:
    `ParseException`

### ResultType

    public final void ResultType(MethodImpl methodImpl)
                          throws ParseException

  Throws:
    `ParseException`

### Name

    public final String Name()
                      throws ParseException

  Throws:
    `ParseException`

### ExecutableMemberThrows_Name

    public final void ExecutableMemberThrows_Name(AbstractExecutableMember member)
                                           throws ParseException

  Throws:
    `ParseException`

### Interfaces_Name

    public final void Interfaces_Name()
                               throws ParseException

  Throws:
    `ParseException`

### NameList

    public final void NameList()
                        throws ParseException

  Throws:
    `ParseException`

### ExecutableMemberThrows_NameList

    public final void ExecutableMemberThrows_NameList(AbstractExecutableMember member)
                                               throws ParseException

  Throws:
    `ParseException`

### Interfaces_NameList

    public final void Interfaces_NameList()
                                   throws ParseException

  Throws:
    `ParseException`

### Expression

    public final void Expression()
                          throws ParseException

  Throws:
    `ParseException`

### AssignmentOperator

    public final void AssignmentOperator()
                                  throws ParseException

  Throws:
    `ParseException`

### ConditionalExpression

    public final void ConditionalExpression()
                                     throws ParseException

  Throws:
    `ParseException`

### ConditionalOrExpression

    public final void ConditionalOrExpression()
                                       throws ParseException

  Throws:
    `ParseException`

### ConditionalAndExpression

    public final void ConditionalAndExpression()
                                        throws ParseException

  Throws:
    `ParseException`

### InclusiveOrExpression

    public final void InclusiveOrExpression()
                                     throws ParseException

  Throws:
    `ParseException`

### ExclusiveOrExpression

    public final void ExclusiveOrExpression()
                                     throws ParseException

  Throws:
    `ParseException`

### AndExpression

    public final void AndExpression()
                             throws ParseException

  Throws:
    `ParseException`

### EqualityExpression

    public final void EqualityExpression()
                                  throws ParseException

  Throws:
    `ParseException`

### InstanceOfExpression

    public final void InstanceOfExpression()
                                    throws ParseException

  Throws:
    `ParseException`

### RelationalExpression

    public final void RelationalExpression()
                                    throws ParseException

  Throws:
    `ParseException`

### ShiftExpression

    public final void ShiftExpression()
                               throws ParseException

  Throws:
    `ParseException`

### AdditiveExpression

    public final void AdditiveExpression()
                                  throws ParseException

  Throws:
    `ParseException`

### MultiplicativeExpression

    public final void MultiplicativeExpression()
                                        throws ParseException

  Throws:
    `ParseException`

### UnaryExpression

    public final void UnaryExpression()
                               throws ParseException

  Throws:
    `ParseException`

### PreIncrementExpression

    public final void PreIncrementExpression()
                                      throws ParseException

  Throws:
    `ParseException`

### PreDecrementExpression

    public final void PreDecrementExpression()
                                      throws ParseException

  Throws:
    `ParseException`

### UnaryExpressionNotPlusMinus

    public final void UnaryExpressionNotPlusMinus()
                                           throws ParseException

  Throws:
    `ParseException`

### CastLookahead

    public final void CastLookahead()
                             throws ParseException

  Throws:
    `ParseException`

### PostfixExpression

    public final void PostfixExpression()
                                 throws ParseException

  Throws:
    `ParseException`

### CastExpression

    public final void CastExpression()
                              throws ParseException

  Throws:
    `ParseException`

### PrimaryExpression

    public final void PrimaryExpression()
                                 throws ParseException

  Throws:
    `ParseException`

### PrimaryPrefix

    public final void PrimaryPrefix()
                             throws ParseException

  Throws:
    `ParseException`

### PrimarySuffix

    public final void PrimarySuffix()
                             throws ParseException

  Throws:
    `ParseException`

### Literal

    public final void Literal()
                       throws ParseException

  Throws:
    `ParseException`

### BooleanLiteral

    public final void BooleanLiteral()
                              throws ParseException

  Throws:
    `ParseException`

### NullLiteral

    public final void NullLiteral()
                           throws ParseException

  Throws:
    `ParseException`

### Arguments

    public final void Arguments()
                         throws ParseException

  Throws:
    `ParseException`

### ArgumentList

    public final void ArgumentList()
                            throws ParseException

  Throws:
    `ParseException`

### AllocationExpression

    public final void AllocationExpression()
                                    throws ParseException

  Throws:
    `ParseException`

### ArrayDimsAndInits

    public final void ArrayDimsAndInits()
                                 throws ParseException

  Throws:
    `ParseException`

### Statement

    public final void Statement()
                         throws ParseException

  Throws:
    `ParseException`

### LabeledStatement

    public final void LabeledStatement()
                                throws ParseException

  Throws:
    `ParseException`

### Block

    public final void Block()
                     throws ParseException

  Throws:
    `ParseException`

### Method_Block

    public final void Method_Block()
                            throws ParseException

  Throws:
    `ParseException`

### BlockStatement

    public final void BlockStatement()
                              throws ParseException

  Throws:
    `ParseException`

### Method_BlockStatement

    public final void Method_BlockStatement()
                                     throws ParseException

  Throws:
    `ParseException`

### LocalVariableDeclaration

    public final void LocalVariableDeclaration()
                                        throws ParseException

  Throws:
    `ParseException`

### EmptyStatement

    public final void EmptyStatement()
                              throws ParseException

  Throws:
    `ParseException`

### StatementExpression

    public final void StatementExpression()
                                   throws ParseException

  Throws:
    `ParseException`

### SwitchStatement

    public final void SwitchStatement()
                               throws ParseException

  Throws:
    `ParseException`

### SwitchLabel

    public final void SwitchLabel()
                           throws ParseException

  Throws:
    `ParseException`

### IfStatement

    public final void IfStatement()
                           throws ParseException

  Throws:
    `ParseException`

### WhileStatement

    public final void WhileStatement()
                              throws ParseException

  Throws:
    `ParseException`

### DoStatement

    public final void DoStatement()
                           throws ParseException

  Throws:
    `ParseException`

### ForStatement

    public final void ForStatement()
                            throws ParseException

  Throws:
    `ParseException`

### ForInit

    public final void ForInit()
                       throws ParseException

  Throws:
    `ParseException`

### StatementExpressionList

    public final void StatementExpressionList()
                                       throws ParseException

  Throws:
    `ParseException`

### ForUpdate

    public final void ForUpdate()
                         throws ParseException

  Throws:
    `ParseException`

### BreakStatement

    public final void BreakStatement()
                              throws ParseException

  Throws:
    `ParseException`

### ContinueStatement

    public final void ContinueStatement()
                                 throws ParseException

  Throws:
    `ParseException`

### ReturnStatement

    public final void ReturnStatement()
                               throws ParseException

  Throws:
    `ParseException`

### ThrowStatement

    public final void ThrowStatement()
                              throws ParseException

  Throws:
    `ParseException`

### SynchronizedStatement

    public final void SynchronizedStatement()
                                     throws ParseException

  Throws:
    `ParseException`

### TryStatement

    public final void TryStatement()
                            throws ParseException

  Throws:
    `ParseException`

### AssertStatement

    public final void AssertStatement()
                               throws ParseException

  Throws:
    `ParseException`

### ReInit

    public void ReInit(InputStream stream)

### ReInit

    public void ReInit(Reader stream)

### ReInit

    public void ReInit(SimpleParserTokenManager tm)

### getNextToken

    public final Token getNextToken()

### getToken

    public final Token getToken(int index)

  Description copied from interface: `JavaParser`
  Gets the Token attribute of the JavaParser object.

  Specified by:
    `getToken` in interface `JavaParser`
  Parameters:
    `index` - Describe what the parameter does
  Returns:
    The Token value

### generateParseException

    public final ParseException generateParseException()

### enable_tracing

    public final void enable_tracing()

### disable_tracing

    public final void disable_tracing()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002-2004 XDoclet Team. All Rights Reserved.