Package com.scriptbasic.lexer.elements
Class MultiCharacter
java.lang.Object
com.scriptbasic.lexer.elements.AbstractElementAnalyzer
com.scriptbasic.lexer.elements.MultiCharacter
- All Implemented Interfaces:
LexicalElementAnalyzer,ScriptBasicKeyWords
public class MultiCharacter extends AbstractElementAnalyzer implements ScriptBasicKeyWords
-
Field Summary
Fields inherited from interface com.scriptbasic.interfaces.ScriptBasicKeyWords
BASIC_KEYWORDS, BASIC_OPERATOR_LEXEME_MAX_LENGTH, BASIC_OPERATORS, KEYWORD_AND, KEYWORD_AS, KEYWORD_CALL, KEYWORD_CASE, KEYWORD_DIV, KEYWORD_ELSE, KEYWORD_ELSEIF, KEYWORD_END, KEYWORD_ENDIF, KEYWORD_ENDSUB, KEYWORD_FALSE, KEYWORD_FOR, KEYWORD_FROM, KEYWORD_GLOBAL, KEYWORD_IF, KEYWORD_IS, KEYWORD_LET, KEYWORD_LOCAL, KEYWORD_METHOD, KEYWORD_NEXT, KEYWORD_NOT, KEYWORD_OR, KEYWORD_PRINT, KEYWORD_REM, KEYWORD_REPEAT, KEYWORD_RETURN, KEYWORD_SELECT, KEYWORD_SENTENCE, KEYWORD_STEP, KEYWORD_SUB, KEYWORD_THEN, KEYWORD_TO, KEYWORD_TRUE, KEYWORD_UNTIL, KEYWORD_USE, KEYWORD_WEND, KEYWORD_WHILE, OPERATOR_AMPERSAND, OPERATOR_DIVIDE, OPERATOR_EQUALS, OPERATOR_GREATER, OPERATOR_GREATER_OR_EQUAL, OPERATOR_LESS, OPERATOR_LESS_OR_EQUAL, OPERATOR_MINUS, OPERATOR_MODULO, OPERATOR_MULTIPLY, OPERATOR_NOT_EQUALS, OPERATOR_PLUS, OPERATOR_POWER -
Constructor Summary
Constructors Constructor Description MultiCharacter(SourceReader reader) -
Method Summary
Modifier and Type Method Description LexicalElementread()Reads a lexeme and returns the created lexical element.
-
Constructor Details
-
Method Details
-
read
Description copied from interface:LexicalElementAnalyzerReads a lexeme and returns the created lexical element.If the characters read from the reader show that the lexeme is not the type that the class implementing this interface can handle then the characters are pushed back to he reader and
nullis returned.If the characters read from the reader show that the lexeme is the type that the class implementing this interface can handle, but is erroneous, then the method throws the exception.
- Specified by:
readin interfaceLexicalElementAnalyzer- Specified by:
readin classAbstractElementAnalyzer- Returns:
- the created lexeme or
null
-