Parse tree design
From CSSEMediaWiki
(Difference between revisions)
Line 14: | Line 14: | ||
=== Patterns in Use === | === Patterns in Use === | ||
* DTSTTCPW Design | * DTSTTCPW Design | ||
+ | |||
+ | === Standard Composite Solution === | ||
+ | |||
+ | [[image:parse-tree-sol-basic-composite.png]] | ||
+ | |||
+ | === Wal's Solution === | ||
+ | |||
+ | [[image:parse-tree-sol-wals.png]] | ||
+ | |||
+ | === Wal's Solution Refactored === | ||
+ | |||
+ | [[image:parse-tree-sol-wals-refactored.png]] | ||
=== Downcasting vs No-ops vs [[DBC]] based superclasses === | === Downcasting vs No-ops vs [[DBC]] based superclasses === |
Revision as of 04:12, 7 August 2009
A context free grammar defines a language, e.g.
A parse tree shows how a sentence in the language is structured according to the grammar.
Contents |
Terminology
In parsing lingo a symbol is a name in a grammar. Each symbol is either a terminal or a non-terminal. Non-terminals appear on the left hand side of a grammar production; terminals don't.
Issues Discussed
Around this design we constructed a variety of patterns and discussed them.
Patterns in Use
- DTSTTCPW Design