Related articles |
---|
RE: GCC for BCPL tom@kednos.com (Tom Linden) (2004-11-26) |
RE: GCC for BCPL tc@cs.bath.ac.uk (Tom Crick) (2004-11-28) |
From: | Tom Crick <tc@cs.bath.ac.uk> |
Newsgroups: | comp.compilers |
Date: | 28 Nov 2004 23:18:41 -0500 |
Organization: | Compilers Central |
References: | <NDEMLKKEBOIFBMJLCECIEEPNDOAA.tom@kednos.com> |
Keywords: | GCC, parse |
Posted-Date: | 28 Nov 2004 23:18:41 EST |
Quoting Tom Linden <tom@kednos.com>:
> 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.
Cheers,
Tom
Return to the
comp.compilers page.
Search the
comp.compilers archives again.