[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: LALR(1) Grammar for Lua?
- From: Russ Webb <Russell.Webb@...>
- Date: Fri, 01 Mar 2002 11:15:08 -0800
Lua used to use a lex/yacc grammar back in the 2.0 days. I think the
recursive decent implementation was adopted mainly to improve error handling
but there might have also been other factors like speed, code size, or
memory/stack usage.
There was a discussion a while back (around 3.2 or later) about a LALR(1)
parser that was written (who wrote it?) and led to a discussion of more
uniform syntax for some things and some corner cases that the hand written
grammar had neglected. So I think it's a useful exercise.
I'd be interested to hear again why a hand written parser was adopted.
Russ
> From: Brian Chin <naerbnic@uclink4.berkeley.edu>
> Reply-To: lua-l@tecgraf.puc-rio.br
> Date: Fri, 01 Mar 2002 11:02:57 -0800
> To: Multiple recipients of list <lua-l@tecgraf.puc-rio.br>
> Subject: LALR(1) Grammar for Lua?
>
> Just two quick questions:
>
> 1. Would there be any benefit for making an LALR(1) Parser (Bison
> Parser) for Lua? If the source distro is a problem, then the people
> could just distribute the resultant .c files
> 2. If there was an ability to use the LALR(1) Grammars, is there any
> change to the language which the recursive descent method was preventing?
>
> - Brian
>