Class Tokenizer
java.lang.Object
com.singularsys.jep.configurableparser.Tokenizer
Breaks the input into a set of tokens.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Factory creating new instances of the tokenizer. -
Field Summary
Modifier and TypeFieldDescriptionprotected final BufferedReader
protected String
protected int
protected int
protected final List<TokenMatcher>
-
Constructor Summary
ConstructorDescriptionConstruct a tokenizer for a given input. -
Method Summary
-
Field Details
-
matchers
-
currentPos
protected int currentPos -
currentLine
-
currentLineNumber
protected int currentLineNumber -
br
-
tokens
-
-
Constructor Details
-
Tokenizer
Construct a tokenizer for a given input.- Parameters:
br
- the input to read from.cp
- The configurable parser instance.- Since:
- 3.4.0
-
-
Method Details
-
scan
Scans the input, breaking it down into tokens.- Returns:
- the list of tokens that the input was broken down into, ";;" returns an empty list, null if attempts to read past end of the file
- Throws:
ParseException
- if there is a syntax error in the input
-
toString
-