Package dk.brics.automaton

Examples of dk.brics.automaton.RegExp


    if (re.endsWith("$") && !re.endsWith("\\$")) {
      re = re.substring(0, re.length() - 1);
    }

    this.dbProvider = dbProvider;
    this.pattern = new RunAutomaton(new RegExp(re).toAutomaton());
  }
View Full Code Here


    if (re.endsWith("$") && !re.endsWith("\\$")) {
      re = re.substring(0, re.length() - 1);
    }

    this.dbProvider = dbProvider;
    this.pattern = new RunAutomaton(new RegExp(re).toAutomaton());
  }
View Full Code Here

    if (re.endsWith("$") && !re.endsWith("\\$")) {
      re = re.substring(0, re.length() - 1);
    }

    this.dbProvider = dbProvider;
    this.pattern = new RunAutomaton(new RegExp(re).toAutomaton());
  }
View Full Code Here

    if (re.endsWith("$") && !re.endsWith("\\$")) {
      re = re.substring(0, re.length() - 1);
    }

    Automaton automaton = new RegExp(re).toAutomaton();
    prefixBegin = automaton.getCommonPrefix();
    prefixLen = prefixBegin.length();

    if (0 < prefixLen) {
      char max = (char) (prefixBegin.charAt(prefixLen - 1) + 1);
View Full Code Here

    if (re.endsWith("$") && !re.endsWith("\\$")) {
      re = re.substring(0, re.length() - 1);
    }

    this.dbProvider = dbProvider;
    this.pattern = new RunAutomaton(new RegExp(re).toAutomaton());
  }
View Full Code Here

public class CompiledAutomaton implements RegexImpl {

    private RunAutomaton runauto = null;
   
    public CompiledAutomaton( String rhsPattern ) {
        RegExp regexpr = new dk.brics.automaton.RegExp(rhsPattern, RegExp.NONE);
        Automaton auto = regexpr.toAutomaton();
        this.runauto = new RunAutomaton(auto, true);
    }
View Full Code Here

   
    private RunAutomaton automaton;
   
    Rule(boolean sign, String regex) {
      super(sign, regex);
      automaton = new RunAutomaton(new RegExp(regex, RegExp.ALL).toAutomaton());
    }
View Full Code Here

   
    private RunAutomaton automaton;
   
    Rule(boolean sign, String regex) {
      super(sign, regex);
      automaton = new RunAutomaton(new RegExp(regex, RegExp.ALL).toAutomaton());
    }
View Full Code Here

  public static RegExp toRegExp(String refPattern) {
    if (isRE(refPattern)) {
      refPattern = refPattern.substring(1);
    }
    return new RegExp(refPattern, RegExp.NONE);
  }
View Full Code Here

public class RegexpEncoder {
    // Usage: java -cp out/production/jalangijava/:lib/automaton.jar RegexpEncoder [length|content] regexp var_string [content_length|true|false]

    public static void main(String[] args) {
        boolean isLength = args[0].equals("length");
        RegExp r = new RegExp(args[1]);
        String prefix = args[2];
        int length=0;
        Automaton a = r.toAutomaton();
//        System.out.println(a.toDot());
        if (!isLength) {
            length = Integer.parseInt(args[3])-1;
            if (length==-1) {
                if (a.getInitialState().isAccept()) {
View Full Code Here

TOP

Related Classes of dk.brics.automaton.RegExp

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.