- java.lang.Object
-
- org.praxislive.core.syntax.Tokenizer
-
-
Constructor Summary
Constructors Constructor Description Tokenizer(CharSequence text)
Create a Tokenizer for the specified text.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Iterator<Token>
iterator()
static List<Token>
parse(CharSequence text)
Convenience method to parse text into tokens.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
Tokenizer
public Tokenizer(CharSequence text)
Create a Tokenizer for the specified text.- Parameters:
text
-
-
-
Method Detail
-
parse
public static List<Token> parse(CharSequence text)
Convenience method to parse text into tokens. This method will throw an exception if the text is invalid. If you need a partial token sequence, use the iterator directly.- Parameters:
text
- text to parse- Returns:
- list of tokens
- Throws:
InvalidSyntaxException
- if the text is invalid
-
-