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 273, Wed May 12 08:38:51 1999 UTC revision 274, Fri May 14 05:23:02 1999 UTC
# Line 45  Line 45 
45           * This function is used to parse aliases and sub-groups. *)           * This function is used to parse aliases and sub-groups. *)
46          fun recParse (p1, p2) p =          fun recParse (p1, p2) p =
47              case parse' (p, (group, (source, p1, p2)) :: groupstack) of              case parse' (p, (group, (source, p1, p2)) :: groupstack) of
48                  NONE => raise LrParser.ParseError                  NONE => (#anyErrors source := true; CMSemant.emptyGroup)
49                | SOME res => res                | SOME res => res
50    
51          fun doMember (p, p1, p2, c) =          fun doMember (p, p1, p2, c) =
# Line 73  Line 73 
73                          end                          end
74                  in                  in
75                      PrettyPrint.add_newline pps;                      PrettyPrint.add_newline pps;
76                      PrettyPrint.begin_block pps PrettyPrint.CONSISTENT 4;                      loop (g, hist)
                     loop (g, hist);  
                     PrettyPrint.end_block pps  
77                  end                  end
78              in              in
79                  EM.error s (p1, p2) EM.COMPLAIN                  EM.error s (p1, p2) EM.COMPLAIN
80                     ("group hierarchy forms a cycle with " ^ AbsPath.spec group)                     ("group hierarchy forms a cycle with " ^ AbsPath.spec group)
81                     pphist                     pphist;
82                    raise LrParser.ParseError
83              end              end
84          in          in
85              case findCycle (groupstack, []) of              case findCycle (groupstack, []) of
# Line 156  Line 155 
155          TextIO.closeIn stream;          TextIO.closeIn stream;
156          if !(#anyErrors source) then NONE          if !(#anyErrors source) then NONE
157          else SOME parseResult          else SOME parseResult
158      end handle LrParser.ParseError => NONE      end
159        handle LrParser.ParseError => NONE
160             | Cycle => NONE
161    
162      fun parse group = parse' (group, [])      fun parse group = parse' (group, [])
163  end  end

Legend:
Removed from v.273  
changed lines
  Added in v.274

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