cvs: pear /HTML_Template_Flexy/Flexy Tokenizer.lex Tokenizer.php /HTML_Template_Flexy/Flexy/Token Tag.php

From: Date: Thu, 06 Feb 2003 06:55:32 +0000
Subject: cvs: pear /HTML_Template_Flexy/Flexy Tokenizer.lex Tokenizer.php /HTML_Template_Flexy/Flexy/Token Tag.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-8729@lists.php.net to get a copy of this message
alan_k Thu Feb 6 01:55:32 2003 EDT Modified files: /pear/HTML_Template_Flexy/Flexy Tokenizer.lex Tokenizer.php /pear/HTML_Template_Flexy/Flexy/Token Tag.php Log: allow cdata tags so I can generate the example for the docs, fix flexyobject, add note where you can get phpLex Index: pear/HTML_Template_Flexy/Flexy/Tokenizer.lex diff -u pear/HTML_Template_Flexy/Flexy/Tokenizer.lex:1.7 pear/HTML_Template_Flexy/Flexy/Tokenizer.lex:1.8 --- pear/HTML_Template_Flexy/Flexy/Tokenizer.lex:1.7 Sun Feb 2 12:04:56 2003 +++ pear/HTML_Template_Flexy/Flexy/Tokenizer.lex Thu Feb 6 01:55:32 2003 @@ -16,14 +16,14 @@ // | Authors: nobody <nobody@localhost> | // +----------------------------------------------------------------------+ // -// $Id: Tokenizer.lex,v 1.7 2003/02/02 17:04:56 alan_k Exp $ +// $Id: Tokenizer.lex,v 1.8 2003/02/06 06:55:32 alan_k Exp $ // // The Source Lex file. (Tokenizer.lex) and the Generated one (Tokenizer.php) // You should always work with the .lex file and generate by // // #mono phpLex/phpLex.exe Tokenizer.lex -// -// +// The lexer is available at http://sourceforge.net/projects/php-sharp/ +// // or the equivialant .NET runtime on windows... // // Note need to change a few of these defines, and work out @@ -239,7 +239,7 @@ <YYINITIAL>{MDO}{TAGC} { /* <!> */ - $this->error(SGML_ERROR,"empty markup tag not handled"); + $this->error(1,"empty markup tag not handled"); return HTML_TEMPLATE_FLEXY_TOKEN_ERROR; } @@ -256,6 +256,9 @@ <YYINITIAL>{MDO}{DSO}{WHITESPACE} { /* <![ -- marked section */ + $this->value = HTML_Template_Flexy_Token::factory('Text',$this->yytext(),$this->yyline); + return HTML_TEMPLATE_FLEXY_TOKEN_OK; + // At the momemnt just ignore this! $this->error(SGML_ERROR,"marked section not handled"); return HTML_TEMPLATE_FLEXY_TOKEN_ERROR; } @@ -263,6 +266,9 @@ <YYINITIAL>{MSC}{TAGC} { /* ]]> -- marked section end */ + $this->value = HTML_Template_Flexy_Token::factory('Text',$this->yytext(),$this->yyline); + return HTML_TEMPLATE_FLEXY_TOKEN_OK; + // At the momemnt just ignore this! $this->error(SGML_ERROR,"unmatched marked sections end"); return HTML_TEMPLATE_FLEXY_TOKEN_ERROR; } Index: pear/HTML_Template_Flexy/Flexy/Tokenizer.php diff -u pear/HTML_Template_Flexy/Flexy/Tokenizer.php:1.9 pear/HTML_Template_Flexy/Flexy/Tokenizer.php:1.10 --- pear/HTML_Template_Flexy/Flexy/Tokenizer.php:1.9 Wed Feb 5 09:35:03 2003 +++ pear/HTML_Template_Flexy/Flexy/Tokenizer.php Thu Feb 6 01:55:32 2003 @@ -16,14 +16,14 @@ // | Authors: nobody <nobody@localhost> | // +----------------------------------------------------------------------+ // -// $Id: Tokenizer.php,v 1.9 2003/02/05 14:35:03 alan_k Exp $ +// $Id: Tokenizer.php,v 1.10 2003/02/06 06:55:32 alan_k Exp $ // // The Source Lex file. (Tokenizer.lex) and the Generated one (Tokenizer.php) // You should always work with the .lex file and generate by // // #mono phpLex/phpLex.exe Tokenizer.lex -// -// +// The lexer is available at http://sourceforge.net/projects/php-sharp/ +// // or the equivialant .NET runtime on windows... // // Note need to change a few of these defines, and work out @@ -1575,12 +1575,15 @@ case 12: { /* <!> */ - $this->error(SGML_ERROR,"empty markup tag not handled"); + $this->error(1,"empty markup tag not handled"); return HTML_TEMPLATE_FLEXY_TOKEN_ERROR; } case 13: { /* <![ -- marked section */ + $this->value = HTML_Template_Flexy_Token::factory('Text',$this->yytext(),$this->yyline); + return HTML_TEMPLATE_FLEXY_TOKEN_OK; + // At the momemnt just ignore this! $this->error(SGML_ERROR,"marked section not handled"); return HTML_TEMPLATE_FLEXY_TOKEN_ERROR; } @@ -1595,6 +1598,9 @@ case 15: { /* ]]> -- marked section end */ + $this->value = HTML_Template_Flexy_Token::factory('Text',$this->yytext(),$this->yyline); + return HTML_TEMPLATE_FLEXY_TOKEN_OK; + // At the momemnt just ignore this! $this->error(SGML_ERROR,"unmatched marked sections end"); return HTML_TEMPLATE_FLEXY_TOKEN_ERROR; } @@ -2256,4 +2262,3 @@ return HTML_TEMPLATE_FLEXY_TOKEN_NONE; } } -?> Index: pear/HTML_Template_Flexy/Flexy/Token/Tag.php diff -u pear/HTML_Template_Flexy/Flexy/Token/Tag.php:1.8 pear/HTML_Template_Flexy/Flexy/Token/Tag.php:1.9 --- pear/HTML_Template_Flexy/Flexy/Token/Tag.php:1.8 Thu Feb 6 01:22:16 2003 +++ pear/HTML_Template_Flexy/Flexy/Token/Tag.php Thu Feb 6 01:55:32 2003 @@ -16,7 +16,7 @@ // | Authors: Alan Knowles <alan@akbkhome> | // +----------------------------------------------------------------------+ // -// $Id: Tag.php,v 1.8 2003/02/06 06:22:16 alan_k Exp $ +// $Id: Tag.php,v 1.9 2003/02/06 06:55:32 alan_k Exp $ /** * A standard HTML Tag = eg. Table/Body etc. @@ -444,9 +444,11 @@ $_HTML_TEMPLATE_FLEXY_TOKEN['activeForm'] = $name; } // override with flexy object - if ($name = $this->getAttribute('FLEXYOBJECT')) { - $_HTML_TEMPLATE_FLEXY_TOKEN['activeForm'] = $name; + if (isset($this->attributes['FLEXYOBJECT'])) { + $_HTML_TEMPLATE_FLEXY_TOKEN['activeForm'] = $this->getAttribute('FLEXYOBJECT'); + unset($this->attributes['FLEXYOBJECT']); } + }

« previous php.pear.cvs (#8729) next »