lua-users home
lua-l archive

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

> Have you considered replacing Yacc with a custom parser?
Yes, but I don4t think it would help. Custom parsers are usually
top-down, and so they are weaker than LALR parsers (if they are LL(1)),
or much more tricky and error-prone, if you handle cases one by one.

  This thing with restricted syntax for function calls is the price we
pay for not having semi-collons ending al statetments. Because of that,
the begining of statetments must be very clear. As a simple example:

i = a+b
(f(x)).x(8)  -- generic expression as a function to be called

would be parsed as:

i = a+b(f(x)).x(8)

-- Roberto