Related articles |
---|
Can shift/reduce problems be eliminated? ashwin21_99@hotmail.com (Ashwin) (2002-12-30) |
Re: Can shift/reduce problems be eliminated? clint@0lsen.net (Clint Olsen) (2002-12-31) |
Re: Can shift/reduce problems be eliminated? vugluskr@unicorn.math.spbu.ru (2002-12-31) |
Re: Can shift/reduce problems be eliminated? cdc@maxnet.co.nz (Carl Cerecke) (2002-12-31) |
Re: Can shift/reduce problems be eliminated? gah@ugcs.caltech.edu (glen herrmannsfeldt) (2003-01-04) |
Re: Can shift/reduce problems be eliminated? bonzini@gnu.org (2003-01-04) |
Re: Can shift/reduce problems be eliminated? vugluskr@unicorn.math.spbu.ru (2003-01-04) |
Re: Can shift/reduce problems be eliminated? cdc@maxnet.co.nz (Carl Cerecke) (2003-01-07) |
Re: Can shift/reduce problems be eliminated? bje@redhat.com (Ben Elliston) (2003-01-07) |
From: | vugluskr@unicorn.math.spbu.ru (Roman Shaposhnick) |
Newsgroups: | comp.compilers |
Date: | 4 Jan 2003 22:48:32 -0500 |
Organization: | St.Petersburg University |
References: | 02-12-121 02-12-137 |
Keywords: | parse, yacc |
Posted-Date: | 04 Jan 2003 22:48:32 EST |
On 31 Dec 2002 23:47:15 -0500, Carl Cerecke wrote:
><grumble>
>I'm currently finishing off a parser for a rather large language with
>many such tricky cases. The current version of my grammar "contains 147
>shift/reduce conflicts and 232 reduce/reduce conflicts.", according
>to bison, in a generated parser of over 2000 states. Beware of languages
>designed by comittee!
></grumble>
Just out of curiosity: don't you consider this to be exactly the case
for hand-written recursive parser ? From my experience, once you have
more hacks than grammar in your .y file, hand crafted recursive parser
might save you from additional trouble, because you have a complete control
over how it works. Or may be mixed approach is even better...
C++ language is one example of this happening, because if I'm not mistaken
g++ is going to throw formal specification away and code it by hand.
Thanks,
Roman.
Return to the
comp.compilers page.
Search the
comp.compilers archives again.