Package org.nineml.coffeegrinder.util
Class RegexCompiler
- java.lang.Object
-
- org.nineml.coffeegrinder.util.RegexCompiler
-
public class RegexCompiler extends java.lang.ObjectAttempt to compile a set of rules into a regular expression.This is speculative work, unfinished.
-
-
Constructor Summary
Constructors Constructor Description RegexCompiler(java.util.List<Rule> sourceRules)Create a regex compiler for the rules.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringcompile(NonterminalSymbol startSymbol)Compile the rules into a regex.
-
-
-
Constructor Detail
-
RegexCompiler
public RegexCompiler(java.util.List<Rule> sourceRules)
Create a regex compiler for the rules.- Parameters:
sourceRules- the rules.
-
-
Method Detail
-
compile
public java.lang.String compile(NonterminalSymbol startSymbol)
Compile the rules into a regex.- Parameters:
startSymbol- the start symbol.- Returns:
- the regex.
-
-