Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!sgi!wdl1!rme From: rme@wdl1.UUCP (Richard M Emberson) Newsgroups: comp.lang.c++ Subject: Re: Using OO Languages for Compilers/Interpreters Message-ID: <3690007@wdl1.UUCP> Date: 10 Apr 89 13:39:11 GMT References: <16915@cup.portal.com> Lines: 21 A small (but by far the most important point) has been missed. Simply to have yacc or bison produce C++ code is not important, but what is important is that their outputs are c++ classes. This allows one to have multiple bnf grammers in the same executable. (Try linking the output of two yacc grammers in the same program - the yacc/bison drivers don't allow multiple grammar tables). With yacc/bison one dare not use them to make a library because any user of the library can not then use yacc/bison in the application linking that library. The yacc++ I produced from yacc yeilds instances of a class (called yacc) defined in a c++ header file. The grammar tables are passed in at instance creation. Thus multiple instances can exist in the same program and at the same time. The same can be done for lex/flex. Richard M. Emberson