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 297, Thu May 27 08:29:19 1999 UTC revision 299, Thu May 27 13:53:27 1999 UTC
# Line 6  Line 6 
6   * Author: Matthias Blume (blume@kurims.kyoto-u.ac.jp)   * Author: Matthias Blume (blume@kurims.kyoto-u.ac.jp)
7   *)   *)
8  signature CMPARSE = sig  signature CMPARSE = sig
9      val parse : Primitive.configuration -> AbsPath.t -> CMSemant.group option      val parse : GeneralParams.param -> AbsPath.t -> CMSemant.group option
10  end  end
11    
12  structure CMParse :> CMPARSE = struct  structure CMParse :> CMPARSE = struct
# Line 25  Line 25 
25                       structure Lex = CMLex                       structure Lex = CMLex
26                       structure LrParser = LrParser)                       structure LrParser = LrParser)
27    
28      fun parse primconf group = let      fun parse param group = let
29    
30          val groupreg = GroupReg.new ()          val groupreg = GroupReg.new ()
31          val fnpolicy = FilenamePolicy.default          val ginfo = { param = param, groupreg = groupreg }
         val params = { groupreg = groupreg,  
                        fnpolicy = fnpolicy,  
                        primconf = primconf,  
                        keep_going = false }  
32    
33          val gc = ref AbsPathMap.empty   (* the "group cache" *)          val gc = ref AbsPathMap.empty   (* the "group cache" *)
34    
# Line 113  Line 109 
109                       CMSemant.emptyGroup group)                       CMSemant.emptyGroup group)
110    
111                  fun doMember (p, p1, p2, c) =                  fun doMember (p, p1, p2, c) =
112                      CMSemant.member (params, recParse (p1, p2))                      CMSemant.member (ginfo, recParse (p1, p2))
113                                      { sourcepath = p, class = c,                                      { sourcepath = p, class = c,
114                                        group = (group, (p1, p2)) }                                        group = (group, (p1, p2)) }
115    
# Line 185  Line 181 
181                      CMParse.parse (lookAhead, tokenStream,                      CMParse.parse (lookAhead, tokenStream,
182                                     fn (s,p1,p2) => error (p1, p2) s,                                     fn (s,p1,p2) => error (p1, p2) s,
183                                     (group, context, error, recParse,                                     (group, context, error, recParse,
184                                      doMember, params))                                      doMember, ginfo))
185              in              in
186                  TextIO.closeIn stream;                  TextIO.closeIn stream;
187                  if !(#anyErrors source) then NONE                  if !(#anyErrors source) then NONE

Legend:
Removed from v.297  
changed lines
  Added in v.299

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