Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!uunet!hsi!essnj1!dns From: dns@essnj1.ESSNJAY.COM (David N. Sears) Newsgroups: comp.lang.c++ Subject: Re: Object Oriented Lex(++) and Yacc(++) Message-ID: <812@essnj1.ESSNJAY.COM> Date: 22 Jun 91 18:01:57 GMT References: <1991Jun17.002512.1384@atc1.atc.com> Organization: ESSNJAY Systems Inc., Bethany, CT, USA Lines: 26 In <1991Jun17.002512.1384@atc1.atc.com> mayil@atc1.atc.com (S. P. Mayil) writes: >Hi, >We are planning to write an interpreter for a customized language in C++ >with the help of tools like Lex(++) and Yacc(++). Do you know about any >Lex++ and Yacc++ implementations that > o generate C++ compatible sources at the least > o make use of C++ concepts and generate not just compatible sources but > full fledged C++ sources. I'm developing a real-time graphics application using g++ and InterViews. Part of the design spec is a graph description language to be parsed at runtime. In complete ignorance of any special requirements of c++, I wrote a yacc grammar and a lex front-end for the language (with c++ actions to construct new objects) and passed it through g++. I now have a yac++.h and lex++.h, neither more than 6 lines of code, which allow me to use standard systemV lex and yacc in c++. If you try compiling your grammar with your c++ compiler, you may find that it is just as easy for you to adapt lex and yacc for your application. cheers, David Sears loosely affiliated with EssnJay Systems, Inc.