Tag Archives: python

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

Python generator fun

I know Python’s iterators and generators aren’t that new anymore, but at heart I’m still a Python 1.5 programmer. I’ve come to iterators and generators in Python from my experience in JavaScript.
This morning I wanted to generate a list of names (for nodes in my NFA/DFA pattern matching code) that looked like: A, B, C, [...]

Posted in Default | Tagged | 1 Comment