Advertisement

04.03.2004 at 06:56PM PST, ID: 20942722
[x]
Attachment Details

Lex & Yacc error question

Asked by iamnamja in C Programming Language

Tags: yacc, declared, error

Hi, I'm currently using yacc..  But i've come across an error message that I can't seem to fix, and was wondering if any of you guys can help me on this...  Well, i have a ambiguious grammer, and to fix the shift reduce i do the following:

exp : exp '+' exp {$$ = $1 + $3}
      | exp '*' exp {$$ = $1 + $3}
...

and so on..  But i get this error:
$$ of 'exp' has no declared type
$1 of 'exp' has no declared type
$3 of 'exp' has no declared type

Am i doing something wrong?  I don't understand what they mean by the declared type.  Thanks guys~Start Free Trial
[+][-]04.03.2004 at 07:35PM PST, ID: 10750606

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: C Programming Language
Tags: yacc, declared, error
Sign Up Now!
Solution Provided By: jerry_jeremiah
Participating Experts: 2
Solution Grade: A
 
 
[+][-]04.04.2004 at 11:51PM PDT, ID: 10755297

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]04.05.2004 at 12:46AM PDT, ID: 10755477

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32