From: <fwi...@us...> - 2008-11-23 14:01:11
|
Revision: 5612 http://jython.svn.sourceforge.net/jython/?rev=5612&view=rev Author: fwierzbicki Date: 2008-11-23 14:01:06 +0000 (Sun, 23 Nov 2008) Log Message: ----------- set* that take lists now take objects in prep for converting from Python objects. Modified Paths: -------------- branches/astwrite/ast/asdl_antlr.py branches/astwrite/src/org/python/antlr/ast/Assert.java branches/astwrite/src/org/python/antlr/ast/Assign.java branches/astwrite/src/org/python/antlr/ast/Attribute.java branches/astwrite/src/org/python/antlr/ast/AugAssign.java branches/astwrite/src/org/python/antlr/ast/BinOp.java branches/astwrite/src/org/python/antlr/ast/BoolOp.java branches/astwrite/src/org/python/antlr/ast/Break.java branches/astwrite/src/org/python/antlr/ast/Call.java branches/astwrite/src/org/python/antlr/ast/ClassDef.java branches/astwrite/src/org/python/antlr/ast/Compare.java branches/astwrite/src/org/python/antlr/ast/Continue.java branches/astwrite/src/org/python/antlr/ast/Delete.java branches/astwrite/src/org/python/antlr/ast/Dict.java branches/astwrite/src/org/python/antlr/ast/Ellipsis.java branches/astwrite/src/org/python/antlr/ast/Exec.java branches/astwrite/src/org/python/antlr/ast/Expr.java branches/astwrite/src/org/python/antlr/ast/Expression.java branches/astwrite/src/org/python/antlr/ast/ExtSlice.java branches/astwrite/src/org/python/antlr/ast/For.java branches/astwrite/src/org/python/antlr/ast/FunctionDef.java branches/astwrite/src/org/python/antlr/ast/GeneratorExp.java branches/astwrite/src/org/python/antlr/ast/Global.java branches/astwrite/src/org/python/antlr/ast/If.java branches/astwrite/src/org/python/antlr/ast/IfExp.java branches/astwrite/src/org/python/antlr/ast/Import.java branches/astwrite/src/org/python/antlr/ast/ImportFrom.java branches/astwrite/src/org/python/antlr/ast/Index.java branches/astwrite/src/org/python/antlr/ast/Interactive.java branches/astwrite/src/org/python/antlr/ast/Lambda.java branches/astwrite/src/org/python/antlr/ast/List.java branches/astwrite/src/org/python/antlr/ast/ListComp.java branches/astwrite/src/org/python/antlr/ast/Module.java branches/astwrite/src/org/python/antlr/ast/Name.java branches/astwrite/src/org/python/antlr/ast/Num.java branches/astwrite/src/org/python/antlr/ast/Pass.java branches/astwrite/src/org/python/antlr/ast/Print.java branches/astwrite/src/org/python/antlr/ast/Raise.java branches/astwrite/src/org/python/antlr/ast/Repr.java branches/astwrite/src/org/python/antlr/ast/Return.java branches/astwrite/src/org/python/antlr/ast/Slice.java branches/astwrite/src/org/python/antlr/ast/Str.java branches/astwrite/src/org/python/antlr/ast/Subscript.java branches/astwrite/src/org/python/antlr/ast/Suite.java branches/astwrite/src/org/python/antlr/ast/TryExcept.java branches/astwrite/src/org/python/antlr/ast/TryFinally.java branches/astwrite/src/org/python/antlr/ast/Tuple.java branches/astwrite/src/org/python/antlr/ast/UnaryOp.java branches/astwrite/src/org/python/antlr/ast/While.java branches/astwrite/src/org/python/antlr/ast/With.java branches/astwrite/src/org/python/antlr/ast/Yield.java branches/astwrite/src/org/python/antlr/ast/aliasType.java branches/astwrite/src/org/python/antlr/ast/argumentsType.java branches/astwrite/src/org/python/antlr/ast/comprehensionType.java branches/astwrite/src/org/python/antlr/ast/excepthandlerType.java branches/astwrite/src/org/python/antlr/ast/keywordType.java Modified: branches/astwrite/ast/asdl_antlr.py =================================================================== --- branches/astwrite/ast/asdl_antlr.py 2008-11-23 06:28:45 UTC (rev 5611) +++ branches/astwrite/ast/asdl_antlr.py 2008-11-23 14:01:06 UTC (rev 5612) @@ -413,19 +413,22 @@ str(field.name).capitalize()), depth) self.emit("return %s;" % field.name, depth+1) self.emit("}", depth) - self.emit("public void set%s(%s) {" % (str(field.name).capitalize(), - self.fieldDef(field)), depth) + self.emit("public Object get%s() {" % (str(field.name).capitalize()), depth) + self.emit("return %s;" % field.name, depth+1) + self.emit("}", depth) + self.emit("public void set%s(Object %s) {" % (str(field.name).capitalize(), + field.name), depth) if field.seq: - self.emit("this.%s = new %s(%s);" % (field.name, - self.javaType(field, True), field.name), depth+1) + self.emit("this.%s = new %s(" % (field.name, self.javaType(field, True)), depth+1) + self.emit("(%s)%s);" % (self.javaType(field), field.name), depth+2) else: - self.emit("this.%s = %s;" % (field.name, field.name), depth+1) + self.emit("this.%s = (%s)%s;" % (field.name, self.javaType(field), field.name), depth+1) self.emit("}", depth) self.emit("", 0) bltinnames = { - 'int' : 'int', - 'bool' : 'boolean', + 'int' : 'Integer', + 'bool' : 'Boolean', 'identifier' : 'String', 'string' : 'Object', 'object' : 'Object', # was PyObject Modified: branches/astwrite/src/org/python/antlr/ast/Assert.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Assert.java 2008-11-23 06:28:45 UTC (rev 5611) +++ branches/astwrite/src/org/python/antlr/ast/Assert.java 2008-11-23 14:01:06 UTC (rev 5612) @@ -12,17 +12,23 @@ public exprType getInternalTest() { return test; } - public void setTest(exprType test) { - this.test = test; + public Object getTest() { + return test; } + public void setTest(Object test) { + this.test = (exprType)test; + } private exprType msg; public exprType getInternalMsg() { return msg; } - public void setMsg(exprType msg) { - this.msg = msg; + public Object getMsg() { + return msg; } + public void setMsg(Object msg) { + this.msg = (exprType)msg; + } private final static String[] fields = new String[] {"test", "msg"}; @@ -43,7 +49,7 @@ addChild(msg); } - public Assert(int ttype, Token token, exprType test, exprType msg) { + public Assert(Integer ttype, Token token, exprType test, exprType msg) { super(ttype, token); this.test = test; addChild(test); Modified: branches/astwrite/src/org/python/antlr/ast/Assign.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Assign.java 2008-11-23 06:28:45 UTC (rev 5611) +++ branches/astwrite/src/org/python/antlr/ast/Assign.java 2008-11-23 14:01:06 UTC (rev 5612) @@ -12,17 +12,24 @@ public ListWrapper<exprType> getInternalTargets() { return targets; } - public void setTargets(java.util.List<exprType> targets) { - this.targets = new ListWrapper<exprType>(targets); + public Object getTargets() { + return targets; } + public void setTargets(Object targets) { + this.targets = new ListWrapper<exprType>( + (java.util.List<exprType>)targets); + } private exprType value; public exprType getInternalValue() { return value; } - public void setValue(exprType value) { - this.value = value; + public Object getValue() { + return value; } + public void setValue(Object value) { + this.value = (exprType)value; + } private final static String[] fields = new String[] {"targets", "value"}; @@ -52,7 +59,7 @@ addChild(value); } - public Assign(int ttype, Token token, java.util.List<exprType> targets, + public Assign(Integer ttype, Token token, java.util.List<exprType> targets, exprType value) { super(ttype, token); this.targets = new ListWrapper<exprType>(targets); Modified: branches/astwrite/src/org/python/antlr/ast/Attribute.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Attribute.java 2008-11-23 06:28:45 UTC (rev 5611) +++ branches/astwrite/src/org/python/antlr/ast/Attribute.java 2008-11-23 14:01:06 UTC (rev 5612) @@ -12,25 +12,34 @@ public exprType getInternalValue() { return value; } - public void setValue(exprType value) { - this.value = value; + public Object getValue() { + return value; } + public void setValue(Object value) { + this.value = (exprType)value; + } private String attr; public String getInternalAttr() { return attr; } - public void setAttr(String attr) { - this.attr = attr; + public Object getAttr() { + return attr; } + public void setAttr(Object attr) { + this.attr = (String)attr; + } private expr_contextType ctx; public expr_contextType getInternalCtx() { return ctx; } - public void setCtx(expr_contextType ctx) { - this.ctx = ctx; + public Object getCtx() { + return ctx; } + public void setCtx(Object ctx) { + this.ctx = (expr_contextType)ctx; + } private final static String[] fields = new String[] {"value", "attr", @@ -53,7 +62,7 @@ this.ctx = ctx; } - public Attribute(int ttype, Token token, exprType value, String attr, + public Attribute(Integer ttype, Token token, exprType value, String attr, expr_contextType ctx) { super(ttype, token); this.value = value; Modified: branches/astwrite/src/org/python/antlr/ast/AugAssign.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/AugAssign.java 2008-11-23 06:28:45 UTC (rev 5611) +++ branches/astwrite/src/org/python/antlr/ast/AugAssign.java 2008-11-23 14:01:06 UTC (rev 5612) @@ -12,25 +12,34 @@ public exprType getInternalTarget() { return target; } - public void setTarget(exprType target) { - this.target = target; + public Object getTarget() { + return target; } + public void setTarget(Object target) { + this.target = (exprType)target; + } private operatorType op; public operatorType getInternalOp() { return op; } - public void setOp(operatorType op) { - this.op = op; + public Object getOp() { + return op; } + public void setOp(Object op) { + this.op = (operatorType)op; + } private exprType value; public exprType getInternalValue() { return value; } - public void setValue(exprType value) { - this.value = value; + public Object getValue() { + return value; } + public void setValue(Object value) { + this.value = (exprType)value; + } private final static String[] fields = new String[] {"target", "op", @@ -55,8 +64,8 @@ addChild(value); } - public AugAssign(int ttype, Token token, exprType target, operatorType op, - exprType value) { + public AugAssign(Integer ttype, Token token, exprType target, operatorType + op, exprType value) { super(ttype, token); this.target = target; addChild(target); Modified: branches/astwrite/src/org/python/antlr/ast/BinOp.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/BinOp.java 2008-11-23 06:28:45 UTC (rev 5611) +++ branches/astwrite/src/org/python/antlr/ast/BinOp.java 2008-11-23 14:01:06 UTC (rev 5612) @@ -2,6 +2,7 @@ package org.python.antlr.ast; import org.python.antlr.PythonTree; import org.python.antlr.ListWrapper; +import org.python.core.PyInteger; import org.antlr.runtime.CommonToken; import org.antlr.runtime.Token; import java.io.DataOutputStream; @@ -12,27 +13,44 @@ public exprType getInternalLeft() { return left; } - public void setLeft(exprType left) { - this.left = left; + public Object getLeft() { + return left; } + public void setLeft(Object left) { + if (left instanceof exprType) { + this.left = (exprType)left; + } else if (left instanceof Integer) { + this.left = new Num(new PyInteger((Integer)left)); + } + } + private operatorType op; public operatorType getInternalOp() { return op; } - public void setOp(operatorType op) { - this.op = op; + public Object getOp() { + return op; } + public void setOp(Object op) { + this.op = (operatorType)op; + } private exprType right; public exprType getInternalRight() { return right; } - public void setRight(exprType right) { - this.right = right; + public Object getRight() { + return right; } + public void setRight(Object right) { + if (right instanceof exprType) { + this.right = (exprType)right; + } else if (right instanceof Integer) { + this.right = new Num(new PyInteger((Integer)right)); + } + } - private final static String[] fields = new String[] {"left", "op", "right"}; public String[] get_fields() { return fields; } @@ -44,6 +62,15 @@ addChild(right); } + public BinOp() { + } + + public BinOp(Object left, operatorType op, Object right) { + setLeft(left); + setOp(op); + setRight(right); + } + public BinOp(Token token, exprType left, operatorType op, exprType right) { super(token); this.left = left; @@ -53,7 +80,7 @@ addChild(right); } - public BinOp(int ttype, Token token, exprType left, operatorType op, + public BinOp(Integer ttype, Token token, exprType left, operatorType op, exprType right) { super(ttype, token); this.left = left; Modified: branches/astwrite/src/org/python/antlr/ast/BoolOp.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/BoolOp.java 2008-11-23 06:28:45 UTC (rev 5611) +++ branches/astwrite/src/org/python/antlr/ast/BoolOp.java 2008-11-23 14:01:06 UTC (rev 5612) @@ -12,17 +12,24 @@ public boolopType getInternalOp() { return op; } - public void setOp(boolopType op) { - this.op = op; + public Object getOp() { + return op; } + public void setOp(Object op) { + this.op = (boolopType)op; + } private ListWrapper<exprType> values; public ListWrapper<exprType> getInternalValues() { return values; } - public void setValues(java.util.List<exprType> values) { - this.values = new ListWrapper<exprType>(values); + public Object getValues() { + return values; } + public void setValues(Object values) { + this.values = new ListWrapper<exprType>( + (java.util.List<exprType>)values); + } private final static String[] fields = new String[] {"op", "values"}; @@ -49,7 +56,7 @@ } } - public BoolOp(int ttype, Token token, boolopType op, + public BoolOp(Integer ttype, Token token, boolopType op, java.util.List<exprType> values) { super(ttype, token); this.op = op; Modified: branches/astwrite/src/org/python/antlr/ast/Break.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Break.java 2008-11-23 06:28:45 UTC (rev 5611) +++ branches/astwrite/src/org/python/antlr/ast/Break.java 2008-11-23 14:01:06 UTC (rev 5612) @@ -16,7 +16,7 @@ super(token); } - public Break(int ttype, Token token) { + public Break(Integer ttype, Token token) { super(ttype, token); } Modified: branches/astwrite/src/org/python/antlr/ast/Call.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Call.java 2008-11-23 06:28:45 UTC (rev 5611) +++ branches/astwrite/src/org/python/antlr/ast/Call.java 2008-11-23 14:01:06 UTC (rev 5612) @@ -12,41 +12,58 @@ public exprType getInternalFunc() { return func; } - public void setFunc(exprType func) { - this.func = func; + public Object getFunc() { + return func; } + public void setFunc(Object func) { + this.func = (exprType)func; + } private ListWrapper<exprType> args; public ListWrapper<exprType> getInternalArgs() { return args; } - public void setArgs(java.util.List<exprType> args) { - this.args = new ListWrapper<exprType>(args); + public Object getArgs() { + return args; } + public void setArgs(Object args) { + this.args = new ListWrapper<exprType>( + (java.util.List<exprType>)args); + } private ListWrapper<keywordType> keywords; public ListWrapper<keywordType> getInternalKeywords() { return keywords; } - public void setKeywords(java.util.List<keywordType> keywords) { - this.keywords = new ListWrapper<keywordType>(keywords); + public Object getKeywords() { + return keywords; } + public void setKeywords(Object keywords) { + this.keywords = new ListWrapper<keywordType>( + (java.util.List<keywordType>)keywords); + } private exprType starargs; public exprType getInternalStarargs() { return starargs; } - public void setStarargs(exprType starargs) { - this.starargs = starargs; + public Object getStarargs() { + return starargs; } + public void setStarargs(Object starargs) { + this.starargs = (exprType)starargs; + } private exprType kwargs; public exprType getInternalKwargs() { return kwargs; } - public void setKwargs(exprType kwargs) { - this.kwargs = kwargs; + public Object getKwargs() { + return kwargs; } + public void setKwargs(Object kwargs) { + this.kwargs = (exprType)kwargs; + } private final static String[] fields = new String[] {"func", "args", @@ -99,9 +116,9 @@ addChild(kwargs); } - public Call(int ttype, Token token, exprType func, java.util.List<exprType> - args, java.util.List<keywordType> keywords, exprType starargs, exprType - kwargs) { + public Call(Integer ttype, Token token, exprType func, + java.util.List<exprType> args, java.util.List<keywordType> keywords, + exprType starargs, exprType kwargs) { super(ttype, token); this.func = func; addChild(func); Modified: branches/astwrite/src/org/python/antlr/ast/ClassDef.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/ClassDef.java 2008-11-23 06:28:45 UTC (rev 5611) +++ branches/astwrite/src/org/python/antlr/ast/ClassDef.java 2008-11-23 14:01:06 UTC (rev 5612) @@ -12,33 +12,48 @@ public String getInternalName() { return name; } - public void setName(String name) { - this.name = name; + public Object getName() { + return name; } + public void setName(Object name) { + this.name = (String)name; + } private ListWrapper<exprType> bases; public ListWrapper<exprType> getInternalBases() { return bases; } - public void setBases(java.util.List<exprType> bases) { - this.bases = new ListWrapper<exprType>(bases); + public Object getBases() { + return bases; } + public void setBases(Object bases) { + this.bases = new ListWrapper<exprType>( + (java.util.List<exprType>)bases); + } private ListWrapper<stmtType> body; public ListWrapper<stmtType> getInternalBody() { return body; } - public void setBody(java.util.List<stmtType> body) { - this.body = new ListWrapper<stmtType>(body); + public Object getBody() { + return body; } + public void setBody(Object body) { + this.body = new ListWrapper<stmtType>( + (java.util.List<stmtType>)body); + } private ListWrapper<exprType> decorators; public ListWrapper<exprType> getInternalDecorators() { return decorators; } - public void setDecorators(java.util.List<exprType> decorators) { - this.decorators = new ListWrapper<exprType>(decorators); + public Object getDecorators() { + return decorators; } + public void setDecorators(Object decorators) { + this.decorators = new ListWrapper<exprType>( + (java.util.List<exprType>)decorators); + } private final static String[] fields = new String[] {"name", "bases", @@ -92,7 +107,7 @@ } } - public ClassDef(int ttype, Token token, String name, + public ClassDef(Integer ttype, Token token, String name, java.util.List<exprType> bases, java.util.List<stmtType> body, java.util.List<exprType> decorators) { super(ttype, token); Modified: branches/astwrite/src/org/python/antlr/ast/Compare.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Compare.java 2008-11-23 06:28:45 UTC (rev 5611) +++ branches/astwrite/src/org/python/antlr/ast/Compare.java 2008-11-23 14:01:06 UTC (rev 5612) @@ -12,25 +12,36 @@ public exprType getInternalLeft() { return left; } - public void setLeft(exprType left) { - this.left = left; + public Object getLeft() { + return left; } + public void setLeft(Object left) { + this.left = (exprType)left; + } private ListWrapper<cmpopType> ops; public ListWrapper<cmpopType> getInternalOps() { return ops; } - public void setOps(java.util.List<cmpopType> ops) { - this.ops = new ListWrapper<cmpopType>(ops); + public Object getOps() { + return ops; } + public void setOps(Object ops) { + this.ops = new ListWrapper<cmpopType>( + (java.util.List<cmpopType>)ops); + } private ListWrapper<exprType> comparators; public ListWrapper<exprType> getInternalComparators() { return comparators; } - public void setComparators(java.util.List<exprType> comparators) { - this.comparators = new ListWrapper<exprType>(comparators); + public Object getComparators() { + return comparators; } + public void setComparators(Object comparators) { + this.comparators = new ListWrapper<exprType>( + (java.util.List<exprType>)comparators); + } private final static String[] fields = new String[] {"left", "ops", @@ -64,7 +75,7 @@ } } - public Compare(int ttype, Token token, exprType left, + public Compare(Integer ttype, Token token, exprType left, java.util.List<cmpopType> ops, java.util.List<exprType> comparators) { super(ttype, token); this.left = left; Modified: branches/astwrite/src/org/python/antlr/ast/Continue.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Continue.java 2008-11-23 06:28:45 UTC (rev 5611) +++ branches/astwrite/src/org/python/antlr/ast/Continue.java 2008-11-23 14:01:06 UTC (rev 5612) @@ -16,7 +16,7 @@ super(token); } - public Continue(int ttype, Token token) { + public Continue(Integer ttype, Token token) { super(ttype, token); } Modified: branches/astwrite/src/org/python/antlr/ast/Delete.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Delete.java 2008-11-23 06:28:45 UTC (rev 5611) +++ branches/astwrite/src/org/python/antlr/ast/Delete.java 2008-11-23 14:01:06 UTC (rev 5612) @@ -12,9 +12,13 @@ public ListWrapper<exprType> getInternalTargets() { return targets; } - public void setTargets(java.util.List<exprType> targets) { - this.targets = new ListWrapper<exprType>(targets); + public Object getTargets() { + return targets; } + public void setTargets(Object targets) { + this.targets = new ListWrapper<exprType>( + (java.util.List<exprType>)targets); + } private final static String[] fields = new String[] {"targets"}; @@ -39,7 +43,8 @@ } } - public Delete(int ttype, Token token, java.util.List<exprType> targets) { + public Delete(Integer ttype, Token token, java.util.List<exprType> targets) + { super(ttype, token); this.targets = new ListWrapper<exprType>(targets); if (targets != null) { Modified: branches/astwrite/src/org/python/antlr/ast/Dict.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Dict.java 2008-11-23 06:28:45 UTC (rev 5611) +++ branches/astwrite/src/org/python/antlr/ast/Dict.java 2008-11-23 14:01:06 UTC (rev 5612) @@ -12,17 +12,25 @@ public ListWrapper<exprType> getInternalKeys() { return keys; } - public void setKeys(java.util.List<exprType> keys) { - this.keys = new ListWrapper<exprType>(keys); + public Object getKeys() { + return keys; } + public void setKeys(Object keys) { + this.keys = new ListWrapper<exprType>( + (java.util.List<exprType>)keys); + } private ListWrapper<exprType> values; public ListWrapper<exprType> getInternalValues() { return values; } - public void setValues(java.util.List<exprType> values) { - this.values = new ListWrapper<exprType>(values); + public Object getValues() { + return values; } + public void setValues(Object values) { + this.values = new ListWrapper<exprType>( + (java.util.List<exprType>)values); + } private final static String[] fields = new String[] {"keys", "values"}; @@ -61,7 +69,7 @@ } } - public Dict(int ttype, Token token, java.util.List<exprType> keys, + public Dict(Integer ttype, Token token, java.util.List<exprType> keys, java.util.List<exprType> values) { super(ttype, token); this.keys = new ListWrapper<exprType>(keys); Modified: branches/astwrite/src/org/python/antlr/ast/Ellipsis.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Ellipsis.java 2008-11-23 06:28:45 UTC (rev 5611) +++ branches/astwrite/src/org/python/antlr/ast/Ellipsis.java 2008-11-23 14:01:06 UTC (rev 5612) @@ -16,7 +16,7 @@ super(token); } - public Ellipsis(int ttype, Token token) { + public Ellipsis(Integer ttype, Token token) { super(ttype, token); } Modified: branches/astwrite/src/org/python/antlr/ast/Exec.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Exec.java 2008-11-23 06:28:45 UTC (rev 5611) +++ branches/astwrite/src/org/python/antlr/ast/Exec.java 2008-11-23 14:01:06 UTC (rev 5612) @@ -12,25 +12,34 @@ public exprType getInternalBody() { return body; } - public void setBody(exprType body) { - this.body = body; + public Object getBody() { + return body; } + public void setBody(Object body) { + this.body = (exprType)body; + } private exprType globals; public exprType getInternalGlobals() { return globals; } - public void setGlobals(exprType globals) { - this.globals = globals; + public Object getGlobals() { + return globals; } + public void setGlobals(Object globals) { + this.globals = (exprType)globals; + } private exprType locals; public exprType getInternalLocals() { return locals; } - public void setLocals(exprType locals) { - this.locals = locals; + public Object getLocals() { + return locals; } + public void setLocals(Object locals) { + this.locals = (exprType)locals; + } private final static String[] fields = new String[] {"body", "globals", @@ -56,7 +65,7 @@ addChild(locals); } - public Exec(int ttype, Token token, exprType body, exprType globals, + public Exec(Integer ttype, Token token, exprType body, exprType globals, exprType locals) { super(ttype, token); this.body = body; Modified: branches/astwrite/src/org/python/antlr/ast/Expr.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Expr.java 2008-11-23 06:28:45 UTC (rev 5611) +++ branches/astwrite/src/org/python/antlr/ast/Expr.java 2008-11-23 14:01:06 UTC (rev 5612) @@ -12,9 +12,12 @@ public exprType getInternalValue() { return value; } - public void setValue(exprType value) { - this.value = value; + public Object getValue() { + return value; } + public void setValue(Object value) { + this.value = (exprType)value; + } private final static String[] fields = new String[] {"value"}; @@ -31,7 +34,7 @@ addChild(value); } - public Expr(int ttype, Token token, exprType value) { + public Expr(Integer ttype, Token token, exprType value) { super(ttype, token); this.value = value; addChild(value); Modified: branches/astwrite/src/org/python/antlr/ast/Expression.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Expression.java 2008-11-23 06:28:45 UTC (rev 5611) +++ branches/astwrite/src/org/python/antlr/ast/Expression.java 2008-11-23 14:01:06 UTC (rev 5612) @@ -12,9 +12,12 @@ public exprType getInternalBody() { return body; } - public void setBody(exprType body) { - this.body = body; + public Object getBody() { + return body; } + public void setBody(Object body) { + this.body = (exprType)body; + } private final static String[] fields = new String[] {"body"}; @@ -31,7 +34,7 @@ addChild(body); } - public Expression(int ttype, Token token, exprType body) { + public Expression(Integer ttype, Token token, exprType body) { super(ttype, token); this.body = body; addChild(body); Modified: branches/astwrite/src/org/python/antlr/ast/ExtSlice.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/ExtSlice.java 2008-11-23 06:28:45 UTC (rev 5611) +++ branches/astwrite/src/org/python/antlr/ast/ExtSlice.java 2008-11-23 14:01:06 UTC (rev 5612) @@ -12,9 +12,13 @@ public ListWrapper<sliceType> getInternalDims() { return dims; } - public void setDims(java.util.List<sliceType> dims) { - this.dims = new ListWrapper<sliceType>(dims); + public Object getDims() { + return dims; } + public void setDims(Object dims) { + this.dims = new ListWrapper<sliceType>( + (java.util.List<sliceType>)dims); + } private final static String[] fields = new String[] {"dims"}; @@ -39,7 +43,8 @@ } } - public ExtSlice(int ttype, Token token, java.util.List<sliceType> dims) { + public ExtSlice(Integer ttype, Token token, java.util.List<sliceType> dims) + { super(ttype, token); this.dims = new ListWrapper<sliceType>(dims); if (dims != null) { Modified: branches/astwrite/src/org/python/antlr/ast/For.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/For.java 2008-11-23 06:28:45 UTC (rev 5611) +++ branches/astwrite/src/org/python/antlr/ast/For.java 2008-11-23 14:01:06 UTC (rev 5612) @@ -12,33 +12,47 @@ public exprType getInternalTarget() { return target; } - public void setTarget(exprType target) { - this.target = target; + public Object getTarget() { + return target; } + public void setTarget(Object target) { + this.target = (exprType)target; + } private exprType iter; public exprType getInternalIter() { return iter; } - public void setIter(exprType iter) { - this.iter = iter; + public Object getIter() { + return iter; } + public void setIter(Object iter) { + this.iter = (exprType)iter; + } private ListWrapper<stmtType> body; public ListWrapper<stmtType> getInternalBody() { return body; } - public void setBody(java.util.List<stmtType> body) { - this.body = new ListWrapper<stmtType>(body); + public Object getBody() { + return body; } + public void setBody(Object body) { + this.body = new ListWrapper<stmtType>( + (java.util.List<stmtType>)body); + } private ListWrapper<stmtType> orelse; public ListWrapper<stmtType> getInternalOrelse() { return orelse; } - public void setOrelse(java.util.List<stmtType> orelse) { - this.orelse = new ListWrapper<stmtType>(orelse); + public Object getOrelse() { + return orelse; } + public void setOrelse(Object orelse) { + this.orelse = new ListWrapper<stmtType>( + (java.util.List<stmtType>)orelse); + } private final static String[] fields = new String[] {"target", "iter", @@ -86,7 +100,7 @@ } } - public For(int ttype, Token token, exprType target, exprType iter, + public For(Integer ttype, Token token, exprType target, exprType iter, java.util.List<stmtType> body, java.util.List<stmtType> orelse) { super(ttype, token); this.target = target; Modified: branches/astwrite/src/org/python/antlr/ast/FunctionDef.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/FunctionDef.java 2008-11-23 06:28:45 UTC (rev 5611) +++ branches/astwrite/src/org/python/antlr/ast/FunctionDef.java 2008-11-23 14:01:06 UTC (rev 5612) @@ -12,33 +12,47 @@ public String getInternalName() { return name; } - public void setName(String name) { - this.name = name; + public Object getName() { + return name; } + public void setName(Object name) { + this.name = (String)name; + } private argumentsType args; public argumentsType getInternalArgs() { return args; } - public void setArgs(argumentsType args) { - this.args = args; + public Object getArgs() { + return args; } + public void setArgs(Object args) { + this.args = (argumentsType)args; + } private ListWrapper<stmtType> body; public ListWrapper<stmtType> getInternalBody() { return body; } - public void setBody(java.util.List<stmtType> body) { - this.body = new ListWrapper<stmtType>(body); + public Object getBody() { + return body; } + public void setBody(Object body) { + this.body = new ListWrapper<stmtType>( + (java.util.List<stmtType>)body); + } private ListWrapper<exprType> decorators; public ListWrapper<exprType> getInternalDecorators() { return decorators; } - public void setDecorators(java.util.List<exprType> decorators) { - this.decorators = new ListWrapper<exprType>(decorators); + public Object getDecorators() { + return decorators; } + public void setDecorators(Object decorators) { + this.decorators = new ListWrapper<exprType>( + (java.util.List<exprType>)decorators); + } private final static String[] fields = new String[] {"name", "args", @@ -82,8 +96,8 @@ } } - public FunctionDef(int ttype, Token token, String name, argumentsType args, - java.util.List<stmtType> body, java.util.List<exprType> decorators) { + public FunctionDef(Integer ttype, Token token, String name, argumentsType + args, java.util.List<stmtType> body, java.util.List<exprType> decorators) { super(ttype, token); this.name = name; this.args = args; Modified: branches/astwrite/src/org/python/antlr/ast/GeneratorExp.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/GeneratorExp.java 2008-11-23 06:28:45 UTC (rev 5611) +++ branches/astwrite/src/org/python/antlr/ast/GeneratorExp.java 2008-11-23 14:01:06 UTC (rev 5612) @@ -12,17 +12,24 @@ public exprType getInternalElt() { return elt; } - public void setElt(exprType elt) { - this.elt = elt; + public Object getElt() { + return elt; } + public void setElt(Object elt) { + this.elt = (exprType)elt; + } private ListWrapper<comprehensionType> generators; public ListWrapper<comprehensionType> getInternalGenerators() { return generators; } - public void setGenerators(java.util.List<comprehensionType> generators) { - this.generators = new ListWrapper<comprehensionType>(generators); + public Object getGenerators() { + return generators; } + public void setGenerators(Object generators) { + this.generators = new ListWrapper<comprehensionType>( + (java.util.List<comprehensionType>)generators); + } private final static String[] fields = new String[] {"elt", "generators"}; @@ -53,7 +60,7 @@ } } - public GeneratorExp(int ttype, Token token, exprType elt, + public GeneratorExp(Integer ttype, Token token, exprType elt, java.util.List<comprehensionType> generators) { super(ttype, token); this.elt = elt; Modified: branches/astwrite/src/org/python/antlr/ast/Global.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Global.java 2008-11-23 06:28:45 UTC (rev 5611) +++ branches/astwrite/src/org/python/antlr/ast/Global.java 2008-11-23 14:01:06 UTC (rev 5612) @@ -12,9 +12,13 @@ public ListWrapper<String> getInternalNames() { return names; } - public void setNames(java.util.List<String> names) { - this.names = new ListWrapper<String>(names); + public Object getNames() { + return names; } + public void setNames(Object names) { + this.names = new ListWrapper<String>( + (java.util.List<String>)names); + } private final static String[] fields = new String[] {"names"}; @@ -29,7 +33,7 @@ this.names = new ListWrapper<String>(names); } - public Global(int ttype, Token token, java.util.List<String> names) { + public Global(Integer ttype, Token token, java.util.List<String> names) { super(ttype, token); this.names = new ListWrapper<String>(names); } Modified: branches/astwrite/src/org/python/antlr/ast/If.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/If.java 2008-11-23 06:28:45 UTC (rev 5611) +++ branches/astwrite/src/org/python/antlr/ast/If.java 2008-11-23 14:01:06 UTC (rev 5612) @@ -12,25 +12,36 @@ public exprType getInternalTest() { return test; } - public void setTest(exprType test) { - this.test = test; + public Object getTest() { + return test; } + public void setTest(Object test) { + this.test = (exprType)test; + } private ListWrapper<stmtType> body; public ListWrapper<stmtType> getInternalBody() { return body; } - public void setBody(java.util.List<stmtType> body) { - this.body = new ListWrapper<stmtType>(body); + public Object getBody() { + return body; } + public void setBody(Object body) { + this.body = new ListWrapper<stmtType>( + (java.util.List<stmtType>)body); + } private ListWrapper<stmtType> orelse; public ListWrapper<stmtType> getInternalOrelse() { return orelse; } - public void setOrelse(java.util.List<stmtType> orelse) { - this.orelse = new ListWrapper<stmtType>(orelse); + public Object getOrelse() { + return orelse; } + public void setOrelse(Object orelse) { + this.orelse = new ListWrapper<stmtType>( + (java.util.List<stmtType>)orelse); + } private final static String[] fields = new String[] {"test", "body", @@ -74,8 +85,8 @@ } } - public If(int ttype, Token token, exprType test, java.util.List<stmtType> - body, java.util.List<stmtType> orelse) { + public If(Integer ttype, Token token, exprType test, + java.util.List<stmtType> body, java.util.List<stmtType> orelse) { super(ttype, token); this.test = test; addChild(test); Modified: branches/astwrite/src/org/python/antlr/ast/IfExp.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/IfExp.java 2008-11-23 06:28:45 UTC (rev 5611) +++ branches/astwrite/src/org/python/antlr/ast/IfExp.java 2008-11-23 14:01:06 UTC (rev 5612) @@ -12,25 +12,34 @@ public exprType getInternalTest() { return test; } - public void setTest(exprType test) { - this.test = test; + public Object getTest() { + return test; } + public void setTest(Object test) { + this.test = (exprType)test; + } private exprType body; public exprType getInternalBody() { return body; } - public void setBody(exprType body) { - this.body = body; + public Object getBody() { + return body; } + public void setBody(Object body) { + this.body = (exprType)body; + } private exprType orelse; public exprType getInternalOrelse() { return orelse; } - public void setOrelse(exprType orelse) { - this.orelse = orelse; + public Object getOrelse() { + return orelse; } + public void setOrelse(Object orelse) { + this.orelse = (exprType)orelse; + } private final static String[] fields = new String[] {"test", "body", @@ -56,8 +65,8 @@ addChild(orelse); } - public IfExp(int ttype, Token token, exprType test, exprType body, exprType - orelse) { + public IfExp(Integer ttype, Token token, exprType test, exprType body, + exprType orelse) { super(ttype, token); this.test = test; addChild(test); Modified: branches/astwrite/src/org/python/antlr/ast/Import.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Import.java 2008-11-23 06:28:45 UTC (rev 5611) +++ branches/astwrite/src/org/python/antlr/ast/Import.java 2008-11-23 14:01:06 UTC (rev 5612) @@ -12,9 +12,13 @@ public ListWrapper<aliasType> getInternalNames() { return names; } - public void setNames(java.util.List<aliasType> names) { - this.names = new ListWrapper<aliasType>(names); + public Object getNames() { + return names; } + public void setNames(Object names) { + this.names = new ListWrapper<aliasType>( + (java.util.List<aliasType>)names); + } private final static String[] fields = new String[] {"names"}; @@ -39,7 +43,7 @@ } } - public Import(int ttype, Token token, java.util.List<aliasType> names) { + public Import(Integer ttype, Token token, java.util.List<aliasType> names) { super(ttype, token); this.names = new ListWrapper<aliasType>(names); if (names != null) { Modified: branches/astwrite/src/org/python/antlr/ast/ImportFrom.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/ImportFrom.java 2008-11-23 06:28:45 UTC (rev 5611) +++ branches/astwrite/src/org/python/antlr/ast/ImportFrom.java 2008-11-23 14:01:06 UTC (rev 5612) @@ -12,32 +12,42 @@ public String getInternalModule() { return module; } - public void setModule(String module) { - this.module = module; + public Object getModule() { + return module; } + public void setModule(Object module) { + this.module = (String)module; + } private ListWrapper<aliasType> names; public ListWrapper<aliasType> getInternalNames() { return names; } - public void setNames(java.util.List<aliasType> names) { - this.names = new ListWrapper<aliasType>(names); + public Object getNames() { + return names; } + public void setNames(Object names) { + this.names = new ListWrapper<aliasType>( + (java.util.List<aliasType>)names); + } - private int level; - public int getInternalLevel() { + private Integer level; + public Integer getInternalLevel() { return level; } - public void setLevel(int level) { - this.level = level; + public Object getLevel() { + return level; } + public void setLevel(Object level) { + this.level = (Integer)level; + } private final static String[] fields = new String[] {"module", "names", "level"}; public String[] get_fields() { return fields; } - public ImportFrom(String module, java.util.List<aliasType> names, int + public ImportFrom(String module, java.util.List<aliasType> names, Integer level) { this.module = module; this.names = new ListWrapper<aliasType>(names); @@ -50,7 +60,7 @@ } public ImportFrom(Token token, String module, java.util.List<aliasType> - names, int level) { + names, Integer level) { super(token); this.module = module; this.names = new ListWrapper<aliasType>(names); @@ -62,8 +72,8 @@ this.level = level; } - public ImportFrom(int ttype, Token token, String module, - java.util.List<aliasType> names, int level) { + public ImportFrom(Integer ttype, Token token, String module, + java.util.List<aliasType> names, Integer level) { super(ttype, token); this.module = module; this.names = new ListWrapper<aliasType>(names); @@ -76,7 +86,7 @@ } public ImportFrom(PythonTree tree, String module, java.util.List<aliasType> - names, int level) { + names, Integer level) { super(tree); this.module = module; this.names = new ListWrapper<aliasType>(names); Modified: branches/astwrite/src/org/python/antlr/ast/Index.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Index.java 2008-11-23 06:28:45 UTC (rev 5611) +++ branches/astwrite/src/org/python/antlr/ast/Index.java 2008-11-23 14:01:06 UTC (rev 5612) @@ -12,9 +12,12 @@ public exprType getInternalValue() { return value; } - public void setValue(exprType value) { - this.value = value; + public Object getValue() { + return value; } + public void setValue(Object value) { + this.value = (exprType)value; + } private final static String[] fields = new String[] {"value"}; @@ -31,7 +34,7 @@ addChild(value); } - public Index(int ttype, Token token, exprType value) { + public Index(Integer ttype, Token token, exprType value) { super(ttype, token); this.value = value; addChild(value); Modified: branches/astwrite/src/org/python/antlr/ast/Interactive.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Interactive.java 2008-11-23 06:28:45 UTC (rev 5611) +++ branches/astwrite/src/org/python/antlr/ast/Interactive.java 2008-11-23 14:01:06 UTC (rev 5612) @@ -12,9 +12,13 @@ public ListWrapper<stmtType> getInternalBody() { return body; } - public void setBody(java.util.List<stmtType> body) { - this.body = new ListWrapper<stmtType>(body); + public Object getBody() { + return body; } + public void setBody(Object body) { + this.body = new ListWrapper<stmtType>( + (java.util.List<stmtType>)body); + } private final static String[] fields = new String[] {"body"}; @@ -39,7 +43,8 @@ } } - public Interactive(int ttype, Token token, java.util.List<stmtType> body) { + public Interactive(Integer ttype, Token token, java.util.List<stmtType> + body) { super(ttype, token); this.body = new ListWrapper<stmtType>(body); if (body != null) { Modified: branches/astwrite/src/org/python/antlr/ast/Lambda.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Lambda.java 2008-11-23 06:28:45 UTC (rev 5611) +++ branches/astwrite/src/org/python/antlr/ast/Lambda.java 2008-11-23 14:01:06 UTC (rev 5612) @@ -12,17 +12,23 @@ public argumentsType getInternalArgs() { return args; } - public void setArgs(argumentsType args) { - this.args = args; + public Object getArgs() { + return args; } + public void setArgs(Object args) { + this.args = (argumentsType)args; + } private exprType body; public exprType getInternalBody() { return body; } - public void setBody(exprType body) { - this.body = body; + public Object getBody() { + return body; } + public void setBody(Object body) { + this.body = (exprType)body; + } private final static String[] fields = new String[] {"args", "body"}; @@ -41,7 +47,8 @@ addChild(body); } - public Lambda(int ttype, Token token, argumentsType args, exprType body) { + public Lambda(Integer ttype, Token token, argumentsType args, exprType + body) { super(ttype, token); this.args = args; this.body = body; Modified: branches/astwrite/src/org/python/antlr/ast/List.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/List.java 2008-11-23 06:28:45 UTC (rev 5611) +++ branches/astwrite/src/org/python/antlr/ast/List.java 2008-11-23 14:01:06 UTC (rev 5612) @@ -12,17 +12,24 @@ public ListWrapper<exprType> getInternalElts() { return elts; } - public void setElts(java.util.List<exprType> elts) { - this.elts = new ListWrapper<exprType>(elts); + public Object getElts() { + return elts; } + public void setElts(Object elts) { + this.elts = new ListWrapper<exprType>( + (java.util.List<exprType>)elts); + } private expr_contextType ctx; public expr_contextType getInternalCtx() { return ctx; } - public void setCtx(expr_contextType ctx) { - this.ctx = ctx; + public Object getCtx() { + return ctx; } + public void setCtx(Object ctx) { + this.ctx = (expr_contextType)ctx; + } private final static String[] fields = new String[] {"elts", "ctx"}; @@ -50,7 +57,7 @@ this.ctx = ctx; } - public List(int ttype, Token token, java.util.List<exprType> elts, + public List(Integer ttype, Token token, java.util.List<exprType> elts, expr_contextType ctx) { super(ttype, token); this.elts = new ListWrapper<exprType>(elts); Modified: branches/astwrite/src/org/python/antlr/ast/ListComp.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/ListComp.java 2008-11-23 06:28:45 UTC (rev 5611) +++ branches/astwrite/src/org/python/antlr/ast/ListComp.java 2008-11-23 14:01:06 UTC (rev 5612) @@ -12,17 +12,24 @@ public exprType getInternalElt() { return elt; } - public void setElt(exprType elt) { - this.elt = elt; + public Object getElt() { + return elt; } + public void setElt(Object elt) { + this.elt = (exprType)elt; + } private ListWrapper<comprehensionType> generators; public ListWrapper<comprehensionType> getInternalGenerators() { return generators; } - public void setGenerators(java.util.List<comprehensionType> generators) { - this.generators = new ListWrapper<comprehensionType>(generators); + public Object getGenerators() { + return generators; } + public void setGenerators(Object generators) { + this.generators = new ListWrapper<comprehensionType>( + (java.util.List<comprehensionType>)generators); + } private final static String[] fields = new String[] {"elt", "generators"}; @@ -53,7 +60,7 @@ } } - public ListComp(int ttype, Token token, exprType elt, + public ListComp(Integer ttype, Token token, exprType elt, java.util.List<comprehensionType> generators) { super(ttype, token); this.elt = elt; Modified: branches/astwrite/src/org/python/antlr/ast/Module.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Module.java 2008-11-23 06:28:45 UTC (rev 5611) +++ branches/astwrite/src/org/python/antlr/ast/Module.java 2008-11-23 14:01:06 UTC (rev 5612) @@ -12,9 +12,13 @@ public ListWrapper<stmtType> getInternalBody() { return body; } - public void setBody(java.util.List<stmtType> body) { - this.body = new ListWrapper<stmtType>(body); + public Object getBody() { + return body; } + public void setBody(Object body) { + this.body = new ListWrapper<stmtType>( + (java.util.List<stmtType>)body); + } private final static String[] fields = new String[] {"body"}; @@ -39,7 +43,7 @@ } } - public Module(int ttype, Token token, java.util.List<stmtType> body) { + public Module(Integer ttype, Token token, java.util.List<stmtType> body) { super(ttype, token); this.body = new ListWrapper<stmtType>(body); if (body != null) { Modified: branches/astwrite/src/org/python/antlr/ast/Name.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Name.java 2008-11-23 06:28:45 UTC (rev 5611) +++ branches/astwrite/src/org/python/antlr/ast/Name.java 2008-11-23 14:01:06 UTC (rev 5612) @@ -12,17 +12,23 @@ public String getInternalId() { return id; } - public void setId(String id) { - this.id = id; + public Object getId() { + return id; } + public void setId(Object id) { + this.id = (String)id; + } private expr_contextType ctx; public expr_contextType getInternalCtx() { return ctx; } - public void setCtx(expr_contextType ctx) { - this.ctx = ctx; + public Object getCtx() { + return ctx; } + public void setCtx(Object ctx) { + this.ctx = (expr_contextType)ctx; + } private final static String[] fields = new String[] {"id", "ctx"}; @@ -39,7 +45,7 @@ this.ctx = ctx; } - public Name(int ttype, Token token, String id, expr_contextType ctx) { + public Name(Integer ttype, Token token, String id, expr_contextType ctx) { super(ttype, token); this.id = id; this.ctx = ctx; Modified: branches/astwrite/src/org/python/antlr/ast/Num.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Num.java 2008-11-23 06:28:45 UTC (rev 5611) +++ branches/astwrite/src/org/python/antlr/ast/Num.java 2008-11-23 14:01:06 UTC (rev 5612) @@ -12,8 +12,11 @@ public Object getInternalN() { return n; } + public Object getN() { + return n; + } public void setN(Object n) { - this.n = n; + this.n = (Object)n; } @@ -29,7 +32,7 @@ this.n = n; } - public Num(int ttype, Token token, Object n) { + public Num(Integer ttype, Token token, Object n) { super(ttype, token); this.n = n; } Modified: branches/astwrite/src/org/python/antlr/ast/Pass.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Pass.java 2008-11-23 06:28:45 UTC (rev 5611) +++ branches/astwrite/src/org/python/antlr/ast/Pass.java 2008-11-23 14:01:06 UTC (rev 5612) @@ -16,7 +16,7 @@ super(token); } - public Pass(int ttype, Token token) { + public Pass(Integer ttype, Token token) { super(ttype, token); } Modified: branches/astwrite/src/org/python/antlr/ast/Print.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Print.java 2008-11-23 06:28:45 UTC (rev 5611) +++ branches/astwrite/src/org/python/antlr/ast/Print.java 2008-11-23 14:01:06 UTC (rev 5612) @@ -12,32 +12,42 @@ public exprType getInternalDest() { return dest; } - public void setDest(exprType dest) { - this.dest = dest; + public Object getDest() { + return dest; } + public void setDest(Object dest) { + this.dest = (exprType)dest; + } private ListWrapper<exprType> values; public ListWrapper<exprType> getInternalValues() { return values; } - public void setValues(java.util.List<exprType> values) { - this.values = new ListWrapper<exprType>(values); + public Object getValues() { + return values; } + public void setValues(Object values) { + this.values = new ListWrapper<exprType>( + (java.util.List<exprType>)values); + } - private boolean nl; - public boolean getInternalNl() { + private Boolean nl; + public Boolean getInternalNl() { return nl; } - public void setNl(boolean nl) { - this.nl = nl; + public Object getNl() { + return nl; } + public void setNl(Object nl) { + this.nl = (Boolean)nl; + } private final static String[] fields = new String[] {"dest", "values", "nl"}; public String[] get_fields() { return fields; } - public Print(exprType dest, java.util.List<exprType> values, boolean nl) { + public Print(exprType dest, java.util.List<exprType> values, Boolean nl) { this.dest = dest; addChild(dest); this.values = new ListWrapper<exprType>(values); @@ -50,7 +60,7 @@ } public Print(Token token, exprType dest, java.util.List<exprType> values, - boolean nl) { + Boolean nl) { super(token); this.dest = dest; addChild(dest); @@ -63,8 +73,8 @@ this.nl = nl; } - public Print(int ttype, Token token, exprType dest, - java.util.List<exprType> values, boolean nl) { + public Print(Integer ttype, Token token, exprType dest, + java.util.List<exprType> values, Boolean nl) { super(ttype, token); this.dest = dest; addChild(dest); @@ -78,7 +88,7 @@ } public Print(PythonTree tree, exprType dest, java.util.List<exprType> - values, boolean nl) { + values, Boolean nl) { super(tree); this.dest = dest; addChild(dest); Modified: branches/astwrite/src/org/python/antlr/ast/Raise.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Raise.java 2008-11-23 06:28:45 UTC (rev 5611) +++ branches/astwrite/src/org/python/antlr/ast/Raise.java 2008-11-23 14:01:06 UTC (rev 5612) @@ -12,25 +12,34 @@ public exprType getInternalExcepttype() { return excepttype; } - public void setExcepttype(exprType excepttype) { - this.excepttype = excepttype; + public Object getExcepttype() { + return excepttype; } + public void setExcepttype(Object excepttype) { + this.excepttype = (exprType)excepttype; + } private exprType inst; public exprType getInternalInst() { return inst; } - public void setInst(exprType inst) { - this.inst = inst; + public Object getInst() { + return inst; } + public void setInst(Object inst) { + this.inst = (exprType)inst; + } private exprType tback; public exprType getInternalTback() ... [truncated message content] |