@ParametersAreNonnullByDefault
public final class GrappaChannel
extends org.sonar.sslr.channel.Channel<com.sonar.sslr.impl.Lexer>
Lexer| Constructor and Description |
|---|
GrappaChannel(com.github.fge.grappa.rules.Rule rule)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addListenerSupplier(ListenerSupplier supplier)
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. |
boolean |
consume(org.sonar.sslr.channel.CodeReader code,
com.sonar.sslr.impl.Lexer output) |
public GrappaChannel(com.github.fge.grappa.rules.Rule rule)
rule - the (grappa) parser rulepublic void addListenerSupplier(ListenerSupplier supplier)
By default, the only listener defined will be a CodeReaderListener, since it is necessary to add the generated tokens
to the lexer.
You can use this method to add more listeners if you wish.
supplier - the supplierpublic boolean consume(org.sonar.sslr.channel.CodeReader code,
com.sonar.sslr.impl.Lexer output)
consume in class org.sonar.sslr.channel.Channel<com.sonar.sslr.impl.Lexer>