comparison src/urweb.lex @ 360:c1e96b387115

Syntax highlighting for embedded XML
author Adam Chlipala <adamc@hcoop.net>
date Tue, 14 Oct 2008 16:37:43 -0400
parents 075b36dbb1a4
children acaf9d19fbb7
comparison
equal deleted inserted replaced
359:465593c024ca 360:c1e96b387115
160 else 160 else
161 (str := ch :: !str; 161 (str := ch :: !str;
162 continue ()) 162 continue ())
163 end); 163 end);
164 164
165 <INITIAL> "<" {id} "/>"=>(let
166 val tag = String.substring (yytext, 1, size yytext - 3)
167 in
168 Tokens.XML_BEGIN_END (tag, yypos, yypos + size yytext)
169 end);
165 <INITIAL> "<" {id} ">"=> (let 170 <INITIAL> "<" {id} ">"=> (let
166 val tag = String.substring (yytext, 1, size yytext - 2) 171 val tag = String.substring (yytext, 1, size yytext - 2)
167 in 172 in
168 YYBEGIN XML; 173 YYBEGIN XML;
169 xmlTag := tag :: (!xmlTag); 174 xmlTag := tag :: (!xmlTag);