Menu

Can't make it work on Eclipse 3.4.2

Help
F. Delente
2009-07-11
2013-04-26
  • F. Delente

    F. Delente - 2009-07-11

    Hello.

    My eclipse version is:

    Eclipse Platform
    Version: 3.4.2
    Build id: M20090211-1700

    I can right click on my project and choose a CUP file in New->Other->CUP/LEX Files->New Java-Cup source.

    I am then asked for the source folder, I enter '.', then File name, I enter 'parser.cup', but I can't go on as I can't type anything in Java folder... and I can't use the file browser either, the '...' button is grayed out!

    Any hint? Thanks!

     
    • Pappy

      Pappy - 2009-07-12

      Hi

      It seems you make a frequent mistake by putting everything in one folder. The plugin doesn't support this approach but encourages structured projects.

      Please read carefully the thread http://sourceforge.net/forum/message.php?msg_id=4189198

      Briefly, use separate folders for sources and classes and do not use default package

      Hope this helps.

       
    • F. Delente

      F. Delente - 2009-07-12

      My project had a src folder, and a bin folder for the classes.

      Putting parser.cup and parser.lex in a new etc/ folder partially solved the problem. I still can't specify a package in the dialog; and in parser.lex, the 'import' directives didn't have the package name, hence

      import .ParserSym;

      I had to add them manually in the lex file, and now it seems ok.

      Thanks for your help and your plugin!

       
      • Pappy

        Pappy - 2009-07-13

        The package must be specified at the begining of the CUP/LEX file as in any other JAVA file.

        The field Package which is present in the New* wizard makes sense only there since it is used to generate the initial source.

        Compare with a JAVA source, you specify the package only when you create a new file, then there is no way to change the package name in a properties page, correct?

        Please have a look at the Javacup and JFlex documentation to get a full list of their directives.

         

Log in to post a comment.

MongoDB Logo MongoDB