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 Stat
Assign
(Exp.VarExp v0) final int
Binop()
final Block
Block()
final Chunk
Chunk()
Root production.final void
Disable tracing.final void
Enable tracing.final Exp
Exp()
ExpList()
final Stat
ExprStat()
final TableField
Field()
final List<TableField>
final void
FieldSep()
final FuncArgs
FuncArgs()
final FuncBody
FuncBody()
final FuncName
FuncName()
final FuncBody
Generate ParseException.final Token
Get the next Token.final Token
getToken
(int index) Get the specific Token.final Stat
final Stat
Label()
static void
NameList()
final ParList
ParList()
final Exp.PrimaryExp
PostfixOp
(Exp.PrimaryExp lhs) final Exp.PrimaryExp
final Exp.PrimaryExp
void
Reinitialise.void
ReInit
(InputStream stream) Reinitialise.void
ReInit
(InputStream stream, String encoding) Reinitialise.void
Reinitialise.final Stat
final Exp
final Stat
Stat()
final LuaString
Str()
final TableConstructor
final int
Unop()
final Exp.VarExp
VarExp()
-
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.
-