Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /sml/releases/release-110.37/src/ml-burg/parse.sml
ViewVC logotype

Annotation of /sml/releases/release-110.37/src/ml-burg/parse.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 250 - (view) (download)
Original Path: sml/trunk/src/ml-burg/parse.sml

1 : monnier 249 (* parse.sml
2 :     *
3 :     * COPYRIGHT (c) 1995 AT&T Bell Laboratories.
4 :     *
5 :     * $Log$
6 :     * Revision 1.1.1.8 1999/04/17 18:56:04 monnier
7 :     * version 110.16
8 :     *
9 :     * Revision 1.1.1.1 1997/01/14 01:38:00 george
10 :     * Version 109.24
11 :     *
12 :     * Revision 1.1.1.2 1997/01/11 18:52:32 george
13 :     * ml-burg Version 109.24
14 :     *
15 :     * Revision 1.2 1996/02/26 15:02:06 george
16 :     * print no longer overloaded.
17 :     * use of makestring has been removed and replaced with Int.toString ..
18 :     * use of IO replaced with TextIO
19 :     *
20 :     * Revision 1.1.1.1 1996/01/31 16:01:25 george
21 :     * Version 109
22 :     *
23 :     *)
24 :     structure Parse =
25 :     struct
26 :     structure BurgLrVals = BurgLrValsFun(structure Token = LrParser.Token)
27 :     structure BurgLex = BurgLexFun(structure Tokens = BurgLrVals.Tokens)
28 :     structure BurgParser = Join(structure ParserData = BurgLrVals.ParserData
29 :     structure Lex = BurgLex
30 :     structure LrParser = LrParser)
31 :    
32 :     fun parse stream =
33 :     let
34 :     val lexer = BurgParser.makeLexer(fn n => TextIO.inputN(stream,n))
35 :     fun error(msg,i:int,_) =
36 :     TextIO.output(TextIO.stdOut,
37 :     "Error: line " ^ Int.toString i ^ ", " ^ msg ^ "\n")
38 :     in
39 :     BurgParser.parse(30,lexer,error,())
40 :     before
41 :     BurgLex.UserDeclarations.resetState()
42 :     end
43 :    
44 :     fun reset () =
45 :     BurgLex.UserDeclarations.resetState()
46 :    
47 :     end
48 :    

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