Hello,
I've been using the C target for a few days. I haven't encounter any
major problems, except this one:
if you take the following dummy grammar:
> grammar g;
> options { language = C; }
> @parser::includes
> { #include "foo.hh" }
>
> prog : stat ;
>
> stat returns [ foo f ] : 'BAZ' ;
>
> WS : (' '|'\t'|'\n'|'\r')+
> {$channel=HIDDEN;} ;
(foo is a C++ struct)
the generated C code is:
> static foo
> stat(pgParser ctx)
> {
> foo f = NULL;
> ...
> }
It raises an error at compilation since foo cannot be affected a NULL
pointer.
Is there a way to specify that the 'f' variable in the 'stat' rules
should be initialized with a specific value?
Thanks,
----------
Alexandre Hamez
[email protected]
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---