commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbe...@apache.org
Subject svn commit: r1032247 - in /commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js: AbstractEnumeratedStatechartGenerator.xsl AbstractStatechartGenerator.xsl StatePatternStatechartGenerator.xsl SwitchyardStatechartGenerator.xsl
Date Sun, 07 Nov 2010 09:41:03 GMT
Author: jbeard
Date: Sun Nov  7 09:41:02 2010
New Revision: 1032247

URL: http://svn.apache.org/viewvc?rev=1032247&view=rev
Log:
Finishing previous commit. All tests pass for all strategies.

Modified:
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/AbstractEnumeratedStatechartGenerator.xsl
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/AbstractStatechartGenerator.xsl
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/StatePatternStatechartGenerator.xsl
    commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/SwitchyardStatechartGenerator.xsl

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/AbstractEnumeratedStatechartGenerator.xsl
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/AbstractEnumeratedStatechartGenerator.xsl?rev=1032247&r1=1032246&r2=1032247&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/AbstractEnumeratedStatechartGenerator.xsl
(original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/AbstractEnumeratedStatechartGenerator.xsl
Sun Nov  7 09:41:02 2010
@@ -139,8 +139,7 @@
 						&amp;&amp; <value-of select="@cond"/>
 					</if>){
 
-					<value-of select="@c:tName"/>();
-					break;
+					return <value-of select="@c:tName"/>();
 				}
 			</for-each>
 			break;
@@ -301,6 +300,21 @@
 		</choose>
 	</template>
 
+	<template name="genPreemptedBasicStatesSet">
+		<param name="t"/>
+		
+		{
+			<!-- TODO: move this out into subclasses -->
+			<for-each select="$t/c:basicStateDescendantsOfLCA/c:basicStateDescendant">
+				<variable name="basicStateDescendantId" select="text()"/>
+				<variable name="descendantState" select="$allStates[@id=$basicStateDescendantId]"/>
+				<value-of select="$descendantState/@c:stateNum - 1"/> : true
+				<if test="position() != last()">,</if>
+			</for-each>
+		}
+	</template>
+
+
 	<template name="genStateHooks"/>
 	<template name="genEnumeratedHooks"/>
 	<template name="genTriggerIntEnum"/>

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/AbstractStatechartGenerator.xsl
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/AbstractStatechartGenerator.xsl?rev=1032247&r1=1032246&r2=1032247&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/AbstractStatechartGenerator.xsl
(original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/AbstractStatechartGenerator.xsl
Sun Nov  7 09:41:02 2010
@@ -1074,17 +1074,6 @@
 		</choose>
 	</template>
 
-	<template name="genPreemptedBasicStatesSet">
-		<param name="t"/>
-		
-		{
-			<for-each select="$t/c:basicStateDescendantsOfLCA/c:basicStateDescendant">
-				<value-of select="text()"/> : true
-				<if test="position() != last()">,</if>
-			</for-each>
-		}
-	</template>
-
 	<template name="genTriggerDispatcherInnerContents">
 		<param name="s"/>
 		<param name="t"/>

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/StatePatternStatechartGenerator.xsl
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/StatePatternStatechartGenerator.xsl?rev=1032247&r1=1032246&r2=1032247&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/StatePatternStatechartGenerator.xsl
(original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/StatePatternStatechartGenerator.xsl
Sun Nov  7 09:41:02 2010
@@ -196,4 +196,16 @@
 		"<value-of select="$eventName"/>"
 	</template>
 
+       <template name="genPreemptedBasicStatesSet">
+               <param name="t"/>
+               
+               {
+                       <for-each select="$t/c:basicStateDescendantsOfLCA/c:basicStateDescendant">
+                               <value-of select="text()"/> : true
+                               <if test="position() != last()">,</if>
+                       </for-each>
+               }
+       </template>
+
+
 </stylesheet>

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/SwitchyardStatechartGenerator.xsl
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/SwitchyardStatechartGenerator.xsl?rev=1032247&r1=1032246&r2=1032247&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/SwitchyardStatechartGenerator.xsl
(original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/src/xslt/backends/js/SwitchyardStatechartGenerator.xsl
Sun Nov  7 09:41:02 2010
@@ -75,8 +75,7 @@
 		</variable>
 
 		case <value-of select="$eventName"/>:
-			<value-of select="$t/@c:tName"/>();
-			break;
+			return <value-of select="$t/@c:tName"/>();
 	</template>
 
 </stylesheet>



Mime
View raw message