GitXplorerGitXplorer
o

writing-compilers-and-interpreters

public
3 stars
4 forks
0 issues

Commits

List of commits on branch master.
Unverified
4a129e2e8c7790e0cd179a1ab109fcf591744442

Unexport error code creation

oobject88 committed 6 years ago
Unverified
ac7d8eda344125ff50ec0de608542560388e04ad

Rename pascalTokenType to tokenType

oobject88 committed 6 years ago
Unverified
24f91e691280b59a761ff05256f5fc8d9d0180dd

Renaming files for reduced stutter

oobject88 committed 6 years ago
Unverified
365312980ccbf0d46a0f31ec0905c5d8bfc180f2

Reducing stuttering

oobject88 committed 6 years ago
Unverified
187dc78ce6369b02fca10a5fc683918eb57b29c9

Struct renaming

oobject88 committed 6 years ago
Unverified
8785a322a1456bc3cc3642d5ca0cd9db3b6be4bf

Introducing some error codes

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