Package wyautl_old.lang

Examples of wyautl_old.lang.Automaton


      }
    } else {
      ArrayList<Automaton.State> states = new ArrayList<Automaton.State>();
      HashMap<NameID, Integer> roots = new HashMap<NameID, Integer>();
      resolveAsType(t, context, states, roots, nominal, unconstrained);
      return Type.construct(new Automaton(states));
    }
  }
View Full Code Here


    return myIndex;
  }

  private static int append(Type type, ArrayList<Automaton.State> states) {
    int myIndex = states.size();
    Automaton automaton = Type.destruct(type);
    Automaton.State[] tStates = automaton.states;
    int[] rmap = new int[tStates.length];
    for (int i = 0, j = myIndex; i != rmap.length; ++i, ++j) {
      rmap[i] = j;
    }
View Full Code Here

    public BinaryTypeWriter(BinaryOutputStream output) {
      super(output);
    }

    public void write(Automaton automaton) throws IOException {
      Type t = Type.construct(new Automaton(automaton));
      if (t != Type.T_VOID) {
        super.write(automaton);
        count++;
        if (verbose) {
          System.err.print("\rWrote " + count + " types.");
View Full Code Here

    if (ntyp instanceof Type.Void) {
      return "v";
    }
    if (ntyp instanceof Type.Compound) {
      Type.Compound compound = (Type.Compound) ntyp;
      Automaton automaton = compound.automaton;

      return writeTypeCompound(automaton);
    }
    if (ntyp instanceof Type.Nominal) {
      return "N";              // **** need to fix; had nid
View Full Code Here

    int size = reader.read_uv();
    Automaton.State[] states = new Automaton.State[size];
    for(int i=0;i!=size;++i) {
      states[i] = readState();
    }
    return new Automaton(states);
  }
View Full Code Here

TOP

Related Classes of wyautl_old.lang.Automaton

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.