Great. Can't wait to see how this work. Did you check my markup proposal? http://aikiframework.org/wiki/Aiki_markup_2
Did you consider parser generator? It will do hard work with regular expressions to match the syntax and create that data structure for you. After you finish, I can help to add some of the markup, if your parser will allow, and if you don't create it already. On Wed, 18 Jan 2012 21:49:40 +0100 Roger Martín <[email protected]> wrote: > In new engine, I'm working with two type of parsers > > 1) Replace parser, implement with: > $preParsers = array ( > '/\[\$([a-z0-9_]+)\]/i' => > array( $this, "parse_vars"), > '/\[GET\[([a-z0-9]+)\]\]/i' => > array( $this, "parse_get"), > '/\[POST\[([a-z0-9]+)\]\]/i' => > array( $this, "parse_post"), > "/\(template\(([a-z0-9_]*)\)template\)/Ui" => > array( $this, "parse_template")) ; > .. > foreach ( $preParsers as $pattern => $callback ){ > $widget = preg_replace_callback ( $pattern, $callback, > $widget); } > (yes..that its all) > > > 2) recursive parser > $parsers = array ( > "widget" => "parse_widget", > "permissions" => "parse_permissions", > "view" => "parse_view", > "noaiki" => "parse_noaiki", > "sql" => "parse_sql", > "script" => "parse_script", > "t" => "parse_t", > "__" => "parse_translate"); > ...more complicated. > > In two cases i'm working with a structure of data (or near). Some > improvement must be done..but in future it might allow conditional > (=configurable) loading of different parser. A parser is not a > extension. Extensions are NOT recursive. Their receive arguments. > > First, i must finish my new engine..but i have in mind this > improvement. -- Jakub Jankiewicz twitter: @jcubic www: http://jcubic.pl _______________________________________________ Mailing list: https://launchpad.net/~aikiframework-devel Post to : [email protected] Unsubscribe : https://launchpad.net/~aikiframework-devel More help : https://help.launchpad.net/ListHelp

