Package com.scriptbasic.lexer
Class BasicKeywordRecognizer
java.lang.Object
com.scriptbasic.lexer.BasicKeywordRecognizer
- All Implemented Interfaces:
KeywordRecognizer,ScriptBasicKeyWords
public class BasicKeywordRecognizer extends java.lang.Object implements KeywordRecognizer, ScriptBasicKeyWords
This class recognizes a reserved keyword.
- Author:
- verhasp
-
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 BasicKeywordRecognizer() -
Method Summary
Modifier and Type Method Description booleanisRecognized(java.lang.String identifier)The method checks the argument if present in the reserved keyword list or not.
-
Constructor Details
-
BasicKeywordRecognizer
public BasicKeywordRecognizer()
-
-
Method Details
-
isRecognized
public boolean isRecognized(java.lang.String identifier)Description copied from interface:KeywordRecognizerThe method checks the argument if present in the reserved keyword list or not.- Specified by:
isRecognizedin interfaceKeywordRecognizer- Parameters:
identifier- the string of the identifier that may be reserved word- Returns:
trueif and only if the identifier string is a reserved keyword
-