[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bison splice
From: |
Paul Eggert |
Subject: |
Re: bison splice |
Date: |
Tue, 03 Jan 2006 23:21:50 -0800 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) |
twlevo <address@hidden> 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:
;
%%
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: bison splice,
Paul Eggert <=