diff options
author | Luis Ontanon <luis.ontanon@gmail.com> | 2005-07-25 22:02:04 +0000 |
---|---|---|
committer | Luis Ontanon <luis.ontanon@gmail.com> | 2005-07-25 22:02:04 +0000 |
commit | 1ca8874eda99120490069d0d297398a80f473d4b (patch) | |
tree | 1e3ad1a9a5cd6ccd48bfbc1dea3d104c16bcadde | |
parent | 93a73781ee6fb77a84bfbf41a7e879daae49f731 (diff) | |
download | wireshark-1ca8874eda99120490069d0d297398a80f473d4b.tar.gz |
rename OUT to OUTSIDE and TEXT to CDATA
svn path=/trunk/; revision=15070
-rw-r--r-- | plugins/xml/xml_lexer.l | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/plugins/xml/xml_lexer.l b/plugins/xml/xml_lexer.l index a496308152..3391ce8f36 100644 --- a/plugins/xml/xml_lexer.l +++ b/plugins/xml/xml_lexer.l @@ -78,31 +78,31 @@ whitespace [[:blank:]\r\n]+ text_start ([^<[:blank:]\r\n]|[^<]) text_stop < -%START OUT COMMENT TAG CLOSE_TAG XMLPI DOCTYPE MARKUPDECL TEXT +%START OUTSIDE COMMENT TAG CLOSE_TAG XMLPI DOCTYPE MARKUPDECL CDATA %% -<OUT>{whitespace} { text_offset = offset - yyleng; add_xml_item(XML_WHITESPACE, yyleng); } -<OUT>{dtd_doctype_stop} { text_offset = offset - yyleng; add_xml_item(XML_DOCTYPE_STOP, yyleng); } +<OUTSIDE>{whitespace} { text_offset = offset - yyleng; add_xml_item(XML_WHITESPACE, yyleng); } +<OUTSIDE>{dtd_doctype_stop} { text_offset = offset - yyleng; add_xml_item(XML_DOCTYPE_STOP, yyleng); } -<OUT>{text_start} { text_offset = offset - yyleng; BEGIN TEXT; } -<TEXT>{text_stop} { add_xml_item(XML_TEXT, --offset - text_offset ); BEGIN OUT; } +<OUTSIDE>{text_start} { text_offset = offset - yyleng; BEGIN CDATA; } +<CDATA>{text_stop} { add_xml_item(XML_TEXT, --offset - text_offset ); BEGIN OUTSIDE; } -<OUT>{comment_start} { text_offset = offset - yyleng; BEGIN COMMENT; } -<COMMENT>{comment_end} { add_xml_item(XML_COMMENT, offset - text_offset); BEGIN OUT; } +<OUTSIDE>{comment_start} { text_offset = offset - yyleng; BEGIN COMMENT; } +<COMMENT>{comment_end} { add_xml_item(XML_COMMENT, offset - text_offset); BEGIN OUTSIDE; } -<OUT>{closetag_start} { text_offset = offset - yyleng ; BEGIN CLOSE_TAG; } -<CLOSE_TAG>{tag_end} { add_xml_item(XML_CLOSE_TAG, offset - text_offset ); BEGIN OUT; } +<OUTSIDE>{closetag_start} { text_offset = offset - yyleng ; BEGIN CLOSE_TAG; } +<CLOSE_TAG>{tag_end} { add_xml_item(XML_CLOSE_TAG, offset - text_offset ); BEGIN OUTSIDE; } -<OUT>{xmlpi_start} { text_offset = offset - yyleng; BEGIN XMLPI; } -<XMLPI>{xmlpi_end} { add_xml_item(XML_XMLPI, offset - text_offset); BEGIN OUT; } +<OUTSIDE>{xmlpi_start} { text_offset = offset - yyleng; BEGIN XMLPI; } +<XMLPI>{xmlpi_end} { add_xml_item(XML_XMLPI, offset - text_offset); BEGIN OUTSIDE; } -<OUT>{markupdecl_start} { text_offset = offset - yyleng -1; BEGIN MARKUPDECL; } -<MARKUPDECL>{open_brace} { add_xml_item(XML_DOCTYPE_START, offset - text_offset); BEGIN OUT; } -<MARKUPDECL>{tag_end} { add_xml_item(XML_MARKUPDECL, offset - text_offset); BEGIN OUT; } +<OUTSIDE>{markupdecl_start} { text_offset = offset - yyleng -1; BEGIN MARKUPDECL; } +<MARKUPDECL>{open_brace} { add_xml_item(XML_DOCTYPE_START, offset - text_offset); BEGIN OUTSIDE; } +<MARKUPDECL>{tag_end} { add_xml_item(XML_MARKUPDECL, offset - text_offset); BEGIN OUTSIDE; } -<OUT>{tag_start} { text_offset = offset - yyleng -1; BEGIN TAG; } -<TAG>{closedtag_end} { add_xml_item(XML_CLOSEDTAG, offset - text_offset); BEGIN OUT; } -<TAG>{tag_end} { add_xml_item(XML_TAG, offset - text_offset); BEGIN OUT; } +<OUTSIDE>{tag_start} { text_offset = offset - yyleng -1; BEGIN TAG; } +<TAG>{closedtag_end} { add_xml_item(XML_CLOSEDTAG, offset - text_offset); BEGIN OUTSIDE; } +<TAG>{tag_end} { add_xml_item(XML_TAG, offset - text_offset); BEGIN OUTSIDE; } %% @@ -163,7 +163,7 @@ extern void dissect_xml(tvbuff_t* the_tvb, packet_info* pinfo _U_, proto_tree* t pi = proto_tree_add_item(tree, proto_xml, tvb, 0, -1, FALSE); tree = proto_item_add_subtree(pi, ett_xml); - BEGIN OUT; + BEGIN OUTSIDE; yylex(); yyrestart(NULL); |