Related articles |
---|
Writing a C/C++ compiler in C++ dezakin@usa.net (2004-01-22) |
Re: Writing a C/C++ compiler in C++ david.boyle@ed.tadpole.com (2004-01-31) |
Re: Writing a C/C++ compiler in C++ haberg@matematik.su.se (2004-02-01) |
Re: Writing a C/C++ compiler in C++ jo@spiffy.ox.compsoc.net (Joel Dillon) (2004-02-01) |
Re: Writing a C/C++ compiler in C++ vbdis@aol.com (2004-02-01) |
Re: Writing a C/C++ compiler in C++ dezakin@usa.net (2004-02-01) |
Re: Writing a C/C++ compiler in C++ vbdis@aol.com (2004-02-04) |
Re: Writing a C/C++ compiler in C++ hkaiser@users.sourceforge.net (2004-02-12) |
Re: Writing a C/C++ compiler in C++ jakacki@hotmail.com (2004-02-12) |
[3 later articles] |
From: | haberg@matematik.su.se (Hans Aberg) |
Newsgroups: | comp.compilers |
Date: | 1 Feb 2004 12:34:05 -0500 |
Organization: | Mathematics |
References: | 04-01-146 |
Keywords: | C++, practice |
Posted-Date: | 01 Feb 2004 12:34:05 EST |
dezakin@usa.net (Dez Akin) wrote:
>I've been thinking of writing a C++ compiler in C++ over the next
>several years, and I was wondering what's changed in writing a
>compiler?
...
>So it seemed straightforward except that C++ isn't a LALR(1) grammer
>that Bison or Byacc accepts. Does this pose problems in writing the
>lexer?
The Bison manual has an example how certain C++ grammar features can be
handled using Bison's GLR parser. It is still LALR(1), but splits the
parser stack when an ambiguity arises, until it somehow can be resolved.
Why do you want to write a C++ compiler on your own? -- Usually they are
written by a number of people, because C++ is such a large, multiparadigm
language.
Hans Aberg
Return to the
comp.compilers page.
Search the
comp.compilers archives again.