Path: utzoo!attcan!uunet!snorkelwacker!paperboy!meissner From: meissner@osf.org (Michael Meissner) Newsgroups: comp.lang.misc Subject: Re: Cheap implementations of languages (Re: Pointers and poor implementations (was: Re: JLG's flogging ...)) Message-ID: Date: 11 Apr 90 15:29:47 GMT References: <14317@lambda.UUCP> <5610@scolex.sco.COM> Sender: news@OSF.ORG Organization: Open Software Foundation Lines: 34 In-reply-to: seanf@sco.COM's message of 11 Apr 90 08:20:18 GMT In article <5610@scolex.sco.COM> seanf@sco.COM (Sean Fagan) writes: | In article <14317@lambda.UUCP> jlg@lambda.UUCP (Jim Giles) writes: | >The fact is that C is not simpler to implement | >than the other procedural languages in general use. In some ways it | >is harder to implement. | | I beg to differ. One of the reasons C is easier to deal with is the lack of | the various keywords and semantic "gotchas" that other languages have. | | > a) Lexical scanning and parsing. | | Not a problem, really, for either language. In fact, for any sane language | (i.e., anything other than PL/I 8-)), this isn't too difficult. No Fortran 77 is much harder to lex, and somewhat easier to parse. In Fortran, spaces outside of hollerith constants and strings are immaterial, which means that you must have a smart lexer, and can't use the normal lex-type tools. The classic case is: DO 10 I=1.15 /* Assign 1.15 to var DO10I */ vs. DO 10 I=1,15 /* Loop 15 times */ In C the lexer must be a little smart, because it has to know about typedef names and return a different token. C++ is somewhat more difficult than C on this regard. -- Michael Meissner email: meissner@osf.org phone: 617-621-8861 Open Software Foundation, 11 Cambridge Center, Cambridge, MA Catproof is an oxymoron, Childproof is nearly so