| Origin: |
Grand 98 (see also Interpreter Gof 95) |
| Reason: |
To provide text-based interaction with a program.
|
| Synopsis: |
Parse, compile, and/or interpret a formal language.
|
| Example: |
To search records in a data structure keywords that occur
in a record are combined by logical connectives such as
and, not, etc.
|
| Solution: |
| Lexer |
The class or set of classes that produces a stream of
Tokens from the source code.
|
| Parser |
The class or set of classes that builds the AST
from the stream of Tokens.
|
| Token |
An abstract class and a set of concrete classes that
provide an internal representation of the lexical
components of the source code.
|
| AST |
An abstract class and a set of concrete classes that
provide an internal representation of the structure
of the source code.
|
|
| See also: |
Composite
(an AST is often a Composite object)
Visitor
(used to process the AST)
|