CSCI 434T
Compiler Design
Home | Schedule and Assignments | Resources
source /home/faculty/freund/shared/setup434This script just configures Eclipse to use the right version of Java. Open a new terminal window. You should see output like the following:
Setting up environment for CS 434 --------------------------------- alias eclipse='env JAVA_HOME= eclipse -vmargs -Dosgi.locking=none' Java version: java version "1.5.0" ...
eclipse &If prompted for a workspace name, select the default. (If you already have a workspace, you may wish to create a new one name, for example, workspace434 for this class.) Click the arrow icon in the main window to go to the workspace.
public static void main(String args[]) { System.out.println("first arg: " + args[0]); }Save the file. Eclipse will compile all changed files when you save them, so you never explicitly invoke javac when using Eclipse.
Now, click on the "Arguments" tab and enter "hello cow" in the "Program variables" box.
Now press the "Run" button, and the output to your program should appear in the "Consol" section at the bottom of the Eclipse window.
You can run the program again by selecting "Run -> Run History -> Hello Config" from the menu, or choosing "Hello Config" from the popup list when you click the green circle in the tool bar.
> java Hello hello moo first arg: helloAs always, you can edit the Hello.java file in Emacs if you wish and compile it with javac. However, I encourage you to do all of your editing inside Eclipse, even if you switch to a terminal to run your program (which is how I often work). If you do edit files outside of Eclipse, you should refresh the project inside Eclipse by clicking on the project name in the Package Explorer and selection "File -> Refresh" and then "Project -> Clean..." from the menu.
durham:~] svnadmin create svn434 durham:~] chmod o-rwx svn434 durham:~] chmod g+rwx svn434 durham:~] chgrp -R cs434a svn434These commands set up the repository so only your project partners can access it. You will have group names other than cs434a. I will provide your group name.
svn+ssh://eringer.cs.williams.edu/home/cs-students/XXX/svn434where XXX is the user name of your group member who created the repository. Click ok, enter your password if prompted, and press ok again.
Reading "ic/lex/ic.flex" Constructing NFA : 4 states in NFA Converting NFA to DFA : . 3 states before minimization, 2 states in minimized DFA Writing code to "ic/lex/Lexer.java"This is JFlex generating your scanner (which also happens automatically inside your Eclipse project).