Class ScriptLexer
java.lang.Object
com.blackrook.rookscript.struct.Lexer
com.blackrook.rookscript.struct.PreprocessorLexer
com.blackrook.rookscript.compiler.ScriptLexer
The lexer for a script reader context.
- Author:
- Matthew Tropiano
-
Nested Class Summary
Nested classes/interfaces inherited from class com.blackrook.rookscript.struct.PreprocessorLexer
PreprocessorLexer.DefaultIncluder, PreprocessorLexer.Includer, PreprocessorLexer.PreprocessorException, PreprocessorLexer.StringProvider
Nested classes/interfaces inherited from class com.blackrook.rookscript.struct.Lexer
Lexer.Kernel, Lexer.Parser, Lexer.ReaderStack, Lexer.Token
-
Field Summary
Fields inherited from class com.blackrook.rookscript.struct.PreprocessorLexer
DEFAULT_INCLUDER, DIRECTIVE_BANG, DIRECTIVE_DEFINE, DIRECTIVE_ELSE, DIRECTIVE_ENDIF, DIRECTIVE_IFDEF, DIRECTIVE_IFNDEF, DIRECTIVE_INCLUDE, DIRECTIVE_UNDEFINE
Fields inherited from class com.blackrook.rookscript.struct.Lexer
DEBUG, END_OF_LEXER, END_OF_STREAM, NEWLINE
-
Constructor Summary
ConstructorDescriptionScriptLexer
(ScriptKernel kernel, Reader in, ScriptReaderIncluder includer, ScriptReaderOptions options) Creates a new lexer around a String, that will be wrapped into a StringReader class chain.ScriptLexer
(ScriptKernel kernel, String name, Reader in, ScriptReaderIncluder includer, ScriptReaderOptions options) Creates a new script lexer around a String, that will be wrapped into a StringReader class chain. -
Method Summary
Methods inherited from class com.blackrook.rookscript.struct.PreprocessorLexer
addDefine, addDefine, getInfoLine, nextToken, preprocess, processDirectiveLine, readChar, setIncluder
Methods inherited from class com.blackrook.rookscript.struct.Lexer
clearCurrentLexeme, getCurrentLexeme, getCurrentLineNumber, getCurrentStream, getCurrentStreamName, getRawStringEnd, getState, getStringEnd, isCommentEndDelimiterStart, isDelimiterStart, isDigit, isExponent, isExponentSign, isHexDigit, isLetter, isLexerEnd, isNewline, isPoint, isRawStringStart, isSpace, isStreamEnd, isStringEnd, isStringEscape, isStringStart, isTab, isUnderscore, isWhitespace, modifyType, pushStream, saveChar, setDelimBreak, setMultilineStringStartAndEnd, setState, setStringStartAndEnd
-
Constructor Details
-
ScriptLexer
public ScriptLexer(ScriptKernel kernel, Reader in, ScriptReaderIncluder includer, ScriptReaderOptions options) Creates a new lexer around a String, that will be wrapped into a StringReader class chain. This will also assign this lexer a default name.- Parameters:
kernel
- the lexer kernel to use for defining how to parse the input text.in
- the input stream to read from.includer
- the script reader includer to use.options
- the script reader options to use.
-
ScriptLexer
public ScriptLexer(ScriptKernel kernel, String name, Reader in, ScriptReaderIncluder includer, ScriptReaderOptions options) Creates a new script lexer around a String, that will be wrapped into a StringReader class chain.- Parameters:
kernel
- the lexer kernel to use for defining how to parse the input text.name
- the name of this lexer.in
- the input stream to read from.includer
- the script reader includer to use.options
- the script reader options to use.
-