Path: csiph.com!feeder.erje.net!2.us.feeder.erje.net!news.glorb.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: Nils M Holm Newsgroups: comp.compilers Subject: Re: Self compiling compiler Date: 4 Apr 2016 12:54:15 GMT Organization: TARFU Lines: 25 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <16-04-006@comp.compilers> References: <16-03-013@comp.compilers> <16-03-016@comp.compilers> <16-04-001@comp.compilers> Injection-Info: miucha.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="70320"; mail-complaints-to="abuse@iecc.com" Keywords: tools Posted-Date: 04 Apr 2016 17:20:22 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: csiph.com comp.compilers:1697 Kaz Kylheku <545-066-4921@kylheku.com> wrote: > What matters here is not the compiler size but: > > - The compiler has to be self-bootstrapping. > [...] > - how easy is it, within the compiler's framework, to do this: > - insert a piece of code which recognizes a static source > code structure (perhaps as an abstract-syntax-tree-level pattern > match) so that it can say "hey, I'm compiling myself: [...] > - obtain the above AST-recognizing code not as C source, but as as a > piece of AST material which the compiler itself can insert into a > parse. > - obtain, as an AST, some rogue code which the malicious compiler > inserts into the parse of the target program such as login, > as well as the rogue code which perpetuates all of this. Right, I missed that point when suggesting Foogol! Most other compilers on my page do fit that bill, and their design is quite clean and modular. The T3X compiler even uses glue code to communicate between phases which, I guess, would make it a good candidate for Thompson's stunt. SubC uses an AST. -- Nils M Holm < n m h @ t 3 x . o r g > www.t3x.org