Class ExpressionParser

java.lang.Object
com.googlecode.aviator.parser.ExpressionParser
All Implemented Interfaces:
Parser

public class ExpressionParser extends Object implements Parser
Syntex parser for expression
Author:
dennis
  • Field Details

    • LEFT_PAREN

      public static final CharToken LEFT_PAREN
    • RIGHT_PAREN

      public static final CharToken RIGHT_PAREN
  • Constructor Details

  • Method Details

    • getPrevToken

      public Token<?> getPrevToken()
    • getCodeGenerator

      public CodeGenerator getCodeGenerator()
      Specified by:
      getCodeGenerator in interface Parser
    • getLookhead

      public Token<?> getLookhead()
    • getSymbolTable

      public SymbolTable getSymbolTable()
      Specified by:
      getSymbolTable in interface Parser
    • setCodeGenerator

      public void setCodeGenerator(CodeGenerator codeGenerator)
      Specified by:
      setCodeGenerator in interface Parser
    • enterScope

      public ScopeInfo enterScope(boolean inNewScope)
      Specified by:
      enterScope in interface Parser
    • restoreScope

      public void restoreScope(ScopeInfo info)
      (non-Javadoc)
      Specified by:
      restoreScope in interface Parser
      See Also:
    • returnStatement

      public void returnStatement()
      Call __reducer_return(result)
    • ternary

      public boolean ternary()
    • join

      public void join()
    • bitOr

      public void bitOr()
    • xor

      public void xor()
    • bitAnd

      public void bitAnd()
    • and

      public void and()
    • equality

      public void equality()
    • rel

      public void rel()
    • shift

      public void shift()
    • expr

      public void expr()
    • exponent

      public void exponent()
    • term

      public void term()
    • unary

      public void unary()
    • isOPVariable

      public boolean isOPVariable(Token<?> token)
    • factor

      public void factor()
    • isJavaIdentifier

      public static final boolean isJavaIdentifier(String id)
      Test whether a given string is a valid Java identifier.
      Parameters:
      id - string which should be checked
      Returns:
      true if a valid identifier
    • reportSyntaxError

      public void reportSyntaxError(String message)
    • move

      public void move(boolean analyse)
    • getParsedTokens

      public int getParsedTokens()
    • back

      public void back()
    • parse

      public Expression parse(boolean reportErrorIfNotEOF)
    • parse

      public Expression parse()
    • isConstant

      public static boolean isConstant(Token<?> token, AviatorEvaluatorInstance instance)
    • isLiteralToken

      public static boolean isLiteralToken(Token<?> token, AviatorEvaluatorInstance instance)