help-bison
[Top][All Lists]
Advanced

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

Re: type clash (`' `ival') on default action


From: Tim Van Holder
Subject: Re: type clash (`' `ival') on default action
Date: Thu, 22 Aug 2002 18:59:27 +0200

Please don't post in HTML.

     57 
     58 %token <ival> SYN_RANGEtok
     59 %token <ival> SYN_NAtok
     60 %token <string_p> SYN_STRINGtok

     81 %type <ival> int_span, real_span, hex_span, date_span,
string_span, ip_span
     82 %type <ival> string_len_span

No type is set for the 'syntax' rule.

    102 synatx : int_span
    103         | real_span
    104         | hex_span
    105         | string_span
    106         | string_len_span
    107         | ip_span
    108         | date_span
    109         |
    110             {
    111             Syn_value_check_status=RT_SUCCESS;
    112             }
    113         ;

Yet here, the default rule ($$ = $1) is used, with $$ (syntax)
typeless and $1 (*_span) an 'ival'.
So the solution is to either give syntax a type (ival seems
obviously correct) and set $$ in the 'empty' case, or to add
(epmty) user actions to all '*_span' cases.





reply via email to

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