polyglot.ext.ibex.lr
Class GLR

java.lang.Object
  extended bypolyglot.ext.ibex.lr.GLR

public class GLR
extends java.lang.Object


Constructor Summary
GLR(ExtensionInfo ext, ParserType pt)
           
 
Method Summary
 java.lang.String[] encodedActionTable()
           
 java.lang.String[] encodedGotoTable()
           
 java.lang.String[] encodedOverflowTable()
           
 java.lang.String[] encodedRuleTable()
           
 int eofSymbolNumber()
           
 boolean isStartSymbol(Nonterminal s)
           
 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.
 int nonterminalNumber(Nonterminal s)
           
 int numRules()
           
 Nonterminal ruleLhs(int i)
           
 int ruleNumber(Nonterminal lhs, RhsCase rhs)
           
 RhsCase ruleRhs(int i)
           
 int startStateNumber(Nonterminal s)
          Get the start state number for a particular nonterminal s.
 int startSymbolNumber(Nonterminal s)
          Get the start symbol number for a particular nonterminal s.
 int terminalNumber(Terminal s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GLR

public GLR(ExtensionInfo ext,
           ParserType pt)
Method Detail

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.