|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--openjava.syntax.AbstractSyntaxRule
|
+--openjava.syntax.SelectionRule
The class SelectionRule represents selective syntax
rule.
Suppose there're several syntax rules; A, B, C. This class can represents the syntax ( A | B | C ). If both A and B are adaptable to token source, A is choosed since A is specified at lefter part than B's part.
Object| Field Summary | |
protected SyntaxRule[] |
elementRules
|
| Fields inherited from class openjava.syntax.AbstractSyntaxRule |
|
| Constructor Summary | |
SelectionRule(SyntaxRule[] elementRules)
Allocates a new rule representing a selection of given rules. |
|
SelectionRule(SyntaxRule e1,
SyntaxRule e2)
|
|
SelectionRule(SyntaxRule e1,
SyntaxRule e2,
SyntaxRule e3)
|
|
| Method Summary | |
ParseTree |
consume(TokenSource token_src)
Consumes tokens from the given token source following the rule. |
| Methods inherited from class openjava.syntax.AbstractSyntaxRule |
getSyntaxException, lookahead |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected SyntaxRule[] elementRules
| Constructor Detail |
public SelectionRule(SyntaxRule[] elementRules)
elementRules - an array of rules
public SelectionRule(SyntaxRule e1,
SyntaxRule e2)
public SelectionRule(SyntaxRule e1,
SyntaxRule e2,
SyntaxRule e3)
| Method Detail |
public ParseTree consume(TokenSource token_src)
throws SyntaxException
AbstractSyntaxRule
consume in interface SyntaxRuleconsume in class AbstractSyntaxRuletoken_src - token source to consume.
SyntaxException
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||