Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!apple!bionet!agate!helios.ee.lbl.gov!nosc!cod!mball From: mball@cod.NOSC.MIL (Michael S. Ball) Newsgroups: comp.lang.c++ Subject: Re: C++ considered disenchanting Message-ID: <1269@cod.NOSC.MIL> Date: 23 Oct 88 20:13:58 GMT References: <2010@cs.Buffalo.EDU> <3006@mulga.oz> Reply-To: mball@cod.nosc.mil.UUCP (Michael S. Ball) Organization: Naval Ocean Systems Center, San Diego Lines: 27 In article halldors@paul.rutgers.edu (Magnus M Halldorsson) writes: >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 ... > >The syntax of C++ is not *complicated*. It isn't really any more >difficult to understand than plain C, however, it is somewhat harder >to parse. The complexity is in the semantics:... Let's get a couple of facts straight. 1. C++ does not require recursive descent (or any other particular technique) for parsing. 2. Parsing does require an indefinite (not infinite) lookahead to resolve certain cases. In my opinion, the cases where confusion may arise are uncommon and do not appear to cause any great difficulty with the language. C++ is complex, but parsing difficulties do not seem to contribute much to that complexity. Mike Ball TauMetric Corporation 1094 Cudahy Place, Ste 302 San Diego, CA 92110 (619)275-6381