Skip to content
Snippets Groups Projects
Select Git revision
  • dba43eab557ed9827a88d0b4bbc91294e985f40e
  • master default
  • labcomm2014
  • labcomm2006
  • python_sig_hash
  • typedefs
  • anders.blomdell
  • typeref
  • pragma
  • compiler-refactoring
  • labcomm2013
  • v2014.6
  • v2015.0
  • v2014.5
  • v2014.4
  • v2006.0
  • v2014.3
  • v2014.2
  • v2014.1
  • v2014.0
  • v2013.0
21 results

WriterWrapper.java

  • LabComm.java 1.07 KiB
    import java.util.Vector;
    
    public class LabComm {
    
      public static void main(String[] args) throws Exception {
        String ver = null;
        Vector<String> outargs = new Vector<String>();
        
        for (String s: args) {
          if (s.startsWith("--ver=")) {
            String newver = s.substring(6);
            if (ver != null && !ver.equals(newver)) {
              throw new Exception("Mismatching versions '" + ver +
                                  "' != '" + newver);
              
            }
            ver = newver;
          } else {
            outargs.add(s);
          }
        }
        for (String s: outargs) {
          System.out.println(s);
        }
        if (ver != null && ver.equals("2006")) {
          outargs.add(0, "--ver=2006");
          se.lth.control.labcomm2006.compiler.LabComm.main(outargs.toArray(
                                                             new String[0]));
        } else if (ver == null || ver.equals("2014")) {
          outargs.add(0, "--ver=2014");
          se.lth.control.labcomm2014.compiler.LabComm.main(outargs.toArray(
                                                             new String[0]));
        } 
      }
    
    }