[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: confusing bison error
From: |
Christian Schoenebeck |
Subject: |
Re: confusing bison error |
Date: |
Fri, 27 Nov 2020 12:27:39 +0100 |
On Freitag, 27. November 2020 11:20:29 CET Jot Dot wrote:
> I learned to distrust Flex's handling of comments when they are in column 0.
>
> Yea, I'm starting to notice "something is up" with the first column.
Like Akim pointed out, you should never place comments on the first column in
Flex's rules section (i.e. the entire scope after %% ), because Flex would
interpret them as patterns.
A good editor usually immediately points you at such errors by at least syntax
highlighting them as RegEx patterns instead of comment highlighting. So just
prepend a space character in front of those comments and that's it.
> FWIW, I prefer to explicitly "continue;" in these cases.
>
> I'm a flex/bison newbie. Can you explain? (Not sure of "continue"). Any
> additional info is always welcome. I don't have any preferences since I
> just started with the idea of using something like flex/bison in my code.
> Before that, it was just some abstract concepts floating in my head. Well,
> not totally true. A couple years back I tried ANTLR but it was way too
> bug-ridden to be of any use. And the bug-report end was a bit uncaring and
> hostile imo. I wasted too much time with it.
Please do us all a favour and use quote characters when you are quoting
somebody in your emails. It's unnecessary to let people decipher who wrote
what, as any email client can do that for you automatically, including the one
you are using there.
Best regards,
Christian Schoenebeck