Examples of NFAConversionThread


Examples of org.antlr.analysis.NFAConversionThread

      ErrorManager.info("two-threaded DFA conversion");
      // create a barrier expecting n DFA and this main creation thread
      Barrier barrier = new Barrier(3);
      // assume 2 CPU for now
      int midpoint = numDecisions/2;
      NFAConversionThread t1 =
        new NFAConversionThread(this, barrier, 1, midpoint);
      new Thread(t1).start();
      if ( midpoint == (numDecisions/2) ) {
        midpoint++;
      }
      NFAConversionThread t2 =
        new NFAConversionThread(this, barrier, midpoint, numDecisions);
      new Thread(t2).start();
      // wait for these two threads to finish
      try {
        barrier.waitForRelease();
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.