Class JavaScriptParserBase

java.lang.Object
Parser
org.luwrain.antlr.js.JavaScriptParserBase

public abstract class JavaScriptParserBase extends Parser
All parser methods that used in grammar (p, prev, notLineTerminator, etc.) should start with lower case char similar to parser rules.
  • Constructor Details

    • JavaScriptParserBase

      public JavaScriptParserBase(TokenStream input)
  • Method Details

    • p

      protected boolean p(String str)
      Short form for prev(String str)
    • prev

      protected boolean prev(String str)
      Whether the previous token value equals to @param str
    • n

      protected boolean n(String str)
      Short form for next(String str)
    • next

      protected boolean next(String str)
      Whether the next token value equals to @param str
    • notLineTerminator

      protected boolean notLineTerminator()
    • notOpenBraceAndNotFunction

      protected boolean notOpenBraceAndNotFunction()
    • closeBrace

      protected boolean closeBrace()
    • lineTerminatorAhead

      protected boolean lineTerminatorAhead()
      Returns true iff on the current index of the parser's token stream a token exists on the HIDDEN channel which either is a line terminator, or is a multi line comment that contains a line terminator.
      Returns:
      true iff on the current index of the parser's token stream a token exists on the HIDDEN channel which either is a line terminator, or is a multi line comment that contains a line terminator.