Slashdot Mirror


Which Compiler to Extend for a Small Project?

Andreas(R) asks: "While planning the design of my small programming language, and would appreciate some lessons learned from experienced programmers which have already tried this. I was investigating whether to start from an existing compiler and extend it. The compiler will be based on yacc, or bison. The programming language will be interpreted, object oriented and have higher order programming. Perl 1 seems like a decent starting point, as it's yacc based, and 5000 lines of code. Later versions of Perl are too large to get a good understanding of the whole program in a short period of time. Perl also has the right license (GPL). Is Python out of the question for such a project, since it's not GPL? What other small languages can be used instead? How do I go about designing a small programming language in practice, using what I already know about compiler theory?"

1 of 89 comments (clear)

  1. Object BF by forkazoo · · Score: 4, Funny

    You know, i was wondering, earlier today, if anybody was ever going to make an object oriented Brainfuck. Object BF (of B F++ if you prefer) would be a delightfully horrible lanfuage. And, since it is such a compact language (though I make no promises about programs written in it) you should have no problem acquianting yourself fully with the existing compiler in about the length of a coffe break.