Lexcial analysis is the first step in any compilation pipeline, and while writing a lexical analyzer is not particularlly difficult to implement by hand, it can incredibly tedious - especially doing it more than once. It's these very properties also ma

Almost every modern programming language uses lexical scoping rules as the default strategy for variable name resolution. Lexical scoping is when a variables value/lifetime is determined in part by its location in the text of the code (lexicographicall

When I transitioned owlscript from being a tree walking interpreter to compiling to bytecode, one of the features that took much longer than others was the re-implementation of set/list comprehensions. Some of the challenges posed by their imp

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