Skip to content
Browse files

ascii art output

  • Loading branch information...
1 parent a34a966 commit b8b4167afed0638b8c9c790aae4788f049fb09d0 bkerley committed Aug 28, 2008
Showing with 7 additions and 1 deletion.
  1. +7 −1 doc/semantic_interpretation.markdown
View
8 doc/semantic_interpretation.markdown
@@ -19,7 +19,13 @@ Matches:
Output from a parser for this grammar looks like this:
-![Tree Returned By ParenLanguageParser](./images/paren_language_output.png)
+ "(((a)))"
+ / | \
+ "(" "((a))" ")"
+ / | \
+ "(" "(a)" ")"
+ / | \
+ "(" "a" ")"
This is a parse tree whose nodes are instances of `Treetop::Runtime::SyntaxNode`. What if we could define methods on these node objects? We would then have an object-oriented program whose structure corresponded to the structure of our language. Treetop provides two techniques for doing just this.

0 comments on commit b8b4167

Please sign in to comment.
Something went wrong with that request. Please try again.