Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /smlnj-lib/trunk/HTML4/html4-attr.l
ViewVC logotype

Annotation of /smlnj-lib/trunk/HTML4/html4-attr.l

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3531 - (view) (download)

1 : jriehl 3531 (* ______________________________________________________________________
2 :     html4-attr.l
3 :    
4 :     Lexer for parsing HTML 4 attributes.
5 :     ______________________________________________________________________ *)
6 :    
7 :     %name HTML4AttrLexer;
8 :    
9 :     %defs (
10 :     open HTML4AttrTokens
11 :    
12 :     fun eof() = EOF
13 :     type lex_result = token
14 :     );
15 :    
16 :     %let alpha=[A-Za-z];
17 :     %let digit=[0-9];
18 :     %let ws=[\ \t\r\n];
19 :    
20 :     {alpha}({alpha}|{digit}|"-")* => (NAME (Atom.atom yytext));
21 :     {digit}+ => (NUMBER yytext);
22 :     "=" => (DOT);
23 :     "." => (DOT);
24 :     [\"][^\"]*[\"] => (STRINGLIT yytext);
25 :     [\'][^\']*[\'] => (STRINGLIT yytext);
26 :    
27 :     {ws}+ => (continue());
28 :    
29 :     (* ______________________________________________________________________
30 :     End of html4-attr.l
31 :     ______________________________________________________________________ *)

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0