help-bison
[Top][All Lists]
Advanced

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

Bison help


From: Sean Walton
Subject: Bison help
Date: Wed, 27 Sep 2006 14:17:24 -0600
User-agent: Thunderbird 1.5.0.7 (X11/20060920)

I am trying to add some productions:

   anesc_pointcut_decl
       : ANESC_POINTCUT idword ':' anesc_designator_exp
       ;
anesc_designator_exp
       : anesc_designator
       | anesc_designator OROR anesc_designator_exp
       | anesc_designator ANDAND anesc_designator_exp
       | '(' anesc_designator_exp ')'
       ;

   anesc_designator
       : CALL '(' typename function_call ')'
       | ANESC_EXECUTE '(' typename function_call ')'
       | ANESC_TARGET '(' idword ')'
       | ANESC_GET '(' idword ')'
       | ANESC_SET '(' idword ')'
       ;

to an existing Bison file. It complained that about the new nonterminals, so I added them to the declaration section:

   %token <u.decl> ANESC_POINTCUT ANESC_AFTER ANESC_BEFORE ANESC_AROUND
   %token <u.decl> ANESC_TARGET ANESC_EXECUTE ANESC_GET ANESC_SET
   ANESC_ARGS
   %type  <u.decl> anesc_pointcut_decl anesc_designator_exp
   anesc_designator
   %type  <u.decl> anesc_advice

I get the following errors:

   c-parse.y:1334.11-38: warning: type clash on default action:
   <u.decl> != <u.itoken>
   c-parse.y:1338.11-45: warning: type clash on default action:
   <u.decl> != <u.itoken>


I am assuming that since 'function_call' is declared type 'u.itoken' there is a type mismatch. If type mismatching is the problem, can anyone help me convert the types? If NOT, please tell me what is wrong with the productions.

Thanks!
-Sean Walton


reply via email to

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