home *** CD-ROM | disk | FTP | other *** search
-
- TP Lex and Yacc Version 3.0a [May 92] Sources
-
- Copyright (c) 1990-92 by Albert Graef, Schillerstr. 18,
- 6509 Schornsheim/Germany (ag@muwiinfa.geschichte.uni-mainz.de)
- All rights reserved
-
- NO WARRANTY: The sources are provided as is. The author is not liable for
- any errors in the source modules or any damages or other consequences of
- their use. There also is no warranty that the programs fit any particular
- purpose.
-
- The TP Lex and Yacc programs consist of 23 modules with about 11000 lines
- of code. A short description of each of the source modules is given below.
-
- To compile TP Lex and Yacc, you need Turbo Pascal 6.0 (may also work with
- Turbo Pascal 5.0/5.5, but I have not tested it). Compile the following
- four source files using the built-in make function of Turbo Pascal (or tpc
- command line option /M), with I/O checking turned off (compiler directive
- $I- or tpc command line option /$I-). (Also, you will usually turn the
- debugging options ($D and $L) off.)
-
- - LEXLIB.PAS
- - YACCLIB.PAS
- - LEX.PAS
- - YACC.PAS
-
- You then have a running version of TP Lex and Yacc. The source file of
- the TP Yacc parser and main program (which is implemented with TP Yacc
- itself) is contained in YACC.Y. This file may be fed into TP Yacc to
- generate the YACC.PAS file. To bootstrap TP Yacc, once you have a
- YACC.EXE, you can recompile YACC.Y with TP Yacc as follows:
-
- yacc yacc myyacc
-
- Then try:
-
- fc yacc.pas myyacc.pas
-
- The two files should not differ.
-
-
- Description of the Source Modules
- ---------------------------------
-
- LEX PAS TP Lex main program
- LEXBASE PAS base module (global declarations)
- LEXDFA PAS DFA construction algorithm
- LEXLIB PAS TP Lex library unit
- LEXLIST PAS listing operations
- LEXMSGS PAS messages and error handling
- LEXOPT PAS DFA optimization algorithm
- LEXPOS PAS operations to construct the position table
- LEXRULES PAS parser for TP Lex grammar rules
- LEXTABLE PAS internal tables used by the TP Lex program
-
- YACC PAS TP Yacc parser and main program
- YACC Y TP Yacc source for YACC.PAS
- YACCBASE PAS base module (global declarations)
- YACCCLOS PAS closure and first set construction algorithms
- YACCLIB PAS TP Yacc library unit
- YACCLOOK PAS LALR lookahead computation algorithm
- YACCLR0 PAS LR(0) set construction algorithm
- YACCMSGS PAS messages and error handling
- YACCPARS PAS parse table construction
- YACCSEM PAS semantic routines of the TP Yacc parser
- YACCTABL PAS internal tables used by the TP Yacc program
-
- YYLEX COD code template for the lexical analyzer routine
- YYPARSE COD code template for the LALR parser routine
-