An open API service indexing awesome lists of open source software.

https://github.com/rofl0r/re2r

transform POSIX ERE regexes into ragel machines with regexec() like wrapper
https://github.com/rofl0r/re2r

ere posix ragel regex

Last synced: over 1 year ago
JSON representation

transform POSIX ERE regexes into ragel machines with regexec() like wrapper

Awesome Lists containing this project

README

          

NAME
re2r - POSIX ERE to ragel converter (C) rofl0r

SYNOPSIS
re2r [OPTIONS]

DESCRIPTION
reads input from stdin, transforms ERE into a ragel machine,
emitting a function with a regexec() like signature.
each input line shall consist of a machine name followed by a regex.

EXAMPLES
ipv4 [0-9]+[.][0-9]+[.][0-9]+[.][0-9]+

OPTIONS
-t template.txt: use template.txt instead of builtin (ragel.tmpl)
-o outfile: write output to outfile instead of stdout

BUGS
POSIX collation, equivalence, and character classes support is not implemented
you can replace character classes like [[:digit:]] with [0-9] using some sort
of preprocessor. see ere.y for more details.