twlevo <[EMAIL PROTECTED]> writes:
> /* line 372, 536, 542 scan-gram.l the {splice} */
>
> %{
> /* user code */
> /
>
> *
>
> this is example of c comment because of that {splice}
>
> * /
>
> / / c++ example
>
> %}
> %%
> prog:
> ;
> %%
>
> /* correct that handling of c and c++ comments needed ? */
I don't see the bug here. {splice} is (\\[ \f\t\v]*\n)*, and this
matches only possibly-empty sequences of backslash-newlines, where
non-newline white space is allowed between the backslash and the
newline. Your example doesn't have any backslashes, so in it {splice}
can only match the empty string.
To see {splice} in action, consider this grammar:
%{
/* user code */
/\
\
*
this is example of c comment because of that {splice}
%} still in a comment
*\
\
/
/\
/ c++ example \
%} still in a comment
%}
%%
prog:
;
%%