Информационный сервер для программистов: Исходники со всего света. Паскальные исходники со всего света
  Powered by Поисковый сервер Яndex: Найдется ВСЁ!
На Главную Исходники Форум Информер Страны мира
   Разбор и Анализ Строк    >>    tply30a2
   
 
 TP Lex and Yacc Version 3.0a Sources   Albert Graef 13.05.1992

TP Lex and Yacc version 3.0a Sources - A lexical analyzer generator for MS-DOS/Turbo Pascal. TP Yacc - Yet Another Compiler Compiler for MS-DOS/Turbo Pascal.



77k 
 

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