Skip to content
Snippets Groups Projects
Select Git revision
  • 6c39cc2f1020c3949e23ab467ff6508e24b5a72d
  • clf default protected
  • kinetic
  • hydro
  • indigo
  • obsolete/master
  • groovy
  • 0.3.2
  • 0.3.1
  • 0.3.0
  • 0.1.35
  • 0.2.4
  • 0.2.3
  • 0.2.2
  • 0.2.1
  • 0.1.34
  • 0.1.33
  • 0.1.32
  • 0.1.31
  • 0.1.30
  • 0.1.29
  • 0.1.28
  • 0.1.27
  • 0.2.0
  • 0.1.26
  • 0.1.25
  • 0.1.24
27 results

rosjava.cmake.em

Blame
  • RagDocBuilder.java 6.55 KiB
    /* Copyright (c) 2013-2017, Jesper Öqvist <jesper.oqvist@cs.lth.se>
     * All rights reserved.
     *
     * Redistribution and use in source and binary forms, with or without
     * modification, are permitted provided that the following conditions are met:
     *
     * 1. Redistributions of source code must retain the above copyright notice,
     * this list of conditions and the following disclaimer.
     *
     * 2. Redistributions in binary form must reproduce the above copyright notice,
     * this list of conditions and the following disclaimer in the documentation
     * and/or other materials provided with the distribution.
     *
     * 3. Neither the name of the copyright holder nor the names of its
     * contributors may be used to endorse or promote products derived from this
     * software without specific prior written permission.
     *
     * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
     * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
     * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     * POSSIBILITY OF SUCH DAMAGE.
     */
    package org.extendj.ragdoc;
    
    import org.extendj.ast.ASTNode;
    import org.extendj.ast.BytecodeReader;
    import org.extendj.ast.CompilationUnit;
    import org.extendj.ast.Frontend;
    import org.extendj.ast.JavaParser;
    import org.extendj.ast.Problem;
    import org.extendj.ast.Program;
    import org.extendj.ast.TypeDecl;
    import se.llbit.json.JsonObject;
    import se.llbit.json.JsonValue;
    import se.llbit.json.PrettyPrinter;
    
    import java.io.BufferedOutputStream;
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.PrintStream;
    import java.nio.file.Files;
    import java.nio.file.StandardCopyOption;
    import java.util.Collection;
    import java.util.Map;
    
    /**
     * Generate API documentation for a JastAdd project.
     *
     * @author Jesper Öqvist <jesper.oqvist@cs.lth.se>
     */
    public class RagDocBuilder extends Frontend {
      /** Generate pretty-printed JSON if in debug mode, otherwise minified JSON is generated. */
      private static final boolean DEBUG = false;
      private JsonBuilder jsonBuilder;
    
      public static void main(String args[]) {
        RagDocBuilder rd = new RagDocBuilder();
        int result = rd.compile(args);
        if (result != EXIT_SUCCESS) {
          System.exit(result);
        }
      }