Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • anders_blomdell/labcomm
  • klaren/labcomm
  • tommyo/labcomm
  • erikj/labcomm
  • sven/labcomm
5 results
Show changes
Showing
with 3408 additions and 54 deletions
Specification ::= Decl*;
abstract Decl ::= TypeInstance /Signature/;
TypeInstance ::= DataType Annotations;
Annotations ::= Annotation*;
Annotation ::= <Key:String> <Value:byte[]>;
Intention : Annotation;
DocString : Annotation;
TypeDecl : Decl;
SampleDecl : Decl;
//Signatures are in the abstract grammar, so that
//they can be extended and refined by aspects.
Signature ::= SignatureList FlatSignatureList:SignatureList;
SignatureList ::= SignatureLine*;
abstract SignatureLine ::= <Indent:int> <Comment:String>;
abstract DataSignatureLine : SignatureLine;
ByteArraySignatureLine : DataSignatureLine ::= <Data:byte[]>;
IntSignatureLine : DataSignatureLine ::= <Data:int>;
StringSignatureLine : DataSignatureLine ::= <Data:String>;
IntentionSignatureLine : DataSignatureLine ::= Intention* ;
TypeRefSignatureLine : SignatureLine ::= Decl;
Field : TypeInstance;
abstract DataType;
VoidType : DataType;
//SampleRefType : DataType;
PrimType : DataType ::= <Name:String> <Token:int>;
UserType : DataType ::= <Name:String>;
StructType : DataType ::= Field*;
ParseArrayType : DataType ::= DataType Dim*;
abstract ArrayType : DataType ::= DataType Dim;
VariableArrayType : ArrayType;
FixedArrayType : ArrayType;
Dim ::= Exp*;
abstract Exp;
IntegerLiteral : Exp ::= <Value:String>;
VariableSize : Exp;
package se.lth.control.labcomm2014.compiler;
import java.io.*;
import java.util.*;
public class LabComm {
private static void println(String s) {
System.out.println(s);
}
private static void print_help() {
println("\n Usage: java -jar labcom.jar [options*] FILE");
println("");
println(" --help Shows this help text");
println(" -v Be verbose");
println(" --ver=VERSION Generate code for labcomm VERSION (=2006 or 2014)");
println("[ C options ]");
println(" -C Generates C/H code in FILE.[ch]");
println(" --cprefix=PREFIX Prefixes C types with PREFIX");
println(" --cinclude=FILE Include FILE in generated .c");
println(" --c=CFILE Generates C code in CFILE");
println(" --h=HFILE Generates H code in HFILE");
println("[ C# options]");
println(" --cs Generates C# code in FILE.cs");
println(" --cs=CSFILE Generates C# code in CSFILE");
println(" --csnamespace=NAMESPACE Place C# classes in NAMESPACE");
println("[ Java options ]");
println(" --java=JDIR Generates Java files in JDIR");
println(" --javapackage=PACKAGE Place Java classes in PACKAGE");
println("[ Python options ]");
println(" -P Generates Python code in FILE.py");
println(" --python=PFILE Generates Python code in PFILE");
println("[ RAPID options ]");
println(" --rapid Generates RAPID code in FILE.sys");
println("[ Misc options ]");
println(" --pretty=PFILE Pretty prints to PFILE");
println(" --typeinfo=TIFILE Generates typeinfo in TIFILE");
println(" --typedefs=TIFILE Generates typedefs in TIFILE");
}
/** To be cleaned up.
*/
private static void checkVersion(int v) {
if(! (v == 2006 || v == 2014) ) {
System.err.println(" Unknown version: " + v);
System.err.println(" Supported versions: 2006, 2014 ");
System.exit(2);
}
}
private static void genH(Specification p, String hName,
Vector cIncludes, String coreName, String prefix, int ver) {
try {
FileOutputStream f;
PrintStream out;
f = new FileOutputStream(hName);
out = new PrintStream(f);
p.C_genH(out, cIncludes, coreName, prefix, ver);
out.close();
} catch (IOException e) {
System.err.println("IOException: " + hName + " " + e);
}
}
private static void genC(Specification p, String cName,
Vector cIncludes, String coreName, String prefix, int ver) {
try {
FileOutputStream f;
PrintStream out;
f = new FileOutputStream(cName);
out = new PrintStream(f);
p.C_genC(out, cIncludes, coreName, prefix, ver);
out.close();
} catch (IOException e) {
System.err.println("IOException: " + cName + " " + e);
}
}
private static void genCS(Specification p, String csName, String csNamespace, int ver) {
// throw new Error("C# generation currently disabled");
try {
p.CS_gen(csName, csNamespace, ver);
} catch (IOException e) {
System.err.println("IOException: " + csName + " " +
csNamespace + " " + e);
}
}
private static void genJava(Specification p, String dirName, String packageName, int ver) {
try {
p.J_gen(dirName, packageName, ver);
} catch (IOException e) {
System.err.println("IOException: " + dirName + " " +
packageName + " " + e);
}
}
private static void genPython(Specification p, String filename, String prefix, int ver) {
try {
FileOutputStream f;
PrintStream out;
f = new FileOutputStream(filename);
out = new PrintStream(f);
p.Python_gen(out, prefix, ver);
out.close();
} catch (IOException e) {
System.err.println("IOException: " + filename + " " + e);
}
}
private static void genRAPID(Specification p, String filename, String prefix, int ver) {
try {
p.RAPID_gen(filename, prefix, ver);
} catch (IOException e) {
System.err.println("IOException: " + filename + " " + e);
}
}
/** Helper class to contain command line options
and their associated behaviour
**/
private static class Opts {
final String[] args;
String coreName = null;
String prefix = null;
boolean verbose = false;
int ver = 2014; //Version 2014 as default
String cFile = null;
String hFile = null;
Vector cIncludes = new Vector();
String cPrefix; // gets default value (prefix) in processFilename
String csFile = null;
String csNamespace = null;
String javaDir = null;
String javaPackage = "";
String pythonFile = null;
String prettyFile = null;
String typeinfoFile = null;
String typedefsFile = null;
String rapidFile = null;
String fileName = null;
Opts(String[] args) {
this.args = args;
}
private static String getCoreName(String s) {
int i = s.lastIndexOf('.');
return s.substring(0, i > 0 ? i : s.length());
}
private static String getFileName(String s) {
return s.substring(s.lastIndexOf('/') + 1, s.length());
}
private static String getBaseName(String s) {
s = getFileName(s);
int i = s.lastIndexOf('.');
return s.substring(0, i > 0 ? i : s.length());
}
private static String getPrefix(String s) {
return s.substring(s.lastIndexOf('/') + 1, s.length());
}
boolean processFilename(){
// Scan for first non-option
for (int i = 0 ; i < args.length ; i++) {
if (! args[i].startsWith("-")) {
fileName = args[i];
break;
}
}
if (fileName != null) {
coreName = getBaseName(fileName);
prefix = getPrefix(coreName);
cPrefix = prefix;
}
return fileName != null;
}
void processArgs(){
for (int i = 0 ; i < args.length ; i++) {
if (fileName == null ||
args[i].equals("-help") ||
args[i].equals("-h") ||
args[i].equals("--help")) {
print_help();
System.exit(0);
} else if (args[i].equals("-v")) {
verbose=true;
} else if (args[i].startsWith("--ver=")) {
ver = Integer.parseInt(args[i].substring(6));
checkVersion(ver);
} else if (args[i].equals("-C")) {
cFile = coreName + ".c";
hFile = coreName + ".h";
} else if (args[i].startsWith("--cinclude=")) {
cIncludes.add(args[i].substring(11));
} else if (args[i].startsWith("--cprefix=")) {
cPrefix = args[i].substring(10);
} else if (args[i].startsWith("--c=")) {
cFile = args[i].substring(4);
} else if (args[i].startsWith("--h=")) {
hFile = args[i].substring(4);
} else if (args[i].equals("--cs")) {
csFile = coreName + ".cs";
} else if (args[i].startsWith("--cs=")) {
csFile = args[i].substring(5);
} else if (args[i].startsWith("--csnamespace=")) {
csNamespace = args[i].substring(14);
} else if (args[i].startsWith("--java=")) {
javaDir = args[i].substring(7);
} else if (args[i].startsWith("--javapackage=")) {
javaPackage = args[i].substring(14);
} else if (args[i].equals("-P")) {
pythonFile = coreName + ".py";
} else if (args[i].startsWith("--python=")) {
pythonFile = args[i].substring(9);
} else if (args[i].startsWith("--pretty=")) {
prettyFile = args[i].substring(9);
} else if (args[i].startsWith("--typeinfo=")) {
typeinfoFile = args[i].substring(11);
} else if (args[i].startsWith("--typedefs=")) {
typedefsFile = args[i].substring(11);
} else if (args[i].equals("--rapid")) {
rapidFile = coreName + ".sys";
} else if (i == args.length - 1) {
fileName = args[i];
} else {
System.err.println(" Unknown argument " + args[i]);
print_help();
System.exit(2);
}
}
if(prefix==null){
System.err.println(" WARNING! prefix==null");
prefix="";
}
}
Specification parseFile(){
Specification ast = null;
try {
// Check for errors
LabCommScanner scanner = new LabCommScanner(
new FileReader(fileName));
LabCommParser parser = new LabCommParser();
Specification p = (Specification)parser.parse(scanner);
Collection errors = new LinkedList();
p.errorCheck(errors);
if (errors.isEmpty()) {
ast = p;
} else {
for (Iterator iter = errors.iterator(); iter.hasNext(); ) {
String s = (String)iter.next();
System.out.println(s);
}
}
} catch (FileNotFoundException e) {
System.err.println("Could not find file: " + fileName);
} catch (IOException e) {
System.err.println("IOException: " + fileName + " " + e);
} catch (beaver.Parser.Exception e) {
System.err.println(e.getMessage());
}
return ast;
}
boolean generateC(Specification ast) {
boolean wroteFile = false;
Vector hIncludes = new Vector(cIncludes);
if (hFile != null) {
cIncludes.add(hFile);
}
if (cFile != null) {
printStatus("C: " , cFile);
genC(ast, cFile, cIncludes, coreName, cPrefix, ver);
wroteFile = true;
}
if (hFile != null) {
printStatus("H: " , hFile);
genH(ast, hFile, hIncludes, coreName, cPrefix, ver);
wroteFile = true;
}
return wroteFile;
}
boolean generateCS(Specification ast) {
boolean wroteFile = false;
if (csFile != null) {
printStatus("C#: " , csFile);
genCS(ast, csFile, csNamespace, ver);
wroteFile = true;
}
return wroteFile;
}
boolean generateJava(Specification ast) {
boolean wroteFile = false;
if (javaDir != null) {
printStatus("Java: " , javaDir);
genJava(ast, javaDir, javaPackage, ver);
wroteFile = true;
}
return wroteFile;
}
boolean generatePython(Specification ast) {
boolean wroteFile = false;
if (pythonFile != null) {
printStatus("Python: " , pythonFile);
genPython(ast, pythonFile, prefix, ver);
wroteFile = true;
}
return wroteFile;
}
boolean generateRAPID(Specification ast) {
boolean wroteFile = false;
if (rapidFile != null) {
printStatus("RAPID: " , rapidFile);
genRAPID(ast, rapidFile, coreName, ver);
wroteFile = true;
}
return wroteFile;
}
boolean generatePrettyPrint(Specification ast) {
boolean wroteFile = false;
if (prettyFile != null) {
printStatus("Pretty: " , prettyFile);
try {
FileOutputStream f = new FileOutputStream(prettyFile);
PrintStream out = new PrintStream(f);
ast.pp(out);
out.close();
wroteFile = true;
} catch (IOException e) {
System.err.println("IOException: " + prettyFile + " " + e);
}
}
return wroteFile;
}
boolean generateTypeinfo(Specification ast) {
boolean wroteFile = false;
if (typeinfoFile != null) {
printStatus("TypeInfo: " , typeinfoFile);
try {
FileOutputStream f = new FileOutputStream(typeinfoFile);
PrintStream out = new PrintStream(f);
ast.C_info(out, cPrefix, ver);
ast.Java_info(out, ver);
ast.CS_info(out, csNamespace, ver);
wroteFile = true;
} catch (IOException e) {
System.err.println("IOException: " + typeinfoFile + " " + e);
}
}
return wroteFile;
}
boolean generateTypedefs(Specification ast) {
boolean wroteFile = false;
if (typedefsFile != null) {
printStatus("Typedefs: " , typedefsFile);
try {
FileOutputStream f = new FileOutputStream(typedefsFile);
PrintStream out = new PrintStream(f);
ast.generateTypedefs(out, ver);
wroteFile = true;
} catch (IOException e) {
System.err.println("IOException: " + typedefsFile + " " + e);
}
}
return wroteFile;
}
private void printStatus(String kind, String filename){
if (verbose) {
System.err.println("Generating "+kind+": " + filename);
}
}
}
public static void main(String[] args) {
Opts opts = new Opts(args);
if(!opts.processFilename()) {
print_help();
System.exit(1);
} else {
opts.processArgs();
Specification ast = opts.parseFile();
if (ast != null) {
boolean fileWritten = false;
fileWritten |= opts.generateC(ast);
fileWritten |= opts.generateCS(ast);
fileWritten |= opts.generateJava(ast);
fileWritten |= opts.generatePython(ast);
fileWritten |= opts.generateRAPID(ast);
fileWritten |= opts.generatePrettyPrint(ast);
fileWritten |= opts.generateTypeinfo(ast);
fileWritten |= opts.generateTypedefs(ast);
// if no output to files, prettyprint on stdout
if (!fileWritten) {
ast.pp(System.out);
}
} else {
// Catch-all for compilation errors
System.err.println("Error in specification");
System.exit(3);
}
}
}
}
%header {:
package AST;
package se.lth.control.labcomm2014.compiler;
import se.lth.control.labcomm2014.compiler.*;
:};
%embed {:
public static class SourceError extends Error {
......@@ -14,7 +15,7 @@
s.append(" *** Syntactic error: unexpected token " + Terminals.NAMES[token.getId()]);
throw new SourceError(s.toString());
//super.syntaxError(token);
//throw new RuntimeException(token.getLine(token.getStart()) + ", " +
//throw new RuntimeException(token.getLine(token.getStart()) + ", " +
// token.getColumn(token.getStart()) + ": Syntax Error");
}
public void scannerError(Scanner.Exception e) {
......@@ -33,9 +34,9 @@
}
:};
Program goal =
/* Empty program */ {: return new Program(); :}
| decl_list.l {: return new Program(l); :}
Specification goal =
/* Empty program */ {: return new Specification(); :}
| decl_list.l {: return new Specification(l); :}
;
List decl_list =
......@@ -53,53 +54,68 @@ List var_decl_list =
| var_decl_list.l var_decl.v {: return l.add(v); :}
;
Field var_decl =
type.t IDENTIFIER SEMICOLON {: return new Field(t, IDENTIFIER); :}
| type.t IDENTIFIER dim_list.d SEMICOLON
{: return new Field(new ParseArrayType(t, d), IDENTIFIER); :}
Annotations annotations =
/* empty list */ {: return new Annotations(); :}
| annotation_list.l {: return new Annotations(l); :}
;
TypeDecl type_decl =
TYPEDEF type.t IDENTIFIER SEMICOLON {: return new TypeDecl(t, IDENTIFIER); :}
| TYPEDEF type.t IDENTIFIER dim_list.d SEMICOLON
{: return new TypeDecl(new ParseArrayType(t, d), IDENTIFIER); :}
List annotation_list =
annotation.i {: return new List().add(i); :}
| annotation_list.l annotation.i {: return l.add(i); :}
;
SampleDecl sample_decl =
SAMPLE type.t IDENTIFIER SEMICOLON
{: return new SampleDecl(t, IDENTIFIER); :}
| SAMPLE type.t IDENTIFIER dim_list.d SEMICOLON
{: return new SampleDecl(new ParseArrayType(t, d), IDENTIFIER); :}
| SAMPLE VOID IDENTIFIER SEMICOLON
{: return new SampleDecl(new VoidType(), IDENTIFIER); :}
String key = IDENTIFIER;
String stringliteral = IDENTIFIER | QUOTEDSTRING;
Annotation annotation = intention.i | docstring.d;
Annotation intention = LPAREN key.k COLON stringliteral.v RPAREN {: return new Intention(k,v.getBytes()); :};
Annotation docstring = QUOTEDSTRING.s {: return new DocString(s.substring(1,s.length()-1).getBytes()); :};
TypeInstance type_instance =
annotations.a type.t IDENTIFIER {: return new TypeInstance(t, IDENTIFIER, a); :}
| annotations.a type.t IDENTIFIER dim_list.d
{: return new TypeInstance(new ParseArrayType(t, d), IDENTIFIER, a); :}
;
Type type =
Field var_decl =
type_instance.t SEMICOLON {: return new Field(t); :}
;
TypeDecl type_decl =
TYPEDEF type_instance.t SEMICOLON {: return new TypeDecl(t); :} ;
SampleDecl sample_decl =
SAMPLE type_instance.t SEMICOLON {: return new SampleDecl(t); :} ;
DataType type =
prim_type.p {: return p; :}
| user_type.u {: return u; :}
| struct_type.s {: return s; :}
| void_type.v {: return v; :}
;
PrimType prim_type =
BOOLEAN
PrimType prim_type =
BOOLEAN
{: return new PrimType(BOOLEAN, ASTNode.LABCOMM_BOOLEAN); :}
| BYTE
| BYTE
{: return new PrimType(BYTE, ASTNode.LABCOMM_BYTE); :}
| SHORT
| SHORT
{: return new PrimType(SHORT, ASTNode.LABCOMM_SHORT); :}
| INT
| INT
{: return new PrimType(INT, ASTNode.LABCOMM_INT); :}
| LONG
| LONG
{: return new PrimType(LONG, ASTNode.LABCOMM_LONG); :}
| FLOAT
| FLOAT
{: return new PrimType(FLOAT, ASTNode.LABCOMM_FLOAT); :}
| DOUBLE
| DOUBLE
{: return new PrimType(DOUBLE, ASTNode.LABCOMM_DOUBLE); :}
| STRING
| STRING
{: return new PrimType(STRING, ASTNode.LABCOMM_STRING); :}
| SAMPLE
{: return new PrimType(SAMPLE, ASTNode.LABCOMM_SAMPLE); :}
;
UserType user_type =
UserType user_type =
IDENTIFIER {: return new UserType(IDENTIFIER); :}
;
......@@ -107,6 +123,10 @@ StructType struct_type =
STRUCT LBRACE var_decl_list.l RBRACE {: return new StructType(l); :}
;
VoidType void_type =
VOID {: return new VoidType(); :}
;
List dim_list =
dim.d {: return new List().add(d); :}
| dim_list.l dim.d {: return l.add(d); :}
......@@ -121,7 +141,7 @@ List exp_list =
| exp_list.l COMMA exp.e {: return l.add(e); :}
;
Exp exp =
Exp exp =
INTEGER_LITERAL {: return new IntegerLiteral(INTEGER_LITERAL); :}
| UNDERSCORE {: return new VariableSize(); :}
;
package AST;
package se.lth.control.labcomm2014.compiler;
import beaver.Symbol;
import beaver.Scanner;
import AST.LabCommParser.Terminals;
import se.lth.control.labcomm2014.compiler.LabCommParser.Terminals;
%%
%public
%final
%public
%final
%class LabCommScanner
%extends Scanner
%type Symbol
%function nextToken
%type Symbol
%function nextToken
%yylexthrow Scanner.Exception
%unicode
......@@ -44,13 +44,16 @@ Comment = {TraditionalComment}
TraditionalComment = "/*" [^*] ~"*/" | "/*" "*"+ "/" | "/*" "*"+ [^/*] ~"*/"
EndOfLineComment = "//" {InputCharacter}* {LineTerminator}?
Identifier = [:jletter:][:jletterdigit:]*
Identifier = [[:letter:]_]([[:letter:]_[:digit:]])*
StringLiteral = [:jletterdigit:]*
DecimalNumeral = 0 | {NonZeroDigit} {Digits}?
DecimalNumeral = 0 | {NonZeroDigit} {Digits}?
Digits = {Digit}+
Digit = 0 | {NonZeroDigit}
NonZeroDigit = [1-9]
QuotedString = "\""~"\""
%%
<YYINITIAL> {
......@@ -76,10 +79,14 @@ NonZeroDigit = [1-9]
"}" { return sym(Terminals.RBRACE); }
"[" { return sym(Terminals.LBRACK); }
"]" { return sym(Terminals.RBRACK); }
"(" { return sym(Terminals.LPAREN); }
")" { return sym(Terminals.RPAREN); }
";" { return sym(Terminals.SEMICOLON); }
":" { return sym(Terminals.COLON); }
"," { return sym(Terminals.COMMA); }
{Identifier} { return sym(Terminals.IDENTIFIER); }
{QuotedString} { return sym(Terminals.QUOTEDSTRING); }
}
// fall through errors
......
aspect LabCommTokens {
public static final int ASTNode.LABCOMM_VERSION = 0x01;
public static final int ASTNode.LABCOMM_SAMPLE_DEF = 0x02; // The flat signature
public static final int ASTNode.LABCOMM_SAMPLE_REF = 0x03;
public static final int ASTNode.LABCOMM_TYPE_DEF = 0x03; // and type declarations, hierarchically
public static final int ASTNode.LABCOMM_TYPE_BINDING=0x05;
public static final int ASTNode.LABCOMM_ARRAY = 0x10;
public static final int ASTNode.LABCOMM_STRUCT = 0x11;
public static final int ASTNode.LABCOMM_BOOLEAN = 0x20;
public static final int ASTNode.LABCOMM_BYTE = 0x21;
public static final int ASTNode.LABCOMM_SHORT = 0x22;
public static final int ASTNode.LABCOMM_INT = 0x23;
public static final int ASTNode.LABCOMM_LONG = 0x24;
public static final int ASTNode.LABCOMM_FLOAT = 0x25;
public static final int ASTNode.LABCOMM_DOUBLE = 0x26;
public static final int ASTNode.LABCOMM_STRING = 0x27;
public static final int ASTNode.LABCOMM_SAMPLE = 0x28;
}
......@@ -2,7 +2,7 @@
aspect NameAnalysis {
inh String Decl.lookupName(String name);
eq Program.getDecl(int index).lookupName(String name) {
eq Specification.getDecl(int index).lookupName(String name) {
for (int i = 0; i < index; i++) {
String s = getDecl(i).getName();
if (s.equals(name)) {
......@@ -24,7 +24,7 @@ aspect NameAnalysis {
inh TypeDecl Decl.lookupType(String name);
inh TypeDecl UserType.lookupType(String name);
eq Program.getDecl(int index).lookupType(String name) {
eq Specification.getDecl(int index).lookupType(String name) {
for(int i = 0; i < index; i++) {
Decl d = getDecl(i);
if(d instanceof TypeDecl && d.getName().equals(name)) {
......@@ -34,7 +34,10 @@ aspect NameAnalysis {
return null;
}
syn TypeDecl UserType.decl() = lookupType(getName());
syn TypeDecl DataType.decl();
eq DataType.decl() = null;
eq UserType.decl() = lookupType(getName());
eq PrimType.decl() = null; //HERE BE DRAGONS XXX
public void ASTNode.nameCheck() {
......
This diff is collapsed.
This diff is collapsed.
/* Temporary aspect with forwarding methods */
aspect Refactoring {
syn int ArrayType.getNumExp() = getDim().getNumExp();
syn Exp ArrayType.getExp(int i) = getDim().getExp(i);
syn String Decl.getName() = getTypeInstance().getName();
syn DataType Decl.getDataType() = getTypeInstance().getDataType();
syn String TypeInstance.getName() = getAnnotations().getName();
public Annotations Annotations.addName(String n) {
//XXX TODO: check if name already exists
addAnnotation(new Intention("",n.getBytes()));
return this;
}
public Field.Field(TypeInstance t) {
this(t.getDataType(), t.getAnnotations());
}
public TypeInstance.TypeInstance(DataType t, String n, Annotations a) {
this(t, a.addName(n));
}
public TypeInstance.TypeInstance(DataType t, String n) {
this(t, new Annotations().addName(n));
System.out.println("WARNING! TypeInstance(DataType, String) ignoring intention list");
}
syn Annotation TypeInstance.getAnnotation(int i) = getAnnotations().getAnnotation(i);
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
aspect Version {
/* An auxilliary class for handling naming and prefixes connected
* to the LabComm version
*/
class LabCommVersion {
public static String versionString(int version) {
switch(version) {
case 2006:
return "2006";
case 2014:
return "2014";
default:
throw new Error("no versionString for version "+version);
}
}
public static boolean versionHasPragma(int version) {
return version != 2006;
}
}
}
.PHONY: all
all: ant-all
.PHONY: test
test: ant-test
.PHONY: clean
clean: ant-clean
rm -f *~
.PHONY: distclean
distclean: clean ant-distclean
.PHONY: ant-%
ant-%:
ant $*
This diff is collapsed.
#!/bin/sh
java -jar /lib/labcomm2014_compiler.jar "$@"
File moved