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/trunk/src/ml-burg/parse.sml
ViewVC logotype

Annotation of /sml/trunk/src/ml-burg/parse.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 651 - (view) (download)

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

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