Package com.singularsys.jep.parser

# Class JccParser

java.lang.Object
com.singularsys.jep.parser.JccParser

All Implemented Interfaces:
  `JccParserConstants`, `JccParserTreeConstants`

public class JccParser extends Object implements JccParserTreeConstants, JccParserConstants

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `Token`
  `jj_nt`
  Next token.
  `protected JJTJccParserState`
  `jjtree`
  `Token`
  `token`
  Current token.
  `JccParserTokenManager`
  `token_source`
  Generated Token Manager.

  ### Fields inherited from interface com.singularsys.jep.parser.JccParserConstants

  `AND, ASSIGN, COLON, COMMA, CROSS, DECIMAL_LITERAL, DEFAULT, DIGIT1, DIGIT2, DIV, DOT, EOF, EQ, EXPONENT, FLOATING_POINT_LITERAL, GE, GT, INDENTIFIER1, INDENTIFIER2, INTEGER_LITERAL, LE, LETTER1, LETTER2, LRND, LSQ, LT, MINUS, MOD, MUL, NE, NO_DOT_IN_IDENTIFIERS, NOT, OR, PLUS, POWER, RRND, RSQ, SEMI, STRING_LITERAL, tokenImage`

  ### Fields inherited from interface com.singularsys.jep.parser.JccParserTreeConstants

  `JJTCONSTANT, JJTFUNNODE, jjtNodeName, JJTOPNODE, JJTSTART, JJTVARNODE, JJTVOID`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `JccParser(CharStream stream)`
  Constructor with user supplied CharStream.
  `JccParser(JccParserTokenManager tm)`
  Constructor with generated Token Manager.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `final void`
  `AdditiveExpression()`
  `final void`
  `AndExpression()`
  `final void`
  `AnyConstant()`
  `final void`
  `ArgumentList(int reqArguments, String functionName)`
  `final void`
  `ArrayAccess()`
  `final void`
  `AssignExpression()`
  `Node`
  `continueParse()`
  Continue parsing without re-initializing the stream.
  `final void`
  `disable_tracing()`
  Disable tracing.
  `final void`
  `enable_tracing()`
  Enable tracing.
  `final void`
  `EqualExpression()`
  `final void`
  `Expression()`
  `final void`
  `Function()`
  `ParseException`
  `generateParseException()`
  Generate ParseException.
  `final Token`
  `getNextToken()`
  Get the next Token.
  `final Token`
  `getToken(int index)`
  Get the specific Token.
  `final String`
  `Identifier()`
  `final void`
  `ListExpression()`
  `final void`
  `LValue()`
  `final void`
  `MultiplicativeExpression()`
  `final void`
  `OrExpression()`
  `Node`
  `parseStream(CharStream stream, Jep jep, ArrayList<String> errorList)`
  `final void`
  `PowerExpression()`
  `final Object`
  `RealConstant()`
  `void`
  `ReInit(CharStream stream)`
  Reinitialise.
  `void`
  `ReInit(JccParserTokenManager tm)`
  Reinitialise.
  `final void`
  `RelationalExpression()`
  `void`
  `restart(CharStream stream, Jep jep, ArrayList<String> errorList)`
  Restart the parse with the given stream.
  `final void`
  `RightExpression()`
  `void`
  `setInitialTokenManagerState(int state)`
  Sets the initial state that the token manager is in.
  `final ASTStart`
  `Start()`
  GRAMMAR START
  `final boolean`
  `trace_enabled()`
  Trace enabled.
  `final void`
  `UnaryExpression()`
  `final void`
  `UnaryExpressionNotPlusMinus()`
  `final void`
  `Variable()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### jjtree

    protected JJTJccParserState jjtree

  - ### token_source

    public JccParserTokenManager token_source
    Generated Token Manager.

  - ### token

    public Token token
    Current token.

  - ### jj_nt

    public Token jj_nt
    Next token.

- ## Constructor Details

  - ### JccParser

    public JccParser(CharStream stream)
    Constructor with user supplied CharStream.

  - ### JccParser

    public JccParser(JccParserTokenManager tm)
    Constructor with generated Token Manager.

- ## Method Details

  - ### parseStream

    public Node parseStream(CharStream stream, Jep jep, ArrayList<String> errorList) throws ParseException
    Throws:
      `ParseException`

  - ### restart

    public void restart(CharStream stream, Jep jep, ArrayList<String> errorList)
    Restart the parse with the given stream.
    Since:
      2.3.0 beta 1

  - ### continueParse

    public Node continueParse() throws ParseException
    Continue parsing without re-initializing the stream. Allows re-entrance of parser so that strings like "x=1; y=2; z=3;" can be parsed. When a semi colon is encountered parsing finishes leaving the rest of the string unparsed. Parsing can be resumed from the current position by using this method. For example

         XJep j = new XJep();
         Parser parse = j.getParse();
         StringReader sr = new StringReader("x=1; y=2; z=3;");
         parse.restart(sr,j);
         Node node;
         try {
         while((node = j.continueParse())!=null) {
            j.println(node);
         } }catch(ParseException e) {}

    Empty expressions, such as the middle one in "x=1;;y=2" are returned as an ASTStart node, the end of file is returned as null.
    Throws:
      `ParseException`

  - ### setInitialTokenManagerState

    public void setInitialTokenManagerState(int state)
    Sets the initial state that the token manager is in. Can be used to change how x.x is interpreted, either as a single identifier (DEFAULT) or as `x <DOT> x (NO_DOT_IN_IDENTIFIERS)`
    Parameters:
      `state` - the state to be in. Currently the only legal values are DEFAULT and NO_DOT_IN_IDENTIFIER

  - ### Start

    public final ASTStart Start() throws ParseException
    GRAMMAR START
    Throws:
      `ParseException`

  - ### Expression

    public final void Expression() throws ParseException
    Throws:
      `ParseException`

  - ### AssignExpression

    public final void AssignExpression() throws ParseException
    Throws:
      `ParseException`

  - ### RightExpression

    public final void RightExpression() throws ParseException
    Throws:
      `ParseException`

  - ### OrExpression

    public final void OrExpression() throws ParseException
    Throws:
      `ParseException`

  - ### AndExpression

    public final void AndExpression() throws ParseException
    Throws:
      `ParseException`

  - ### EqualExpression

    public final void EqualExpression() throws ParseException
    Throws:
      `ParseException`

  - ### RelationalExpression

    public final void RelationalExpression() 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`

  - ### PowerExpression

    public final void PowerExpression() throws ParseException
    Throws:
      `ParseException`

  - ### UnaryExpressionNotPlusMinus

    public final void UnaryExpressionNotPlusMinus() throws ParseException
    Throws:
      `ParseException`

  - ### ListExpression

    public final void ListExpression() throws ParseException
    Throws:
      `ParseException`

  - ### LValue

    public final void LValue() throws ParseException
    Throws:
      `ParseException`

  - ### ArrayAccess

    public final void ArrayAccess() throws ParseException
    Throws:
      `ParseException`

  - ### Variable

    public final void Variable() throws ParseException
    Throws:
      `ParseException`

  - ### Function

    public final void Function() throws ParseException
    Throws:
      `ParseException`

  - ### ArgumentList

    public final void ArgumentList(int reqArguments, String functionName) throws ParseException
    Throws:
      `ParseException`

  - ### Identifier

    public final String Identifier() throws ParseException
    Throws:
      `ParseException`

  - ### AnyConstant

    public final void AnyConstant() throws ParseException
    Throws:
      `ParseException`

  - ### RealConstant

    public final Object RealConstant() throws ParseException
    Throws:
      `ParseException`

  - ### ReInit

    public void ReInit(CharStream stream)
    Reinitialise.

  - ### ReInit

    public void ReInit(JccParserTokenManager 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.