Re: Supporting multiple input syntaxes

luser droog <mijoryx@yahoo.com.dmarc.email>
Sun, 23 Aug 2020 22:16:33 -0700 (PDT)

          From comp.compilers

Related articles
[6 earlier articles]
Supporting multiple input syntaxes davidlovemore@gmail.com (David Lovemore) (2020-08-15)
Re: Supporting multiple input syntaxes mijoryx@yahoo.com.dmarc.email (luser droog) (2020-08-15)
Re: Supporting multiple input syntaxes davidlovemore@gmail.com (David Lovemore) (2020-08-16)
Re: Supporting multiple input syntaxes mijoryx@yahoo.com.dmarc.email (luser droog) (2020-08-20)
Re: Supporting multiple input syntaxes gah4@u.washington.edu (gah4) (2020-08-23)
Re: Supporting multiple input syntaxes mijoryx@yahoo.com.dmarc.email (luser droog) (2020-08-23)
Re: Supporting multiple input syntaxes mijoryx@yahoo.com.dmarc.email (luser droog) (2020-08-23)
Re: Supporting multiple input syntaxes antispam@math.uni.wroc.pl (2021-02-11)
Re: Supporting multiple input syntaxes elronnd@elronnd.net (Elijah Stone) (2021-02-17)
Re: Supporting multiple input syntaxes antispam@math.uni.wroc.pl (2021-02-23)
Re: Supporting multiple input syntaxes ltcmelo@gmail.com (ltc...@gmail.com) (2021-03-14)
Re: Supporting multiple input syntaxes rockbrentwood@gmail.com (Rock Brentwood) (2021-03-14)
| List of all articles for this month |
From: luser droog <mijoryx@yahoo.com.dmarc.email>
Newsgroups: comp.compilers
Date: Sun, 23 Aug 2020 22:16:33 -0700 (PDT)
Organization: Compilers Central
References: 20-08-002 20-08-004
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="85732"; mail-complaints-to="abuse@iecc.com"
Keywords: parse, LL(1)
Posted-Date: 24 Aug 2020 11:43:04 EDT
In-Reply-To: 20-08-004

On Thursday, August 13, 2020 at 5:22:51 PM UTC-5, Hans-Peter Diettrich wrote:
> Am 13.08.2020 um 00:20 schrieb luser droog:
> > I've got my project successfully parsing the circa-1975 C syntax
> > from that old manual. I'd like to add parsers for K&R1 and c90
> > syntaxes.
> >
> > How separate should these be? Should they be complete
> > separate grammars, or more piecewise selection?
>
> IMO this depends widely on the usage of the parser output (diagnostics,
> backend...). C90 is much stricter than K&R, requires more checks. Do you
> need extensive error diagnostics, or do you assume that all source code
> is free of errors?
>
>
> > https://github.com/luser-dr00g/pcomb/blob/master/pc9syn.c
>
> You seem to implement an LL(1) parser? My C98 Parser is LL(2), i.e. an
> LL(1) parser with one or two locations where more lookahead is required.


In which places do you need more lookahead? Btw, some of my reading
describes my parsers as LL(infinity) because of the backtracking.


Post a followup to this message

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