Package com.prineside.luaj.parser
Class LuaParser
java.lang.Object
com.prineside.luaj.parser.LuaParser
- All Implemented Interfaces:
LuaParserConstants
-
Field Summary
FieldsModifier and TypeFieldDescriptionNext token.Current token.Generated Token Manager.Fields inherited from interface com.prineside.luaj.parser.LuaParserConstants
AND, BREAK, CHAR, CHARSTRING, COMMENT, DBCOLON, DECIMAL, DEFAULT, DIGIT, DO, ELSE, ELSEIF, END, EOF, EXP, FALSE, FLOAT, FNUM, FOR, FUNCTION, GOTO, HEX, HEXDIGIT, HEXEXP, HEXNUM, IF, IN, IN_COMMENT, IN_LC0, IN_LC1, IN_LC2, IN_LC3, IN_LCN, IN_LS0, IN_LS1, IN_LS2, IN_LS3, IN_LSN, LF, LOCAL, LONGCOMMENT0, LONGCOMMENT1, LONGCOMMENT2, LONGCOMMENT3, LONGCOMMENTN, LONGSTRING0, LONGSTRING1, LONGSTRING2, LONGSTRING3, LONGSTRINGN, NAME, NIL, NOT, NUMBER, OR, QUOTED, REPEAT, RETURN, STRING, THEN, tokenImage, TRUE, UNICODE, UNTIL, WHILE -
Constructor Summary
ConstructorsConstructorDescriptionConstructor with generated Token Manager.LuaParser(InputStream stream) Constructor with InputStream.LuaParser(InputStream stream, String encoding) Constructor with InputStream and supplied encodingConstructor. -
Method Summary
Modifier and TypeMethodDescriptionfinal StatAssign(Exp.VarExp v0) final intBinop()final BlockBlock()final ChunkChunk()Root production.final voidDisable tracing.final voidEnable tracing.final ExpExp()ExpList()final StatExprStat()final TableFieldField()final List<TableField>final voidFieldSep()final FuncArgsFuncArgs()final FuncBodyFuncBody()final FuncNameFuncName()final FuncBodyGenerate ParseException.final TokenGet the next Token.final TokengetToken(int index) Get the specific Token.final Statfinal StatLabel()static voidNameList()final ParListParList()final Exp.PrimaryExpPostfixOp(Exp.PrimaryExp lhs) final Exp.PrimaryExpfinal Exp.PrimaryExpvoidReinitialise.voidReInit(InputStream stream) Reinitialise.voidReInit(InputStream stream, String encoding) Reinitialise.voidReinitialise.final Statfinal Expfinal StatStat()final LuaStringStr()final TableConstructorfinal intUnop()final Exp.VarExpVarExp()
-
Field Details
-
token_source
Generated Token Manager. -
token
Current token. -
jj_nt
Next token.
-
-
Constructor Details
-
LuaParser
Constructor with InputStream. -
LuaParser
Constructor with InputStream and supplied encoding -
LuaParser
Constructor. -
LuaParser
Constructor with generated Token Manager.
-
-
Method Details
-
main
- Throws:
ParseException
-
getCharStream
-
Chunk
Root production.- Throws:
ParseException
-
Block
- Throws:
ParseException
-
Stat
- Throws:
ParseException
-
IfThenElse
- Throws:
ParseException
-
ReturnStat
- Throws:
ParseException
-
Label
- Throws:
ParseException
-
ExprStat
- Throws:
ParseException
-
Assign
- Throws:
ParseException
-
VarExp
- Throws:
ParseException
-
FuncName
- Throws:
ParseException
-
PrefixExp
- Throws:
ParseException
-
PrimaryExp
- Throws:
ParseException
-
PostfixOp
- Throws:
ParseException
-
FuncArgs
- Throws:
ParseException
-
NameList
- Throws:
ParseException
-
ExpList
- Throws:
ParseException
-
SimpleExp
- Throws:
ParseException
-
Str
- Throws:
ParseException
-
Exp
- Throws:
ParseException
-
FunctionCall
- Throws:
ParseException
-
FuncBody
- Throws:
ParseException
-
ParList
- Throws:
ParseException
-
TableConstructor
- Throws:
ParseException
-
FieldList
- Throws:
ParseException
-
Field
- Throws:
ParseException
-
FieldSep
- Throws:
ParseException
-
Binop
- Throws:
ParseException
-
Unop
- Throws:
ParseException
-
ReInit
Reinitialise. -
ReInit
Reinitialise. -
ReInit
Reinitialise. -
ReInit
Reinitialise. -
getNextToken
Get the next Token. -
getToken
Get the specific Token. -
generateParseException
Generate ParseException. -
enable_tracing
public final void enable_tracing()Enable tracing. -
disable_tracing
public final void disable_tracing()Disable tracing.
-