|Grammar with precedence rules firstname.lastname@example.org (2002-03-09)|
|Re: Grammar with precedence rules email@example.com (Joachim Durchholz) (2002-03-11)|
|Re: Grammar with precedence rules firstname.lastname@example.org (2002-03-17)|
|Re: Grammar with precedence rules email@example.com (Dennis Mickunas) (2002-03-17)|
|Re: Grammar with precedence rules firstname.lastname@example.org (Joachim Durchholz) (2002-03-19)|
|Re: Grammar with precedence rules email@example.com (2002-03-21)|
|Re: Grammar with precedence rules firstname.lastname@example.org (Michael Dyck) (2002-03-31)|
|From:||email@example.com (Hans Aberg)|
|Date:||21 Mar 2002 21:58:42 -0500|
|References:||02-03-043 02-03-068 02-03-077 02-03-110|
|Posted-Date:||21 Mar 2002 21:58:42 EST|
>Hmm... I must confess that I didn't fully understand what you're trying
To a grammar/precedence pair (G, P), find a definition language L(G,
P). (Thus, independent of parsing algorithms.)
>One thing that could be done is to use a Tomita (Earley) parser and use
>the priorities to resolve any ambiguities. (Never having used such a
>parser, I can't say whether the parser will give you the information you
>need to trace the ambiguity to a rule though.)
So merely adding non-deterministic parsing algorithms will not help, if
the idea is to find the language in a manner independent of the parsing
>BTW I'm not sure whether it's a good idea. Prioritizing stuff means that
>you'll never see any unintentional ambiguities. And to make sure that
>there are no unwanted ambiguities left, you'll have to thoroughly
>understand the grammar, so you'll have to do it the hard way anyway.
>Or did I overlook something?
The idea is to define the language independent of the parsing algorithm so
that when the latter is changed, the parsing remains the same.
Unintentional ambiguities will of course be seen if one is not putting in
massive ad hoc precedence relations. -- There is never a way to design a
language so that the programmer use it prudently.
Hans Aberg * Anti-spam: remove "remove." from email address.
* Email: Hans Aberg <firstname.lastname@example.org>
* Home Page: <http://www.matematik.su.se/~haberg/>
* AMS member listing: <http://www.ams.org/cml/>
Return to the
Search the comp.compilers archives again.