|Grammar for variable and method declarations. firstname.lastname@example.org (wooks) (2007-03-01)|
|Re: Grammar for variable and method declarations. email@example.com (Chris Dollin) (2007-03-03)|
|Re: Grammar for variable and method declarations. firstname.lastname@example.org (George Neuner) (2007-03-03)|
|From:||George Neuner <email@example.com>|
|Date:||3 Mar 2007 23:32:37 -0500|
|Posted-Date:||03 Mar 2007 23:32:37 EST|
On 1 Mar 2007 21:33:40 -0500, "wooks" <firstname.lastname@example.org> wrote:
>How do you define a grammar where ...
>public/private datatype id and are not distinguishable until the 4th
The language is not LL(1), left factoring can not remove all the
conflicts. You need extended look ahead and/or predication and
backtracking to parse the language in LL.
LL(k>1) tools such as Antlr and JavaCC can handle this problem in the
natural way, as can any of the LR tools.
Return to the
Search the comp.compilers archives again.