Class Tokenizer
java.lang.Object
com.predic8.membrane.core.graphql.Tokenizer
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanadvance()Advances to next token.doublefloat_()intinteger()voidSame asadvance(), but throw EOFException if EOF is reached instead of returning a boolean.longposition()intIftype()returnedPUNCTUATOR, this will return the value.voidrevert()Undo the lastadvance().string()type()
-
Constructor Details
-
Tokenizer
-
-
Method Details
-
revert
public void revert()Undo the lastadvance().Note that this can only be used to go *one* token back.
Also note that when this method has been called, the second-to-last token cannot actually be inspected. This method only serves the purpose to let the next parsing routine call
advance()again itself. This can therefore be used to check - again - whether EOF has been reached. -
mustAdvance
Same asadvance(), but throw EOFException if EOF is reached instead of returning a boolean.- Throws:
IOExceptionParsingException
-
advance
Advances to next token.- Returns:
- whether another token was found. ('false' signals that EOF has been reached.)
- Throws:
EOFException- parsing error (EOF while parsing a token, e.g. an unclosed string)ParsingException- parsing error (illegal text according to the grammar)IOException
-
type
-
punctuator
public int punctuator()Iftype()returnedPUNCTUATOR, this will return the value. -
string
-
integer
public int integer() -
float_
public double float_() -
tokenString
-
position
public long position()
-