A Java 23 implementation of regular expression syntax and semantics with formal language properties.
Regular expression syntax model, parser, and semantics including:
- Sealed type hierarchy for expressions (Token, Union, Concatenation, KleeneStar, etc.)
- Right and left-associative parsers
- Algebraic simplification
- Brzozowski derivatives
- Nullability and inhabitation checking
Generic parsing infrastructure for building text parsers:
- Result monad pattern for type-safe error handling
- Position tracking (line, column, offset)
- LSP-compatible error reporting
- Zero dependencies
./gradlew buildAdd to your build.gradle:
repositories {
maven {
url = uri("https://maven.pkg.github.com/plug-obp/rege-java")
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("USERNAME")
password = project.findProperty("gpr.key") ?: System.getenv("TOKEN")
}
}
}
dependencies {
implementation 'org.obpcdl:rege-core:1.0.0-main.3.b2bb1c4'
implementation 'org.obpcdl:reader-infra:1.0.0-main.3.b2bb1c4'
}Note: GitHub Packages requires authentication. See GitHub's documentation for setup.
- Java 23
- Gradle 8.12.1+
MIT License - See LICENSE file for details