While implementing Owlscript I didnt want to crowd the grammar by having two different types of control flow which only differed by their syntax. This is the case in C-like languages were for loops serve more as syntactic sugaring of the while loop con

Virtually every modern programming language capable of writing non-trivial programs is expected to support Lexical scoping by default. Some legacy programming languages, and even a few modern scripting languages still make use of dynamic scoping (Perl

When I set out to develop my own language, there were a several "milestones" I had set for myself along the way. Goals I could tick off to gauge my progress. One such goal I've been working towards for some time was to be able to pass Knuth's "Man or B

Having previously covered conditional statements and loops, there is only one topic left to cover in my series on compiling control flow constructs to pcode, and of course I have saved the best for last. In todays post we're going to talk about compili

When we last left off, I had covered compiling while statements, which involved branching, conditional branching and labels, as well as the basic technique of backpatching. In todays post we're going to kick our backpatch-fu up a level by using it in c