Examples of Alternative


Examples of apigen.adt.Alternative

      Type type = types.next();
      String type_name = buildTypeName(type);

      Iterator<Alternative> alts = type.alternativeIterator();
      while (alts.hasNext()) {
        Alternative alt = alts.next();
        String decl = buildConstructorDecl(type, alt);
        hprintln(decl + ";");

        printDocHead("Constructs a " + alt.getId() + " of type "
            + type_name, "Like all ATerm types, " + type_name
            + "s are maximally shared.");
        printDocArgs("arg", "a child of the new " + alt.getId(), type,
            alt);
        printDocReturn("A pointer to a " + alt.getId()
            + ", either newly constructed or shared");
        printDocTail();
        printFoldOpen(decl.toString());
        println(decl + " {");
View Full Code Here

Examples of apigen.adt.Alternative

  }

  private void genIsAlts(Type type) throws GenerationException {
    Iterator<Alternative> alts = type.alternativeIterator();
    while (alts.hasNext()) {
      Alternative alt = alts.next();
      genIsAlt(type, alt);
    }
  }
View Full Code Here

Examples of apigen.adt.Alternative

      printFoldOpen(decl);
      println(decl + " {");

      Iterator<Alternative> alts = type.alternativeIterator();
      while (alts.hasNext()) {
        Alternative alt = alts.next();
        genSortVisitorAltImpl(type, alt);
      }

      println("  ATabort(\"not a " + type_id + ": %t\\n\", arg);");
      println("  return (" + type_name + ")NULL;");
View Full Code Here

Examples of apigen.adt.Alternative

    printDocTail();
    println(decl + " {");
    Iterator<Alternative> alts = type.alternativeIterator();
    boolean first = true;
    while (alts.hasNext()) {
      Alternative alt = alts.next();
      print("  ");
      if (first) {
        first = false;
      } else {
        print("else ");
View Full Code Here

Examples of apigen.adt.Alternative

  private static void generateAlternativeClasses(ADT adt,
      JavaGenerationParameters params, Type type, GenerationObserver l) {
    Iterator<Alternative> altIterator = type.alternativeIterator();
    while (altIterator.hasNext()) {
      Alternative alt = altIterator.next();
      run(new AlternativeGenerator(adt, params, type, alt), l);
    }
  }
View Full Code Here

Examples of apigen.adt.Alternative

  }

  private int printAlternativesClassFiles(int i, Type type) {
    Iterator<Alternative> alts = type.alternativeIterator();
    while (alts.hasNext()) {
      Alternative alt = alts.next();
      makeNewBucket(i);
      printAlternativeClassFiles(type, alt);
      i++;
    }
View Full Code Here

Examples of apigen.adt.Alternative

        genListVisit(type);
      } else if (!typeConverter.isReserved(type.getId())) {
        /* builtin childs are not visitable */
        Iterator<Alternative> alts = type.alternativeIterator();
        while (alts.hasNext()) {
          Alternative alt = alts.next();
          genVisit(type, alt);
        }
      }
    }
  }
View Full Code Here

Examples of apigen.adt.Alternative

  }

  protected void genDefaultIsMethods(Type type) {
    Iterator<Alternative> alts = type.alternativeIterator();
    while (alts.hasNext()) {
      Alternative alt = alts.next();
      genDefaultIsMethod(alt);
    }
  }
View Full Code Here

Examples of apigen.adt.Alternative

        genListVisit(type);
      } else if (!typeConverter.isReserved(type.getId())) {
        /* builtin childs are not visitable */
        genTypeVisit(type);
        while (alts.hasNext()) {
          Alternative alt = alts.next();
          genVisit(type, alt);
        }
      }
    }
  }
View Full Code Here

Examples of apigen.adt.Alternative

  private void genConstructorTypeMembers(Type type,
      JavaGenerationParameters params) {
    Iterator<Alternative> alts = type.alternativeIterator();

    while (alts.hasNext()) {
      Alternative alt = alts.next();
      genAlternativeMembers(type, alt, params);
    }
  }
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.