1April 14, 2002: 2 3I haven't worked on Yapps for a while, mainly because I spent all my energy 4on trying to graduate. Now that I've finished school, I have several projects 5I want to start working on again, including Yapps. 6 7Notes for myself: 8 9Add a debugging mode that helps you understand how the grammar 10 is constructed and how things are being parsed 11Look into an English output mode that would use natural language 12 to describe a grammar 13Optimize unused variables 14Add a convenience to automatically gather up the values returned 15 from subpatterns, put them into a list, and return them 16Improve the documentation 17Write some larger examples 18Get rid of old-style regex support 19Use SRE's lex support to speed up lexing (this may be hard given that 20 yapps allows for context-sensitive lexers) 21Look over Dan Connoly's experience with Yapps (bugs, frustrations, etc.) 22 and see what improvements could be made 23Add something to pretty-print the grammar (without the actions) 24Maybe conditionals? Follow this rule only if <condition> holds. 25 But this would be useful mainly when multiple rules match, and we 26 want the first matching rule. The conditional would mean we skip to 27 the next rule. Maybe this is part of the attribute grammar system, 28 where rule X<0> can be specified separately from X<N>. 29Convenience functions that could build return values for all rules 30 without specifying the code for each rule individually 31Patterns (abstractions over rules) -- for example, comma separated values 32 have a certain rule pattern that gets replicated all over the place 33"Gather" mode that simply outputs the return values for certain nodes. 34 For example, if you just want all expressions, you could ask yapps 35 to gather the results of the 'expr' rule into a list. This would 36 ignore all the higher level structure. 37Look at everyone's Yapps grammars, and come up with larger examples 38 http://www.w3.org/2000/10/swap/SemEnglish.g 39 http://www.w3.org/2000/10/swap/kifExpr.g 40 http://www.w3.org/2000/10/swap/rdfn3.g 41It would be nice if you could feed text into Yapps (push model) instead 42 of Yapps reading text out of a string (pull model). However, I think 43 that would make the resulting parser code mostly unreadable 44 (like yacc, etc.). Coroutines/stacklesspython may be the answer. 45 46 47

