diff options
author | Luis Ontanon <luis.ontanon@gmail.com> | 2005-09-24 19:03:35 +0000 |
---|---|---|
committer | Luis Ontanon <luis.ontanon@gmail.com> | 2005-09-24 19:03:35 +0000 |
commit | 3cf75fd6bb75d770486c01fc512fb1796a765d96 (patch) | |
tree | 2b08ce0001d0ff5df7b2f521a39f0728d8f40092 /epan/dtd_parse.l | |
parent | 0f2e45a47a42cd92380a54765584d94328079d01 (diff) |
get rid of most dtd leaks.
There's just one left I'm aware of (the doctype name).
svn path=/trunk/; revision=15990
Diffstat (limited to 'epan/dtd_parse.l')
-rw-r--r-- | epan/dtd_parse.l | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/epan/dtd_parse.l b/epan/dtd_parse.l index 9f4bf2f8a6..545242d497 100644 --- a/epan/dtd_parse.l +++ b/epan/dtd_parse.l @@ -83,7 +83,6 @@ #define DTD_PARSE(token_type) \ { DEBUG_DTD_TOKEN; \ build_data->location = location; \ - location = NULL; \ DtdParse(pParser, (token_type), new_token(yytext), build_data); \ if(build_data->error->len > 0) yyterminate(); \ } @@ -108,6 +107,8 @@ get_location_xmlpi [^[:blank:]]+ stop_xmlpi "?>" +notation_tag "<!"[:blank:]*NOTATION + special_start "<!" special_stop ">" whitespace [[:blank:]\r\n]+ @@ -151,7 +152,7 @@ name [a-z][-a-zA-Z0-9_]* dquoted ["][^\"]*["] squoted ['][^\']*['] -%START DTD XMLPI LOCATION DONE PROTOCOL GET_ATTR_QUOTE GET_ATTR_VAL GET_ATTR_CLOSE_QUOTE IN_COMMENT +%START DTD XMLPI LOCATION DONE PROTOCOL GET_ATTR_QUOTE GET_ATTR_VAL GET_ATTR_CLOSE_QUOTE IN_COMMENT IN_NOTATION %% {whitespace} ; @@ -162,6 +163,10 @@ squoted ['][^\']*['] <IN_COMMENT>[-] ; <IN_COMMENT>{comment_stop} { BEGIN DTD; } +<DTD>{notation_tag} { BEGIN IN_NOTATION; } +<IN_NOTATION>. ; +<IN_NOTATION>{special_stop} { BEGIN DTD; } + <DTD>{start_xmlpi} { BEGIN XMLPI; } @@ -282,7 +287,6 @@ static dtd_token_data_t* new_token(gchar* text) { } - static int my_yyinput(char* buff, guint size) { if (offset >= len ) { |