CSCI 434T
Compiler Design
Home | Schedule and Assignments | Resources
source ~freund/share/setup434This script just configures Eclipse to use the right version of Java. Open a new terminal window. To verify it is set up correctly, type:
alias eclipseYou should see
alias eclipse='env JAVA_HOME= /opt/eclipse/eclipse -vmargs -Dosgi.locking=none'
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.) You may be prompted with a dialog about "Scala Diagnostics". Just click "Yes" followed by "Ok". Then click the "Workbench" 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 "Console" 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 "Finish", enter your username and password if prompted, and press "Ok". You will also be asked for a new "Master Password". Eclipse stores your password so you don't need to type it in every time you connect to the reposityro. To make this secure, Eclipse uses the "Master Password" to encrypt your Unix password.
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).