0Write your program to compile an input file whose name is taken from the command line. Your program will then parse (yyparse()) the input file and, *if* the parse terminates without an error, print out the entire symbol table. Run your program for each of the files:Program 3 is here.
SampleA.pax. This file has no errors.
SampleB.pax. This file has a syntax error.
SampleC.pax. This file has a lexical error.
gcc -o sample3 sample3.c for Unix, etc.(here the "- o" switch means the following string is to be the name of the output file.) and run the resulting executable for you sample terminal session. Read the comment at the beginning of the sample Paxi file before running your sample terminal session.
gcc -o sample3.exe sample3.c for Windows
JFlex is a version of lex which generates Java code (and is written in Java). JFlex and complete documentation can be found at http://jflex.de.
byacc/j is an extension of byacc (Berkeley yacc) which will, as an option, generate Java code. It can be found, along with documentation, at http://byaccj.sourceforge.net.
DOS ports of flex and bison can be downloaded here: http://www.delorie.com/pub/djgpp/current/v2gnu/flx254b.zip and http://www.delorie.com/pub/djgpp/current/v2gnu/bsn23b.zip.
djgpp, a DOS port of gcc/g++, can be accessed by following links from http://www.delorie.com/djgpp . Documentation is available there as well.
A large number of Unix programming tools have been ported using this compiler and can be found in http://www.delorie.com/pub/djgpp/current/v2gnu/
Cygwin provides gcc/g++ along with a Unix-like environment. Read about it and how to download it at http://www.cygwin.com/ (but be prepared for a huge download).
A Windows port of emacs is ntemacs ( http://www.gnu.org/software/emacs/windows/ntemacs.html)
If you really must use vi, vim ("vi improved") is available for a variety of systems including Windows at http://www.vim.org
jEdit, a powerful editor with commands much like a standard word processor, is available for all systems at http://jedit.org.