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/smlnj-lib/Util/int-inf.sml
ViewVC logotype

Diff of /sml/trunk/src/smlnj-lib/Util/int-inf.sml

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

revision 1208, Tue May 21 02:22:43 2002 UTC revision 1209, Tue May 21 02:35:36 2002 UTC
# Line 204  Line 204 
204                  end                  end
205            (* end case *))            (* end case *))
206    
207          fun scanHex getc cs = (case (scanPrefix getc cs)        (* consume a possible "0x" or "0X" prefix on a hex literal *)
208            fun scan0x getc NONE = NONE
209              | scan0x getc (orig as SOME{neg, next, rest}) =
210                  if (next = 0w0)
211                    then (case getc rest
212                       of SOME((#"x" | #"X"), rest1) => (case getc rest1
213                             of SOME(c, rest2) => let
214                                  val d = code c
215                                  in
216                                    if (d < 0w16)
217                                      then SOME{neg=neg, next=d, rest=rest2}
218                                      else orig
219                                  end
220                              | NONE => orig
221                            (* end case *))
222                        | _ => orig
223                      (* end case *))
224                    else orig
225    
226            fun scanHex getc cs = (case scan0x getc (scanPrefix getc cs)
227             of NONE => NONE             of NONE => NONE
228              | (SOME{neg, next, rest}) => let              | (SOME{neg, next, rest}) => let
229                  fun isDigit (d : Word32.word) = (d < 0w16)                  fun isDigit (d : Word32.word) = (d < 0w16)

Legend:
Removed from v.1208  
changed lines
  Added in v.1209

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