help-bison
[Top][All Lists]
Advanced

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

RE: Problem in grammar


From: Godeau Julien
Subject: RE: Problem in grammar
Date: Mon, 21 Feb 2011 15:35:17 +0100

Hello,
The forget was just in the description I made, I already had the rule in my 
parser. Since the last mail, I tried the GLR parser and it now works well as 
all token are examined before taking a decision, instead of just having a look 
at the next one. I don't really understand why, but in the description it seems 
to fit better my need.
Thanks for your help, it's good to see that the community spirit works :o)

Julien

-----Message d'origine-----
De : Joel E. Denny [mailto:address@hidden 
Envoyé : lundi 21 février 2011 15:27
À : Godeau Julien
Cc : address@hidden
Objet : RE: Problem in grammar

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]