Skip to content

ianloic/llvm-fnmatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

About

Implementing fnmatch on the LLVM virtual machine. For my own amusement.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages