help-bison
[Top][All Lists]
Advanced

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

RE: Problem in grammar


From: Joel E. Denny
Subject: RE: Problem in grammar
Date: Mon, 21 Feb 2011 09:26:42 -0500 (EST)
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)

On Mon, 21 Feb 2011, Godeau Julien wrote:

> Thanks for your answer.
> You're right, I wanted to simplify the thing and I forgot to put the 
> 'SIGNAL' token in signal definition:
> 
> signal : SIGNAL                          { $$ = $2; }

> "My_other_signal" is seen as a SIGNAL token, being recognized by its 
> name thanks to a list of existing signals. "IDENTIFIER" token is a new 
> name that the system does not know neither for a variable nor for a 
> signal.

Now all three of your examples are accepted.  Of course, I'm just assuming 
your scanner returns the tokens you want.  To see what tokens your scanner 
really is returning and how your parser is analyzing them, you might look 
at a parser trace.  See the section "Tracing Your Parser" in the Bison 
manual.



reply via email to

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