Re: GCC for BCPL (Nick Maclaren)
26 Nov 2004 22:42:42 -0500

          From comp.compilers

Related articles
GCC for BCPL (Tom Crick) (2004-11-20)
Re: GCC for BCPL (2004-11-26)
Re: GCC for BCPL (2004-12-11)
| List of all articles for this month |

From: (Nick Maclaren)
Newsgroups: comp.compilers
Date: 26 Nov 2004 22:42:42 -0500
Organization: University of Cambridge, England
References: 04-11-082
Keywords: parse, GCC
Posted-Date: 26 Nov 2004 22:42:42 EST

Tom Crick <> wrote:
>Recently work has been spent on validating the BCPL grammar, but this
>has forced a re-evaluation of using Bison to create the parser. The
>original BCPL parsers were recursive-descent and certain language
>features (particularly the optional semicolon problem) seem to point
>towards their use now. However, does anyone with experience of BCPL
>feel that Bison is adequate for generating a BCPL parser? As soon as
>this stage is over, the development focus can move back to GCC
>integration and the building of the (GCC 4.0) intermediate

Hmm. I know BCPL, but not Bison :-)

My reaction is that isn't a very good way to proceed, and that it
might well be simpler and cleaner to do a bootstrapping job via a
BCPL interpreter. I.e.:

        Take a BCPL compiler/interpreter (such as Martin Richards's!),
and add an alternate mode to generate the GCC internal form (or
something suitable to read in to generate it).

        Bootstrap by running that on itself and feeding its output
into GCC - voila! - a GCC compiler for BCPL.

Of course, things won't be quite as simple as that. Have you asked
Martin Richards what he thinks?

Nick Maclaren.

Post a followup to this message

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