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
Modifier and TypeMethodDescriptionvoid
comment
(CharSequence text) Called for a comment.void
newLine
(CharSequence text) Indicates that a new line starts.void
token
(CharSequence text) Called when a token is encountered.void
whitespace
(CharSequence text) Called when whitespace characters are encountered.
-
Method Details
-
newLine
Indicates that a new line starts.- Parameters:
text
- the new line character (CR, LF, CR/LF or FF)
-
whitespace
Called when whitespace characters are encountered.- Parameters:
text
- the whitespace text
-
token
Called when a token is encountered. No distinction between operators and values is done here.- Parameters:
text
- the token text
-
comment
Called for a comment.- Parameters:
text
- the comment
-