[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: messages within messages
- From: Roberto Ierusalimschy <roberto@...>
- Date: Sat, 27 Dec 1997 10:07:23 -0200
> 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