public
Description: Implementing fnmatch on the LLVM virtual machine. For my own amusement.
Homepage:
Clone URL: git://github.com/ianloic/llvm-fnmatch.git
name age message
file .gitignore Mon Jul 06 13:31:19 -0700 2009 ignore "backup" files [ianloic]
file README Tue Jul 07 06:25:27 -0700 2009 README updates, correctly describe supported pa... [ianloic]
file characterset.py Mon Jul 06 20:53:10 -0700 2009 use frozenset instead of set in CharacterSet si... [ianloic]
file compiler.py Wed Jul 15 09:08:39 -0700 2009 add #! to scripts [ianloic]
file dfa.py Mon Jul 06 12:43:48 -0700 2009 remove debugging junkage [ianloic]
file dot.py Wed Jul 15 09:08:39 -0700 2009 add #! to scripts [ianloic]
file fsm.py Tue Jul 07 19:35:10 -0700 2009 add docs, minor improvements to fsm.py [ianloic]
file nfa.py Tue Jul 07 06:31:21 -0700 2009 remove legacy function [ianloic]
file performance.py Wed Jul 15 09:08:46 -0700 2009 improve performance.py [ianloic]
file test.py Wed Jul 15 13:36:45 -0700 2009 make test.py a real test tool, unfortunately te... [ianloic]
README
Implementation of a subset of fnmatch on llvm. 
This is just an exercise in implementing a pattern matching language JIT
on LLVM, perhaps a stepping stone towards implementing a full regular
expression engine.

This code operates on 8-bit octets rather than unicode characters. It only
understands the following expressions:
 - '?' matches any single character
 - '*' matches any zero or more characters
 - '[xyz]' matches any of 'x', 'y', or 'z'
 - '[!xyz]' matches anything except 'x', 'y', or 'z'
 - '[x-z]' matches anything in the range 'x' to 'z' inclusive
 - bracket expressions can be combined
 - '\x' matches the character 'x' literally (ie: escaping)
 - any other character matches literally
 
The implementation is in Python using llvm-py, including some additions that I
have made. I keep my llvm-py tree at: