ErikCorryGoogle / grut

Hacky little regexp compiler using LLVM

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

grut

A hacky regexp compiler that generates machine code for regexp matching, originally written for a talk at the Yow! conference in Sydney 2016. Requires Dart language and Clang 3.8 or newer. Try out with:

make all
./grut /usr/share/dict/words

Features:

  • Regexp style is backtracking.
  • Supports .()^$ and literals. Greedy and non-greedy ?*+{}, [] char classes.
  • Supports look-aheads and look-behinds (variable length).
  • Supports \b (word boundary).
  • Supports back-references like \1.

Known issues:

  • Can't match a null character, and expects a null terminated string.
  • No Unicode support.
  • No case independence.

About

Hacky little regexp compiler using LLVM

License:BSD 2-Clause "Simplified" License


Languages

Language:Dart 89.2%Language:C++ 9.3%Language:Makefile 0.6%Language:Perl 0.6%Language:OCaml 0.4%