Re: Programming language and IDE design

wclodius@earthlink.net (William Clodius)
Fri, 22 Nov 2013 18:27:41 -0700

          From comp.compilers

Related articles
[16 earlier articles]
Re: Programming language and IDE design martin@gkc.org.uk (Martin Ward) (2013-11-16)
Re: Programming language and IDE design DrDiettrich1@aol.com (Hans-Peter Diettrich) (2013-11-16)
Re: Programming language and IDE design gneuner2@comcast.net (George Neuner) (2013-11-18)
Re: Programming language and IDE design sgk@REMOVEtroutmask.apl.washington.edu (Steven G. Kargl) (2013-11-19)
Re: Programming language and IDE design gneuner2@comcast.net (George Neuner) (2013-11-19)
Re: Programming language and IDE design jonathan@cobalt.astro.indiana.edu (Jonathan Thornburg) (2013-11-19)
Re: Programming language and IDE design wclodius@earthlink.net (2013-11-22)
Re: Programming language and IDE design robin51@dodo.com.au (robin) (2013-11-25)
Re: Programming language and IDE design martin@gkc.org.uk (Martin Ward) (2013-12-03)
Re: Programming language and IDE design DrDiettrich1@aol.com (Hans-Peter Diettrich) (2013-12-05)
Re: Programming language and IDE design hu47121@usenet.kitty.sub.org (2014-03-02)
Re: Programming language and IDE design gneuner2@comcast.net (George Neuner) (2014-03-02)
| List of all articles for this month |

From: wclodius@earthlink.net (William Clodius)
Newsgroups: comp.compilers
Date: Fri, 22 Nov 2013 18:27:41 -0700
Organization: Compilers Central
References: 13-10-016 13-10-017 13-11-003 13-11-011 13-11-016 13-11-018
Keywords: Fortran, parse, comment
Posted-Date: 22 Nov 2013 20:32:27 EST

George Neuner <gneuner2@comcast.net> wrote:


> On Sat, 16 Nov 2013 15:55:10 +0000, Martin Ward <martin@gkc.org.uk>
> wrote:
>
> >On Friday 08 Nov 2013 at 21:04, George Neuner <gneuner2@comcast.net> wrote:
> >
> >> The majority of successful languages are LL(k) for small k. It's hard
> >> to get much simpler than that for parsing.
> >
> >C is not LL(K), neither is COBOL, nor C++, nor I think is Java.
> >That probably covers the majority of successful languages:
> >if "success" is defined as "total lines of code in production".
>
> They _all_ are LL(k). More specifically, I believe all of your
> examples are, at most, LL(2).
>
> AFAIK, Fortran's DO loop requires the most lookahead of any of the
> classic language features: LL(4) [if I'm counting correctly].
>
> 10DOI=42
> 10DOI=42,45
>
> Card Fortran didn't require whitespace separation. You had to look
> ahead to find [or not] the comma to distinguish DO "I = m,n" from the
> assignment "DOI = n".


In Fortran typically staement classification (and identification of
tokens in fixed form) was performed as an initial pass. Once the
statement is identified as to whether or not it is an assignment then
the syntactic interpretation of the first token is LL(1), and I suspect
all tokens including Holleriths.
[I wrote some F77 parsers 30 years ago, and there was some reason I
needed to deal with the Hollerith strings before the rest of the
pre-parse, but I don't remember offhand what it was. -John]


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.