help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Advice needed, please


From: Hans Aberg
Subject: Re: Advice needed, please
Date: Sun, 7 Jun 2009 00:04:23 +0200

On 6 Jun 2009, at 23:29, xelanoimis wrote:

I'm updating my scripting language and I need some help from someone more experienced with bison who would like to have a look at my grammar. As it is now it works fine, but I just want to make sure I didn't do any bad things in there. Or if there's a way to "optimize" it, make the result smaller,
faster, etc...

You might inquiry the Usenet newsgroup comp.compilers.

I have some "shift/reduce conflicts" and I wonder if I must fix them or just
use the %expect option to silence the warning.

Opinions differ, but not fixing could indicate grammar errors. Look into the .output file for the parsing "." in the conflicting rules, and set token precedences on the tokens immediately before and after.

Also I wonder about reporting the parser error. I get the line number but it doesn't always say a suggestive message, like missing ';' or missing '}'. For example when I have an error in the top level it says: "parse error, expecting '$". I'm not sure where this came from and how can I get a better
message.

These are default messages that Bison generates. Better ones are on the todo list.

  Hans






reply via email to

[Prev in Thread] Current Thread [Next in Thread]