comparison src/lacweb.lex @ 48:0a5c312de09a

Start of FFI
author Adam Chlipala <adamc@hcoop.net>
date Sun, 22 Jun 2008 09:27:29 -0400
parents b3fbbc6cb1e5
children a6e185c7c428
comparison
equal deleted inserted replaced
47:ac4c0b4111ba 48:0a5c312de09a
65 %% 65 %%
66 %header (functor LacwebLexFn(structure Tokens : Lacweb_TOKENS)); 66 %header (functor LacwebLexFn(structure Tokens : Lacweb_TOKENS));
67 %full 67 %full
68 %s COMMENT STRING; 68 %s COMMENT STRING;
69 69
70 id = [a-z_][A-Za-z0-9_]*; 70 id = [a-z_][A-Za-z0-9_']*;
71 cid = [A-Z][A-Za-z0-9_]*; 71 cid = [A-Z][A-Za-z0-9_']*;
72 ws = [\ \t\012]; 72 ws = [\ \t\012];
73 intconst = [0-9]+; 73 intconst = [0-9]+;
74 realconst = [0-9]+\.[0-9]*; 74 realconst = [0-9]+\.[0-9]*;
75 75
76 %% 76 %%
133 <INITIAL> "struct" => (Tokens.STRUCT (yypos, yypos + size yytext)); 133 <INITIAL> "struct" => (Tokens.STRUCT (yypos, yypos + size yytext));
134 <INITIAL> "sig" => (Tokens.SIG (yypos, yypos + size yytext)); 134 <INITIAL> "sig" => (Tokens.SIG (yypos, yypos + size yytext));
135 <INITIAL> "end" => (Tokens.END (yypos, yypos + size yytext)); 135 <INITIAL> "end" => (Tokens.END (yypos, yypos + size yytext));
136 <INITIAL> "functor" => (Tokens.FUNCTOR (yypos, yypos + size yytext)); 136 <INITIAL> "functor" => (Tokens.FUNCTOR (yypos, yypos + size yytext));
137 <INITIAL> "where" => (Tokens.WHERE (yypos, yypos + size yytext)); 137 <INITIAL> "where" => (Tokens.WHERE (yypos, yypos + size yytext));
138 <INITIAL> "extern" => (Tokens.EXTERN (yypos, yypos + size yytext));
138 139
139 <INITIAL> "Type" => (Tokens.TYPE (yypos, yypos + size yytext)); 140 <INITIAL> "Type" => (Tokens.TYPE (yypos, yypos + size yytext));
140 <INITIAL> "Name" => (Tokens.NAME (yypos, yypos + size yytext)); 141 <INITIAL> "Name" => (Tokens.NAME (yypos, yypos + size yytext));
141 142
142 <INITIAL> {id} => (Tokens.SYMBOL (yytext, yypos, yypos + size yytext)); 143 <INITIAL> {id} => (Tokens.SYMBOL (yytext, yypos, yypos + size yytext));