Re: JavaCC and <BOF> (or <SOF>)





You're right, now that I tried it it works fine. Actually I appeared to have a different issue... The string definition was not correct and produced rather strange results. Should have been:

<STRING: (<STRING_CHARS)+ ("-" | <STRING_CHARS>)* >

Right. I didn't look closely enough. You don't need the + on the prefix though. It will be good keep the grammar clean so there is no confusion.

<STRING: (<STRING_CHARS) ("-" | <STRING_CHARS>)* >

should do it.

Sreeni.
.