From: <fwi...@us...> - 2007-12-06 13:11:25
|
Revision: 3765 http://jython.svn.sourceforge.net/jython/?rev=3765&view=rev Author: fwierzbicki Date: 2007-12-06 05:11:24 -0800 (Thu, 06 Dec 2007) Log Message: ----------- bugfix for asdl_antlr and run the asdl gen from build.xml with a python command for better cross-platform. Modified Paths: -------------- trunk/sandbox/ast/asdl_antlr.py trunk/sandbox/ast/build.xml Modified: trunk/sandbox/ast/asdl_antlr.py =================================================================== --- trunk/sandbox/ast/asdl_antlr.py 2007-12-05 23:58:13 UTC (rev 3764) +++ trunk/sandbox/ast/asdl_antlr.py 2007-12-06 13:11:24 UTC (rev 3765) @@ -233,7 +233,10 @@ self.emit("super(token);", depth+1) for f in fields: self.emit("this.%s = %s;" % (f.name, f.name), depth+1) - if f.seq: + fparg = self.fieldDef(f) + #For now ignoring int and String -- will want to wrap in a PythonTree later I think. + if f.seq and not fparg.startswith("int") and not fparg.startswith("String"): + print self.fieldDef(f) self.emit("for(int i%(name)s=0;i%(name)s<%(name)s.length;i%(name)s++) {" % {"name":f.name}, depth+1) self.emit("addChild(%s[i%s]);" % (f.name, f.name), depth+2) self.emit("}", depth+1) Modified: trunk/sandbox/ast/build.xml =================================================================== --- trunk/sandbox/ast/build.xml 2007-12-05 23:58:13 UTC (rev 3764) +++ trunk/sandbox/ast/build.xml 2007-12-06 13:11:24 UTC (rev 3765) @@ -48,7 +48,8 @@ <target name="asdl_gen" depends="init"> <apply verbose="true" - executable="./asdl_antlr.py"> + executable="python"> + <arg value="./asdl_antlr.py" /> <fileset dir="." includes="Python.asdl"/> </apply> </target> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |