public abstract class SonarParserBase
extends com.github.fge.grappa.parsers.ListeningParser<com.sonar.sslr.api.Token.Builder>
This base parser class only defines a single method whose argument is
a TokenType and always returns true.
Typically, the usage will be:
public Rule myRule()
{
return sequence(otherRule(), pushToken(myToken));
}
This method then builds a Token.Builder using information from the
parsing context to obtain the start and end of the match, and associates this
match with the token type.
| Constructor and Description |
|---|
SonarParserBase() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
pushToken(com.sonar.sslr.api.TokenType tokenType) |
post, post, postRaw, register, unregisterACTION, alpha, anyOf, anyOf, anyOf, asciiChars, bit, ch, charRange, cr, crlf, ctl, digit, dquote, empty, eof, firstOf, firstOf, fromCharArray, fromCharLiteral, fromStringLiteral, hexDigit, hexDigitLowerCase, hexDigitUpperCase, hTab, ignoreCase, ignoreCase, ignoreCase, join, join, lf, longestString, longestString, longestStringIgnoreCase, longestStringIgnoreCase, noneOf, noneOf, nTimes, octet, oneOrMore, oneOrMore, optional, optional, regex, repeat, repeat, sequence, sequence, sp, string, string, test, test, testNot, testNot, toRule, toRules, trie, trie, trieIgnoreCase, trieIgnoreCase, unicodeChar, unicodeRange, vchar, wsp, zeroOrMore, zeroOrMorecurrentChar, currentIndex, drop, drop, dup, getContext, hasError, inPredicate, match, matchedChar, matchEnd, matchLength, matchOrDefault, matchRange, matchStart, peek, peek, peekAs, peekAs, poke, poke, pop, pop, popAs, popAs, position, push, push, setContext, swap, swap