Re: Sun lex++ and yacc++ ? (Vern Paxson)
Thu, 23 Apr 1992 22:31:35 GMT

          From comp.compilers

Related articles
Sun lex++ and yacc++ ? gunter@sprite.Berkeley.EDU (1992-04-22)
Re: Sun lex++ and yacc++ ? (Diomidis Spinellis) (1992-04-23)
Re: Sun lex++ and yacc++ ? (1992-04-23)
| List of all articles for this month |

Newsgroups: comp.compilers
From: (Vern Paxson)
Keywords: lex, yacc, C++
Organization: Lawrence Berkeley Laboratory, Berkeley
References: 92-04-111
Date: Thu, 23 Apr 1992 22:31:35 GMT

In article 92-04-111 gunter@sprite.Berkeley.EDU (Michial Gunter) writes:
>(The problem with yacc is that the types of all (non)terminal are a
>union. Unions in C++ cannot contain classes with constructor ...

Use pointers to classes instead of classes themselves. With this approach
I don't have any problems writing C++ parser/scanners using yacc (or bison)
and flex.


Vern Paxson
Computer Systems Engineering ucbvax!!vern
Lawrence Berkeley Laboratory (510) 486-7504

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.