Index of /ports/emulators/stella/work/stella-2.4.2/src/yacc

      Name                    Last modified       Size  Description

[DIR] Parent Directory 27-Aug-2007 07:04 - [   ] Makefile.yacc 20-Sep-2005 08:17 1k [   ] YaccParser.cxx 01-Jan-2007 10:04 7k [   ] YaccParser.hxx 01-Jan-2007 10:04 1k [   ] YaccParser.o 02-Jan-2008 17:54 85k [   ] calctest.c 14-Jul-2005 08:13 1k [   ] module.mk 30-Jun-2005 21:29 1k [   ] stella.y 20-Sep-2005 08:17 5k [   ] y.tab.c 20-Sep-2005 08:17 40k [   ] y.tab.h 20-Jul-2005 20:26 1k

Makefile.yacc    - Not part of the regular stella build!
YaccParser.cxx   - C++ wrapper for generated parser, includes hand-coded lexer
YaccParser.hxx   - Include in user code, declares public "methods" (actually functions)
calctest.c       - Not part of stella! Used for testing the lexel/parser.
module.mk        - Used for regular Stella build
stella.y         - Yacc/Bison source for parser
y.tab.c, y.tab.h - Generated parser. NOT BUILT AUTOMATICALLY!

I've only tested stella.y with GNU bison 1.35 and (once) with Berkeley
Yacc 1.9. Hopefully your favorite version will work, too :)

Even though they're generated, y.tab.c and .h are in CVS. This is so that
people who don't have a local copy of bison or yacc can still compile
Stella.

If you modify stella.y, you MUST run "make -f Makefile.yacc" in this directory.
This will regenerate y.tab.c and y.tab.h. Do this before "cvs commit".

If you're hacking the parser, you can test it without the rest of Stella
by running "make -f Makefile.yacc calctest" in this directory, then running
calctest with an expression as its argument:

./calctest '2+2'
= 4

If you're trying to benchmark the lexer/parser, try adding -DBM to the
g++ command that builds calctest.