Package edu.wisc.game.parser
Class Token
java.lang.Object
edu.wisc.game.parser.Token
public class Token extends Object
A token represents an element of the input text. Used in parsing rules.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Token.Type
-
Field Summary
-
Method Summary
Modifier and Type Method Description String
asId()
boolean
equals(Object o)
boolean
isOpenParen()
static void
main(String[] argv)
String
toArgv()
Re-imagines the token as an element of a command line.static Vector<Token>
tokenize(String x)
String
toSrc()
String
toString()
static String
toString(Vector<Token> tokens)
-
Field Details
-
Method Details
-
asId
- Returns:
- The string value if it is an ID, or null otherwise
-
equals
-
toString
-
toSrc
-
toArgv
Re-imagines the token as an element of a command line. Used for compatibility purposes in the Captive Game Server. -
tokenize
- Throws:
RuleParseException
-
toString
-
isOpenParen
public boolean isOpenParen() -
main
- Throws:
IOException
RuleParseException
-