When it comes to pattern recognition (especially of regular expressions) the DFA can't beat. Truly, the ability of a DFA to confirm or reject a pattern in linear time (O(n)) is a highly desirable trait, even better than when using an NFA Directly. Unfo
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
-
DFA Minimization: Moore's Algorithm
-
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