[antlr-interest] $ in action comments
Gavin Lambert
antlr at mirality.co.nz
Thu Feb 21 10:53:12 PST 2008
At 06:30 22/02/2008, Ian Moor wrote:
>I have finally tracked down two errors from generating a tree
>parser:
>error(111): pico/Gen.g:16:9: reference to attribute outside of a
>rule: zero
>error(114): pico/Gen.g:454:11: attribute is not a token,
parameter,
>or return value: v0
>
> in the first case there is a // comment in the
members sections
>containing $zero, and in the second case there is a comment in
an
>action containing a $v0.
ANTLR doesn't understand the syntax of the target language, so it
doesn't know what are comments and what aren't. The only things
it looks for are $s (to expand), }s (to terminate the block), and
{s (to avoid terminating too early).
More information about the antlr-interest
mailing list