Author: jbeard
Date: Sun Nov  7 09:36:15 2010
New Revision: 1032239

URL: http://svn.apache.org/viewvc?rev=1032239&view=rev
Log:
Python frontend now generating code.

Modified:
    
commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/scxml/cgf/SCXMLCompiler.py
    
commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/scxml/cgf/backends/js/StatePatternStatechartGenerator.py
    
commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/scxml/cgf/backends/js/StateTableStatechartGenerator.py
    
commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/scxml/cgf/backends/js/SwitchyardGenerator.py

Modified: 
commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/scxml/cgf/SCXMLCompiler.py
URL: 
http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/scxml/cgf/SCXMLCompiler.py?rev=1032239&r1=1032238&r2=1032239&view=diff
==============================================================================
--- 
commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/scxml/cgf/SCXMLCompiler.py 
(original)
+++ 
commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/scxml/cgf/SCXMLCompiler.py 
Sun Nov  7 09:36:15 2010
@@ -2,6 +2,7 @@ import sys
 import pkg_resources
 import getopt
 from lxml import etree
+#import pdb
 
 def compile(pathsToSCXML=[],backend="state",options={}):
        #open it
@@ -22,7 +23,7 @@ def compile(pathsToSCXML=[],backend="sta
        for doc in sourceDocuments:
                ir = transformDocument(doc,config["transformations"])
                transformedJs = 
transformDocument(ir,[config["code"]],options,"text")
-               results.push(transformedJs) 
+               results.append(transformedJs) 
 
                #TODO: optionally beautify result here
 
@@ -44,7 +45,7 @@ def transformDocument(sourceDocument=Non
                return outputDocument   
        else:
                #assume "text"
-               return outputDocument.root.getText() 
+               return str(outputDocument)
 
 def usage():
        print "Couldn't parse command-line args. TODO: print helpful usage 
text."

Modified: 
commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/scxml/cgf/backends/js/StatePatternStatechartGenerator.py
URL: 
http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/scxml/cgf/backends/js/StatePatternStatechartGenerator.py?rev=1032239&r1=1032238&r2=1032239&view=diff
==============================================================================
--- 
commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/scxml/cgf/backends/js/StatePatternStatechartGenerator.py
 (original)
+++ 
commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/scxml/cgf/backends/js/StatePatternStatechartGenerator.py
 Sun Nov  7 09:36:15 2010
@@ -8,5 +8,5 @@ config =  {
                                        
"xslt/ir-compiler/addEventRegularExpressions.xsl",
                                        "xslt/ir-compiler/expandStarEvent.xsl",
                                        
"xslt/layout/addTransitionTargetIds.xsl" ],
-       "code" : "xslt/backends/js/StatePatternStatechartGenerator.xsl"  
#preprocessed stylesheet instead? 
+       "code" : "target/StatePatternStatechartGenerator_combined.xsl"   
#preprocessed stylesheet instead? 
 }

Modified: 
commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/scxml/cgf/backends/js/StateTableStatechartGenerator.py
URL: 
http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/scxml/cgf/backends/js/StateTableStatechartGenerator.py?rev=1032239&r1=1032238&r2=1032239&view=diff
==============================================================================
--- 
commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/scxml/cgf/backends/js/StateTableStatechartGenerator.py
 (original)
+++ 
commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/scxml/cgf/backends/js/StateTableStatechartGenerator.py
 Sun Nov  7 09:36:15 2010
@@ -2,6 +2,6 @@ from scxml.cgf.backends.js.AbstractEnume
 
 config =  {
        "transformations": 
AbstractEnumeratedStatechartGeneratorConfig["transformations"], 
-       "code" : "xslt/backends/js/StateTableStatechartGenerator.xsl"    
#preprocessed stylesheet instead? 
+       "code" : "target/StateTableStatechartGenerator_combined.xsl"     
#preprocessed stylesheet instead? 
 }
 

Modified: 
commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/scxml/cgf/backends/js/SwitchyardGenerator.py
URL: 
http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/scxml/cgf/backends/js/SwitchyardGenerator.py?rev=1032239&r1=1032238&r2=1032239&view=diff
==============================================================================
--- 
commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/scxml/cgf/backends/js/SwitchyardGenerator.py
 (original)
+++ 
commons/sandbox/gsoc/2010/scxml-js/trunk/src/python/scxml/cgf/backends/js/SwitchyardGenerator.py
 Sun Nov  7 09:36:15 2010
@@ -2,5 +2,5 @@ from scxml.cgf.backends.js.AbstractEnume
 
 config =  {
        "transformations": 
AbstractEnumeratedStatechartGeneratorConfig["transformations"], 
-       "code" : "xslt/backends/js/SwitchyardStatechartGenerator.xsl"    
#preprocessed stylesheet instead? 
+       "code" : "target/SwitchyardStatechartGenerator_combined.xsl"     
#preprocessed stylesheet instead? 
 }


Reply via email to