-
Book Overview & Buying
-
Table Of Contents
Building Programming Language Interpreters
By :
Creating a parser is an exercise in translating a sequence of tokens into a hierarchical data structure that represents the syntax of the language. This does not yet describe how the code will run, but it’s an important step before that.
The first step is identifying what the data types are that you will need in your parse tree, and how the semantics of the language syntax are going to be represented in those objects.
That is going to be directly connected with the grammar for the language. It’s important to explore the language definition in a way that is simple to get a complete picture. You may identify deficiencies at that point, and it’s easier to make any changes before you actually implement the parser.
When writing a parser, it’s important to evaluate all the different options that you have for existing libraries, their benefits, and their caveats. There are different kinds of grammars that require different levels of sophistication...
Change the font size
Change margin width
Change background colour