jyc / lalr-scm

Automatically exported from code.google.com/p/lalr-scm
0 stars 0 forks source link

Feature request: Greater flexibility for error productions #1

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
It would be really handy (and more compatible with Bison) if lalr-scm error
productions could:

1. Include non-terminals (e.g., (error non-term))
2. Include the 'error' token in positions other than the CAR of the
production (e.g. (TERM error non-term))

My assumption is that it's possible to rewrite Bison grammars for lalr-scm
by adding intermediate productions to emulate the behavior of Bison-style
error productions, but it would be nice if the user didn't have to do that
explicitly.

Original issue reported on code.google.com by jool...@gmail.com on 27 Oct 2008 at 1:29

GoogleCodeExporter commented 8 years ago

Original comment by schemeway on 30 Nov 2008 at 9:10

GoogleCodeExporter commented 8 years ago
Actually, looking at the way errors are handled in the source code, it looks 
like
what I'm describing above might already work.  You'd just have to get rid of the
checks in lalr.scm:1343-1347.

Thoughts?

Original comment by jool...@gmail.com on 12 Dec 2008 at 3:40

GoogleCodeExporter commented 8 years ago
I had to replace the test by something less restrictive, but I cannot simply 
just get
rid of it. I committed a fix.

Original comment by schemeway on 13 Dec 2008 at 12:37

GoogleCodeExporter commented 8 years ago

Original comment by schemeway on 13 Dec 2008 at 12:58