Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Compilers > Re: Bootstrapin...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 19 Topic 2388 of 2472
Post > Topic >>

Re: Bootstraping compilers ?

by Hans-Peter Diettrich <DrDiettrich1@[EMAIL PROTECTED] > Apr 22, 2008 at 08:07 PM

Paulo Jorge de O. C. de Matos wrote:

>>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?

Consider two aspects: the language to compile, and the compiler itself.

With regards to the language you may want to retain backwards
compatibility, or multiple "idioms" of the language, which may be
selectable by command line switches. This part can grow or shrink,
whatever functionality you want to put into, or remove from, your
concrete compiler. The lexer/parser may be implemented for C99, with
conditional branches in the semantic code to reject or allow for the
recognition of the C95/C99 or any sooner (or later) language specs. A
parser frequently will accept more (syntactic) constructs, whereas the
exact language specification (including semantics) will be implemented
by semantic code only.

The compiler itself may not profit from new language features, so that
this code can stay in the old (C95) version - provided backwards
compatibility of the language specs.

DoDi
 




 19 Posts in Topic:
Bootstraping compilers ?
pocm@[EMAIL PROTECTED] (  2008-04-16 22:30:21 
Re: Bootstraping compilers ?
Chris Hills <chris@[EM  2008-04-18 11:45:12 
Re: Bootstraping compilers ?
pocm@[EMAIL PROTECTED] (  2008-04-22 00:07:22 
Re: Bootstraping compilers ?
David Spencer <spencer  2008-04-22 16:05:51 
Re: Bootstraping compilers ?
Hans-Peter Diettrich <  2008-04-22 20:07:33 
Re: Bootstraping compilers ?
=?ISO-8859-1?Q?Roland_Lei  2008-04-18 07:32:18 
Re: Bootstraping compilers ?
Marco van de Voort <ma  2008-04-18 19:32:59 
Re: Bootstraping compilers ?
"Damian Thomas"  2008-04-18 08:46:51 
Re: Bootstraping compilers ?
Marco van de Voort <ma  2008-04-18 19:38:29 
Re: Bootstraping compilers ?
"Christopher Glaeser  2008-04-19 23:42:06 
Re: Bootstraping compilers ?
Greg Lindahl <lindahl@  2008-04-18 14:13:55 
Re: Bootstraping compilers ?
torbenm@[EMAIL PROTECTED]  2008-04-21 10:35:52 
Re: Bootstraping compilers ?
Hans-Peter Diettrich <  2008-04-21 20:22:33 
Re: Bootstraping compilers ?
glen herrmannsfeldt <g  2008-04-21 21:18:53 
Re: Bootstraping compilers ?
glen herrmannsfeldt <g  2008-04-23 00:47:23 
Re: Fortran H, was Bootstraping compilers ?
"Comp.compilers"  2008-04-23 21:15:42 
Re: Fortran H, was Bootstraping compilers ?
=?ISO-8859-1?Q?J=FCrgen_K  2008-04-24 17:59:13 
Re: Fortran H, was Bootstraping compilers ?
glen herrmannsfeldt <g  2008-04-25 12:57:11 
Re: Fortran H, was Bootstraping compilers ?
glen herrmannsfeldt <g  2008-04-24 10:07:24 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Jul 25 2:21:23 CDT 2008.