GitXplorerGitXplorer
o

writing-compilers-and-interpreters

public
3 stars
4 forks
0 issues

Commits

List of commits on branch master.
Unverified
31b1805284cbf8bff7153e9ed4376b9e16791dc0

Fixing number token

oobject88 committed 6 years ago
Unverified
69f086a3da7e89bf78d8945093ff932a13dc0c1d

Fixing output bugs

oobject88 committed 6 years ago
Unverified
3dfe801a3ddf4ee77fc8060f177ebba5130efff2

Fixing token scanning issues

oobject88 committed 6 years ago
Unverified
5aab72207bdbf9e0c6f29c2aecb05e0313afd03d

Added ErrorToken

oobject88 committed 6 years ago
Unverified
051902392bf6897545eb6630cb4b28164dc86fe3

Adding NumberToken

oobject88 committed 6 years ago
Unverified
ee39c9779d19baffa84a865707fa27ba67e22ae4

Adding word, string, symbol tokens

oobject88 committed 6 years ago

README

The README file for this repository.

Writing Compilers And Interpreters

This project is an attempt to work through Ronald Mak's book, "Writing Compilers and Interpreters" (3rd ed., 2009), using the Go programming language.

Like the book's original content, this project is designed to compile and interpret the Pascal programming language. Or, more pointedly, to learn the mechanics behind compiling and interpreting a programming language.

Certain changes have been made, which should not have any impact on the content of the work. In particular, Steve Francia's cobra package is used to handle command line parsing.

Other changes are natural occurances due to the differences between Go and Java.

  • Go has no exceptions, while Java depends on them extensively. The Go code in this project depends heavily on returned error instances, which changes the signature of functions. We have to be mindful of how this effects the logical flow of the functions themselves.
  • Implementations of Message know how to format themselves as strings