help-bison
[Top][All Lists]
Advanced

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

Bug in Bison rr2 table ?


From: Matthias Mann
Subject: Bug in Bison rr2 table ?
Date: Tue, 11 Nov 2003 23:11:18 +0100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007

Hello,

I'm using the GLR parser with the following grammer section:

class_interface_stmt
    .......
    | variable_init_decl    { PARSE_ERROR("A interface can't contain variables"); }
    ........
;

and this is called rule 36 by bison (snippet from .output file):

   29 class_native_stmt: access_decl
   30                  | using_decl
   31                  | static_mod_opt variable_uninit_decl
   32                  | access_mod_opt enum_decl
   33                  | static_mod_opt function_pure_decl
   34                  | static_mod_opt function_virtual_decl
   35                  | static_mod_opt variable_init_decl
   36                  | state_decl

state 97

   36 class_native_stmt: state_decl .

    $default  reduce using rule 36 (class_native_stmt)


But the yyr1 table contains a value of 2 at index 36 (which caused a invalid location information in @$)

I've patched the entry in the resulting file to generate correct error messages but I can't be sure that this manual patching will cause other errors and it's inpracticable. Is there a way to fix this ?
I'm using bison from CVS from 16okt2003.

Ciao Matthias Mann

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


reply via email to

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