|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--sjm.parse.Parser
|
+--sjm.parse.Terminal
|
+--sjm.parse.tokens.Symbol
A Symbol matches a specific sequence, such as
<, or <= that a tokenizer
returns as a symbol.
| Field Summary | |
protected Token |
symbol
the literal to match |
| Fields inherited from class sjm.parse.Terminal |
discard |
| Fields inherited from class sjm.parse.Parser |
assembler, name |
| Constructor Summary | |
Symbol(char c)
Constructs a symbol that will match the specified char. |
|
Symbol(java.lang.String s)
Constructs a symbol that will match the specified sequence of characters. |
|
| Method Summary | |
protected boolean |
qualifies(java.lang.Object o)
Returns true if the symbol this object represents equals an assembly's next element. |
java.lang.String |
unvisitedString(java.util.Vector visited)
Returns a textual description of this parser. |
| Methods inherited from class sjm.parse.Terminal |
accept, discard, match, matchOneAssembly, randomExpansion, setDiscard |
| Methods inherited from class sjm.parse.Parser |
accept, add, best, bestMatch, completeMatch, elementClone, getName, matchAndAssemble, randomInput, setAssembler, toString, toString |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
protected Token symbol
| Constructor Detail |
public Symbol(char c)
char - the character to match. The char must be
one that the tokenizer will return as a
symbol token. This typically includes most
characters except letters and digits.public Symbol(java.lang.String s)
String - the characters to match. The characters
must be a sequence that the tokenizer will
return as a symbol token, such as
<=.| Method Detail |
protected boolean qualifies(java.lang.Object o)
qualifies in class Terminalobject - an element from an assemblypublic java.lang.String unvisitedString(java.util.Vector visited)
unvisitedString in class Terminalvector - a list of parsers already printed in
this descriptionParser.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||