I have this simple Bison JFLEX parser : http://pastebin.com/SNB20y7G

I ran jflex parser.flex ( this is how my file is called) obtained a class called TuringLexer.java When I try to compile it with javac TuringLexer.java I get this:

$ javac TuringLexer.java
TuringLexer.java:482: cannot find symbol
symbol  : class Yytoken
location: class TuringLexer
  public Yytoken yylex() throws java.io.IOException {
         ^
1 error

Any clue what the issue might be? Thank you!

有帮助吗?

解决方案

The issue was that I had forgotten to add:

%public
%class TuringLexer
%type Void

instead of just

   %class TuringLexer

now the .java file works aswell

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top