Related articles |
---|
java CUP contradiction brienin2@tcnj.edu (Scott) (2001-04-30) |
From: | Scott <brienin2@tcnj.edu> |
Newsgroups: | comp.compilers |
Date: | 30 Apr 2001 00:53:56 -0400 |
Organization: | Excite@Home - The Leader in Broadband http://home.com/faster |
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
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?
Thank you,
Scott Briening
brienin2@tcnj.edu
Return to the
comp.compilers page.
Search the
comp.compilers archives again.