diff options
author | Adrian Thurston <thurston@complang.org> | 2012-05-20 08:54:29 -0400 |
---|---|---|
committer | Adrian Thurston <thurston@complang.org> | 2012-05-20 08:54:29 -0400 |
commit | 683181743be4e853e9b95d917d1432b0ee31f6b9 (patch) | |
tree | 0a44363ddce6d222b5f4b602fa933d4cf33c38d0 /test | |
parent | 1ddab8b4903589fd43d368a35bf3a2b358c65cab (diff) | |
download | colm-683181743be4e853e9b95d917d1432b0ee31f6b9.tar.gz |
updated tags3 test for follow-ignore.
Another case of tag closing '>' and '/>' needing to go into a region of its own.
Diffstat (limited to 'test')
-rw-r--r-- | test/tags3.exp | 2 | ||||
-rw-r--r-- | test/tags3.lm | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/test/tags3.exp b/test/tags3.exp index af380f30..1ade1db1 100644 --- a/test/tags3.exp +++ b/test/tags3.exp @@ -1,4 +1,4 @@ -<start><_repeat_item><item><tag><open_tag><_literal_0011><</_literal_0011><tag_id>t1</tag_id><_repeat_attr></_repeat_attr><_literal_000a>></_literal_000a></open_tag><_repeat_item><item><tag><open_tag><_literal_0011><</_literal_0011><tag_id>t2</tag_id><_repeat_attr></_repeat_attr><_literal_000a>></_literal_000a></open_tag><_repeat_item></_repeat_item><opt_close_tag></opt_close_tag></tag></item><item><tag><open_tag><_literal_0011><</_literal_0011><tag_id>a</tag_id><_repeat_attr><attr><attr_name>href</attr_name><_opt_eql_attr_val><eql_attr_val><_literal_0007>=</_literal_0007><attr_val><dquote_val>"foo"</dquote_val></attr_val></eql_attr_val></_opt_eql_attr_val></attr></_repeat_attr><_literal_000a>></_literal_000a></open_tag><_repeat_item><item><doc_data>FOO</doc_data></item></_repeat_item><opt_close_tag><_literal_0012></</_literal_0012><close_id>a</close_id><_literal_000a>></_literal_000a></opt_close_tag></tag></item><item><tag><open_tag><_literal_0011><</_literal_0011><tag_id>t3</tag_id><_repeat_attr></_repeat_attr><_literal_000a>></_literal_000a></open_tag><_repeat_item></_repeat_item><opt_close_tag><_literal_0012></</_literal_0012><close_id>t3</close_id><_literal_000a>></_literal_000a></opt_close_tag></tag></item></_repeat_item><opt_close_tag><_literal_0012></</_literal_0012><close_id>t1</close_id><_literal_000a>></_literal_000a></opt_close_tag></tag></item></_repeat_item><trailing> +<start><_repeat_item><item><tag><open_tag><_literal_0011><</_literal_0011><tag_id>t1</tag_id><_repeat_attr></_repeat_attr><_literal_000d>></_literal_000d></open_tag><_repeat_item><item><tag><open_tag><_literal_0011><</_literal_0011><tag_id>t2</tag_id><_repeat_attr></_repeat_attr><_literal_000d>></_literal_000d></open_tag><_repeat_item></_repeat_item><opt_close_tag></opt_close_tag></tag></item><item><tag><open_tag><_literal_0011><</_literal_0011><tag_id>a</tag_id><_repeat_attr><attr><attr_name>href</attr_name><_opt_eql_attr_val><eql_attr_val><_literal_0007>=</_literal_0007><attr_val><dquote_val>"foo"</dquote_val></attr_val></eql_attr_val></_opt_eql_attr_val></attr></_repeat_attr><_literal_000d>></_literal_000d></open_tag><_repeat_item><item><doc_data>FOO</doc_data></item></_repeat_item><opt_close_tag><_literal_0012></</_literal_0012><close_id>a</close_id><_literal_000d>></_literal_000d></opt_close_tag></tag></item><item><tag><open_tag><_literal_0011><</_literal_0011><tag_id>t3</tag_id><_repeat_attr></_repeat_attr><_literal_000d>></_literal_000d></open_tag><_repeat_item></_repeat_item><opt_close_tag><_literal_0012></</_literal_0012><close_id>t3</close_id><_literal_000d>></_literal_000d></opt_close_tag></tag></item></_repeat_item><opt_close_tag><_literal_0012></</_literal_0012><close_id>t1</close_id><_literal_000d>></_literal_000d></opt_close_tag></tag></item></_repeat_item><trailing> </trailing></start>link: FOO target: "foo" diff --git a/test/tags3.lm b/test/tags3.lm index 09660c8a..37823d7e 100644 --- a/test/tags3.lm +++ b/test/tags3.lm @@ -28,12 +28,13 @@ lex ATTR_NAME lex ATTR_VAL { ignore /space+/ - literal '>', '/>' token dquote_val /'"' ([^"] | '\\' any)* '"'/ token squote_val /"'" ([^'] | '\\' any)* "'"/ token unq_val /[^ \t\r\n<>"'] [^ \t\r\n<>]*/ } +literal '>', '/>' + # # Tokens # @@ -97,9 +98,10 @@ lex DOCTYPE token dt_name /def_name/ token dt_literal /def_system_literal/ token dt_bl /"[" [^\]]* "]"/ - token dt_close /'>'/ } +token dt_close /'>'/ + # Using a separate scanner for the keywords in DOCTYPE prevents them from # covering dt_name lex DOCTYPE_KW |