objc-parse.y and bison 1.875
Theodore Papadopoulo
Theodore.Papadopoulo@sophia.inria.fr
Tue Jan 14 16:08:00 GMT 2003
I'm certainly not an objc specialist, but the following patch cures
the reduce/reduce problem and I believe it does not change the syntax...
Index: c-parse.in
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/c-parse.in,v
retrieving revision 1.155
diff -c -3 -p -r1.155 c-parse.in
*** c-parse.in 10 Jan 2003 02:21:58 -0000 1.155
--- c-parse.in 14 Jan 2003 15:59:38 -0000
*************** classdef:
*** 2848,2854 ****
;
protocoldef:
! PROTOCOL identifier protocolrefs
{
objc_pq_context = 1;
objc_interface_context
--- 2848,2854 ----
;
protocoldef:
! PROTOCOL identifier non_empty_protocolrefs
{
objc_pq_context = 1;
objc_interface_context
*************** protocoldef:
*** 2860,2872 ****
finish_protocol(objc_interface_context);
objc_interface_context = NULL_TREE;
}
! /* The @protocol forward-declaration production introduces a
! reduce/reduce conflict on ';', which should be resolved in
! favor of the production 'identifier_list -> identifier'. */
! | PROTOCOL identifier_list ';'
! {
! objc_declare_protocols ($2);
! }
;
protocolrefs:
--- 2860,2869 ----
finish_protocol(objc_interface_context);
objc_interface_context = NULL_TREE;
}
! | PROTOCOL identifier_list
! {
! objc_declare_protocols ($2);
! }
;
protocolrefs:
--------------------------------------------------------------------
Theodore Papadopoulo
Email: Theodore.Papadopoulo@sophia.inria.fr Tel: (33) 04 92 38 76 01
--------------------------------------------------------------------
More information about the Gcc-bugs
mailing list