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/cm/parse/parse.sml
ViewVC logotype

Diff of /sml/trunk/src/cm/parse/parse.sml

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

revision 397, Fri Aug 13 07:06:52 1999 UTC revision 404, Wed Sep 1 07:03:22 1999 UTC
# Line 11  Line 11 
11          GeneralParams.param -> bool option ->          GeneralParams.param -> bool option ->
12          SrcPath.t -> (CMSemant.group * GeneralParams.info) option          SrcPath.t -> (CMSemant.group * GeneralParams.info) option
13      val reset : unit -> unit      val reset : unit -> unit
14        val listLibs : unit -> unit
15        val dismissLib : SrcPath.t -> unit
16  end  end
17    
18  functor ParseFn (val pending : unit -> DependencyGraph.impexp SymbolMap.map  functor ParseFn (val pending : unit -> DependencyGraph.impexp SymbolMap.map
# Line 34  Line 36 
36      val sgc = ref (SrcPathMap.empty: CMSemant.group SrcPathMap.map)      val sgc = ref (SrcPathMap.empty: CMSemant.group SrcPathMap.map)
37      fun reset () = sgc := SrcPathMap.empty      fun reset () = sgc := SrcPathMap.empty
38    
39        fun listLibs () = let
40            fun show (sp, _) =
41                Say.say [SrcPath.descr sp, "\n"]
42        in
43            SrcPathMap.appi show (!sgc)
44        end
45    
46        fun dismissLib l =
47            (sgc := #1 (SrcPathMap.remove (!sgc, l)))
48            handle LibBase.NotFound => ()
49    
50      fun parse gropt param stabflag group = let      fun parse gropt param stabflag group = let
51    
52          val stabthis = isSome stabflag          val stabthis = isSome stabflag
# Line 65  Line 78 
78                                   (sgc := SrcPathMap.insert (!sgc, group, g);                                   (sgc := SrcPathMap.insert (!sgc, group, g);
79                                    SOME g)                                    SOME g)
80                               fun isStable (GG.GROUP { kind, ... }) =                               fun isStable (GG.GROUP { kind, ... }) =
81                                   case kind of                                   case kind of GG.STABLELIB => true | _ => false
                                      GG.STABLELIB _ => true  
                                    | _ => false  
82                               val pres =                               val pres =
83                                   parse' (group, groupstack, pErrFlag,                                   parse' (group, groupstack, pErrFlag,
84                                           stabthis, curlib)                                           stabthis, curlib)
# Line 109  Line 120 
120              end              end
121    
122              fun getStable gpath = let              fun getStable gpath = let
                 (* To make a cycle involving existing stable groups,  
                  * one must use aliases.  The cycle will be detected  
                  * amoung those aliases... (?? - hopefully) *)  
123                  fun getStableSG p =                  fun getStableSG p =
124                      mparse (p, groupstack, pErrFlag, staball, SOME gpath)                      mparse (p, groupstack, pErrFlag, staball, SOME gpath)
125              in              in
126                  Stabilize.loadStable (ginfo, getStableSG, pErrFlag) gpath                  Stabilize.loadStable ginfo { getGroup = getStableSG,
127                                                 anyerrors = pErrFlag } gpath
128              end              end
129    
130              (* We stabilize libraries only because a stable library will              (* We stabilize libraries only because a stable library will

Legend:
Removed from v.397  
changed lines
  Added in v.404

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