"Walter F.J. Mueller" <w.f.j.mueller(a)retro11.de> writes:
[...] to enjoy C with an Algol-look.
For those who enjoy Bournegol, can I also recommend the source code to
David Turner's KRC, which was ported from (EMAS) BCPL to C using a
similar approach. A sample from main.c:
STATIC VOID
DISPLAYCOM()
{ TEST HAVEID()
THEN TEST HAVE(EOL)
THEN DISPLAY(THE_ID,TRUE,FALSE); OR
TEST HAVE((TOKEN)DOTDOT_SY)
THEN { ATOM A = THE_ID; LIST X=NIL;
ATOM B = HAVE(EOL) ? (ATOM)EOL :> // BUG?
HAVEID() && HAVE(EOL) ? THE_ID :
0;
TEST B==0 THEN SYNTAX();
OR X=EXTRACT(A,B);
UNTIL X==NIL
DO { DISPLAY((ATOM)HD(X),FALSE,FALSE);
X=TL(X); } } //could insert extra line here between groups
OR SYNTAX();
OR SYNTAX();
}
http://krc-lang.org/
--
Adam Sampson <ats(a)offog.org> <http://offog.org/>