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

SCM Repository

[smlnj] Diff of /sml/trunk/src/MLRISC/Tools/Parser/mdl.lex
ViewVC logotype

Diff of /sml/trunk/src/MLRISC/Tools/Parser/mdl.lex

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 999, Tue Nov 27 06:28:37 2001 UTC revision 1115, Sun Mar 3 18:16:31 2002 UTC
# Line 219  Line 219 
219    
220  %header (functor MDLLexFun(Tokens : MDL_TOKENS));  %header (functor MDLLexFun(Tokens : MDL_TOKENS));
221  %arg ({srcMap,err,MDLmode});  %arg ({srcMap,err,MDLmode});
222    %reject
223    
224  alpha=[A-Za-z];  alpha=[A-Za-z];
225  digit=[0-9];  digit=[0-9];
# Line 252  Line 253 
253  <INITIAL,COMMENT,ASM>{ws}       => (continue());  <INITIAL,COMMENT,ASM>{ws}       => (continue());
254  <ASMQUOTE>\n            => (err(yypos,yypos+size yytext,  <ASMQUOTE>\n            => (err(yypos,yypos+size yytext,
255                                  "newline in assembly text!"); continue());                                  "newline in assembly text!"); continue());
 <INITIAL>\-\-.*\n       => (continue());  
256  <INITIAL>"(*"           => (commentLevel := 1; YYBEGIN COMMENT; continue());  <INITIAL>"(*"           => (commentLevel := 1; YYBEGIN COMMENT; continue());
257  <INITIAL,ASM>{integer}  => (decimal(err,yytext,yypos));  <INITIAL,ASM>{integer}  => (decimal(err,yytext,yypos));
258  <INITIAL,ASM>{hex}      => (hex(err,yytext,yypos));  <INITIAL,ASM>{hex}      => (hex(err,yytext,yypos));
# Line 271  Line 271 
271  <INITIAL,ASM>{real}     => (real(err,yytext,yypos));  <INITIAL,ASM>{real}     => (real(err,yytext,yypos));
272  <INITIAL,ASM>"$"        => (if MDLmode then DOLLAR(yypos,yypos+1)  <INITIAL,ASM>"$"        => (if MDLmode then DOLLAR(yypos,yypos+1)
273                              else SYMBOL("$",yypos,yypos+1));                              else SYMBOL("$",yypos,yypos+1));
274  <INITIAL,ASM>"asm:"     => (ASM_COLON(yypos,yypos + size yytext));  <INITIAL,ASM>"asm:"     => (if MDLmode then
275  <INITIAL,ASM>"mc:"      => (MC_COLON(yypos,yypos + size yytext));                                ASM_COLON(yypos,yypos+size yytext) else REJECT());
276  <INITIAL,ASM>"rtl:"     => (RTL_COLON(yypos,yypos + size yytext));  <INITIAL,ASM>"mc:"      => (if MDLmode then
277  <INITIAL,ASM>"delayslot:" => (DELAYSLOT_COLON(yypos,size yytext));                                 MC_COLON(yypos,yypos+size yytext) else REJECT());
278  <INITIAL,ASM>"padding:" => (PADDING_COLON(yypos,size yytext));  <INITIAL,ASM>"rtl:"     => (if MDLmode then
279  <INITIAL,ASM>"nullified:" => (NULLIFIED_COLON(yypos,size yytext));                                 RTL_COLON(yypos,yypos+size yytext) else REJECT());
280  <INITIAL,ASM>"candidate:" => (CANDIDATE_COLON(yypos,size yytext));  <INITIAL,ASM>"delayslot:" => (if MDLmode then
281                                   DELAYSLOT_COLON(yypos,size yytext) else REJECT());
282    <INITIAL,ASM>"padding:" => (if MDLmode then
283                                   PADDING_COLON(yypos,size yytext) else REJECT());
284    <INITIAL,ASM>"nullified:" => (if MDLmode then
285                                    NULLIFIED_COLON(yypos,size yytext) else REJECT());
286    <INITIAL,ASM>"candidate:" => (if MDLmode then
287                                    CANDIDATE_COLON(yypos,size yytext) else REJECT());
288  <INITIAL,ASM>{id}       => (lookup(MDLmode,yytext,yypos));  <INITIAL,ASM>{id}       => (lookup(MDLmode,yytext,yypos));
289  <INITIAL,ASM>{tyvar}    => (TYVAR(yytext,yypos,yypos + size yytext));  <INITIAL,ASM>{tyvar}    => (TYVAR(yytext,yypos,yypos + size yytext));
290  <INITIAL,ASM>"("        => (LPAREN(yypos,yypos+1));  <INITIAL,ASM>"("        => (LPAREN(yypos,yypos+1));
291  <INITIAL,ASM>")"        => (RPAREN(yypos,yypos+1));  <INITIAL,ASM>")"        => (RPAREN(yypos,yypos+1));
292  <INITIAL,ASM>"["        => (LBRACKET(yypos,yypos+1));  <INITIAL,ASM>"["        => (LBRACKET(yypos,yypos+1));
293    <INITIAL,ASM>"#["       => (LHASHBRACKET(yypos,yypos+1));
294  <INITIAL,ASM>"]"        => (RBRACKET(yypos,yypos+1));  <INITIAL,ASM>"]"        => (RBRACKET(yypos,yypos+1));
295  <INITIAL,ASM>"{"        => (LBRACE(yypos,yypos+1));  <INITIAL,ASM>"{"        => (LBRACE(yypos,yypos+1));
296  <INITIAL,ASM>"}"        => (RBRACE(yypos,yypos+1));  <INITIAL,ASM>"}"        => (RBRACE(yypos,yypos+1));

Legend:
Removed from v.999  
changed lines
  Added in v.1115

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