]> Joshua Wise's Git repositories - snipe.git/blobdiff - parse/parse.sml
Initial import of l5c
[snipe.git] / parse / parse.sml
index 5981be1131aba92d1647216e40291925104a8609..a2cc2fee41e34ceddffaacd961cc4af14fd7d75b 100644 (file)
@@ -1,4 +1,4 @@
-(* L1 Compiler
+(* L5 Compiler
  * Parsing
  * Author: Kaustuv Chaudhuri <kaustuv+@cs.cmu.edu>
  * Modified: Frank Pfenning <fp@cs.cmu.edu>
@@ -17,10 +17,10 @@ end
 structure Parse :> PARSE =
 struct 
 
-  structure L1LrVals = L1LrValsFn (structure Token = LrParser.Token)
-  structure L1Lex = L1LexFn (structure Tokens = L1LrVals.Tokens)
-  structure L1Parse = Join (structure ParserData = L1LrVals.ParserData
-                            structure Lex = L1Lex
+  structure L5LrVals = L5LrValsFn (structure Token = LrParser.Token)
+  structure L5Lex = L5LexFn (structure Tokens = L5LrVals.Tokens)
+  structure L5Parse = Join (structure ParserData = L5LrVals.ParserData
+                            structure Lex = L5Lex
                             structure LrParser = LrParser)
 
   (* Main parsing function *)
@@ -31,18 +31,18 @@ struct
          val _ = ParseState.setfile filename (* start at position 0 in filename *)
          fun parseerror (s, p1, p2) = ErrorMsg.error (ParseState.ext (p1,p2)) s
          val lexer = LrParser.Stream.streamify
-                         (L1Lex.makeLexer (fn _ => TextIO.input instream))
+                         (L5Lex.makeLexer (fn _ => TextIO.input instream))
          (* 0 = no error correction, 15 = reasonable lookahead for correction *)
-         val (absyn, _) = L1Parse.parse(0, lexer, parseerror, ())
+         val (absyn, _) = L5Parse.parse(0, lexer, parseerror, ())
           val _ = if !ErrorMsg.anyErrors
                  then raise ErrorMsg.Error
                  else ()
        in
          absyn
        end)
-      handle L1Lex.LexError => ( ErrorMsg.error NONE "lexer error" ;
+      handle (*L5Lex.LexError => ( ErrorMsg.error NONE "lexer error" ;
                               raise ErrorMsg.Error )
-          | LrParser.ParseError => raise ErrorMsg.Error (* always preceded by msg *)
+          |*) LrParser.ParseError => raise ErrorMsg.Error (* always preceded by msg *)
            | e as IO.Io _ => ( ErrorMsg.error NONE (exnMessage e);
                                raise ErrorMsg.Error )
 
This page took 0.025232 seconds and 4 git commands to generate.