This project contains a program to translate a regular expression from ECMAScript
syntax into the one used in the Java library dk.brics.automaton.
Another tool is the evaluation of JSON files containing patterns in ECMAScript syntax.
Algorithm design: Dominik Freydenberger (Loughborough University)
Implementation: Christoph Köhnen (University of Passau)
To install and build this program, type the following:
git clone https://github.com/sdbs-uni-p/EcmaScript2Brics
cd EcmaScript2Brics
./build-dependencies.sh
For a regular expression <regExp>
the brics expression can be obtained with the following line:
java -jar EcmaScript2Brics.jar "<regExp>"
The expression must be typed in unescaped and the result is java-escaped, i.e. \n
does not cause a linebreak by printing the output.
For a pattern ^\\d$
from a JSON document the unescaped version is ^\d$
.
The command lines look as follows:
java -jar EcmaScript2Brics.jar "^\d$"
The Brics expression is: [0-9]
To refer to this project in a publication, please use this BibTeX entry.
@Misc{anchor_removal,
author = {Dominik Freydenberger and Christoph K\"ohnen and Stefanie Scherzinger},
title = {Anchor Removal Operator for ECMAScript Regular Expressions},
note = {\url{https://github.com/sdbs-uni-p/EcmaScript2Brics}},
year = 2021
}
This work was partly funded by Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) grant #385808805.