Re: Parsing a language with optional spaces

Christian Schoenebeck <[email protected]>
Newsgroups gmane.comp.parsers.bison.general
Message-ID <7857553.s7lKJkEGbu@silver>
On Dienstag, 14. Juli 2020 07:02:36 CEST Akim Demaille wrote:
> > Le 13 juil. 2020 à 07:56, Akim Demaille <[email protected]> a écrit :
> >> Le 12 juil. 2020 à 19:47, Christian Schoenebeck
> >> <[email protected]> a écrit :>> 
> >> And BTW:
> >>> The GLR parsers require a compiler for ISO C89 or later.
> >> 
> >> Tough requirement! ;-)
> > 
> > Yes, we could get rid of that mention, indeed.  Besides, Valentin recently
> > pointed me to one very discreet place where glr.c actually had a
> > declaration after a statement, so it was actually C99.
> > 
> > I'll clean that up, thanks!
> 
> I'm installing this.
> 
> commit 88bd814bf103123c4f820f0a4f8fee85f8a63047
> Author: Akim Demaille <[email protected]>
> Date:   Tue Jul 14 06:56:15 2020 +0200

Sure, looks fine to me!

> -Except for GLR parsers (@pxref{Compiler Requirements for GLR}), the C
> -code that Bison generates requires only C89 or later.  However, Bison
> -itself requires common C99 features such as declarations after
> -statements.  Bison's @code{configure} script attempts to enable C99 (or
> -later) support on compilers that default to pre-C99.  If your compiler
> -lacks these C99 features entirely, GCC may well be a better choice; or
> -you can try upgrading to your compiler's latest version.
> +Except for GLR parsers (which require C99), the C code that Bison generates
> +requires only C89 or later.  However, Bison itself requires common C99
> +features such as declarations after statements.  Bison's @code{configure}
> +script attempts to enable C99 (or later) support on compilers that default
> +to pre-C99.  If your compiler lacks these C99 features entirely, GCC may
> +well be a better choice; or you can try upgrading to your compiler's
> latest +version.

That would already be far beyond my personal level of detail. :) I mean it is 
absolutely correct, but you barely find a C compiler for that to be an issue 
at all nowaways. Usually you would need to explicitly force a compiler to 
strict ISO C89 for that to happen today.

Best regards,
Christian Schoenebeck
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.