Update LuaParser.jj and LuaParser.java to accept lua 5.2 syntax for all files in the standard tests.

This commit is contained in:
James Roseborough
2012-08-31 14:51:35 +00:00
parent 79f31955a4
commit 7d3b5a6b14
5 changed files with 838 additions and 683 deletions

View File

@@ -1,5 +1,5 @@
/**
* Javacc grammar for lua language version 5.1
* Javacc grammar for lua language version 5.2
*
* Originally created for use in luaj, a Java implementation of the lua language
* @see http://sourceforge.net/projects/luaj/
@@ -133,7 +133,7 @@ TOKEN :
| < #QUOTED: <DECIMAL> | <UNICODE> | <CHAR> >
| < #DECIMAL: "\\" ["0"-"9"] (["0"-"9"])? (["0"-"9"])? >
| < DBCOLON: "::" >
| < SHEBANG: "#" ["!"," "] (~["\n","\r"])* ("\n"|"\r"|"\r\n") >
| < SHEBANG: "#" ["!"," "] (~["\n","\r"])* (<LF>)? >
| < #UNICODE: "\\" "u" <HEXDIGIT> <HEXDIGIT> <HEXDIGIT> <HEXDIGIT> >
| < #CHAR: "\\" (~[]) >
| < #LF: ("\n" | "\r" | "\r\n") >