moar-regex / moar

Deterministic Regular Expressions with Backreferences
MIT License
21 stars 3 forks source link

GUI tool to create MOAs #6

Open s4ke opened 8 years ago

s4ke commented 8 years ago

As MOAs are more expressive than the Deterministic Regexes, a tool to build MOAs in a GUI would be nice.

Features of such a tool would be:

Behaviour:

Starting with an empty MOA that doesn't accept any input (L(A) = {}) the user can add states and edges to the graph. Edges are added by click dragging from the start to the end of the edge (a state). These edges then can be annotated with o(x),r(x),c(x) for variables. If the click drag ends on blank space a State is created automatically. (States should be able to be created on their own as well). States are marked with an equivalent representation as in the JSON format. (To see the format, try the cli tool and export a Regex containing all features and as much syntactic sugar as possible to a JSON file).

Translation into MOA:

The easiest way to translate this into a MOA would either be to create the JSON string and then building the MOA from that or by creating the MOA by putting everything into the internal data-structures by hand. The JSON version would require less tight coupling to the MOA internal API.

Possible APIs to use: