Links for labs

  1. Lab 1: Work on assignment 1. You can also practice Regular expression in Grep .
  2. Lab 2: Finish A1
  3. Lab 3: Start A2. JLex installation instructions, JLex lecture slides (pdf), simple.lex, mylexer2.lex, english.lex
  4. Lab 4: Finish A2.
  5. Lab 5: JavaCup
  6. Lab 6: Finish A3.
  7. Lab 7, 8: A4.
  8. Lab 9, 10: Recursive descent parser RecursiveDescent.java    Symbol.java  Calc3Scanner.java Calc2Symbol.java

Assignments

links for assignments

Other resources

Course Outline

This course covers both pragmatic and theoretical aspects of grammars, recognizers, and translators for computer languages. The theoretical aspect contains regular language, context free language, finite state machine, different paring techniques including recursive descent parsing, LL(1), SLR, LALR, and LR(1) parsing. The practical aspect contains automatic generation of scanners using a scanner generator JLex, automatic parser generation using parser generator JavaCUP, and language translation techniques. The prerequisites are 03-60-212, 03-60-140, 03-60-104, and 03-60-100. All the assignments will use Java, hence you should have a solid knowledge in Java programming. After this course, you will be able to understand grammars, write grammars, write parsers according to a grammar, and write a translator between different languages. Attendance in lectures and labs is very important to be successful in this course - students who do not attend lectures and labs generally score very low on exams and assignments. You must keep up with the material as the semester progresses.

Textbook

We will follow Chpaters 1-5, and some of Chpaters 6 and 7 of the following book :