In other words, the part you'll never read...)

I need to warn you up front that I can be a bit long-winded, so bear with me while I try to describe a bit about what PCCTS is, how you can write parsers and compilers using it, what type of code it will produce, the color of the moon on an October evening and why "42" is such an important number (or so says Douglas Adams.)

Ok. Call me nuts. I just sick of all the whining about how hard it is to learn PCCTS. (So the whining is valid -- it's a bit hard to learn. I only had the cat to whine to.) I remembered learning it a few years ago using the "Advanced Tutorial" but things have changed significantly since then. Back then, I used PCCTS for a compiler course. I loved it and have loved it ever since. I figured, "Hey, I've got a simple compiler written in PCCTS, so why not revise it and write it as a tutorial?" So here it is.

I want this tutorial to really help people, so I'm asking for input. Email me at with any suggestions or comments you may have, and I just might do some more work on this.

History of this document

  • Changed page layouts
  • Added source code from my original compiler project at Hopkins.
  • Finished up pretty-up changes using FrontPage 98 beta.  No new content.
  • Made zip & tgz of new HTML
  • Removed old zips of non-style-sheet pages (the tutorial no longer uses style sheets.)
12/21/96 - part 2 Marathon session time!
  • The recognizer section is now (fairly) complete.
  • The sample code works
  • All code and HTML can be downloaded, complete with makefile and VC++ project file.
12/21/96 - part 1
  • I noticed that the definition of XL didn't really make sense with regard to unary adding operators. The precedence said mult-ops had a higher precedence. So an expression like
      -a * b
    is interpreted as
      -(a * b)
    technically it's a wash, as the expression will evaluate the same anyway. However, logic dictates that a unary op applies to the single thing to its right, so I switched the precedences. Isn't precedence fun!
  • Started this history (Now I'll try to keep a record.)
  • Cleaned up < and > symbols. Some browsers had trouble when I didn't use the symbolic names for them.
  • My birthday, 30 years ago...
  • Put the first part of this tutorial on the web. (So I don't keep good records...)

And now let's talk about the language we'll be compiling.