From 9daf4133bf6f61cbe3787a46b021d261242a85f0 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 19 May 2007 08:34:02 +0100 Subject: add tagwall --- tw/lang/TW_lang.php | 183 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 183 insertions(+) create mode 100644 tw/lang/TW_lang.php (limited to 'tw/lang/TW_lang.php') diff --git a/tw/lang/TW_lang.php b/tw/lang/TW_lang.php new file mode 100644 index 000000000..2c962213a --- /dev/null +++ b/tw/lang/TW_lang.php @@ -0,0 +1,183 @@ +signature = "TW"; + $this->version = "1.0"; + $this->initial_state="OUT"; + $this->states = + array + ( + "OUT" => array ( + array( + "<" => array("T_tagWall",0), + + //"&" => array("VChar",0), // validate char (currently not implemented in base) + ), + + PF_CLEAN, // PF_CLEAN - znaky sa forwarduju na vystup + 0,0 + ), + + "T_tagWall" => array ( + array( + "ALPHA" => array("T_begin",1), // normal tag + "/" => array("T_Cbegin",0), // close tag + "<" => array("T_tagWall",1), // '<<<<<<<<' fix (faster than _RET) + "!--" => array("HTML_comment",0), + "_ALL" => array("_RET",0), // ' array ( + array( + "ALPHA" => array("T_gettag",1), + "_ALL" => array("_RET",0), + ), + PF_XIO | PF_XDONE, 0,0 + ), + + + "T_begin" => array ( + array( + "ALPHA" => array("T_gettag",1), + "_ALL" => array("_RET",0), + ), + + PF_XIO | PF_XDONE, 0,0 + ), + + + "T_gettag" => array ( + array( + "!ALNUM"=> array("T_in",1), + ), + + PF_XIO | PF_XDONE | PF_XNEW, 0,0 + ), + + + "T_in" => array( + array( + "ALPHA" => array("A_begin",1), // char back to stream + ">" => array("_RET",0), + "/>" => array("_RET",0), // pozor na spracovanie v T_begin + ), + + 0,0,0 + ), + + "A_begin" => array ( + array( + "!ALPHA"=> array("V_begin",1), + ">" => array("_RET",1), // vracia string do streamu + "/>" => array("_RET",1), // pozor na spracovanie v TAGbegin + ), + + PF_XIO | PF_XDONE | PF_XNEW , 0,0 + ), + + // this is wide attribute=value implementation + "V_begin" => array ( + array( + '"' => array("VALUE1",0), + "'" => array("VALUE2",0), + "ALNUM" => array("VALUE3",1), + + ">" => array("_RET",1), + "/>" => array("_RET",1), + ), + + PF_XIO | PF_XDONE, 0,0 + ), + + // "DOUBLEQUOTED VALUE" + "VALUE1" => array( + array( + '"' => array("_RET",0), + ), + PF_XIO, 0,0 + ), + + // 'SINGLEQUOTED VALUE' + "VALUE2" => array( + array( + "'" => array("_RET",0), + ), + PF_XIO, 0,0 + ), + + // UNQUOTEDVALUE99 + "VALUE3" => array( + array( +/* "_" => array ("VALUE3",0), //Uncomment for better HTML4 compatibility (not recommended) + "." => array ("VALUE3",0), +*/ + "-" => array ("VALUE3",0), + "!ALNUM"=> array("_RET",1), + ), + PF_XIO, 0,0 + ), + + // all comment content will be removed + "HTML_comment" => array( + array( + "-->" => array("_RET",0), + ), + 0,0,0 + ), + ); + + $this->keywords=null; + } +} +?> \ No newline at end of file -- cgit v1.2.3