polyglot.ext.ibex.lr
Class GLR
java.lang.Object
polyglot.ext.ibex.lr.GLR
- public class GLR
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GLR
public GLR(ExtensionInfo ext,
ParserType pt)
numRules
public int numRules()
ruleLhs
public Nonterminal ruleLhs(int i)
ruleRhs
public RhsCase ruleRhs(int i)
eofSymbolNumber
public int eofSymbolNumber()
ruleNumber
public int ruleNumber(Nonterminal lhs,
RhsCase rhs)
nonterminalNumber
public int nonterminalNumber(Nonterminal s)
terminalNumber
public int terminalNumber(Terminal s)
isStartSymbol
public boolean isStartSymbol(Nonterminal s)
startSymbolNumber
public int startSymbolNumber(Nonterminal s)
- Get the start symbol number for a particular nonterminal
s
.
This should only be called if the symbol s
is a start
symbol. This method is needed to generate code to invoke the parser for
a particular symbol.
startStateNumber
public int startStateNumber(Nonterminal s)
- Get the start state number for a particular nonterminal
s
.
This should only be called if the symbol s
is a start
symbol. This method is needed to generate code to invoke the parser for
a particular symbol.
encodedActionTable
public java.lang.String[] encodedActionTable()
encodedOverflowTable
public java.lang.String[] encodedOverflowTable()
encodedGotoTable
public java.lang.String[] encodedGotoTable()
encodedRuleTable
public java.lang.String[] encodedRuleTable()
mergeRulesForNonterminal
public java.util.Collection mergeRulesForNonterminal(Nonterminal lhs)
- Return a collection of collections of right-hand-sides
rhs
associated with the nonterminal lhs
such that the rule lhs ::= rhs
requires a merge
action. Each pair of rules in each collection should have a merge
action.