BCPL compiler with GCC
Andrew Haley
aph@redhat.com
Wed Oct 22 17:54:00 GMT 2003
Tom Crick writes:
> Hello,
>
> I'm trying to write a compiler for BCPL and have been investigating writing
> a new frontend to GCC.
>
> Do you know if anyone has written a parser and tree rep. for BCPL in GCC?
> Are there some nasty traps and pitfalls ahead? Obviously there are some nice
> little quirks in BCPL ('valof()' and general scoping issues), but
> semantically it's not much different from C.
Addresses are always word addresses, aren't they? I suppose you'd end
up with something like
!B mapping onto *(word *)(b * sizeof word)
> Also, with upcoming changes to GCC, would it be a good idea to convert to
> GENERIC at the end?
Yes. In fact, you could generate generic trees during parsing.
But you could convert BCPL to C instead.
Andrew.
More information about the Gcc
mailing list