net.mtu.eggplant.dbc
Class JavaRecognizer

java.lang.Object
  extended byantlr.Parser
      extended byantlr.LLkParser
          extended bynet.mtu.eggplant.dbc.JavaRecognizer
All Implemented Interfaces:
JavaTokenTypes

public class JavaRecognizer
extends LLkParser
implements JavaTokenTypes

Java parser for JonsAssert. This file is generated by Antlr.

 Run 'java JonsAssert '

 Contributing authors:
      John Mitchell       johnm@non.net
      Terence Parr        parrt@magelang.com
      John Lilley         jlilley@empathy.com
      Scott Stanchfield   thetick@magelang.com
      Markus Mohnen       mohnen@informatik.rwth-aachen.de
      Peter Williams      pwilliams@netdynamics.com

 Version 1.00 December 9, 1997 -- initial release
 Version 1.01 December 10, 1997
      fixed bug in octal def (0..7 not 0..8)
 Version 1.10 August 1998 (parrt)
      added tree construction
      fixed definition of WS,comments for mac,pc,unix newlines
      added unary plus
 Version 1.11 (Nov 20, 1998)
      Added "shutup" option to turn off last ambig warning.
      Fixed inner class def to allow named class defs as statements
      synchronized requires compound not simple statement
      add [] after builtInType DOT class in primaryExpression
      "const" is reserved but not valid..removed from modifiers

 Version 1.12 (Feb 2, 1999)
      Changed LITERAL_xxx to xxx in tree grammar.
      Updated java.g to use tokens {...} now for 2.6.0 (new feature).

 Version 1.13 (Apr 23, 1999)
      Didn't have (stat)? for else clause in tree parser.
      Didn't gen ASTs for interface extends.  Updated tree parser too.
      Updated to 2.6.0.
 Version 1.14 (Jun 20, 1999)
      Allowed final/abstract on local classes.
      Removed local interfaces from methods
      Put instanceof precedence where it belongs...in relationalExpr
          It also had expr not type as arg; fixed it.
      Missing ! on SEMI in classBlock
      fixed: (expr) + "string" was parsed incorrectly (+ as unary plus).
      fixed: didn't like Object[].class in parser or tree parser

 This grammar is in the PUBLIC DOMAIN

 BUGS

This parser has been modified from the original Recognizer to a pre-parser that implements assertions in java as well as support JDK 1.4.

Version:
$Revision: 1.11 $

Field Summary
static String[] _tokenNames
           
static BitSet _tokenSet_0
           
static BitSet _tokenSet_1
           
static BitSet _tokenSet_10
           
static BitSet _tokenSet_11
           
static BitSet _tokenSet_12
           
static BitSet _tokenSet_13
           
static BitSet _tokenSet_14
           
static BitSet _tokenSet_15
           
static BitSet _tokenSet_16
           
static BitSet _tokenSet_17
           
static BitSet _tokenSet_18
           
static BitSet _tokenSet_19
           
static BitSet _tokenSet_2
           
static BitSet _tokenSet_20
           
static BitSet _tokenSet_21
           
static BitSet _tokenSet_3
           
static BitSet _tokenSet_4
           
static BitSet _tokenSet_5
           
static BitSet _tokenSet_6
           
static BitSet _tokenSet_7
           
static BitSet _tokenSet_8
           
static BitSet _tokenSet_9
           
 
Fields inherited from class antlr.Parser
astFactory, inputState, returnAST, tokenNames, tokenTypeToASTClassMap, traceDepth
 
Fields inherited from interface net.mtu.eggplant.dbc.JavaTokenTypes
ABSTRACT, ARRAY_DECLARATOR, ARRAY_INIT, ASSERT_CONDITION, ASSIGN, BAND, BAND_ASSIGN, BLOCK, BNOT, BOR, BOR_ASSIGN, BSR, BSR_ASSIGN, BXOR, BXOR_ASSIGN, CASE_GROUP, CHAR_LITERAL, CLASS_DEF, COLON, COMMA, CONDITION, CTOR_DEF, DEC, DIV, DIV_ASSIGN, DOT, ELIST, EMPTY_STAT, EOF, EQUAL, ESC, EXPONENT, EXPR, EXTENDS_CLAUSE, FINAL, FLOAT_SUFFIX, FOR_CONDITION, FOR_INIT, FOR_ITERATOR, GE, GT, HEX_DIGIT, IDENT, IMPLEMENTS_CLAUSE, IMPORT, INC, INDEX_OP, INSTANCE_INIT, INTERFACE_DEF, INVARIANT_CONDITION, JAVADOC_CLOSE, JAVADOC_OPEN, LABELED_STAT, LAND, LBRACK, LCURLY, LE, LITERAL_boolean, LITERAL_break, LITERAL_byte, LITERAL_case, LITERAL_catch, LITERAL_char, LITERAL_class, LITERAL_continue, LITERAL_default, LITERAL_do, LITERAL_double, LITERAL_else, LITERAL_extends, LITERAL_false, LITERAL_finally, LITERAL_float, LITERAL_for, LITERAL_if, LITERAL_implements, LITERAL_import, LITERAL_instanceof, LITERAL_int, LITERAL_interface, LITERAL_long, LITERAL_native, LITERAL_new, LITERAL_null, LITERAL_package, LITERAL_private, LITERAL_protected, LITERAL_public, LITERAL_return, LITERAL_short, LITERAL_static, LITERAL_super, LITERAL_switch, LITERAL_synchronized, LITERAL_this, LITERAL_threadsafe, LITERAL_throw, LITERAL_throws, LITERAL_transient, LITERAL_true, LITERAL_try, LITERAL_void, LITERAL_volatile, LITERAL_while, LNOT, LOR, LPAREN, LT, MESSAGE, METHOD_CALL, METHOD_DEF, MINUS, MINUS_ASSIGN, ML_COMMENT, MOD, MOD_ASSIGN, MODIFIERS, NOT_EQUAL, NULL_TREE_LOOKAHEAD, NUM_FLOAT, NUM_INT, OBJBLOCK, PACKAGE_DEF, PARAMETER_DEF, PARAMETERS, PLUS, PLUS_ASSIGN, POST_CONDITION, POST_DEC, POST_INC, PRE_CONDITION, QUESTION, RBRACK, RCURLY, RPAREN, SEMI, SL, SL_ASSIGN, SL_COMMENT, SLIST, SR, SR_ASSIGN, STAR, STAR_ASSIGN, STATIC_INIT, STRING_LITERAL, TYPE, TYPECAST, UNARY_MINUS, UNARY_PLUS, VARIABLE_DEF, VOCAB, WS
 
Constructor Summary
  JavaRecognizer(ParserSharedInputState state)
           
  JavaRecognizer(TokenBuffer tokenBuf)
           
protected JavaRecognizer(TokenBuffer tokenBuf, int k)
           
  JavaRecognizer(TokenStream lexer)
           
protected JavaRecognizer(TokenStream lexer, int k)
           
 
Method Summary
 void aCase()
           
protected  void addAsserts(List asserts, Token jdClose)
          add an assert.
protected  void addInvariant(Token invariant)
          add invariants to this class
 void additiveExpression()
          binary addition/subtraction (level 3)
 void addPostCondition(Token post)
          clear out the list of postconditions.
 void addPreCondition(Token pre)
          Add a precondition to the list of preconditions.
 void andExpression()
          bitwise or non-short-circuiting and (&) (level 7)
 void argList()
           
 void arrayInitializer()
           
 void assertOrInvariantCondition()
          Handle assert or invariant conditions, if an invariant token is seen, clear the asserts, if an assert is seen, clear the invariants.
 void assignmentExpression()
           
 Token builtInType()
           
 Token builtInTypeSpec()
           
 void casesGroup()
           
 void caseSList()
           
 void classBlock(String name, boolean isInterface, boolean isAnonymous, Token superclass)
          This is the body of a class or interface.
 void classDefinition()
           
 Token classTypeSpec()
           
protected  void clearInvariants()
          Clear the list of invariants for this class.
 void clearPostConditions()
          clear out the list of postconditions.
 void clearPreConditions()
          clear out the list of preconditions.
 CodePointPair compoundStatement()
           
 void conditionalExpression()
           
 void constant()
           
 net.mtu.eggplant.util.Pair ctorHead()
          This is the header of a method.
 void declaration()
          A declaration is the creation of a reference or primitive-type variable Create a separate Type/Var tree for each var in the var list.
 void declaratorBrackets()
           
 void end()
           
 void equalityExpression()
          equality/inequality (==/!
 void exclusiveOrExpression()
          exclusive or (^) (level 8)
 void expression()
          the mother of all expressions expressions Note that most of these expressions follow the pattern thisLevelExpression : nextHigherPrecedenceExpression (OPERATOR nextHigherPrecedenceExpression)* which is a standard recursive definition for a parsing an expression.
 void expressionList()
          This is a list of expressions.
 void field()
          Now the various things that can be defined inside a class or interface...
 void forCond()
           
 void forInit()
           
 void forIter()
           
protected  List getInvariants()
          get the invariants for this class.
 List getPostConditions()
          Get the list of postconditions that have been seen since the last clear.
 List getPreConditions()
          Get the list of preconditions that have been seen since the last clear.
 Symtab getSymtab()
          Get the symbol table object being used.
 void handler()
           
 Token identifier()
          A (possibly-qualified) java identifier.
 void identifierStar()
          Used for import statements.
 void implementsClause()
           
 void importDefinition()
           
 void inclusiveOrExpression()
          bitwise or non-short-circuiting or (|) (level 9)
 void initializer()
           
 void interfaceDefinition()
           
 void interfaceExtends()
           
 void invariantCondition()
          This is a javadoc comment that we're looking for invariants in.
 void javadocComment()
          This is a javadoc comment that we're not looking for any conditions in.
 void logicalAndExpression()
          logical and (&&) (level 10)
 void logicalOrExpression()
          logical or (||) (level 11)
 void middle()
           
 Token modifier()
           
 Set modifiers()
           
 void multiplicativeExpression()
          multiplication/division/modulo (level 2)
 void newArrayDeclarator()
           
 void newExpression()
          object instantiation.
 String packageDefinition()
          Package statement: "package" followed by an identifier.
 net.mtu.eggplant.util.StringPair parameterDeclaration()
           
 List parameterDeclarationList()
           
 StringBuffer parameterDeclaratorBrackets()
           
 void parameterModifier()
           
protected  void parseImplementedInterface(Token t)
          Given the id Token from the implements clause find the package the interface is defined in.
 void postfixExpression()
          qualified names, array expressions, method invocation, post inc/dec
 void pre()
           
 void prePostField()
           
 void prePosts()
           
 void primaryExpression()
          the basic element of an expression
 void print(String s)
           
 void relationalExpression()
          boolean relational expressions (level 5)
 void returnTypeBrackersOnEndOfMethodHead()
           
 void setSymtab(Symtab symtab)
          set the symbol table object to use.
 void shiftExpression()
          bit shift expressions (level 4)
 void start()
           
 void statement()
           
 Token superClassClause()
           
 Set throwsClause()
           
 void tryBlock()
           
 Token type()
           
 void typeDefinition()
           
 Token typeSpec()
           
 void unaryExpression()
           
 void unaryExpressionNotPlusMinus()
           
 void unit()
           
 void uselessComments()
           
 void variableDeclarator()
          Declaration of a variable.
 void variableDefinitions()
           
 void varInitializer()
           
 
Methods inherited from class antlr.LLkParser
consume, LA, LT, traceIn, traceOut
 
Methods inherited from class antlr.Parser
addMessageListener, addParserListener, addParserMatchListener, addParserTokenListener, addSemanticPredicateListener, addSyntacticPredicateListener, addTraceListener, consumeUntil, consumeUntil, defaultDebuggingSetup, getAST, getASTFactory, getFilename, getInputState, getTokenName, getTokenNames, getTokenTypeToASTClassMap, isDebugMode, mark, match, match, matchNot, panic, removeMessageListener, removeParserListener, removeParserMatchListener, removeParserTokenListener, removeSemanticPredicateListener, removeSyntacticPredicateListener, removeTraceListener, reportError, reportError, reportWarning, rewind, setASTFactory, setASTNodeClass, setASTNodeType, setDebugMode, setFilename, setIgnoreInvalidDebugCalls, setInputState, setTokenBuffer, traceIndent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_tokenNames

public static final String[] _tokenNames

_tokenSet_0

public static final BitSet _tokenSet_0

_tokenSet_1

public static final BitSet _tokenSet_1

_tokenSet_2

public static final BitSet _tokenSet_2

_tokenSet_3

public static final BitSet _tokenSet_3

_tokenSet_4

public static final BitSet _tokenSet_4

_tokenSet_5

public static final BitSet _tokenSet_5

_tokenSet_6

public static final BitSet _tokenSet_6

_tokenSet_7

public static final BitSet _tokenSet_7

_tokenSet_8

public static final BitSet _tokenSet_8

_tokenSet_9

public static final BitSet _tokenSet_9

_tokenSet_10

public static final BitSet _tokenSet_10

_tokenSet_11

public static final BitSet _tokenSet_11

_tokenSet_12

public static final BitSet _tokenSet_12

_tokenSet_13

public static final BitSet _tokenSet_13

_tokenSet_14

public static final BitSet _tokenSet_14

_tokenSet_15

public static final BitSet _tokenSet_15

_tokenSet_16

public static final BitSet _tokenSet_16

_tokenSet_17

public static final BitSet _tokenSet_17

_tokenSet_18

public static final BitSet _tokenSet_18

_tokenSet_19

public static final BitSet _tokenSet_19

_tokenSet_20

public static final BitSet _tokenSet_20

_tokenSet_21

public static final BitSet _tokenSet_21
Constructor Detail

JavaRecognizer

protected JavaRecognizer(TokenBuffer tokenBuf,
                         int k)

JavaRecognizer

public JavaRecognizer(TokenBuffer tokenBuf)

JavaRecognizer

protected JavaRecognizer(TokenStream lexer,
                         int k)

JavaRecognizer

public JavaRecognizer(TokenStream lexer)

JavaRecognizer

public JavaRecognizer(ParserSharedInputState state)
Method Detail

print

public void print(String s)

setSymtab

public void setSymtab(Symtab symtab)
set the symbol table object to use.


getSymtab

public Symtab getSymtab()
Get the symbol table object being used.


parseImplementedInterface

protected void parseImplementedInterface(Token t)
Given the id Token from the implements clause find the package the interface is defined in. Parse the interface for assertions and add an AssertInterface object to the current class so we can check against it later.


addAsserts

protected void addAsserts(List asserts,
                          Token jdClose)
add an assert. This should get cached with the file object?

Parameters:
asserts - asserts, ordered as they appear in the code.

addInvariant

protected void addInvariant(Token invariant)
add invariants to this class

PreConditions
(invariant != null)

getInvariants

protected List getInvariants()
get the invariants for this class. Invariants are in the order they appear in the source.


clearInvariants

protected void clearInvariants()
Clear the list of invariants for this class.


getPreConditions

public List getPreConditions()
Get the list of preconditions that have been seen since the last clear. Preconditions are in the order they appear in the source.


addPreCondition

public void addPreCondition(Token pre)
Add a precondition to the list of preconditions.


clearPreConditions

public void clearPreConditions()
clear out the list of preconditions.


getPostConditions

public List getPostConditions()
Get the list of postconditions that have been seen since the last clear. Postconditions are in the order they appear in the source.


addPostCondition

public void addPostCondition(Token post)
clear out the list of postconditions.


clearPostConditions

public void clearPostConditions()
clear out the list of postconditions.


unit

public final void unit()
                throws RecognitionException,
                       TokenStreamException
Throws:
RecognitionException
TokenStreamException

pre

public final void pre()
               throws RecognitionException,
                      TokenStreamException
Throws:
RecognitionException
TokenStreamException

start

public final void start()
                 throws RecognitionException,
                        TokenStreamException
Throws:
RecognitionException
TokenStreamException

middle

public final void middle()
                  throws RecognitionException,
                         TokenStreamException
Throws:
RecognitionException
TokenStreamException

end

public final void end()
               throws RecognitionException,
                      TokenStreamException
Throws:
RecognitionException
TokenStreamException

uselessComments

public final void uselessComments()
                           throws RecognitionException,
                                  TokenStreamException
Throws:
RecognitionException
TokenStreamException

packageDefinition

public final String packageDefinition()
                               throws RecognitionException,
                                      TokenStreamException
Package statement: "package" followed by an identifier.

Throws:
RecognitionException
TokenStreamException

importDefinition

public final void importDefinition()
                            throws RecognitionException,
                                   TokenStreamException
Throws:
RecognitionException
TokenStreamException

invariantCondition

public final void invariantCondition()
                              throws RecognitionException,
                                     TokenStreamException
This is a javadoc comment that we're looking for invariants in.

Throws:
RecognitionException
TokenStreamException

typeDefinition

public final void typeDefinition()
                          throws RecognitionException,
                                 TokenStreamException
Throws:
RecognitionException
TokenStreamException

javadocComment

public final void javadocComment()
                          throws RecognitionException,
                                 TokenStreamException
This is a javadoc comment that we're not looking for any conditions in.

Throws:
RecognitionException
TokenStreamException

identifier

public final Token identifier()
                       throws RecognitionException,
                              TokenStreamException
A (possibly-qualified) java identifier. We start with the first IDENT and expand its name by adding dots and following IDENTS

Returns:
a Token that represents this identifier, the text of the Token is equal to the whole identifier, including possible dots for a fully qualified java class name.
Throws:
RecognitionException
TokenStreamException

identifierStar

public final void identifierStar()
                          throws RecognitionException,
                                 TokenStreamException
Used for import statements. Adds this package identifier to the list of imports in the symbol table.

Throws:
RecognitionException
TokenStreamException

modifiers

public final Set modifiers()
                    throws RecognitionException,
                           TokenStreamException
Returns:
the list of modifiers as Strings
Throws:
RecognitionException
TokenStreamException

classDefinition

public final void classDefinition()
                           throws RecognitionException,
                                  TokenStreamException
Throws:
RecognitionException
TokenStreamException

interfaceDefinition

public final void interfaceDefinition()
                               throws RecognitionException,
                                      TokenStreamException
Throws:
RecognitionException
TokenStreamException

declaration

public final void declaration()
                       throws RecognitionException,
                              TokenStreamException
A declaration is the creation of a reference or primitive-type variable Create a separate Type/Var tree for each var in the var list.

Throws:
RecognitionException
TokenStreamException

typeSpec

public final Token typeSpec()
                     throws RecognitionException,
                            TokenStreamException
Returns:
the Token that represents this type spec
Throws:
RecognitionException
TokenStreamException

variableDefinitions

public final void variableDefinitions()
                               throws RecognitionException,
                                      TokenStreamException
Throws:
RecognitionException
TokenStreamException

modifier

public final Token modifier()
                     throws RecognitionException,
                            TokenStreamException
Throws:
RecognitionException
TokenStreamException

classTypeSpec

public final Token classTypeSpec()
                          throws RecognitionException,
                                 TokenStreamException
Returns:
the Token that represents this class type spec
Throws:
RecognitionException
TokenStreamException

builtInTypeSpec

public final Token builtInTypeSpec()
                            throws RecognitionException,
                                   TokenStreamException
Returns:
the Token that represents this builtin type spec
Throws:
RecognitionException
TokenStreamException

builtInType

public final Token builtInType()
                        throws RecognitionException,
                               TokenStreamException
Returns:
the Token that represents this builtin type
Throws:
RecognitionException
TokenStreamException

type

public final Token type()
                 throws RecognitionException,
                        TokenStreamException
Returns:
the Token that represents this type
Throws:
RecognitionException
TokenStreamException

superClassClause

public final Token superClassClause()
                             throws RecognitionException,
                                    TokenStreamException
Throws:
RecognitionException
TokenStreamException

implementsClause

public final void implementsClause()
                            throws RecognitionException,
                                   TokenStreamException
Throws:
RecognitionException
TokenStreamException

classBlock

public final void classBlock(String name,
                             boolean isInterface,
                             boolean isAnonymous,
                             Token superclass)
                      throws RecognitionException,
                             TokenStreamException
This is the body of a class or interface. You can have fields and extra semicolons, That's about it (until you see what a field is...)

Throws:
RecognitionException
TokenStreamException

interfaceExtends

public final void interfaceExtends()
                            throws RecognitionException,
                                   TokenStreamException
Throws:
RecognitionException
TokenStreamException

prePostField

public final void prePostField()
                        throws RecognitionException,
                               TokenStreamException
Throws:
RecognitionException
TokenStreamException

prePosts

public final void prePosts()
                    throws RecognitionException,
                           TokenStreamException
Throws:
RecognitionException
TokenStreamException

field

public final void field()
                 throws RecognitionException,
                        TokenStreamException
Now the various things that can be defined inside a class or interface... Note that not all of these are really valid in an interface (constructors, for example), and if this grammar were used for a compiler there would need to be some semantic checks to make sure we're doing the right thing...

Throws:
RecognitionException
TokenStreamException

ctorHead

public final net.mtu.eggplant.util.Pair ctorHead()
                                          throws RecognitionException,
                                                 TokenStreamException

This is the header of a method. It includes the name and parameters for the method. This also watches for a list of exception classes in a "throws" clause.

this is only used for constructors so I'm just going to return the params, the method name is known

Returns:
the parameters as StringPair(type, name)
Throws:
RecognitionException
TokenStreamException

compoundStatement

public final CodePointPair compoundStatement()
                                      throws RecognitionException,
                                             TokenStreamException
Returns:
a CodePointPair that represent the open and close curly braces
Throws:
RecognitionException
TokenStreamException

parameterDeclarationList

public final List parameterDeclarationList()
                                    throws RecognitionException,
                                           TokenStreamException
Throws:
RecognitionException
TokenStreamException

returnTypeBrackersOnEndOfMethodHead

public final void returnTypeBrackersOnEndOfMethodHead()
                                               throws RecognitionException,
                                                      TokenStreamException
Throws:
RecognitionException
TokenStreamException

throwsClause

public final Set throwsClause()
                       throws RecognitionException,
                              TokenStreamException
Throws:
RecognitionException
TokenStreamException

variableDeclarator

public final void variableDeclarator()
                              throws RecognitionException,
                                     TokenStreamException
Declaration of a variable. This can be a class/instance variable, or a local variable in a method It can also include possible initialization.

Throws:
RecognitionException
TokenStreamException

declaratorBrackets

public final void declaratorBrackets()
                              throws RecognitionException,
                                     TokenStreamException
Throws:
RecognitionException
TokenStreamException

varInitializer

public final void varInitializer()
                          throws RecognitionException,
                                 TokenStreamException
Throws:
RecognitionException
TokenStreamException

initializer

public final void initializer()
                       throws RecognitionException,
                              TokenStreamException
Throws:
RecognitionException
TokenStreamException

arrayInitializer

public final void arrayInitializer()
                            throws RecognitionException,
                                   TokenStreamException
Throws:
RecognitionException
TokenStreamException

expression

public final void expression()
                      throws RecognitionException,
                             TokenStreamException
the mother of all expressions
 expressions
 Note that most of these expressions follow the pattern
   thisLevelExpression :
       nextHigherPrecedenceExpression
           (OPERATOR nextHigherPrecedenceExpression)*
 which is a standard recursive definition for a parsing an expression.
 The operators in java have the following precedences:
    lowest  (13)  = *= /= %= += -= <<= >>= >>>= &= ^= |=
            (12)  ?:
            (11)  ||
            (10)  &&
            ( 9)  |
            ( 8)  ^
            ( 7)  &
            ( 6)  == !=
            ( 5)  < <= > >=
            ( 4)  << >>
            ( 3)  +(binary) -(binary)
            ( 2)  * / %
            ( 1)  ++ -- +(unary) -(unary)  ~  !  (type)
                  []   () (method call)  . (dot -- identifier qualification)
                  new   ()  (explicit parenthesis)

 the last two are not usually on a precedence chart; I put them in
 to point out that new has a higher precedence than '.', so you
 can validy use
     new Frame().show()

 Note that the above precedence levels map to the rules below...
 Once you have a precedence chart, writing the appropriate rules as below
   is usually very straightfoward

Throws:
RecognitionException
TokenStreamException

parameterDeclaration

public final net.mtu.eggplant.util.StringPair parameterDeclaration()
                                                            throws RecognitionException,
                                                                   TokenStreamException
Throws:
RecognitionException
TokenStreamException

parameterModifier

public final void parameterModifier()
                             throws RecognitionException,
                                    TokenStreamException
Throws:
RecognitionException
TokenStreamException

parameterDeclaratorBrackets

public final StringBuffer parameterDeclaratorBrackets()
                                               throws RecognitionException,
                                                      TokenStreamException
Throws:
RecognitionException
TokenStreamException

assertOrInvariantCondition

public final void assertOrInvariantCondition()
                                      throws RecognitionException,
                                             TokenStreamException
Handle assert or invariant conditions, if an invariant token is seen, clear the asserts, if an assert is seen, clear the invariants. This should keep us out of trouble.

Throws:
RecognitionException
TokenStreamException

statement

public final void statement()
                     throws RecognitionException,
                            TokenStreamException
Throws:
RecognitionException
TokenStreamException

forInit

public final void forInit()
                   throws RecognitionException,
                          TokenStreamException
Throws:
RecognitionException
TokenStreamException

forCond

public final void forCond()
                   throws RecognitionException,
                          TokenStreamException
Throws:
RecognitionException
TokenStreamException

forIter

public final void forIter()
                   throws RecognitionException,
                          TokenStreamException
Throws:
RecognitionException
TokenStreamException

casesGroup

public final void casesGroup()
                      throws RecognitionException,
                             TokenStreamException
Throws:
RecognitionException
TokenStreamException

tryBlock

public final void tryBlock()
                    throws RecognitionException,
                           TokenStreamException
Throws:
RecognitionException
TokenStreamException

aCase

public final void aCase()
                 throws RecognitionException,
                        TokenStreamException
Throws:
RecognitionException
TokenStreamException

caseSList

public final void caseSList()
                     throws RecognitionException,
                            TokenStreamException
Throws:
RecognitionException
TokenStreamException

expressionList

public final void expressionList()
                          throws RecognitionException,
                                 TokenStreamException
This is a list of expressions.

Throws:
RecognitionException
TokenStreamException

handler

public final void handler()
                   throws RecognitionException,
                          TokenStreamException
Throws:
RecognitionException
TokenStreamException

assignmentExpression

public final void assignmentExpression()
                                throws RecognitionException,
                                       TokenStreamException
Throws:
RecognitionException
TokenStreamException

conditionalExpression

public final void conditionalExpression()
                                 throws RecognitionException,
                                        TokenStreamException
Throws:
RecognitionException
TokenStreamException

logicalOrExpression

public final void logicalOrExpression()
                               throws RecognitionException,
                                      TokenStreamException
logical or (||) (level 11)

Throws:
RecognitionException
TokenStreamException

logicalAndExpression

public final void logicalAndExpression()
                                throws RecognitionException,
                                       TokenStreamException
logical and (&&) (level 10)

Throws:
RecognitionException
TokenStreamException

inclusiveOrExpression

public final void inclusiveOrExpression()
                                 throws RecognitionException,
                                        TokenStreamException
bitwise or non-short-circuiting or (|) (level 9)

Throws:
RecognitionException
TokenStreamException

exclusiveOrExpression

public final void exclusiveOrExpression()
                                 throws RecognitionException,
                                        TokenStreamException
exclusive or (^) (level 8)

Throws:
RecognitionException
TokenStreamException

andExpression

public final void andExpression()
                         throws RecognitionException,
                                TokenStreamException
bitwise or non-short-circuiting and (&) (level 7)

Throws:
RecognitionException
TokenStreamException

equalityExpression

public final void equalityExpression()
                              throws RecognitionException,
                                     TokenStreamException
equality/inequality (==/!=) (level 6)

Throws:
RecognitionException
TokenStreamException

relationalExpression

public final void relationalExpression()
                                throws RecognitionException,
                                       TokenStreamException
boolean relational expressions (level 5)

Throws:
RecognitionException
TokenStreamException

shiftExpression

public final void shiftExpression()
                           throws RecognitionException,
                                  TokenStreamException
bit shift expressions (level 4)

Throws:
RecognitionException
TokenStreamException

additiveExpression

public final void additiveExpression()
                              throws RecognitionException,
                                     TokenStreamException
binary addition/subtraction (level 3)

Throws:
RecognitionException
TokenStreamException

multiplicativeExpression

public final void multiplicativeExpression()
                                    throws RecognitionException,
                                           TokenStreamException
multiplication/division/modulo (level 2)

Throws:
RecognitionException
TokenStreamException

unaryExpression

public final void unaryExpression()
                           throws RecognitionException,
                                  TokenStreamException
Throws:
RecognitionException
TokenStreamException

unaryExpressionNotPlusMinus

public final void unaryExpressionNotPlusMinus()
                                       throws RecognitionException,
                                              TokenStreamException
Throws:
RecognitionException
TokenStreamException

postfixExpression

public final void postfixExpression()
                             throws RecognitionException,
                                    TokenStreamException
qualified names, array expressions, method invocation, post inc/dec

Throws:
RecognitionException
TokenStreamException

primaryExpression

public final void primaryExpression()
                             throws RecognitionException,
                                    TokenStreamException
the basic element of an expression

Throws:
RecognitionException
TokenStreamException

newExpression

public final void newExpression()
                         throws RecognitionException,
                                TokenStreamException
object instantiation.

Throws:
RecognitionException
TokenStreamException

argList

public final void argList()
                   throws RecognitionException,
                          TokenStreamException
Throws:
RecognitionException
TokenStreamException

constant

public final void constant()
                    throws RecognitionException,
                           TokenStreamException
Throws:
RecognitionException
TokenStreamException

newArrayDeclarator

public final void newArrayDeclarator()
                              throws RecognitionException,
                                     TokenStreamException
Throws:
RecognitionException
TokenStreamException