[Dbc-talk] dbc parser errror
Charles Mills
cmills at freeshell.org
Tue Feb 7 00:21:04 EST 2006
On Jan 30, 2006, at 1:11 AM, sebastian wrote:
> hi,
> i am again working with dbc in my project and encountered another
> parser
> error - prob occures with empty structs in typedef:
>
> typedef struct {
> } CPU_Interrupt_frame;
>
> dbc.c:3: parse error on "}"
>
>
> regards,
> seb
> _______________________________________________
> Dbc-talk mailing list
> Dbc-talk at rubyforge.org
> http://rubyforge.org/mailman/listinfo/dbc-talk
Perhaps the following will fix:
cvs diff -u ctype.y
Index: ctype.y
===================================================================
RCS file: /var/cvs/dbc/caphir/src/ctype.y,v
retrieving revision 1.2
diff -u -r1.2 ctype.y
--- ctype.y 10 May 2005 17:17:13 -0000 1.2
+++ ctype.y 7 Feb 2006 05:07:44 -0000
@@ -337,6 +337,10 @@
{ result = CType::StructUnion.get(val[0],
nil, val[2]) }
| struct_or_union struct_or_union_or_enum_name
{ result = CType::StructUnion.get(val[0], val
[1]) }
+ | struct_or_union struct_or_union_or_enum_name '{' '}'
+ { result = CType::StructUnion.get(val[0], val
[1], []) }
+ | struct_or_union '{' '}'
+ { result = CType::StructUnion.get(val[0],
nil, []) }
;
# these are the members of the struct
-Charlie
More information about the Dbc-talk
mailing list