Luky Library - 4.1.1 (20061117-1148)

luky.lua
Class LuaParser

java.lang.Object
  extended by 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
 
Method Summary
 LuaToken getRootToken()
          returns the parsed rootToken, makes most sense after a succesfull readFile
static void main(String[] args)
          main routine used for testing
 int readFile(String fileName)
          reads the lua file
 int writeFile(String fileName)
          writes the lua file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LuaParser

public LuaParser()
default constructor

Method Detail

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

Luky Library - 4.1.1 (20061117-1148)