Class RegexCompiler


  • public class RegexCompiler
    extends java.lang.Object
    Attempt 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.String compile​(NonterminalSymbol startSymbol)
      Compile the rules into a regex.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.