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?

Yeah, ask at a site that pertains to this JLex and/or CUP thing you're using. I, myself, have never heard of them.

Truth be told, this problem doesn't seem to apply to Java, at all, but rather to these tools that you're using.

Cup and jflex are java tools for syntax and lexical analasys, so i thought this is the place to create a thread, if there's more apropriate place on forum for this kind of issues please admin move the thread. Thx.

Edited 7 Years Ago by Sikter: n/a

Yes, I can see that they are either tools to create Java code, or tools written in Java, but neither of those makes the problem a Java problem.

Looking at the homepage for this "CUP" thing (http://www2.cs.tum.edu/projects/cup/) shows a list of related persons with links to their web pages. At least some of those webpages contain email addresses. I would say to start there.

This article has been dead for over six months. Start a new discussion instead.