Package dev.yasint.regexsynth.ast
Class IntegerRange
java.lang.Object
dev.yasint.regexsynth.ast.IntegerRange
- All Implemented Interfaces:
Expression
public final class IntegerRange extends java.lang.Object implements Expression
Synthesis :: Regular Expression Integer Range
This generates a regular expression number range given inclusive start and end integers. This implementation's running time is O(log n).
This code is originally based on a StackOverflow post answer. However, the code has some optimizations and changes to match our use-case. `https://bit.ly/3bIXZBy`
-
Method Details
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
toRegex
public java.lang.StringBuilder toRegex()- Specified by:
toRegexin interfaceExpression
-