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 3962 - (view) (download)

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

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