https://github.com/nhomble/regex-ssm
regex, finite automata, and a little spring state machine
https://github.com/nhomble/regex-ssm
Last synced: 3 months ago
JSON representation
regex, finite automata, and a little spring state machine
- Host: GitHub
- URL: https://github.com/nhomble/regex-ssm
- Owner: nhomble
- Created: 2020-05-25T23:48:11.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-06-14T22:30:41.000Z (almost 2 years ago)
- Last Synced: 2025-01-21T00:47:24.281Z (5 months ago)
- Language: Java
- Size: 17.6 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
regex-ssm
=========
An attempt to demo [spring state machine](https://docs.spring.io/spring-statemachine/docs/current/reference/) with some
finite automata (regex evaluator).. and then I ended up writing more automata related code than state machine.The parsing logic follows eliben's [work](https://github.com/eliben/code-for-blog/tree/master/2009/regex_fsm) since I wasn't
trying to redo my college project again.# Usage
```shell script
$ java -jar regex-ssm-1.0-SNAPSHOT.jar
.
.
rex> help
.
.
Regex Commands
regex: parse provided regexRegex Match Commands
* check: check if provided string matches previously provided regex
.
.
rex> regex (a|b)*cc?
rex>check aaaabbbbcc
MATCHES
rex>check c
MATCHES
rex>check d
DOES NOT MATCH
```