Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /branches/vis12/src/compiler/inputs/cmd-line-inputs.sml
ViewVC logotype

Diff of /branches/vis12/src/compiler/inputs/cmd-line-inputs.sml

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

revision 230, Thu Aug 5 16:00:24 2010 UTC revision 340, Mon Sep 13 15:34:36 2010 UTC
# Line 8  Line 8 
8    
9  structure Inputs : sig  structure Inputs : sig
10    
11      (* returns true if the argument has the form of a command-line input specification *)
12        val isCmdLineInput : string -> bool
13    
14    (* initialize the table from the command-line arguments; returns false if there was    (* initialize the table from the command-line arguments; returns false if there was
15     * an error processing an argument.     * an error processing an argument.
16     *)     *)
# Line 27  Line 30 
30    
31      fun notEq #"=" = false | notEq _ = true      fun notEq #"=" = false | notEq _ = true
32    
33        fun isCmdLineInput s = String.isPrefix "-D" s
34    
35      fun initFromArgs args = let      fun initFromArgs args = let
36            fun doArg arg = let            fun doArg arg = let
37                  val arg = Substring.full arg                  val arg = Substring.full arg
# Line 70  Line 75 
75                            ]);                            ]);
76                          TextIO.flushOut TextIO.stdOut;                          TextIO.flushOut TextIO.stdOut;
77                          case TextIO.inputLine TextIO.stdIn                          case TextIO.inputLine TextIO.stdIn
78                           of SOME ln => (                           of SOME ln => let
79                                  val ln = String.substring(ln, 0, size ln - 1)
80                                  in
81                                AtomTable.insert inputs (name', ln);  (* cache value *)                                AtomTable.insert inputs (name', ln);  (* cache value *)
82                                cvt ln)                                  cvt ln
83                                  end
84                            | NONE => OS.Process.exit OS.Process.failure                            | NONE => OS.Process.exit OS.Process.failure
85                          (* end case *))                          (* end case *))
86                      | someVal => someVal                      | someVal => someVal

Legend:
Removed from v.230  
changed lines
  Added in v.340

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