tinypas

所属分类:编译器/解释器
开发工具:Pascal
文件大小:62KB
下载次数:16
上传日期:2009-09-20 21:49:15
上 传 者rc2molina
说明:  Small compiler for Pascal

文件列表:
COLIN\PROGRAM\Utils\TinyPas\Errors.pas (1733, 1998-12-13)
COLIN\PROGRAM\Utils\TinyPas\Hello.pas (244, 1998-12-14)
COLIN\PROGRAM\Utils\TinyPas\PASS32.EXE (110112, 1998-07-02)
COLIN\PROGRAM\Utils\TinyPas\PRO32.EXE (10270, 1998-07-01)
COLIN\PROGRAM\Utils\TinyPas\TinyPas.dof (1271, 1998-12-14)
COLIN\PROGRAM\Utils\TinyPas\TinyPas.pas (7620, 1998-12-14)
COLIN\PROGRAM\Utils\TinyPas\TinyPas.res (876, 1998-12-12)
COLIN\PROGRAM\Utils\TinyPas\Utils.pas (998, 1998-12-13)

********************************************************************** * * * - TinyPascal compiler v0.01 - * * Copyright Bloodshed Software * * * * email: webmaster@bloodshed.nu * * www: http://www.bloodshed.nu/ * * * ********************************************************************** TinyPascal implements a small compiler for a very simple Pascal language. It compiles Write and Writeln procedures into x86 assembly that can be then assemble and link with Pass32 (public domain tool). The sources have been compiled under Delphi 3. I think it should work with others version. - Installation : First extract the tinypas.zip archive to a directory. Then load TinyPas.pas into Delphi. Just compile it and you'll have built the TinyPascal compiler executable. - Compiling a file with TinyPascal : You can compile a file by calling the compiler like this: tinypas Where is the path/name to the file to compile. I you do not give any parameters, you'll be prompt for a filename. If you got no errors, the compiler will ask you if you want to create an executable (.com Msdos executable. If you want to have a .exe file, then you should remove the -t parameter when you call Pass32. I decided to have by default a .com executable because if i take a .exe file generated, it doesn't work on Windows). - Writing programs with TinyPascal :) A TinyPascal source composed only of the 5 keywords: program,begin,end, write,writeln. In can only compile Write and Writeln procedures into x86 assembly that can be the assemble and link to an executable file. The compiler can also encapsulate comments. A TinyPascal source file has the following look: { Sample example to use with the TinyPascal compiler } program Hello; begin writeln('Hello'); { Write Hello to the console with a line break } write('World !'); { Write World ! to the console without a line feed } end. Here is the EBNF grammar of the TinyPascal language : tinypascal_program ::= "PROGRAM" identifier ";" main_block "." main_block ::= "BEGIN" write_procedure | writeln_procedure "END" write_procedure ::= "WRITE "(" string ")" ";" writeln_procedure ::= "WRITELN" "(" string ")" ";" - Disclaimer of warranty: - We're not responsible of any damages, loss of data or anything else this program could cause your computer. - This program is freeware but you can't make money from it. - The sources can be distributed if no changes if made. - You can use the sources: * for educational purpose. * to participate in the improvement of this program (see below) - Participating in the improvement of TinyPascal: If you want to participate on the improvement of this program, please send me your modified sources to: Colin.Laplace@Wanadoo.fr www: http://www.bloodshed.nu/

近期下载者

相关文件


收藏者