Menu

#9 Don't edit JavaCC output files

open
common code (8)
5
2003-12-30
2003-11-16
Tom Morris
No

The build process should run JavaCC if necessary to
create the .java files from LinesParser.jj and the
resulting Java files shouldn't be edited unless
absolutely necessary.

The current practice of directly editing
LinesParser.java makes it impossible to regenerate if
LinesParser.jj changes. There is at least one bug fix
and several enhancements which will require editing the
LinesParser.jj.

Discussion

  • Daniel Kionka

    Daniel Kionka - 2003-11-17

    Logged In: YES
    user_id=325184

    Can you explain what JavaCC is and where I can get it?

     
  • Tom Morris

    Tom Morris - 2003-11-29
    • labels: --> 589532
    • assigned_to: nobody --> tfmorris
     
  • Tom Morris

    Tom Morris - 2003-11-29

    Logged In: YES
    user_id=788730

    This is partially fixed. LinesParser.jj has been updated to
    incorporate changes to the hand edited .java files and work
    has begun to run JavaCC as part of the build process. This
    can be closed when that work is complete.

    JavaCC is a "compiler compiler" currently available from
    https://javacc.dev.java.net/ The current version is 3.2
    (vs. the pre-1.0 version that was used to generate the .java
    files in CVS)

     
  • Tom Morris

    Tom Morris - 2003-12-30
    • assigned_to: tfmorris --> dkionka
     
  • Tom Morris

    Tom Morris - 2003-12-30

    Logged In: YES
    user_id=788730

    Although I added this to the Ant build prototype, it should
    still be fixed even if the team stays with the current make
    based build procedure.

    The following files should be deleted from CVS and generated
    at build time from LinesParser.jj using JavaCC:

    LinesParser.java
    LinesParserConstants.java
    LinesParserTokenManager.java
    SimpleCharStream.java (or JavaCharStream.java)
    Token.java
    TokenMgrError.Java

    The first three will change any time LinesParser.jj changes.
    The last three are constant for all parsers generated by a
    given version of JavaCC.

    I've assigned this to dkionka since I don't deal with the
    build process.

     
  • Daniel Kionka

    Daniel Kionka - 2003-12-30
    • labels: 589532 --> common code
     

Log in to post a comment.