| java.lang.Object fri.patterns.interpreter.parsergenerator.syntax.Rule
Rule | public class Rule implements Serializable(Code) | | A rule is a list of String symbols on the right side
and a nonterminal on the left side: "a ::= b c d;"
A nonterminal is represented as a String with no quotes,
every terminal must appear quoted by " or ' or ` (backquote).
author: (c) 2004 Fritz Ritzberger |
Constructor Summary | |
public | Rule(String nonterminal, int rightSize) Source generator constructor. | public | Rule(String[] symbols) Constructing a rule from a String array, first element is interpreted as nonterminal. | public | Rule(List symbols) Constructing a rule from a String List, first element is interpreted as nonterminal. | protected | Rule() Serializable constructor, do not use. |
Rule | public Rule(String nonterminal, int rightSize)(Code) | | Source generator constructor.
|
Rule | public Rule(String[] symbols)(Code) | | Constructing a rule from a String array, first element is interpreted as nonterminal.
|
Rule | public Rule(List symbols)(Code) | | Constructing a rule from a String List, first element is interpreted as nonterminal.
|
Rule | protected Rule()(Code) | | Serializable constructor, do not use.
|
addRightSymbol | public void addRightSymbol(String symbol)(Code) | | |
equals | public boolean equals(Object o)(Code) | | Returns true if symbol lists are equal.
|
hashCode | public int hashCode()(Code) | | Returns symbol lists hashcode.
|
indexOnRightSide | public int indexOnRightSide(String symbol)(Code) | | |
rightSize | public int rightSize()(Code) | | |
setRightSymbol | public void setRightSymbol(String symbol, int i)(Code) | | |
toString | public String toString()(Code) | | Returns the syntax as a multiline string.
|
|
|