Abstract Syntax Trees are the data structure which bridges the cap between the front and back ends of many (most?) compilers. Because of this, its design influcences the implementation of many other areas of the compiler. Of the many design decisions w
Over the past few post's I've introduced data structures for representing Context Free Grammars from BNF, algorithms for computing First sets of those CFGs, and algorithms for computing the follow sets to accompany them. With that, we have everything n
Having previously discussed the data structures needed for representing a context free grammar as well as a method for computing the 'First' set, in todays post I will cover constructing the 'Follow' set. The follow set, as it's name would imply, is th
I recently had a few wifi-enabled microcontrollers (ESP32) dropped into my lap, and with a bit of free time, set out to find a use for them, and barring that, at least have some fun playing around with them.
When constructing a recognizer or parser from a context free grammar there are some properties of the language which must be calculated from the grammar irregardless of the type of parser being developed. Two such properties which make the automatic ge
-
Parsing Regular Expressions with MGCPGen
-
Determinization: Converting εNFA to DFA
-
Implementing Lexical Scoping: Resolving Variable Names with De Bruijn Indices
-
Improving Balance of Ternary Search Tries
-
Making Sense of LALR Parser Construction
-
Compiling Set Comprehensions to Bytecode: an exercise in managing abstractions
-
Fast Multi-Pattern String Searching with the Aho-Corasick Algorithm
-
Capture Groups: Tracking Regular Expression Sub Matches
-
Resolving Shift/Reduce Conflicts With Operator Precedence
-
Squeezing DFAs with Pair Compression