public interface GearleyResult
| Modifier and Type | Method and Description |
|---|---|
GearleyResult |
continueParsing()
After a successful prefix parse, this method continues parsing.
|
GearleyResult |
continueParsing(GearleyParser parser)
After a successful prefix parse, this method continues parsing with a new parser.
|
Arborist |
getArborist()
Get an arborist to extract trees from the forest.
|
Arborist |
getArborist(Axe axe)
Get an arborist to extract trees from the forest.
|
int |
getColumnNumber()
Returns the column number of the last character on the last line read by the parser.
|
ParseForest |
getForest()
Return the parse forest created by the parser.
|
Token |
getLastToken()
Return the last token parsed.
|
int |
getLineNumber()
Returns the line number of the last line read by the parser.
|
int |
getOffset()
Returns the last offset read by the parser.
|
GearleyParser |
getParser()
The parser used.
|
long |
getParseTime()
Returns the number of milliseconds spent parsing.
|
java.util.Set<TerminalSymbol> |
getPredictedTerminals()
Returns the symbols predicted as possibly next in the case where a parse fails.
|
int |
getTokenCount()
Return the number of tokens parsed.
|
boolean |
isAmbiguous()
Returns true if the parse was ambiguous.
|
boolean |
isInfinitelyAmbiguous()
Returns true if the parse was infinitely ambiguous.
|
boolean |
prefixSucceeded()
Returns true if the parser successfully processed a prefix of the input.
|
boolean |
succeeded()
Returns true of the parse was successful.
|
GearleyParser getParser()
boolean succeeded()
boolean prefixSucceeded()
Note that the GLL parser does not support prefix parsing.
long getParseTime()
GearleyResult continueParsing()
GearleyResult continueParsing(GearleyParser parser)
parser - The (next) parser.ParseForest getForest()
This method returns null if the parse was unsuccessful.
Arborist getArborist()
The default arborist is created with Arborist.getArborist(ParseForest).
Arborist getArborist(Axe axe)
The arborist is created with Arborist.getArborist(ParseForest, Axe).
axe - the arborists axeboolean isAmbiguous()
boolean isInfinitelyAmbiguous()
The parse will only be infinitely ambiguous if the grqmmar contained a loop.
int getTokenCount()
Token getLastToken()
int getOffset()
int getLineNumber()
int getColumnNumber()
java.util.Set<TerminalSymbol> getPredictedTerminals()