Related articles |
---|
Solving a shift/reduce conflict with an explicit precedence mdhe51@dial.pipex.com (Paul Davis) (2003-07-23) |
Re: Solving a shift/reduce conflict with an explicit precedence haberg@matematik.su.se (2003-07-25) |
Re: Solving a shift/reduce conflict with an explicit precedence derkgwen@HotPOP.com (Derk Gwen) (2003-07-25) |
From: | Derk Gwen <derkgwen@HotPOP.com> |
Newsgroups: | comp.compilers |
Date: | 25 Jul 2003 21:15:23 -0400 |
Organization: | Quick STOP Groceries |
References: | 03-07-170 |
Keywords: | parse, design, comment |
Posted-Date: | 25 Jul 2003 21:15:23 EDT |
# production is ambiguous. The obvious solution to fix this is to
# rewrite 'const_expr' so that it doesn't include NAME. However, the
Perhaps the less obvious solution is that this is part of the context
sensitive grammar and cannot be captured with a fixed number of context
free rules. Why not drop trying to parse const_expr, just parse all
expression and then decide if the parse tree is a constant or not.
--
Derk Gwen http://derkgwen.250free.com/html/index.html
[I agree. You can produce much better error messages that way. -John]
Return to the
comp.compilers page.
Search the
comp.compilers archives again.