Menu

#97 No error message when name/classname mismatch

jflex bug
closed-invalid
5
2008-07-27
2008-07-14
No

JFlex does not throw an error message when the name of the .flex file does not match the name on the %class line.

filename: foo.flex
%class Bar

It just says BUILD SUCCESSFUL, but there is no output.

Discussion

  • Chris Cleveland

    Chris Cleveland - 2008-07-14

    Logged In: YES
    user_id=68865
    Originator: YES

    Sorry, I think the BUILD SUCCESSFUL message comes from the Ant script I used to invoke JFlex.

     
  • Gerwin Klein

    Gerwin Klein - 2008-07-27

    Logged In: YES
    user_id=93534
    Originator: NO

    Ok. Just to clear up the issue for anyone else reading the thread: JFlex does not look at the %class directive to derive the file name since it is legal in Java to have more than one class in one file. Instead the .java name is derived from the .flex file name. Usually you want these to be equal to %class.

     
  • Gerwin Klein

    Gerwin Klein - 2008-07-27
    • milestone: --> jflex bug
    • status: open --> closed-invalid