Package org.luwrain.antlr.js
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
protected boolean
Returnstrue
iff on the current index of the parser's token stream a token exists on theHIDDEN
channel which either is a line terminator, or is a multi line comment that contains a line terminator.protected boolean
Short form for next(String str)protected boolean
Whether the next token value equals to @param strprotected boolean
protected boolean
protected boolean
Short form for prev(String str)protected boolean
Whether the previous token value equals to @param str
-
Constructor Details
-
JavaScriptParserBase
public JavaScriptParserBase(TokenStream input)
-
-
Method Details
-
p
Short form for prev(String str) -
prev
Whether the previous token value equals to @param str -
n
Short form for next(String str) -
next
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()Returnstrue
iff on the current index of the parser's token stream a token exists on theHIDDEN
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 theHIDDEN
channel which either is a line terminator, or is a multi line comment that contains a line terminator.
-