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: Sun, 20 Feb 2011 10:06:02 -0500 (EST)
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)

On Tue, 15 Feb 2011, Godeau Julien wrote:

> My_var = 3. + 1.
> 
> My_signal = 4. + My_other_signal
> 
> Mysignal = My_other_signal + 4.
> 
>  
> 
> Let's assume that My_var and My_signal are new identifiers, my problem
> is that in the second example the command "Mysignal = 4." is recognized
> by Bison as an integer variable assignment (with parsing error because
> of "My_other_signal") while what should have been done is to recognize
> that "4. + My_other_signal" is a signal (and process it) and then do a
> signal assignment. In the third example, it works fine.

You must have sent us the wrong grammar.  IDENTIFIER can only appear 
before an '=', so the third example (where I assume My_other_signal is an 
IDENTIFIER) should be a syntax error as well.



reply via email to

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