Path: csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Rod Pemberton" Newsgroups: alt.os.development Subject: Re: C parser ramblings, language design, etc Date: Sun, 13 Sep 2015 07:20:20 -0400 Organization: Aioe.org NNTP Server Lines: 21 Message-ID: References: <76dff2ed-c7a8-42fe-8eab-82d1dce5487f@googlegroups.com> <44441c58-9675-43f0-a337-5e4f7f17947b@googlegroups.com> NNTP-Posting-Host: n4wpt9zq8xR26Ttf9mo2BA.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/12.16 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Xref: csiph.com alt.os.development:8780 On Sun, 13 Sep 2015 05:37:49 -0400, Alexei A. Frounze wrote: > Now, if you didn't want to fast forward from > do to while, what is the fuss about? The 'while' as a statement is seen prior to the 'while' which goes with the 'do'. A simple parser/compiler has no way to determine which is which without braces for a compound statement. I.e., it can't determine what is or isn't a statement, just what are keywords and other language elements. Analysis of the AST or a grammar-based parser or some other solution would be required to eliminate the 'while' as a statement as being the 'while' paired with 'do'. I.e., C is too complicated for simple parsing and code generation from the language. Rod Pemberton -- Just how many texting and calendar apps does humanity need?