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

SCM Repository

[smlnj] View of /sml/trunk/src/ml-yacc/examples/pascal/README
ViewVC logotype

View of /sml/trunk/src/ml-yacc/examples/pascal/README

Parent Directory Parent Directory | Revision Log Revision Log

Revision 2 - (download) (annotate)
Sat Oct 4 23:33:09 1997 UTC (22 years, 10 months ago) by monnier
File size: 825 byte(s)
Initial revision
This is a grammar for Berkeley Pascal, hacked to be SLR, though that is
not necessary because ML-Yacc supports LALR(1).

To construct the parser, first use ML-Yacc on the file "pascal.grm" to create
the files "pascal.grm.sig" and "pascal.grm.sml".  This can be done by loading
ML-Yacc and typing ``ParseGen.parseGen "pascal.grm"''.  Then construct the
lexer by using ML_Lex on the file pascal.lex (``LexGen.lexGen "pascal.lex"'').

Finally, load the background file "base.sml".  Then use "load.sml" to
load all the files.  The end result is a structure Parser with four
functions.   The function parse_prog will parse a program in a string.
Then function parse_query will parse a query in a string.  The function
parse_file will parse a program in a file.  The function top_parse will
parse a query from the standard input.

ViewVC Help
Powered by ViewVC 1.0.0