This program was made as final project for Compiler course, written in C++, consist of two main portions, the first is lexical analyzer, which produce a linked list of Tokens, the second portion is the syntax analyzer, which read the tokens from the linked list and check that it don't violate the language grammars, error recovery technique is included to list all errors.
to run it... write a Pascal code in "code.txt" then compile and run the program, the compiler.cpp file and code.txt must be in the same folder, or copy "code.txt" to "Debug" folder and execute compiler.exe.
this compiler doesn't check for variables scope, or if it's defined or not.
I don't give a guarantee that it's good, because I didn't write even one line in Pascal language, so I couldn't check if it's true or not, I did just use production rules I have to make it.
Important: use MS-VC6 to compile and run.
File List:
53299-53299/
0b
53299-53299/code.txt
254b
53299-53299/compiler.cpp
26Kb
Similar code
PasBlk
(Popularity: ) : Is a TP4/5 program that is designed to help visualize block structures in Pascal programs. It can be used on either a monochrome or a color monitor. Blocks are displayed using seven different colors on a color monitor. On a ... Pascal Program Formatter
(Popularity: ) : The program has been updated to replace keywords according to the TURBO Pascal conventions.