Related articles |
---|
Sun lex++ and yacc++ ? gunter@sprite.Berkeley.EDU (1992-04-22) |
Re: Sun lex++ and yacc++ ? dds@doc.imperial.ac.uk (Diomidis Spinellis) (1992-04-23) |
Re: Sun lex++ and yacc++ ? vern@daffy.ee.lbl.gov (1992-04-23) |
Newsgroups: | comp.compilers |
From: | vern@daffy.ee.lbl.gov (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
Vern Paxson vern@ee.lbl.gov
Computer Systems Engineering ucbvax!ee.lbl.gov!vern
Lawrence Berkeley Laboratory (510) 486-7504
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.