Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!uflorida!gatech!gt-eedsp!baud From: baud@gt-eedsp.UUCP (Kurt Baudendistel) Newsgroups: comp.lang.c++ Subject: Re: C++ considered disenchanting Message-ID: <535@gt-eedsp.UUCP> Date: 19 Oct 88 16:04:09 GMT References: <2010@cs.Buffalo.EDU> <3006@mulga.oz> Reply-To: baud@gt-eedsp.UUCP (Kurt Baudendistel) Organization: School of Electrical Engineering, Ga. Tech, Atlanta, GA 30332 Lines: 35 In article <3006@mulga.oz> ttey@mulga.oz (YEO Tee Thiam Eric) writes: >It is so complex that it has been said that to parse C++ correctly, >a recursive decent parser with an infinite look ahead and some >heuristics is required (I believed it was mentioned in some >documentation for GNU G++). interestingly enough, the g++ documentation states that [t]he design of the C++ programming language did not take into account the usefulness of being able to specify that language using an LALR(1) grammar. As a resut, in order to correctly parse it, one needs a look-ahead lexical analyzer (with infinite lookahead), and a recursive descent parser, guided by some good heuristics. which supports this conjecture. however, the documentation goes on to state that ... in providing such a grammar [LALR(1) as g++ actually does], some syntactic forms were lost, most notably old-style C function declarations and occasionally function parameters which are declared longhand to be pointers to functions are not recognized properly. the forms that need to be modified are standard c forms, but c++ was designed to be c compatible. there's the rub. with all of this c++ bashing, what is my alternative (realistically) for a programming langugage that provides the c++ power of abstraction and the efficiency of c? -- Kurt Baudendistel [GRA McClellan] Georgia Tech, School of Electrical Engineering, Atlanta, GA 30332 USENET: ...!{allegra,hplabs,ihnp4,ulysses}!gatech!gt-eedsp!baud INTERNET: gt-eedsp!baud@gatech.edu