luky.lua
Class LuaParser
java.lang.Object
luky.lua.LuaParser
public class LuaParser
- extends Object
Reads Lua files from HW2
token: ( NAME = ( COLLECTION | VALUE ) | DATA | COLLECTION ) ,
collection: { }
name: String
data: String
value: String
- Version:
- 1.00
- Author:
- Chris Lukassen
-

Constructor Summary |
LuaParser()
default constructor |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LuaParser
public LuaParser()
- default constructor
getRootToken
public LuaToken getRootToken()
- returns the parsed rootToken, makes most sense after a succesfull readFile
- Returns:
- the parsed rootToken
readFile
public int readFile(String fileName)
- reads the lua file
- Parameters:
fileName
- the name
- Returns:
- Constants.OK or Constants.NOK
writeFile
public int writeFile(String fileName)
- writes the lua file
- Parameters:
fileName
- the name
- Returns:
- Constants.OK or Constants.NOK
main
public static void main(String[] args)
- main routine used for testing
- Parameters:
args
- the arguments that were used to start the server