Re: Compiler Compiler Compiler

"Kevin Szabo" <kszabo@nortelnetworks.com>
27 Mar 2001 23:23:23 -0500

          From comp.compilers

Related articles
Compiler Compiler Compiler danwang+news@cs.princeton.edu (Daniel C. Wang) (2001-03-22)
Re: Compiler Compiler Compiler jjan@cs.rug.nl (J.H.Jongejan) (2001-03-26)
Re: Compiler Compiler Compiler mike@dimmick.demon.co.uk (Mike Dimmick) (2001-03-26)
Re: Compiler Compiler Compiler nr@labrador.eecs.harvard.edu (2001-03-26)
Re: compiler compiler compiler Dr_Feriozi@prodigy.net (2001-03-26)
Re: Compiler Compiler Compiler kszabo@nortelnetworks.com (Kevin Szabo) (2001-03-27)
Re: Compiler Compiler Compiler Trevor.Jenkins@suneidesis.com (Trevor Jenkins) (2001-03-27)
Re: Compiler Compiler Compiler cfc@world.std.com (Chris F Clark) (2001-03-27)
Re: Compiler Compiler Compiler i.dittmer@fh-osnabrueck.de (Ingo Dittmer) (2001-03-27)
Re: Compiler Compiler Compiler iank@idiom.com (2001-03-27)
Re: Compiler Compiler Compiler rog@vitanuova.com (2001-03-31)
Re: Compiler Compiler Compiler blume@research.bell-labs.com (Matthias Blume) (2001-03-31)
[9 later articles]
| List of all articles for this month |

From: "Kevin Szabo" <kszabo@nortelnetworks.com>
Newsgroups: comp.compilers
Date: 27 Mar 2001 23:23:23 -0500
Organization: Nortel Networks (Ottawa, Ontario, Canada)
References: 01-03-095 01-03-122
Keywords: parse, tools
Posted-Date: 27 Mar 2001 23:23:23 EST

Mike Dimmick <mike@dimmick.demon.co.uk> wrote:
|Many 'new' programming languages tend to be C or C++ derivatives.
|There are a number of problems with the C and C++ syntaxes which can
|only be solved by absorbing semantic information into the parser.
|Unfortunately, this usually means that information must be entered
|into semantic tables whilst processing a complete rule. YACC really
|doesn't handle this at all well.


I've never tried to parse C/C++. Could you give an example or two
of the problems (or point me to a reference).


The problems I have seen with some parsing strategies is having the
lexer bind a symbol before it gets to the parser, that is trying
to lookup in the symbol tables and resolving whether a token is a
varible/type/unbound before it hits the parser.


Cheers,
Kevin
[With C, the messiest place is parsing typedefs, exactly because of
the symbol binding issue. Typedefs act like keywords except
sometimes. C++ is much worse, the syntax is ambiguous as was
discussed here recently. -John]





Post a followup to this message

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