Parsing regular expressions can be a real chicken-or-the-egg scenario, many algorithms for compiling regular expressions to NFA or DFA involves converting the expression to an AST. This is the job of a parser of course, which as you may know tend to in
Kleenes Theorem tells us of the equivelance between regular expressions and Finite Automata. It also informs us that any regular expression represented by an NFA can also be described by a DFA. Two other algorithms I have covered on this page also expl
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
Ternary Search Tries are one of my favorite data structures. They're also somewhat of a black-sheep data structure in that while they are quite useful, theyre often shoved to the side in favor of more main stream data structures like hash tables. They
When Donald Knuth published "On the translation of language from left to right" in 1965 he introduced the concept of LR parsers to the world. LR(k) parsers are a family of bottom-up parsers that perform a rightmost derivation in reverse. At th
-
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