Lab 1 Resources
Textbook
Development
- Linux Mint - a modern,
elegant and comfortable operating system which is both powerful and easy
to use.
- Ubuntu
Linux - download page
- Windows - how to set up your Windows laptop for use on the projects:
- Download and install Cygwin,
and select flex, bison, gcc, and make to be installed as well as all of the
defaults. Have it install in the default C:\cygwin directory and
have it cache the "packages" it downloads in a subdirectory of that,
such as C:\cygwin\pkgs. It can
take as much as an hour to download and install, but is worth the
wait.
- Once installed, open a Cygwin command window (from the Start
menu or Desktop icon) and navigate to the directory where your
project files are. Type "make" and everything should compile!
- Note that you can still use any editor you want to write and
edit your code, you just need to be in a Cygwin command window to
have access to make, flex and bison (as well as lots of other Linux
commands).
- Using yylineno in scanner and
parser in order to display the current line number in error messages,
for instance: Inside the scanner file (filename.l) add the following:
%option yylineno, then recompile (you
may need to run "make clean" first).
(Thanks to Allison Husk for the pointer)
Scanning
Parsing
-
Bison - parser
generator manual
Video Lectures
Parsing
Grammars
Other Code Generation Tools
Other Compiler Development Tools
-
Java JDK
(recommended Java SE 6 Update 23)
- Eclipse
(recommended Eclipse IDE for Java Developers)
- JFlex
(recommended jflex-1.4.3.zip)
- JavaCUP
(recommended CUP 11a beta 20060608, executable standalone Jar-package)
Other Documentation
- JFlex -
lexical scanner generator
-
JavaCUP - parser generator
- Ant - build
file automation
- Yacc - Yet Another
Compiler Compiler (Wikipedia article)
|