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 3860, Thu Nov 21 03:48:49 2013 UTC revision 3861, Thu Nov 21 15:31:53 2013 UTC
# Line 23  Line 23 
23    fun float s = T.FLOAT(valOf(LargeReal.fromString s))    fun float s = T.FLOAT(valOf(LargeReal.fromString s))
24  (* support for incremental construction of strings *)  (* support for incremental construction of strings *)
25    val sbuf : string list ref = ref []    val sbuf : string list ref = ref []
26    fun addStr s = sbuf := s :: !sbuf    fun addStr s = (sbuf := s :: !sbuf)
27    fun addUChr lit = let    fun addUChr lit = let
28        (* trim the "\u" prefix *)        (* trim the "\u" prefix *)
29          val digits = Substring.triml 2 (Substring.full lit)          val digits = Substring.triml 2 (Substring.full lit)
# Line 91  Line 91 
91  <INITIAL>{symbol}               => ( T.SYMBOL yytext );  <INITIAL>{symbol}               => ( T.SYMBOL yytext );
92  (* TODO backport this to the JSON parser, which hangs if it sees a \\ in a  (* TODO backport this to the JSON parser, which hangs if it sees a \\ in a
93  * string. *)  * string. *)
94  <S>"\\\\"                       => ( addStr "\\"; continue() );  <S>"\\"                         => ( addStr "\\"; continue() );
95  <S>"\\\""                       => ( addStr "\""; continue() );  <S>"\\\""                       => ( addStr "\""; continue() );
 <S>"\\/"                        => ( addStr "/"; continue() );  
96  <S>"\\b"                        => ( addStr "\b"; continue() );  <S>"\\b"                        => ( addStr "\b"; continue() );
97  <S>"\\f"                        => ( addStr "\f"; continue() );  <S>"\\f"                        => ( addStr "\f"; continue() );
98  <S>"\\n"                        => ( addStr "\n"; continue() );  <S>"\\n"                        => ( addStr "\n"; continue() );

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

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