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
CUP.
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:
%eofval{
return new Symbol(sym.EOF);
%eofval}
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?
Sikter 0 Newbie Poster
masijade 1,351 Industrious Poster Team Colleague Featured Poster
Sikter 0 Newbie Poster
masijade 1,351 Industrious Poster Team Colleague Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.