Tom Crick <>
28 Nov 2004 23:18:41 -0500

          From comp.compilers

Related articles
RE: GCC for BCPL (Tom Linden) (2004-11-26)
RE: GCC for BCPL (Tom Crick) (2004-11-28)
| List of all articles for this month |

From: Tom Crick <>
Newsgroups: comp.compilers
Date: 28 Nov 2004 23:18:41 -0500
Organization: Compilers Central
References: <>
Keywords: GCC, parse
Posted-Date: 28 Nov 2004 23:18:41 EST

Quoting Tom Linden <>:

> It might be interesting to explain why you abandoned recursive
> descent, and what the reasons for doing so.
> >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.

That was partly my reason for posting to the list! The use of a
bottom-up parser generator such as Bison seems to create some problems
when trying to adequately describe some of the language features in
BCPL. It seems that certain features (particularly the optional
semicolon as a command separator, unlike C where it is a terminator)
would be easier to handle with a top-down, recursive-descent parser,
like the original BCPL parsers. I had wondered if anyone had any
experience with BCPL grammars in Bison and whether it would be
worthwhile to rewrite the parser.



Post a followup to this message

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