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 /ml-lex/trunk/lexgen.sml
ViewVC logotype

Diff of /ml-lex/trunk/lexgen.sml

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

revision 1285, Thu Oct 17 13:42:10 2002 UTC revision 1286, Thu Oct 17 14:02:07 2002 UTC
# Line 68  Line 68 
68  # Revision 1.3  1997/10/04  03:52:13  dbm  # Revision 1.3  1997/10/04  03:52:13  dbm
69  #   Fix to remove output file if ml-lex fails.  #   Fix to remove output file if ml-lex fails.
70  #  #
71            10/17/02 (jhr) changed bad character error message to properly
72                    print the bad character.
73            10/17/02 (jhr) fixed skipws to use Char.isSpace test.
74   *)   *)
75    
76  (* Subject: lookahead in sml-lex  (* Subject: lookahead in sml-lex
# Line 421  Line 424 
424                num (explode s, 0)                num (explode s, 0)
425              end              end
426    
427        fun skipws () = (case nextch()        fun skipws () = let val ch = nextch()
428               of #" " => skipws()              in
429                | #"\t" => skipws()                if Char.isSpace ch
430                | #"\n" => skipws()                  then skipws()
431                | x => x                  else ch
432              (* end case *))              end
433    
434        and nextch () = getch(!LexBuf)        and nextch () = getch(!LexBuf)
435    
# Line 498  Line 501 
501                               end                               end
502                          in ID(getID [ch])                          in ID(getID [ch])
503                          end                          end
504                        else (prSynErr ("bad character: " ^ String.str ch))                        else prSynErr (String.concat[
505                              "bad character: \"", Char.toString ch, "\""
506                            ])
507          in NextTok := makeTok()          in NextTok := makeTok()
508          end          end
509          | 1 => let val rec makeTok = fn () =>          | 1 => let val rec makeTok = fn () =>

Legend:
Removed from v.1285  
changed lines
  Added in v.1286

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