School of Computer Science     University of Windsor

03-60-214: Computer Languages, Grammars and Translators (Winter 2007)
[Home] [Assignments] [Lecture Slides] [Resources] [Calendar] [Find your marks]

[Tiny Language]
[javaCup Installation]

[Home]
[Up]

 

 

 

Instructions for running JavaCup

  1. Go to JavaCUP web site (http://www.cs.princeton.edu/~appel/modern/java/CUP/), download the tar file if you are using unix, or download the zip file if you are using windows.
  2. You can also click this to get the javaCup tar file.
  3. unzip the the tar file.
    bulletIn unix:
    bulletIf it is a gz file, run gunzip *.gz
    bulletif it is a  tarfile, run tar -xvf *.tar

  4. To run your javaCup, in the directory that is one layer above java_cup,  type java java_cup.Main < yourCupFile
  5. The above command will generate the parser.
  6. You can also look at the bat files calc.bat and calc2.bat, to see the sequence of command to run the program. Note that JLex package should be also under your current directory. You can run those commands in sequence automatically by typing "calc" in windows,  or typing ".\calc.bat" in unix and change the access mode by typing "chmod 755 calc.bat".
  7. Note the difference between unix and windows, especially in lex file. You need to change the newline symbol \r\n in windows to \n in unix. 

Instructor: Dr. Jianguo Lu     Email: jlu at uwindsor  Office: 5111 Lambton Tower        Phone: 519.253.3000 ext 3786


Last updated: March 04, 2007.