title: java_cup.runtime.Symbol "EOF" has not been declared
body: <p>I have alreay read <a href="https://stackoverflow.com/questions/22772799/parse-eof-token-in-cup">this</a> discussion, but it didn't help me.</p>
  <pre><code>start with file;
  file ::= primario SEP secondario SEP terziario EOF {:fm.scriviDebug();:};
  </code></pre>
  <p>Where <code>fm.scriviDebug()</code> is a my custom class that prints on stdout what CUP parsed.</p>
  <p>I have no idea where is the problem.</p>
  <h3>Some infos:</h3>
  <hr />
  <p>I use JFLex to scan a file and passing symbols to CUP in the following way:</p>
  <pre><code>...
  {bo} {System.out.println(&quot;[BO] [&quot;+yytext() +&quot;]&quot;);return symbol(sym.BO);}
  {bc} {System.out.println(&quot;[BC] [&quot;+yytext() +&quot;]&quot;);return symbol(sym.BC);}
  {sc} {System.out.println(&quot;[SC] [&quot;+yytext() +&quot;]&quot;);return symbol(sym.SC);}
  {eq} {System.out.println(&quot;[EQ] [&quot;+yytext() +&quot;]&quot;);return symbol(sym.EQ);}
  ...
  </code></pre>
  <hr />
  <p>I get more than one warning of the following type:</p>
  <pre><code>Warning in file &quot;Scanner.jflex&quot; (line 115):
  Expression matches the empty string, which may lead to non-termination.
     .*  {
  </code></pre>
  <hr />
  <p>This is what I get while &quot;compiling&quot; CUP:</p>
  <pre><code>Opening files...
  Parsing specification from standard input...
  Error at 63(73): java_cup.runtime.Symbol &quot;EOF&quot; has not been declared
  Closing files...
  ------- CUP v0.10k Parser Generation Summary -------
  1 error and 0 warnings
  20 terminals, 14 non-terminals, and 18 productions declared,
  producing 0 unique parse states.
  0 terminals declared but not used.
  0 non-terminals declared but not used.
  0 productions never reduced.
  0 conflicts detected (0 expected).
      No code produced.
  ---------------------------------------------------- (v0.10k)
  </code></pre>
  <hr />
  <p>Another error after compiling CUP fails:</p>
  <pre><code> cannot find symbol
             { return new java_cup.runtime.Symbol(sym.EOF); }
  </code></pre>
  <hr />
  <p>Please, tell me if more info are required.</p>