|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.sc3d.apt.sss.v3.Grammar
org.sc3d.apt.sss.v3.Grammar.NonTerminal
public static class Grammar.NonTerminal
The subclass of Grammar with 'isTerminal==false'. This class represents quantified non-terminals. By quantified I mean that it can be optional and/or repeatable (as represented in SSS grammar specifications by the symbols '?', '*' and '+'). This class is called 'NonTerminal' only as an abbreviation for 'QuantifiedNonTerminal'.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.sc3d.apt.sss.v3.Grammar |
|---|
Grammar.Keyword, Grammar.NonTerminal, Grammar.Production, Grammar.Terminal |
| Field Summary | |
|---|---|
boolean |
isOptional
One of the flags passed to the constructor. |
boolean |
isRepeatable
One of the flags passed to the constructor. |
int |
numProds
The number of Productions. |
| Fields inherited from class org.sc3d.apt.sss.v3.Grammar |
|---|
isTerminal |
| Constructor Summary | |
|---|---|
Grammar.NonTerminal(Grammar.NonTerminal that,
boolean isOptional,
boolean isRepeatable)
Constructs a NonTerminal with the same productions as 'that' but different flags. |
|
Grammar.NonTerminal(Grammar.Production[] prods,
boolean isOptional,
boolean isRepeatable)
Constructs a NonTerminal. |
|
| Method Summary | |
|---|---|
Grammar.Production |
get(int index)
Returns the Production with index 'index'. |
java.lang.String |
toString()
Returns a String representation of this NonTerminal. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public final int numProds
public final boolean isOptional
public final boolean isRepeatable
| Constructor Detail |
|---|
public Grammar.NonTerminal(Grammar.Production[] prods,
boolean isOptional,
boolean isRepeatable)
prods - an array of Productions that produce this NonTerminal, in order of preference. The array is not copied away, and must therefore not be modified hereafter.isOptional - 'true' if zero copies of this non-terminal is acceptable, or 'false' to insist on at least one copy.isRepeatable - 'true' if more than one copy of this non-terminal is acceptable, or 'false' to insist on at most one copy.
public Grammar.NonTerminal(Grammar.NonTerminal that,
boolean isOptional,
boolean isRepeatable)
| Method Detail |
|---|
public Grammar.Production get(int index)
public java.lang.String toString()
toString in class Grammar
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||