Interface Parser.SyntaxHandler
-
- All Known Implementing Classes:
InstructionSequenceBuilder
,Parser.AbstractSyntaxHandler
- Enclosing class:
- Parser
public static interface Parser.SyntaxHandler
This interface defines all possible syntactic elements of a Type 4 function. It is called by the parser as the function is interpreted.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
comment(java.lang.CharSequence text)
Called for a comment.void
newLine(java.lang.CharSequence text)
Indicates that a new line starts.void
token(java.lang.CharSequence text)
Called when a token is encountered.void
whitespace(java.lang.CharSequence text)
Called when whitespace characters are encountered.
-
-
-
Method Detail
-
newLine
void newLine(java.lang.CharSequence text)
Indicates that a new line starts.- Parameters:
text
- the new line character (CR, LF, CR/LF or FF)
-
whitespace
void whitespace(java.lang.CharSequence text)
Called when whitespace characters are encountered.- Parameters:
text
- the whitespace text
-
token
void token(java.lang.CharSequence text)
Called when a token is encountered. No distinction between operators and values is done here.- Parameters:
text
- the token text
-
comment
void comment(java.lang.CharSequence text)
Called for a comment.- Parameters:
text
- the comment
-
-