Unformatted text preview: of the
speciﬁcation in an appropriate speciﬁcation language.
regular expressions Scanner
Spec grammar semantic rules Parser
Spec Parser Interpreter tokens Scanner
text syntax tree Front End answer Sometimes you can automatically generate the component from the speciﬁcation
(scanners, parsers), sometimes it’s impossible; occasionally it’s possible but better
to do it by hand. But usually it’s better to use a tool.
There are standard tools for generating scanners and parsers; we will use our own
tool, called SLLGEN, for that.
We will, however, write our interpreters by hand, in Scheme.
It’s always important to distinguish between a language we are studying or implementing, sometimes called the object language, and the language we use to
implement it, called the implementation language. We will have many small object languages, but our implementation language will always be Scheme. 3 1.2 The Four Questions
When looking at a language, we will always ask four questions. As we proceed
through the course, we will ask these questions in more and more sophisticated
ways; I’ll show some of these subquestions now, even...
View Full Document
- Fall '09
- Data Structures, eopl, ¡§ £¡, Dr. Wand