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 /smlnj-lib/trunk/SExp/sexp.lex
ViewVC logotype

Diff of /smlnj-lib/trunk/SExp/sexp.lex

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

revision 3635, Tue May 24 17:24:11 2011 UTC revision 3860, Thu Nov 21 03:48:49 2013 UTC
# Line 37  Line 37 
37  %let digit1_9 = [1-9];  %let digit1_9 = [1-9];
38  %let digit = [0-9];  %let digit = [0-9];
39  %let digits = {digit}+;  %let digits = {digit}+;
 (* TODO check if JSON should allow "+1" as a valid encoding of positive one. *)  
40  %let int = [+-]?({digit} | {digit1_9}{digits}+);  %let int = [+-]?({digit} | {digit1_9}{digits}+);
41  %let frac = "."{digits};  %let frac = "."{digits};
42  %let exp = [eE][+-]?{digits};  %let exp = [eE][+-]?{digits};
# Line 48  Line 47 
47    
48  %states S;  %states S;
49    
50  <INITIAL>[,;\ \t\n\r]+          => ( T.WHITE );  <INITIAL>[ \t\n\r]+             => ( T.WHITE );
51    <INITIAL>";"[^\n\r]*[\n\r]+     => ( skip() (* comment *));
52    
53  <INITIAL>"'"([^\ \t\n\r]+)    => ( T.SYMBOL (String.extract(yytext, 1, NONE)) );  <INITIAL>"'"([^\ \t\n\r]+)    => ( T.SYMBOL (String.extract(yytext, 1, NONE)) );
54    
# Line 103  Line 103 
103  <S>[^\\"]+                      => ( addStr yytext; continue() );  <S>[^\\"]+                      => ( addStr yytext; continue() );
104  <S>"\""                         => ( YYBEGIN INITIAL; finishString() );  <S>"\""                         => ( YYBEGIN INITIAL; finishString() );
105    
 <INITIAL>"/*"(~(.*"*/".*))"*/"  => ( skip() );  
   
106  (* FIXME: add some error reporting *)  (* FIXME: add some error reporting *)
107  <INITIAL>.                      => ( skip() );  <INITIAL>.                      => ( skip() );

Legend:
Removed from v.3635  
changed lines
  Added in v.3860

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