[Swift-commit] r2432 - in trunk: resources src/org/griphyn/vdl/toolkit

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Sat Jan 10 15:51:18 CST 2009


Author: benc
Date: 2009-01-10 15:51:17 -0600 (Sat, 10 Jan 2009)
New Revision: 2432

Added:
   trunk/resources/swiftscript.stg
Removed:
   trunk/resources/XDTM.stg
Modified:
   trunk/src/org/griphyn/vdl/toolkit/VDLt2VDLx.java
Log:
rename XDTM template file to swiftscript

Deleted: trunk/resources/XDTM.stg
===================================================================
--- trunk/resources/XDTM.stg	2009-01-10 21:16:16 UTC (rev 2431)
+++ trunk/resources/XDTM.stg	2009-01-10 21:51:17 UTC (rev 2432)
@@ -1,337 +0,0 @@
-group XDTM;
-
-program(namespaces,targetNS,functions,types,statements,sourcelocation) ::= <<
-<program xmlns=$defaultNS()$
-         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xmlns:xs="http://www.w3.org/2001/XMLSchema"$if(!namespaces)$>
-     $else$
-
-     $namespaces;separator="\n"$>$endif$
-  $if(types)$  
-  <types>
-     $types;separator="\n"$   
-  </types>  
-  $endif$
-  $functions;separator="\n"$
-  $statements;separator="\n"$
-</program>
->>
-
-defaultNS(ns,sourcelocation) ::= <<
-$if(ns)$"$ns$"$else$
-"http://ci.uchicago.edu/swift/2007/07/swiftscript"
-$endif$
->>
-
-nsDef(prefix,uri,sourcelocation) ::= <<
-$if(prefix)$xmlns:$prefix$="$uri$"$else$targetNamespace="$uri$"$endif$
->>
-
-typeDef(name,type,members,sourcelocation) ::= <<
-$if(type)$
-   	<type>
-		<typename>$name$</typename>
-		<typealias>$type$</typealias>
-		<typestructure></typestructure>
-	</type>   
-$else$
-$if(!members)$
-	<type>
-		<typename>$name$</typename>
-		<typealias>string</typealias>
-		<typestructure></typestructure>
-	</type>
-$else$
-	<type>
-		<typename>$name$</typename>
-		<typealias></typealias>
-		<typestructure>
-			$members;separator="\n"$
-		</typestructure>
-	</type>
-$endif$
-$endif$
->>
-
-memberdefinition(type,name,sourcelocation) ::= <<
-    <member>
-		<membername>$name$</membername>
-		<membertype>$type$</membertype>
-	</member>
->>
-
-variable(type,name, value,sourcelocation) ::= <<
-<variable name="$name$" type="$type$"$if(!value)$ xsi:nil="true"/>$else$>$value$</variable>
-$endif$
->>
-
-dataset(name,type,mapping, lfn,sourcelocation) ::= <<
-<dataset name="$name$" type="$type$">
-$if(lfn)$
-  <file name="$lfn$"/>
-
-$else$
-  $mapping$
-
-$endif$
-</dataset>
->>
-
-mapping(descriptor,params,sourcelocation) ::= <<
-<mapping descriptor="$descriptor$"$if(params)$>
-  $params;separator="\n"$
-</mapping>
-$else$/>$endif$
->>
-
-mapParam(name,value,sourcelocation) ::= <<
-<param name="$name$">$value$</param>
->>
-
-arrayInit(elements,range,sourcelocation) ::= <<
-$if(range)$
-
-  $range$
-
-$else$
-
-  <array>
-    $elements$
-  </array>
-
-$endif$
->>
-
-range(from, to, step, sourcelocation) ::= <<
-<range>
-  $from$
-  $to$
-  $if(step)$$step$$endif$
-</range>
->>
-
-function(name,outputs,inputs,statements,config,sourcelocation) ::= <<
-<procedure name="$name$">
-  $outputs;separator="\n"$
-  $inputs;separator="\n"$
-  $statements;separator="\n"$
-  $config$
-</procedure>
->>
-
-call(func,outputs,inputs,sourcelocation) ::= <<
-<call proc="$func$" src="$sourcelocation$">
-  $outputs;separator="\n"$
-  $inputs;separator="\n"$
-</call>
->>
-
-vardecl(sourcelocation) ::= <<
-$if (it.type)$
-<variable name="$it.name$" type="$it.type$"/>$\n$
-$endif$
->>
-
-returnParam(type,name,bind,sourcelocation) ::= <<
-<output$if (bind)$ bind="$bind$"$endif$>$name$</output>
->>
-
-actualParam(value,bind,sourcelocation) ::= <<
-<input$if (bind)$ bind="$bind$"$endif$>$value$</input>
->>
-
-parameter(type,name,outlink,defaultv,sourcelocation) ::= <<
-
-$if(outlink)$
-  <output 
-$else$
-  <input 
-$endif$
-
-name="$name$" type="$type$"
-
-$if(defaultv)$> 
-$defaultv$
-
-$if(outlink)$
-  </output>
-$else$
-  </input>
-$endif$
-
-$else$
- xsi:nil="true" />
-$endif$
->>
-
-app(exec,arguments,stdin,stdout,stderr,sourcelocation) ::= <<
-<binding>
-  <application>
-    <executable>$exec$</executable>
-$if(stdin)$
-    $stdin$
-$endif$
-$if(stdout)$
-    $stdout$
-$endif$
-$if(stderr)$
-    $stderr$
-$endif$
-$if(arguments)$
-    $arguments$
-$endif$
-  </application>
-</binding>
->>
-
-functionInvocation(name,args,sourcelocation) ::= <<
-<function name="$name$">
-$if(args)$
-  $args$
-$endif$
-</function>
->>
-
-mappingExpr(expr,sourcelocation) ::= "$expr$"
-
-stdin(content,sourcelocation) ::= <<
-<stdin>$content$</stdin>
->>
-
-stdout(content,sourcelocation) ::= <<
-<stdout>$content$</stdout>
->>
-
-stderr(content,sourcelocation) ::= <<
-<stderr>$content$</stderr>
->>
-
-statementList(statements,sourcelocation) ::= <<
-  $statements;separator="\n"$
->>
-
-if(cond,body,els,sourcelocation) ::= <<
-<if>
-  $cond$
-  <then>
-  $body$
-  </then>
-$if(els)$
-  <else>
-  $els$
-  </else>
-$endif$
-</if>
->>
-
-foreach(var,in,index,body,sourcelocation) ::= <<
-<foreach var="$var$" $if(index)$ indexVar="$index$"$endif$ src="$sourcelocation$">
-<in>$in$</in>
-<body>$body$</body>
-</foreach>
->>
-
-switch(cond,cases,sourcelocation) ::= <<
-<switch>
-  $cond$
-  $cases;separator="\n"$
-</switch>
->>
-
-case(value, statements,sourcelocation) ::= <<
-$if(value)$
-<case>
-  $value$
-  <statements>
-  $statements;separator="\n"$
-  </statements>
-</case>
-$else$
-<default>
-  $statements;separator="\n"$
-</default>
-$endif$
->>
-
-iterate(cond,body,var,sourcelocation) ::= <<
-<iterate var="$var$">
-  <body>
-    $body$
-  </body>
-  $cond$
-</iterate>
->>
-
-assign(lhs,rhs,sourcelocation) ::= <<
-<assign src="$sourcelocation$">
- $lhs$
- $rhs$
-</assign>
->>
-
-arraySubscript(array, subscript, sourcelocation) ::= <<
-<arraySubscript>
- $array$
- $subscript$
-</arraySubscript>
->>
-
-memberAccess(structure,name,sourcelocation) ::= <<
-<structureMember>
-  $structure$
-  <memberName>$name$</memberName>
-</structureMember>
->>
-
-unaryNegation(exp,sourcelocation) ::= <<
-<unaryNegation>
-  $exp$
-</unaryNegation>
->>
-
-cond(op,left,right,sourcelocation) ::= <<
-<cond op="$op$">
-  $left$
-  $right$
-</cond>
->>
-
-and(left,right,sourcelocation) ::= <<
-<and>
-  $left$
-  $right$
-</and>
->>
-
-or(left, right,sourcelocation) ::= <<
-<or>
-  $left$
-  $right$
-</or>
->>
-
-not(exp,sourcelocation) ::= "<not>$exp$</not>"
-
-arith(op, left,right, sourcelocation) ::= <<
-<arith op="$op$">
-  $left$
-  $right$
-</arith>
->>
-
-paren(exp,sourcelocation) ::= "$exp$"
-
-type(name,sourcelocation) ::= "$name$"
-
-variableReference(name,sourcelocation) ::= "<variableReference>$name$</variableReference>"
-
-iConst(value,sourcelocation) ::= "<integerConstant>$value$</integerConstant>"
-
-fConst(value,sourcelocation) ::= "<floatConstant>$value$</floatConstant>"
-
-bConst(value,sourcelocation) ::= "<booleanConstant>$value$</booleanConstant>"
-
-sConst(value,sourcelocation) ::= "<stringConstant>$value$</stringConstant>"
-
-blank(sourcelocation) ::= ""
-

Copied: trunk/resources/swiftscript.stg (from rev 2429, trunk/resources/XDTM.stg)
===================================================================
--- trunk/resources/swiftscript.stg	                        (rev 0)
+++ trunk/resources/swiftscript.stg	2009-01-10 21:51:17 UTC (rev 2432)
@@ -0,0 +1,337 @@
+group XDTM;
+
+program(namespaces,targetNS,functions,types,statements,sourcelocation) ::= <<
+<program xmlns=$defaultNS()$
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xmlns:xs="http://www.w3.org/2001/XMLSchema"$if(!namespaces)$>
+     $else$
+
+     $namespaces;separator="\n"$>$endif$
+  $if(types)$  
+  <types>
+     $types;separator="\n"$   
+  </types>  
+  $endif$
+  $functions;separator="\n"$
+  $statements;separator="\n"$
+</program>
+>>
+
+defaultNS(ns,sourcelocation) ::= <<
+$if(ns)$"$ns$"$else$
+"http://ci.uchicago.edu/swift/2007/07/swiftscript"
+$endif$
+>>
+
+nsDef(prefix,uri,sourcelocation) ::= <<
+$if(prefix)$xmlns:$prefix$="$uri$"$else$targetNamespace="$uri$"$endif$
+>>
+
+typeDef(name,type,members,sourcelocation) ::= <<
+$if(type)$
+   	<type>
+		<typename>$name$</typename>
+		<typealias>$type$</typealias>
+		<typestructure></typestructure>
+	</type>   
+$else$
+$if(!members)$
+	<type>
+		<typename>$name$</typename>
+		<typealias>string</typealias>
+		<typestructure></typestructure>
+	</type>
+$else$
+	<type>
+		<typename>$name$</typename>
+		<typealias></typealias>
+		<typestructure>
+			$members;separator="\n"$
+		</typestructure>
+	</type>
+$endif$
+$endif$
+>>
+
+memberdefinition(type,name,sourcelocation) ::= <<
+    <member>
+		<membername>$name$</membername>
+		<membertype>$type$</membertype>
+	</member>
+>>
+
+variable(type,name, value,sourcelocation) ::= <<
+<variable name="$name$" type="$type$"$if(!value)$ xsi:nil="true"/>$else$>$value$</variable>
+$endif$
+>>
+
+dataset(name,type,mapping, lfn,sourcelocation) ::= <<
+<dataset name="$name$" type="$type$">
+$if(lfn)$
+  <file name="$lfn$"/>
+
+$else$
+  $mapping$
+
+$endif$
+</dataset>
+>>
+
+mapping(descriptor,params,sourcelocation) ::= <<
+<mapping descriptor="$descriptor$"$if(params)$>
+  $params;separator="\n"$
+</mapping>
+$else$/>$endif$
+>>
+
+mapParam(name,value,sourcelocation) ::= <<
+<param name="$name$">$value$</param>
+>>
+
+arrayInit(elements,range,sourcelocation) ::= <<
+$if(range)$
+
+  $range$
+
+$else$
+
+  <array>
+    $elements$
+  </array>
+
+$endif$
+>>
+
+range(from, to, step, sourcelocation) ::= <<
+<range>
+  $from$
+  $to$
+  $if(step)$$step$$endif$
+</range>
+>>
+
+function(name,outputs,inputs,statements,config,sourcelocation) ::= <<
+<procedure name="$name$">
+  $outputs;separator="\n"$
+  $inputs;separator="\n"$
+  $statements;separator="\n"$
+  $config$
+</procedure>
+>>
+
+call(func,outputs,inputs,sourcelocation) ::= <<
+<call proc="$func$" src="$sourcelocation$">
+  $outputs;separator="\n"$
+  $inputs;separator="\n"$
+</call>
+>>
+
+vardecl(sourcelocation) ::= <<
+$if (it.type)$
+<variable name="$it.name$" type="$it.type$"/>$\n$
+$endif$
+>>
+
+returnParam(type,name,bind,sourcelocation) ::= <<
+<output$if (bind)$ bind="$bind$"$endif$>$name$</output>
+>>
+
+actualParam(value,bind,sourcelocation) ::= <<
+<input$if (bind)$ bind="$bind$"$endif$>$value$</input>
+>>
+
+parameter(type,name,outlink,defaultv,sourcelocation) ::= <<
+
+$if(outlink)$
+  <output 
+$else$
+  <input 
+$endif$
+
+name="$name$" type="$type$"
+
+$if(defaultv)$> 
+$defaultv$
+
+$if(outlink)$
+  </output>
+$else$
+  </input>
+$endif$
+
+$else$
+ xsi:nil="true" />
+$endif$
+>>
+
+app(exec,arguments,stdin,stdout,stderr,sourcelocation) ::= <<
+<binding>
+  <application>
+    <executable>$exec$</executable>
+$if(stdin)$
+    $stdin$
+$endif$
+$if(stdout)$
+    $stdout$
+$endif$
+$if(stderr)$
+    $stderr$
+$endif$
+$if(arguments)$
+    $arguments$
+$endif$
+  </application>
+</binding>
+>>
+
+functionInvocation(name,args,sourcelocation) ::= <<
+<function name="$name$">
+$if(args)$
+  $args$
+$endif$
+</function>
+>>
+
+mappingExpr(expr,sourcelocation) ::= "$expr$"
+
+stdin(content,sourcelocation) ::= <<
+<stdin>$content$</stdin>
+>>
+
+stdout(content,sourcelocation) ::= <<
+<stdout>$content$</stdout>
+>>
+
+stderr(content,sourcelocation) ::= <<
+<stderr>$content$</stderr>
+>>
+
+statementList(statements,sourcelocation) ::= <<
+  $statements;separator="\n"$
+>>
+
+if(cond,body,els,sourcelocation) ::= <<
+<if>
+  $cond$
+  <then>
+  $body$
+  </then>
+$if(els)$
+  <else>
+  $els$
+  </else>
+$endif$
+</if>
+>>
+
+foreach(var,in,index,body,sourcelocation) ::= <<
+<foreach var="$var$" $if(index)$ indexVar="$index$"$endif$ src="$sourcelocation$">
+<in>$in$</in>
+<body>$body$</body>
+</foreach>
+>>
+
+switch(cond,cases,sourcelocation) ::= <<
+<switch>
+  $cond$
+  $cases;separator="\n"$
+</switch>
+>>
+
+case(value, statements,sourcelocation) ::= <<
+$if(value)$
+<case>
+  $value$
+  <statements>
+  $statements;separator="\n"$
+  </statements>
+</case>
+$else$
+<default>
+  $statements;separator="\n"$
+</default>
+$endif$
+>>
+
+iterate(cond,body,var,sourcelocation) ::= <<
+<iterate var="$var$">
+  <body>
+    $body$
+  </body>
+  $cond$
+</iterate>
+>>
+
+assign(lhs,rhs,sourcelocation) ::= <<
+<assign src="$sourcelocation$">
+ $lhs$
+ $rhs$
+</assign>
+>>
+
+arraySubscript(array, subscript, sourcelocation) ::= <<
+<arraySubscript>
+ $array$
+ $subscript$
+</arraySubscript>
+>>
+
+memberAccess(structure,name,sourcelocation) ::= <<
+<structureMember>
+  $structure$
+  <memberName>$name$</memberName>
+</structureMember>
+>>
+
+unaryNegation(exp,sourcelocation) ::= <<
+<unaryNegation>
+  $exp$
+</unaryNegation>
+>>
+
+cond(op,left,right,sourcelocation) ::= <<
+<cond op="$op$">
+  $left$
+  $right$
+</cond>
+>>
+
+and(left,right,sourcelocation) ::= <<
+<and>
+  $left$
+  $right$
+</and>
+>>
+
+or(left, right,sourcelocation) ::= <<
+<or>
+  $left$
+  $right$
+</or>
+>>
+
+not(exp,sourcelocation) ::= "<not>$exp$</not>"
+
+arith(op, left,right, sourcelocation) ::= <<
+<arith op="$op$">
+  $left$
+  $right$
+</arith>
+>>
+
+paren(exp,sourcelocation) ::= "$exp$"
+
+type(name,sourcelocation) ::= "$name$"
+
+variableReference(name,sourcelocation) ::= "<variableReference>$name$</variableReference>"
+
+iConst(value,sourcelocation) ::= "<integerConstant>$value$</integerConstant>"
+
+fConst(value,sourcelocation) ::= "<floatConstant>$value$</floatConstant>"
+
+bConst(value,sourcelocation) ::= "<booleanConstant>$value$</booleanConstant>"
+
+sConst(value,sourcelocation) ::= "<stringConstant>$value$</stringConstant>"
+
+blank(sourcelocation) ::= ""
+


Property changes on: trunk/resources/swiftscript.stg
___________________________________________________________________
Name: svn:mergeinfo
   + 

Modified: trunk/src/org/griphyn/vdl/toolkit/VDLt2VDLx.java
===================================================================
--- trunk/src/org/griphyn/vdl/toolkit/VDLt2VDLx.java	2009-01-10 21:16:16 UTC (rev 2431)
+++ trunk/src/org/griphyn/vdl/toolkit/VDLt2VDLx.java	2009-01-10 21:51:17 UTC (rev 2432)
@@ -22,7 +22,7 @@
 public class VDLt2VDLx {
 	private static final Logger logger = Logger.getLogger(VDLt2VDLx.class);
 	
-	public static final String DEFAULT_TEMPLATE_FILE_NAME = "XDTM.stg";
+	public static final String DEFAULT_TEMPLATE_FILE_NAME = "swiftscript.stg";
 
 	public static void main(String[] args) throws Exception {
 		try {




More information about the Swift-commit mailing list