Re: Compilation error in ancient YACC code

Hans Åberg <[email protected]>
Newsgroups gmane.comp.parsers.bison.general
Message-ID <[email protected]>
> On 15 Apr 2019, at 22:37, Chris Bragg <[email protected]> wrote:
> 
> The YACC compiler generates only two errors. I suspect that the problem is a
> minor one and that a small fix to the syntax will fix the problem. I am not
> a YACC programmer - it is a complete mystery to me - and I was hoping a
> posting of the yacc source code up to the point the errors occur and the
> error report itself would allow someone to spot the problem. 
> 
> The YACC errors reported are follows:
> 
> calc.y:121.14: error: syntax error, unexpected =
> 
>           expr = { Expression = $1;};
> 
>              ^
> 
> calc.y:123.23: error: syntax error, unexpected =
> 
>           '('  expr ')' = { $$

Just take away that = before all actions {…}. Somebody else might enlighten on the history of that.



_______________________________________________
[email protected] https://lists.gnu.org/mailman/listinfo/help-bison
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.