Re: Visual compiler construction (Ben Combee)
6 Sep 1999 11:54:10 -0400

          From comp.compilers

Related articles
Visual compiler construction (Walt and Denise Fles) (1999-09-05)
Re: Visual compiler construction (1999-09-06)
Re: Visual compiler construction (Taylor Hutt) (1999-09-10)
| List of all articles for this month |

From: (Ben Combee)
Newsgroups: comp.compilers
Date: 6 Sep 1999 11:54:10 -0400
Organization: Metrowerks
References: 99-09-005
Keywords: practice

> do "real world" compilers like the VC++ series use Lex and Yacc? I
> know that it is recommened to "hand code" a lexer for use with YACC,
> but what about products from MS, Borland, and the GNU compilers are
> they written in YACC? I couldn't imagine a C grammar written without
> it ( though Im sure it originally was ).

CodeWarrior's compilers use a hand-coded lexical analysis phase and a
recursive descent parser for their C and C++ language analysis. The
theory behind it is similar to that from the parsing column in the
June 1999 SIGPLAN Notices -- we detect the beginning of interesting
symbols then use a matching scheme to determine what if the token is
reserved or an identifier. This gives us a lot of flexibility in
deciding what particular language we are parsing (strict C89, strict
C9X, C with extensions, ISO C++, ARM-compatible C++, or Objective C,
for example).
Ben Combee <> -- x86/Win32/Linux/NetWare CompilerWarrior

Post a followup to this message

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