java CUP contradiction

Scott <>
30 Apr 2001 00:53:56 -0400

          From comp.compilers

Related articles
java CUP contradiction (Scott) (2001-04-30)
| List of all articles for this month |

From: Scott <>
Newsgroups: comp.compilers
Date: 30 Apr 2001 00:53:56 -0400
Organization: Excite@Home - The Leader in Broadband
Keywords: Java, question
Posted-Date: 30 Apr 2001 00:53:56 EDT

Hello! I'm in a dilly of a pickle here and can't seem to get any
answers on the web. My problem is one of EOF token recognition with

When I define EOF as one of my terminals, CUP complains:

Duplicate terminal (EOF) created

So, I take it out, and CUP complains:

Error at 86(24): java_cup.runtime.Symbol "EOF" has not been declared

So what's this all about? Everything else works just fine if I remove
all references to that evil and allusive EOF symbol. The parse works
its way through, but then craps out due to a null pointer exception at
the end of file.

I am using JLex with the %cup compatibility flag and have the standard:

return new Symbol(sym.EOF);

in my lex file.

Can anyone offer any suggestions on how to proceed? Or point me in the
direction of someone or someplace that could give me a few suggestions?

Thank you,
Scott Briening

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.