https://github.com/rishvic/rregex
Solution for Compiler Design, Assignment 1
https://github.com/rishvic/rregex
Last synced: 28 days ago
JSON representation
Solution for Compiler Design, Assignment 1
- Host: GitHub
- URL: https://github.com/rishvic/rregex
- Owner: rishvic
- License: apache-2.0
- Created: 2023-07-31T14:04:52.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-31T14:20:04.000Z (almost 3 years ago)
- Last Synced: 2023-07-31T16:04:20.239Z (almost 3 years ago)
- Language: Rust
- Size: 1.43 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# RRegex
To build the regex library, run `wasm-pack build`.
Run the `www/` Next.js project by running `yarn dev` from inside the directory,
after building the library.
## Operators
Three operators are currently supported:
1. **Concatenation:** Just writing two regexes one after the other means they are
concatenated. Eg. "ab" is the concatenation of "a" and "b".
1. **Union:** The pipe operator '|' means either one of the regexes should match
the string. Eg. "a|b" is the union of "a" and "b".
1. **Kleene star:** The star operator '\*' means zero or more repetitions of
the regex. Eg. "a\*" is the repetition of "a".
## Examples
Sample images for some regular expressions are stored in the `examples/`
directory.