|JavaCC in teaching email@example.com (Johannes Waldmann) (2004-12-16)|
|Re: JavaCC in teaching firstname.lastname@example.org (Etienne Gagnon) (2004-12-17)|
|Re: JavaCC in teaching email@example.com (Alexey Demakov) (2004-12-17)|
|Re: JavaCC in teaching firstname.lastname@example.org (Mayan Moudgill) (2004-12-19)|
|Re: JavaCC in teaching email@example.com (2004-12-22)|
|From:||firstname.lastname@example.org (Des Watson)|
|Date:||22 Dec 2004 01:06:17 -0500|
|Organization:||Janet Usenet Reading Service.|
|Posted-Date:||22 Dec 2004 01:06:17 EST|
Johannes Waldmann (email@example.com) wrote:
: What is your opinion on using JavaCC in teaching?
I've been using JavaCC in a final year compiler design course at the
University of Sussex for some years. Its use forms a part of an
exercise to build a compiler for a small C-like language targeted to a
simple register-based machine (although some students develop code
generators for "real" architectures). The source language changes
from year to year.
: I consider using JavaCC as an example in my compiler construction
: course, effectively replacing flex/bison.
Yes - I used to use flex/bison for this exercise.
: While the "classical" tools are well covered in standard textbooks,
: is there similar coverage for JavaCC somewhere? .
The documentation on the web together with the examples in the
distribution seems to be more than adequate - I talk about the general
principles in the lectures and the students are happy to research all
the details themselves.
: Any pointers and comments appreciated (especially from teachers).
These students have already been exposed to traditional hand-written
top-down predictive parsers. This JavaCC exercise aims to give them
some (limited) experience of one of the many compiler construction
tools, to show that with these tools it may be possible to parse large
grammars without too much pain and to give them a better insight into
top-down parsing (they all tend to have to think carefully about
lookahead!). I find that with the larger compiler construction
exercises that require code to be written from scratch, students often
get overwhelmed by the detail in the limited time they have available
- using an appropriate parser generator helps them to produce
something that they are more likely to be proud of.
Return to the
Search the comp.compilers archives again.