Re: Bootstraping compilers ?



pocm@xxxxxxxxxxx (Paulo Jorge de O. C. de Matos) writes:

Chris Hills <chris@xxxxxxxxxxxx> writes:
However once you have written a C99 compiler (using C95) you can then
write a C99 compiler and compile it with itself (after the first
compilation using the C99 compiler written in C95)

Thanks you all for your replies. Chris, this is making me
confused. Does your quote mean that I would have to write two
compilers? One compiler in C95 and one in C99? So the first would
accept C99, the second in C99 is then fed into the first?

It's not too hard to write a C99 parser that will also parse C95;
almost all valid C95 code is also valid C99 code, and will generate
the same object code. The differences are relatively easy to deal
with either in the scanner or in analyzing the parse tree.

--
dhs spencer@xxxxxxxxx

.



Relevant Pages

  • Re: Requesting advice how to clean up C code for validating string represents integer
    ... Or whatever the GNU C compiler uses when the -ansi switch is turned ... -ansi Support all ANSI standard C programs. ... Please tell me whether GNU C MAN pages are referring to C99 or what? ...
    (comp.lang.c)
  • Re: Storgae durations
    ... whether C99 is the "current" standard depends on what ... gcc is *close* to being a C99 compiler, but it isn't actually there yet. ... That's precisely what "conforming" means. ... The function won't always invoke undefined behavior, ...
    (comp.lang.c)
  • Re: const array declaration
    ... [I snipped some gcc diagnostics from a previous poster here] ... outside the C code changes it, so that the compiler cannot simply ... "b" are thus not at all constants, but C99 accepts this, just as ... In C89, all aggregate initializers ...
    (comp.lang.c)
  • Re: good c compiler
    ... Language accepted is C99. ... I take it, then, that you accept that lcc-win32 does not conform to any ISO ... and is therefore not really a C compiler. ...
    (comp.lang.c)
  • Re: Is C99 the final C? (some suggestions)
    ... The Intel C compiler claims to also support C99, ... The Pelles C compiler for Windows and Pocket PC claims C99 support. ...
    (comp.lang.c)