## parse.pkg
# Compiled by:
#
src/app/burg/mythryl-burg.libpackage parse {
package burg_lr_vals = burg_lr_vals_fun (package token = lr_parser::token;);
package burg_lex = burg_lex_g (package tokens = burg_lr_vals::tokens;);
package burg_parser = make_complete_yacc_parser_g (package parser_data = burg_lr_vals::parser_data;
package lex = burg_lex;
package lr_parser = lr_parser;);
fun parse stream
=
{ lexer = burg_parser::make_lexer (\\ n = file__premicrothread::read_n (stream, n));
fun error (msg, i: Int, _)
=
file__premicrothread::write (file__premicrothread::stdout,
"Error: line " + int::to_string i + ", " + msg + "\n");
burg_parser::parse (30, lexer, error, ())
then
burg_lex::user_declarations::reset_state();
};
fun reset ()
=
burg_lex::user_declarations::reset_state();
};
## COPYRIGHT (c) 1995 AT&T Bell Laboratories.
# $Log: parse.pkg, v $
# Revision 1.2 2000/06/01 18:33:42 monnier
# bring revisions from the vendor branch to the trunk
#
# Revision 1.1.1.8 1999/04/17 18:56:04 monnier
# version 110.16
#
# Revision 1.1.1.1 1997/01/14 01:38:00 george
# Version 109.24
#
# Revision 1.1.1.2 1997/01/11 18:52:32 george
# mythryl-burg Version 109.24
#
# Revision 1.2 1996/02/26 15:02:06 george
# print no longer overloaded.
# use of makestring has been removed and replaced with int::to_string ..
# use of IO replaced with file
#
# Revision 1.1.1.1 1996/01/31 16:01:25 george
# Version 109
#
# Subsequent changes by Jeff Prothero Copyright (c) 2010-2015,
# released per terms of SMLNJ-COPYRIGHT.