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
- Host: GitHub
- URL: https://github.com/rofl0r/re2r
- Owner: rofl0r
- License: gpl-2.0
- Created: 2020-10-10T00:16:54.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2021-05-09T18:32:49.000Z (about 5 years ago)
- Last Synced: 2025-03-24T12:12:31.651Z (over 1 year ago)
- Topics: ere, posix, ragel, regex
- Language: C
- Homepage:
- Size: 47.9 KB
- Stars: 7
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README
- License: COPYING
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.