Presentation is loading. Please wait.

Presentation is loading. Please wait.

Download TPL.zip to some directory

Similar presentations


Presentation on theme: "Download TPL.zip to some directory"— Presentation transcript:

1 An example for setting up an Eclipse project an running the TPL project

2 Download TPL.zip to some directory
Extract files Download TPL.zip to some directory

3 Start a new Java project

4 Specify the TPL directory

5 Browse for the directory and choose it

6 Make sure you chose the right directory (not the sub-direcitory src/TPL)
Click next

7 The folders tree should look like this

8 Click on the ‘Libraries’ tab
Add the java_cup.runtime jar file

9 Choose the jar file from the lib sub-directory

10 Make sure the jar file is successfully added

11 Let’s change the default output directory from ‘bin’ to ‘classes’
Let’s change the default output directory from ‘bin’ to ‘classes’. This is done to match the output directory specified in build.xml

12 After change

13 Compiler signals an error because Lexer does not exist – we need to generate it

14 Open a command line and go to the TPL directory
Run ant with the ‘scanner’ target

15 Now Lexer.java exists under src/TPL

16 Run ant with the ‘classes’ target to compile all sources
Run Main on prog.tpl, specifying that the CLASSPATH should contain the /classes sub-directory and the java-cup-runtime jar file The scanner signals a lexical error in line 0 since it include a comment and TPL.lex does not identify comments as tokens (yet)


Download ppt "Download TPL.zip to some directory"

Similar presentations


Ads by Google