From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 26 May 93 20:02:23 GMT From: news.crd.ge.com!e7sa!groleau@uunet.uu.net (Wes Groleau X7574) Subject: Re: what languages Ada 9X compilers are being written in Message-ID: List-Id: In article jls@ddciiny.UUCP (Jonathan Schilling) writ es: >..... as a general rule (with notable exceptions I'm sure), compilers are >best if written in their own language. First, it means the compiler developer s >will have a genuine "feel" for the language and its uses, rather than what >......... On the other hand, trying to write an Ada compiler in Ada has one quirk that forces one to do something NOT typically done in Ada: I had to write a parser for a special-purpose language. The easiest, most readable way to read tokens for reserved words is to have an enumerated type whose literals were all the reserved words, and read them with enumeration_io and/or with RESERVED_WORD_TYPE'VALUE. Unfortunately, some of the reserved words are also Ada reserved words, so a few extra wierd string techniques had to be used. If the target language was actually Ada, the problem would obviously be worse.