Method Summary |
|
public void | addRule(Rule rule) Appends a new rule to this Syntax. |
public void | appendRules(List rules) Append rules to this syntax. |
public List | findStartRules() Returns a List of top level Rules (that do not appear on right side of any contained rule). |
public Rule | getRule(int i) Returns the rule at the given position. |
public Set | getUnresolvedNonterminals() Returns a set of nonterminals that have no rule within this syntax. |
public boolean | hasRule(String nonterminal) Returns true if the passed nonterminal is on the left side of at least one contained rule. |
public void | insertRule(int i, Rule rule) Inserts a new rule into this Syntax (needed to set artificial START rule at position 0). |
public void | removeRule(int index) Removes the rule at passed index from this Syntax. |
public void | resolveFrom(Syntax resolvingSyntax) Resolves undefined rules in this syntax from another syntax. |
public void | resolveSingulars() Simplify the syntax. |
public int | size() Returns the number of rules of this Syntax. |
public String | toString() Returns the syntax as a human readable multiline text. |