Package xtc.tree

Examples of xtc.tree.Printer.indent()


    // Print the header.
    final Printer printer = runtime.console();

    printer.sep();
    printer.indent().p("// Generated by Rats!, version ").p(Constants.VERSION).
      p(", ").p(Constants.COPY).pln('.');
    printer.sep();
    printer.pln();

    printer.indent().p("/** AST structure for grammar ").p(m.name.name).
View Full Code Here


    printer.indent().p("// Generated by Rats!, version ").p(Constants.VERSION).
      p(", ").p(Constants.COPY).pln('.');
    printer.sep();
    printer.pln();

    printer.indent().p("/** AST structure for grammar ").p(m.name.name).
      pln(". */");

    // Ensure that all tuples are concrete and then print the result.
    if (! runtime.test("optionVariant")) {
      // Flat AST definition.
View Full Code Here

    if (! runtime.test("optionVariant")) {
      // Flat AST definition.
      final VariantT node = ast.toVariant("Node", false);

      ast.concretizeTuples(node, UnitT.TYPE);
      printer.indent().p("module ").p(m.name.name).p("Tree").pln(';');
      printer.pln();
      ast.print(node, printer, true, false, null);
      printer.pln();

    } else {
View Full Code Here

      processed.clear();

      // Print variants...
      if (! meta.modularize) {
        // ... in a single module.
        printer.indent().p("module ").p(m.name.name).p("Tree").pln(';');
        printer.pln();

        for (Production p : m.productions) {
          if (AST.isStaticNode(p.type)) {
            final VariantT variant = p.type.resolve().toVariant();
View Full Code Here

                  if (first) {
                    first = false;
                  } else {
                    printer.sep().pln();
                  }
                  printer.indent().p("module ").p(module).pln(';');
                  printer.pln();
                 
                } else if (! module.equals(qualifier)) {
                  continue;
                }
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.