lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Mike Pall wrote:

Hi,

Klaas-Jan Stol wrote:
for sake of completeness, I just updated the Lua wiki with a link to a Lua 5 grammar for Bison (or Yacc).

Oh, nice! But you forgot the URL: http://lua-users.org/wiki/LuaGrammar

I'm using this grammar in my attempt to write a Lua compiler targeting Parrot, the new virtual machine for Perl6.

Since you are restarting the Lua/Parrot project at this time,
maybe it would be a good idea to use the Lua 5.1 grammar?

It's not that different from Lua 5.0. We gained two new operators
('*x' to get the object size and 'x%y' for modulo) and the
ellipsis token ('...') is now a valid multi-result expression
representing the variable arguments inside a varargs function.

Is the new syntax overview of 5.1 already published? If so, could you give me a link? I could try to insert the new syntax elements into my parser.

thanks,

klaas-jan