Skip navigation links
A B C E G I L M P S W 

A

addListenerSupplier(ListenerSupplier) - Method in class es.litesolutions.sonar.grappa.GrappaChannel
Add one listener to the parsing process By default, the only listener defined will be a CodeReaderListener, since it is necessary to add the generated tokens to the lexer.
addListenerSupplier(ListenerSupplier) - Method in class es.litesolutions.sonar.grappa.GrappaSslrFactory.Builder
Add a ListenerSupplier to the factory Since a ListeningParseRunner is used, it means you can add further parsing listeners when the file is parsed; for instance, you may want to add a TracingListener to debug the parsing process.
afterParse(PostParseEvent<Token.Builder>) - Method in class es.litesolutions.sonar.grappa.CodeReaderListener
 

B

beforeParse(PreParseEvent<Token.Builder>) - Method in class es.litesolutions.sonar.grappa.CodeReaderListener
 
build() - Method in class es.litesolutions.sonar.grappa.GrappaSslrFactory.Builder
Build the factory

C

charAt(int) - Method in class es.litesolutions.sonar.grappa.CodeReaderInputBuffer
 
codePointAt(int) - Method in class es.litesolutions.sonar.grappa.CodeReaderInputBuffer
Returns the Unicode code point starting at a given index If the index is greater than, or equal to, the buffer's length, this method returns -1.
CodeReaderInputBuffer - Class in es.litesolutions.sonar.grappa
An InputBuffer over a CodeReader Unfortunately, this is required.
CodeReaderInputBuffer(CodeReader) - Constructor for class es.litesolutions.sonar.grappa.CodeReaderInputBuffer
 
CodeReaderListener - Class in es.litesolutions.sonar.grappa
A parsing listener associated with a Sonar CodeReader and Lexer This listener will handle both the consumption of characters from the code reader, and adding tokens to the lexer.
CodeReaderListener(CodeReader, Lexer) - Constructor for class es.litesolutions.sonar.grappa.CodeReaderListener
 
consume(CodeReader, Lexer) - Method in class es.litesolutions.sonar.grappa.GrappaChannel
 
create(CodeReader, Lexer) - Method in interface es.litesolutions.sonar.grappa.listeners.ListenerSupplier
 

E

es.litesolutions.sonar.grappa - package es.litesolutions.sonar.grappa
 
es.litesolutions.sonar.grappa.injector - package es.litesolutions.sonar.grappa.injector
 
es.litesolutions.sonar.grappa.listeners - package es.litesolutions.sonar.grappa.listeners
 
extract(int, int) - Method in class es.litesolutions.sonar.grappa.CodeReaderInputBuffer
 
extract(IndexRange) - Method in class es.litesolutions.sonar.grappa.CodeReaderInputBuffer
 
extractLine(int) - Method in class es.litesolutions.sonar.grappa.CodeReaderInputBuffer
 

G

getLineCount() - Method in class es.litesolutions.sonar.grappa.CodeReaderInputBuffer
 
getLineRange(int) - Method in class es.litesolutions.sonar.grappa.CodeReaderInputBuffer
Get the index range matching a given line number
getParser() - Method in class es.litesolutions.sonar.grappa.GrappaSslrFactory
Get a Sonar Parser from this factory
getPosition(int) - Method in class es.litesolutions.sonar.grappa.CodeReaderInputBuffer
 
GrammarInjector - Interface in es.litesolutions.sonar.grappa.injector
Inject a grammar into a LexerfulGrammarBuilder This interface is used by GrappaSslrFactory to prepare a grammar for a Sonar Parser.
GrappaChannel - Class in es.litesolutions.sonar.grappa
The one and only channel necessary for a Grappa-based Lexer
GrappaChannel(Rule) - Constructor for class es.litesolutions.sonar.grappa.GrappaChannel
Constructor
GrappaSslrFactory - Class in es.litesolutions.sonar.grappa
A factory to create a Sonar parser based on a lexerful Grammar and a Grappa parser The syntax to create a factory is: final GrappaSslrFactory factory = GrappaSslrFactory .withParserClass(MyParser.class) .withInjector(MyGrammar::myMethod) .withEntryPoint(someGrammarRuleKey) .build(); You then use the GrappaSslrFactory.getParser() method to build a parser, which you will then use in an AstScanner.
GrappaSslrFactory.Builder<P extends SonarParserBase> - Class in es.litesolutions.sonar.grappa
A builder for a GrappaSslrFactory This class is not directly instantiable; use GrappaSslrFactory.withParserClass(Class) to create a new instance.

I

injectInto(LexerfulGrammarBuilder) - Method in interface es.litesolutions.sonar.grappa.injector.GrammarInjector
 
injectInto(LexerfulGrammarBuilder) - Method in class es.litesolutions.sonar.grappa.injector.LegacyGrammarInjector
 

L

LegacyGrammarInjector - Class in es.litesolutions.sonar.grappa.injector
Legacy grammar injector This injector requires that a static method named injectInto exists in the class you pass as an argument to the constructor, and this method must takes LexerfulGrammarBuilder as an argument.
LegacyGrammarInjector(Class<? extends GrammarRuleKey>) - Constructor for class es.litesolutions.sonar.grappa.injector.LegacyGrammarInjector
Constructor
length() - Method in class es.litesolutions.sonar.grappa.CodeReaderInputBuffer
 
ListenerSupplier - Interface in es.litesolutions.sonar.grappa.listeners
Create a ParseRunnerListener given a CodeReader and a Lexer as arguments This allows you to register listeners to a GrappaChannel.

M

matchFailure(MatchFailureEvent<Token.Builder>) - Method in class es.litesolutions.sonar.grappa.CodeReaderListener
 
matchSuccess(MatchSuccessEvent<Token.Builder>) - Method in class es.litesolutions.sonar.grappa.CodeReaderListener
 

P

pushToken(TokenType) - Method in class es.litesolutions.sonar.grappa.SonarParserBase
 

S

SonarParserBase - Class in es.litesolutions.sonar.grappa
The base (grappa) parser class to extend This base parser class only defines a single method whose argument is a TokenType and always returns true.
SonarParserBase() - Constructor for class es.litesolutions.sonar.grappa.SonarParserBase
 

W

withEntryPoint(GrammarRuleKey) - Method in class es.litesolutions.sonar.grappa.GrappaSslrFactory.Builder
Define the grammar entry point for the grammar
withGrammarClass(Class<? extends GrammarRuleKey>) - Method in class es.litesolutions.sonar.grappa.GrappaSslrFactory.Builder
withGrammarInjector(GrammarInjector) - Method in class es.litesolutions.sonar.grappa.GrappaSslrFactory.Builder
Sets the grammar injector for this factory Since Java 8 is used, and a GrammarInjector is a functional interface, you can use method references here.
withMainRule(Function<P, Rule>) - Method in class es.litesolutions.sonar.grappa.GrappaSslrFactory.Builder
Define the main rule for the parser as a Function Typically, if your parser class is MyParser and the rule you want as a main rule is called myRule, the argument to this method will be MyParser::myRule.
withParserClass(Class<P>) - Static method in class es.litesolutions.sonar.grappa.GrappaSslrFactory
Initialize a builder for a new factory
A B C E G I L M P S W 
Skip navigation links