sourcer

所属分类:编译器/解释器
开发工具:C/C++
文件大小:56KB
下载次数:18
上传日期:2009-06-13 10:04:36
上 传 者liu_gin
说明:  TINY语言编译器,包括语法分析,词法分析等等
(TINY compiler language, including syntax analysis, lexical analysis, etc.)

文件列表:
SCAN.H (659, 1998-08-01)
PARSE.H (484, 1998-08-01)
CGEN.H (679, 1998-08-01)
TM.C (16753, 1998-08-01)
UTIL.C (4848, 1998-08-01)
SAMPLE.TM (920, 1998-07-31)
CODE.C (3039, 1998-08-01)
SAMPLE.TNY (263, 1996-08-25)
TINY.EXE (40736, 1998-04-26)
TM.EXE (14104, 1998-03-20)
MAIN.C (2535, 1998-08-01)
MAKEFILE (1129, 1998-02-03)
ANALYZE.H (652, 1998-08-01)
CODE.H (2234, 1998-08-01)
GLOBALS.H (2955, 1998-08-01)
SYMTAB.H (959, 1998-08-01)
UTIL.H (1037, 1998-08-01)
ANALYZE.C (4452, 1998-08-01)
CGEN.C (6971, 1998-08-01)
PARSE.C (5173, 1998-08-01)
SCAN.C (5733, 1999-08-04)
SYMTAB.C (3564, 1998-08-01)
YACC (0, 2003-02-10)
YACC\TINY.Y (5161, 1997-02-01)
YACC\GLOBALS.H (3338, 1997-01-31)
LEX (0, 2003-02-10)
LEX\TINY.L (1995, 1998-07-31)

This is the README.DOS file included in the loucomp.zip file. The other files in the distribution are the source code files in standard C for the TINY compiler and Tiny Machine simulator as described in the text: Compiler Construction - Principles and Practice, by Kenneth C. Louden, PWS Publishing Co., 1997. They are (with very minor variations) all the files as listed in Appendices B and C of the text. At the top level are: The file you are now reading (README.DOS): The sixteen files as listed on page 23 of the text (which are used to make the TINY compiler) The tm.c source code file for the TM machine interpreter The TINY program of Figure 1.4, page 23 (called sample.tny) Two DOS executables tiny.exe and tm.exe for your convenience. A Makefile for the TINY compiler and TM simulator for Borland's MAKE utility (with minor edits this should work for other MAKEs). There are also two subdirectories: lex and yacc (assuming you have unzipped with the -d option). The lex subdirectory contains the single file tiny.l as described in the text on pages 90-91, which can be used to build a lex/flex version of the scanner. The yacc subdirectory contains the two files tiny.y and globals.h as described on pages 243-245 of the text, which can be used to build a Yacc/Bison version of the parser. Note that, due to the considerable variation among Yacc/Bison versions, these files will probably need some minor editing in order to get them to work correctly. All source code has been tested with the Borland 3.0 and 4.0 compilers, as well as with the Gnu C compiler and the Sun Ansi C compiler (version 2.0). Any Ansi C compiler should be usable to compile this code, but there is no guarantee that your favorite compiler will work. Nevertheless, if you have a problem, I would appreciate hearing about it, and I will respond if I can find a solution.

近期下载者

相关文件


收藏者