[/] [trunk/] [src/] [cmdlang/] [cmdlang.sml] - Diff 7 ⟶ 17

Diff between revs 7 and 17
Rev 7 Rev 17
Line 1... Line 1...
(* $Id: cmdlang.sml 7 2007-10-31 05:39:12Z tbourke $ *)
(* $Id: cmdlang.sml 17 2007-11-09 10:24:48Z tbourke $ *)
 
 
structure CmdLang : CMD_LANG = struct
structure CmdLang : CMD_LANG = struct
 
 
  structure LrVals = CmdLangLrValsFn (structure FilePos = FilePos
  structure LrVals = CmdLangLrValsFn (structure FilePos = FilePos
                                      structure Token = LrParser.Token
                                      structure Token = LrParser.Token
Line 10... Line 10...
  structure Parser = JoinWithArg(structure LrParser = LrParser
  structure Parser = JoinWithArg(structure LrParser = LrParser
                                 structure ParserData = LrVals.ParserData
                                 structure ParserData = LrVals.ParserData
                                 structure Lex = Lex)
                                 structure Lex = Lex)
 
 
  fun parse rdr (env, ostrm) = let
  fun parse rdr (env, ostrm) = let
      val prError   = FilePos.error "blah" (* (Settings.progName^":")*)
      val prError   = FilePos.error (Settings.progName^":")
 
 
      val strm = ref ostrm
      val strm = ref ostrm
      fun read _ = case rdr (!strm) of
      fun read _ = case rdr (!strm) of
                     NONE => ""
                     NONE => ""
                   | SOME (s, strm') => s before strm := strm'
                   | SOME (s, strm') => s before strm := strm'
                   | SOME (s, strm') => s before strm := strm'
                   | SOME (s, strm') => s before strm := strm'