Tag Archives: fnmatch

An fnmatch implementation using finite state machines and LLVM

For my amusement (and I guess education) I decided to implement a regular expression language on top of LLVM using a Ken Thompson style finite state machine algorithm. Instead of implementing classic POSIX regular expressions I chose to implement something closer to POSIX fnmatch expressions for a couple of reasons. The fnmatch language is simpler [...]

Posted in Default | Also tagged , , , | Leave a comment

Implementing text pattern matching languages in LLVM

We use pattern matching languages all day long. From shell filename matching rules (fnmatch) in our shells and shell utilities like find and locate to regular expression matching in programming languages, configuration files and shell utilities like grep and sed. These have typically been implemented by parsing the pattern into data structures and walking those [...]

Posted in Default | Also tagged , | 1 Comment