commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbe...@apache.org
Subject svn commit: r954348 - in /commons/sandbox/gsoc/2010/scxml-js/trunk: src/javascript/scxml/cgf/ src/javascript/scxml/cgf/backends/ src/javascript/scxml/cgf/backends/js/ test/
Date Mon, 14 Jun 2010 02:19:37 GMT
Author: jbeard
Date: Mon Jun 14 02:19:37 2010
New Revision: 954348

URL: http://svn.apache.org/viewvc?rev=954348&view=rev
Log:
Added constructs which describes sequences of transformations.

Added:
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/backends/
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/backends/js/
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/backends/js/AbstractEnumeratedStatechartGenerator.js
  (with props)
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/backends/js/AbstractStatechartGenerator.js
  (with props)
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/backends/js/StatePatternStatechartGenerator.js
  (with props)
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/backends/js/StateTableStatechartGenerator.js
  (with props)
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/backends/js/SwitchyardStatechartGenerator.js
  (with props)
Modified:
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/SCXMLCompiler.js
    commons/sandbox/gsoc/2010/scxml-js/trunk/test/SCXMLCompiler.js

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/SCXMLCompiler.js
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/SCXMLCompiler.js?rev=954348&r1=954347&r2=954348&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/SCXMLCompiler.js (original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/SCXMLCompiler.js Mon
Jun 14 02:19:37 2010
@@ -26,6 +26,7 @@ code.  
 */ 
 
 require.def("src/javascript/scxml/cgf/SCXMLCompiler",
+
 	["lib/js/beautify.js"],
 	
 	function(){

Added: commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/backends/js/AbstractEnumeratedStatechartGenerator.js
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/backends/js/AbstractEnumeratedStatechartGenerator.js?rev=954348&view=auto
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/backends/js/AbstractEnumeratedStatechartGenerator.js
(added)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/backends/js/AbstractEnumeratedStatechartGenerator.js
Mon Jun 14 02:19:37 2010
@@ -0,0 +1,19 @@
+require.def(
+
+	"src/javascript/scxml/cgf/backends/js/StatePatternStatechartGenerator",
+
+	[
+		"src/javascript/scxml/cgf/backends/js/AbstractStatechartGenerator",
+		"xml!src/xslt/ir-compiler/appendTransitionInformation.xsl" ],
+	function(
+		AbstractStatechartGenerator,
+		appendTransitionInformation
+	){
+
+		return {
+			"transformations" : AbstractStatechartGenerator.transformations.concat( appendTransitionInformation
)
+		};
+
+
+	}
+);

Propchange: commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/backends/js/AbstractEnumeratedStatechartGenerator.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/backends/js/AbstractStatechartGenerator.js
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/backends/js/AbstractStatechartGenerator.js?rev=954348&view=auto
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/backends/js/AbstractStatechartGenerator.js
(added)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/backends/js/AbstractStatechartGenerator.js
Mon Jun 14 02:19:37 2010
@@ -0,0 +1,46 @@
+require.def(
+
+	"src/javascript/scxml/cgf/backends/js/AbstractStatechartGenerator",
+
+	[
+		"xml!src/xslt/ir-compiler/enumerateEvents.xsl",
+		"xml!src/xslt/ir-compiler/normalizeInitialStates.xsl",
+		"xml!src/xslt/ir-compiler/generateUniqueStateIds.xsl",
+		"xml!src/xslt/ir-compiler/generateUniqueInitialStateIds.xsl",
+		"xml!src/xslt/ir-compiler/splitTransitionTargets.xsl",
+		"xml!src/xslt/ir-compiler/changeTransitionsPointingToCompoundStatesToPointToInitialStates.xsl",
+		"xml!src/xslt/ir-compiler/computeLCA.xsl",
+		"xml!src/xslt/ir-compiler/transformIf.xsl",
+		"xml!src/xslt/ir-compiler/appendStateInformation.xsl",
+		"xml!src/xslt/ir-compiler/appendBasicStateInformation.xsl" ],
+	function(
+		enumerateEvents,
+		normalizeInitialStates,
+		generateUniqueStateIds,
+		generateUniqueInitialStateIds,
+		splitTransitionTargets,
+		changeTransitionsPointingToCompoundStatesToPointToInitialStates,
+		computeLCA,
+		transformIf,
+		appendStateInformation,
+		appendBasicStateInformation
+	){
+
+		return {
+			"transformations" : [
+				enumerateEvents,
+				normalizeInitialStates,
+				generateUniqueStateIds,
+				generateUniqueInitialStateIds,
+				splitTransitionTargets,
+				changeTransitionsPointingToCompoundStatesToPointToInitialStates,
+				computeLCA,
+				transformIf,
+				appendStateInformation,
+				appendBasicStateInformation
+			]
+		};
+
+
+	}
+);

Propchange: commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/backends/js/AbstractStatechartGenerator.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/backends/js/StatePatternStatechartGenerator.js
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/backends/js/StatePatternStatechartGenerator.js?rev=954348&view=auto
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/backends/js/StatePatternStatechartGenerator.js
(added)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/backends/js/StatePatternStatechartGenerator.js
Mon Jun 14 02:19:37 2010
@@ -0,0 +1,23 @@
+require.def(
+
+	"src/javascript/scxml/cgf/backends/js/StatePatternStatechartGenerator",
+
+	[
+		"src/javascript/scxml/cgf/backends/js/AbstractStatechartGenerator",
+		"xml!src/xslt/ir-compiler/appendTransitionInformation.xsl",
+		"xml!src/xslt/backends/js/StatePatternStatechartGenerator.xsl" ],
+
+	function(
+		AbstractStatechartGenerator,
+		appendTransitionInformation,
+		StatePatternStatechartGenerator
+	){
+
+		return {
+			"transformations" : AbstractStatechartGenerator.transformations.concat(appendTransitionInformation),
+			"code" : StatePatternStatechartGenerator
+		};
+
+
+	}
+);

Propchange: commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/backends/js/StatePatternStatechartGenerator.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/backends/js/StateTableStatechartGenerator.js
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/backends/js/StateTableStatechartGenerator.js?rev=954348&view=auto
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/backends/js/StateTableStatechartGenerator.js
(added)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/backends/js/StateTableStatechartGenerator.js
Mon Jun 14 02:19:37 2010
@@ -0,0 +1,17 @@
+require.def(
+
+	"src/javascript/scxml/cgf/backends/js/StateTableStatechartGenerator",
+
+	[ "src/javascript/scxml/cgf/backends/js/AbstractEnumeratedStatechartGenerator", 
+		"xml!src/xslt/backends/js/StateTableStatechartGenerator.xsl" ],
+
+	function(AbstractEnumeratedStatechartGenerator,StateTableStatechartGenerator){
+
+		return {
+			"transformations" : AbstractEnumeratedStatechartGenerator.transformations,
+			"code" : StateTableStatechartGenerator		
+		}
+
+
+	}
+);

Propchange: commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/backends/js/StateTableStatechartGenerator.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/backends/js/SwitchyardStatechartGenerator.js
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/backends/js/SwitchyardStatechartGenerator.js?rev=954348&view=auto
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/backends/js/SwitchyardStatechartGenerator.js
(added)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/backends/js/SwitchyardStatechartGenerator.js
Mon Jun 14 02:19:37 2010
@@ -0,0 +1,17 @@
+require.def(
+
+	"src/javascript/scxml/cgf/backends/js/SwitchyardStatechartGenerator",
+
+	[ "src/javascript/scxml/cgf/backends/js/AbstractEnumeratedStatechartGenerator", 
+		"xml!src/xslt/backends/js/SwitchyardStatechartGenerator.xsl" ],
+
+	function(AbstractEnumeratedStatechartGenerator,SwitchyardStatechartGenerator){
+
+		return {
+			"transformations" : AbstractEnumeratedStatechartGenerator.transformations,
+			"code" : SwitchyardStatechartGenerator
+		}
+
+
+	}
+);

Propchange: commons/sandbox/gsoc/2010/scxml-js/trunk/src/javascript/scxml/cgf/backends/js/SwitchyardStatechartGenerator.js
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/test/SCXMLCompiler.js
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/test/SCXMLCompiler.js?rev=954348&r1=954347&r2=954348&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/test/SCXMLCompiler.js (original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/test/SCXMLCompiler.js Mon Jun 14 02:19:37 2010
@@ -2,61 +2,15 @@ require.def(
 	"test/SCXMLCompiler",
 	[
 		"xml!test/kitchen_sink/KitchenSink.xml",
-		"xml!src/xslt/ir-compiler/enumerateEvents.xsl",
-		"xml!src/xslt/ir-compiler/normalizeInitialStates.xsl",
-		"xml!src/xslt/ir-compiler/generateUniqueStateIds.xsl",
-		"xml!src/xslt/ir-compiler/generateUniqueInitialStateIds.xsl",
-		"xml!src/xslt/ir-compiler/splitTransitionTargets.xsl",
-		"xml!src/xslt/ir-compiler/changeTransitionsPointingToCompoundStatesToPointToInitialStates.xsl",
-		"xml!src/xslt/ir-compiler/computeLCA.xsl",
-		"xml!src/xslt/ir-compiler/transformIf.xsl",
-		"xml!src/xslt/ir-compiler/appendStateInformation.xsl",
-		"xml!src/xslt/ir-compiler/appendBasicStateInformation.xsl",
-		"xml!src/xslt/ir-compiler/flattenTransitions.xsl",
-		"xml!src/xslt/ir-compiler/nameTransitions.xsl",
-		"xml!src/xslt/ir-compiler/numberStatesAndTransitions.xsl",
-		"xml!src/xslt/ir-compiler/appendTransitionInformation.xsl",
-		"xml!src/xslt/backends/js/StatePatternStatechartGenerator.xsl",
+		"src/javascript/scxml/cgf/backends/js/StatePatternStatechartGenerator",
 		"/lib/js/beautify.js"],
 	function(
 		KitchenSink,
-		enumerateEvents,
-		normalizeInitialStates,
-		generateUniqueStateIds,
-		generateUniqueInitialStateIds,
-		splitTransitionTargets,
-		changeTransitionsPointingToCompoundStatesToPointToInitialStates,
-		computeLCA,
-		transformIf,
-		appendStateInformation,
-		appendBasicStateInformation,
-		flattenTransitions,
-		nameTransitions,
-		numberStatesAndTransitions,
-		appendTransitionInformation,
 		StatePatternStatechartGenerator
 	){
 
 		var sourceDocument = KitchenSink;
-		var transforms = [ 	enumerateEvents,
-					normalizeInitialStates,
-					generateUniqueStateIds,
-					generateUniqueInitialStateIds,
-					splitTransitionTargets,
-					changeTransitionsPointingToCompoundStatesToPointToInitialStates,
-					computeLCA,
-					transformIf,
-					appendStateInformation,
-					appendBasicStateInformation,
-					/*
-					flattenTransitions,
-					nameTransitions,
-					numberStatesAndTransitions,
-					*/
-					appendTransitionInformation
-				];
-					//StatePatternStatechartGenerator
-		//TODO: generate code
+		var transforms = StatePatternStatechartGenerator.transformations;
 
 		function getProcessorFromStylesheetDocument(d){
 			var processor = new XSLTProcessor();  
@@ -90,13 +44,12 @@ require.def(
 
 				//transform to js
 				var statePatternStatechartGeneratorProcessor =	
-					 getProcessorFromStylesheetDocument(StatePatternStatechartGenerator);
+					 getProcessorFromStylesheetDocument(StatePatternStatechartGenerator.code);
 	
 				//set parameters
 				for(optName in options){
 					 statePatternStatechartGeneratorProcessor.setParameter(null,optName,options[optName]);
 				}
-				
 
 				docToTransform = statePatternStatechartGeneratorProcessor.transformToDocument(docToTransform);
 			
@@ -113,7 +66,6 @@ require.def(
 				return transformedJs;
 
 				/*
-				
 				//eval
 				eval(resultText);
 				window.StatechartExecutionContext = StatechartExecutionContext;



Mime
View raw message