|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectGrammar
public class Grammar
| Constructor Summary | |
|---|---|
Grammar()
Constructs a new, empty grammar. |
|
| Method Summary | |
|---|---|
void |
addRule(java.lang.String ruleText)
Adds definitions for a single nonterminal to this grammar. |
Definitions |
getDefinitions(java.lang.String nonterminal)
Returns a list of definitions for the given nonterminal. |
void |
print()
Prints this Grammar. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Grammar()
| Method Detail |
|---|
public void addRule(java.lang.String ruleText)
throws java.lang.IllegalArgumentException
ruleText - The text to be parsed and kept as definitions.
java.lang.IllegalArgumentException - If the input parameter has a syntax error.public Definitions getDefinitions(java.lang.String nonterminal)
nonterminal - The nonterminal whose definitions are to be returned.
public void print()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||