From: <fwi...@us...> - 2008-11-21 14:59:32
|
Revision: 5597 http://jython.svn.sourceforge.net/jython/?rev=5597&view=rev Author: fwierzbicki Date: 2008-11-21 14:59:28 +0000 (Fri, 21 Nov 2008) Log Message: ----------- More experimentation with ast -- adding internalGet* methods. The idea being that the main parser and compiler will interact with the ast nodes only through constructors and internalGet* methods, while Python code will interact with ast code through regular get* and set* methods which will be able to translate from Python to node types. Modified Paths: -------------- branches/astwrite/ast/asdl_antlr.py branches/astwrite/src/org/python/antlr/GrammarActions.java 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/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/Delete.java branches/astwrite/src/org/python/antlr/ast/Dict.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/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 branches/astwrite/src/org/python/compiler/ArgListCompiler.java branches/astwrite/src/org/python/compiler/CodeCompiler.java branches/astwrite/src/org/python/compiler/Future.java branches/astwrite/src/org/python/compiler/ScopesCompiler.java Property Changed: ---------------- branches/astwrite/src/org/python/antlr/ast/ branches/astwrite/src/org/python/compiler/ Modified: branches/astwrite/ast/asdl_antlr.py =================================================================== --- branches/astwrite/ast/asdl_antlr.py 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/ast/asdl_antlr.py 2008-11-21 14:59:28 UTC (rev 5597) @@ -409,7 +409,7 @@ def visitField(self, field, depth): self.emit("private %s;" % self.fieldDef(field, True), depth) - self.emit("public %s get%s() {" % (self.javaType(field, True), + self.emit("public %s getInternal%s() {" % (self.javaType(field, True), str(field.name).capitalize()), depth) self.emit("return %s;" % field.name, depth+1) self.emit("}", depth) Modified: branches/astwrite/src/org/python/antlr/GrammarActions.java =================================================================== --- branches/astwrite/src/org/python/antlr/GrammarActions.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/GrammarActions.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -135,7 +135,7 @@ List<exprType> result = new ArrayList<exprType>(); if (etype != null) { if (etype instanceof Tuple) { - return ((Tuple)etype).getElts(); + return ((Tuple)etype).getInternalElts(); } result.add(etype); } @@ -314,10 +314,10 @@ } if (tree instanceof GeneratorExp) { GeneratorExp g = (GeneratorExp)tree; - recurseSetContext(g.getElt(), context); + recurseSetContext(g.getInternalElt(), context); } else if (tree instanceof ListComp) { ListComp lc = (ListComp)tree; - recurseSetContext(lc.getElt(), context); + recurseSetContext(lc.getInternalElt(), context); } else if (!(tree instanceof ListComp)) { for (int i=0; i<tree.getChildCount(); i++) { recurseSetContext(tree.getChild(i), context); @@ -357,7 +357,7 @@ checkAssign(castExpr(e.get(0))); if (e.get(0) instanceof Name) { Name arg = (Name)e.get(0); - k.add(new keywordType(arg, arg.getId(), castExpr(e.get(1)))); + k.add(new keywordType(arg, arg.getInternalId(), castExpr(e.get(1)))); } else { errorHandler.error("keyword must be a name", (PythonTree)e.get(0)); } @@ -588,26 +588,26 @@ exprType negate(PythonTree t, exprType o) { if (o instanceof Num) { Num num = (Num)o; - if (num.getN() instanceof PyInteger) { - int v = ((PyInteger)num.getN()).getValue(); + if (num.getInternalN() instanceof PyInteger) { + int v = ((PyInteger)num.getInternalN()).getValue(); if (v > 0) { num.setN(new PyInteger(-v)); return num; } - } else if (num.getN() instanceof PyLong) { - BigInteger v = ((PyLong)num.getN()).getValue(); + } else if (num.getInternalN() instanceof PyLong) { + BigInteger v = ((PyLong)num.getInternalN()).getValue(); if (v.compareTo(BigInteger.ZERO) == 1) { num.setN(new PyLong(v.negate())); return num; } - } else if (num.getN() instanceof PyFloat) { - double v = ((PyFloat)num.getN()).getValue(); + } else if (num.getInternalN() instanceof PyFloat) { + double v = ((PyFloat)num.getInternalN()).getValue(); if (v > 0) { num.setN(new PyFloat(-v)); return num; } - } else if (num.getN() instanceof PyComplex) { - double v = ((PyComplex)num.getN()).imag; + } else if (num.getInternalN() instanceof PyComplex) { + double v = ((PyComplex)num.getInternalN()).imag; if (v > 0) { num.setN(new PyComplex(0,-v)); return num; @@ -631,7 +631,7 @@ } void checkAssign(exprType e) { - if (e instanceof Name && ((Name)e).getId().equals("None")) { + if (e instanceof Name && ((Name)e).getInternalId().equals("None")) { errorHandler.error("assignment to None", e); } else if (e instanceof GeneratorExp) { errorHandler.error("can't assign to generator expression", e); @@ -653,7 +653,7 @@ errorHandler.error("can't assign to conditional expression", e); } else if (e instanceof Tuple) { //XXX: performance problem? Any way to do this better? - List<exprType> elts = ((Tuple)e).getElts(); + List<exprType> elts = ((Tuple)e).getInternalElts(); if (elts.size() == 0) { errorHandler.error("can't assign to ()", e); } @@ -662,7 +662,7 @@ } } else if (e instanceof org.python.antlr.ast.List) { //XXX: performance problem? Any way to do this better? - List<exprType> elts = ((org.python.antlr.ast.List)e).getElts(); + List<exprType> elts = ((org.python.antlr.ast.List)e).getInternalElts(); for (int i=0;i<elts.size();i++) { checkAssign(elts.get(i)); } @@ -781,7 +781,7 @@ for (Object o : sltypes) { if (o instanceof Index) { Index i = (Index)o; - etypes.add(i.getValue()); + etypes.add(i.getInternalValue()); } else { extslice = true; break; Property changes on: branches/astwrite/src/org/python/antlr/ast ___________________________________________________________________ Modified: svn:ignore - .comprehensionType.java.swp + .comprehensionType.java.swp .If.java.swp Modified: branches/astwrite/src/org/python/antlr/ast/Assert.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Assert.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/Assert.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class Assert extends stmtType { private exprType test; - public exprType getTest() { + public exprType getInternalTest() { return test; } public void setTest(exprType test) { @@ -17,7 +17,7 @@ } private exprType msg; - public exprType getMsg() { + public exprType getInternalMsg() { return msg; } public void setMsg(exprType msg) { Modified: branches/astwrite/src/org/python/antlr/ast/Assign.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Assign.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/Assign.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class Assign extends stmtType { private ListWrapper<exprType> targets; - public ListWrapper<exprType> getTargets() { + public ListWrapper<exprType> getInternalTargets() { return targets; } public void setTargets(java.util.List<exprType> targets) { @@ -17,7 +17,7 @@ } private exprType value; - public exprType getValue() { + public exprType getInternalValue() { return value; } public void setValue(exprType value) { Modified: branches/astwrite/src/org/python/antlr/ast/Attribute.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Attribute.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/Attribute.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class Attribute extends exprType implements Context { private exprType value; - public exprType getValue() { + public exprType getInternalValue() { return value; } public void setValue(exprType value) { @@ -17,7 +17,7 @@ } private String attr; - public String getAttr() { + public String getInternalAttr() { return attr; } public void setAttr(String attr) { @@ -25,7 +25,7 @@ } private expr_contextType ctx; - public expr_contextType getCtx() { + public expr_contextType getInternalCtx() { return ctx; } public void setCtx(expr_contextType ctx) { Modified: branches/astwrite/src/org/python/antlr/ast/AugAssign.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/AugAssign.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/AugAssign.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class AugAssign extends stmtType { private exprType target; - public exprType getTarget() { + public exprType getInternalTarget() { return target; } public void setTarget(exprType target) { @@ -17,7 +17,7 @@ } private operatorType op; - public operatorType getOp() { + public operatorType getInternalOp() { return op; } public void setOp(operatorType op) { @@ -25,7 +25,7 @@ } private exprType value; - public exprType getValue() { + public exprType getInternalValue() { return value; } public void setValue(exprType value) { Modified: branches/astwrite/src/org/python/antlr/ast/BinOp.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/BinOp.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/BinOp.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class BinOp extends exprType { private exprType left; - public exprType getLeft() { + public exprType getInternalLeft() { return left; } public void setLeft(exprType left) { @@ -17,7 +17,7 @@ } private operatorType op; - public operatorType getOp() { + public operatorType getInternalOp() { return op; } public void setOp(operatorType op) { @@ -25,7 +25,7 @@ } private exprType right; - public exprType getRight() { + public exprType getInternalRight() { return right; } public void setRight(exprType right) { Modified: branches/astwrite/src/org/python/antlr/ast/BoolOp.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/BoolOp.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/BoolOp.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class BoolOp extends exprType { private boolopType op; - public boolopType getOp() { + public boolopType getInternalOp() { return op; } public void setOp(boolopType op) { @@ -17,7 +17,7 @@ } private ListWrapper<exprType> values; - public ListWrapper<exprType> getValues() { + public ListWrapper<exprType> getInternalValues() { return values; } public void setValues(java.util.List<exprType> values) { Modified: branches/astwrite/src/org/python/antlr/ast/Call.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Call.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/Call.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class Call extends exprType { private exprType func; - public exprType getFunc() { + public exprType getInternalFunc() { return func; } public void setFunc(exprType func) { @@ -17,7 +17,7 @@ } private ListWrapper<exprType> args; - public ListWrapper<exprType> getArgs() { + public ListWrapper<exprType> getInternalArgs() { return args; } public void setArgs(java.util.List<exprType> args) { @@ -25,7 +25,7 @@ } private ListWrapper<keywordType> keywords; - public ListWrapper<keywordType> getKeywords() { + public ListWrapper<keywordType> getInternalKeywords() { return keywords; } public void setKeywords(java.util.List<keywordType> keywords) { @@ -33,7 +33,7 @@ } private exprType starargs; - public exprType getStarargs() { + public exprType getInternalStarargs() { return starargs; } public void setStarargs(exprType starargs) { @@ -41,7 +41,7 @@ } private exprType kwargs; - public exprType getKwargs() { + public exprType getInternalKwargs() { return kwargs; } public void setKwargs(exprType kwargs) { Modified: branches/astwrite/src/org/python/antlr/ast/ClassDef.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/ClassDef.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/ClassDef.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class ClassDef extends stmtType { private String name; - public String getName() { + public String getInternalName() { return name; } public void setName(String name) { @@ -17,7 +17,7 @@ } private ListWrapper<exprType> bases; - public ListWrapper<exprType> getBases() { + public ListWrapper<exprType> getInternalBases() { return bases; } public void setBases(java.util.List<exprType> bases) { @@ -25,7 +25,7 @@ } private ListWrapper<stmtType> body; - public ListWrapper<stmtType> getBody() { + public ListWrapper<stmtType> getInternalBody() { return body; } public void setBody(java.util.List<stmtType> body) { @@ -33,7 +33,7 @@ } private ListWrapper<exprType> decorators; - public ListWrapper<exprType> getDecorators() { + public ListWrapper<exprType> getInternalDecorators() { return decorators; } public void setDecorators(java.util.List<exprType> decorators) { Modified: branches/astwrite/src/org/python/antlr/ast/Compare.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Compare.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/Compare.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class Compare extends exprType { private exprType left; - public exprType getLeft() { + public exprType getInternalLeft() { return left; } public void setLeft(exprType left) { @@ -17,7 +17,7 @@ } private ListWrapper<cmpopType> ops; - public ListWrapper<cmpopType> getOps() { + public ListWrapper<cmpopType> getInternalOps() { return ops; } public void setOps(java.util.List<cmpopType> ops) { @@ -25,7 +25,7 @@ } private ListWrapper<exprType> comparators; - public ListWrapper<exprType> getComparators() { + public ListWrapper<exprType> getInternalComparators() { return comparators; } public void setComparators(java.util.List<exprType> comparators) { Modified: branches/astwrite/src/org/python/antlr/ast/Delete.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Delete.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/Delete.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class Delete extends stmtType { private ListWrapper<exprType> targets; - public ListWrapper<exprType> getTargets() { + public ListWrapper<exprType> getInternalTargets() { return targets; } public void setTargets(java.util.List<exprType> targets) { Modified: branches/astwrite/src/org/python/antlr/ast/Dict.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Dict.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/Dict.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class Dict extends exprType { private ListWrapper<exprType> keys; - public ListWrapper<exprType> getKeys() { + public ListWrapper<exprType> getInternalKeys() { return keys; } public void setKeys(java.util.List<exprType> keys) { @@ -17,7 +17,7 @@ } private ListWrapper<exprType> values; - public ListWrapper<exprType> getValues() { + public ListWrapper<exprType> getInternalValues() { return values; } public void setValues(java.util.List<exprType> values) { Modified: branches/astwrite/src/org/python/antlr/ast/Exec.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Exec.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/Exec.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class Exec extends stmtType { private exprType body; - public exprType getBody() { + public exprType getInternalBody() { return body; } public void setBody(exprType body) { @@ -17,7 +17,7 @@ } private exprType globals; - public exprType getGlobals() { + public exprType getInternalGlobals() { return globals; } public void setGlobals(exprType globals) { @@ -25,7 +25,7 @@ } private exprType locals; - public exprType getLocals() { + public exprType getInternalLocals() { return locals; } public void setLocals(exprType locals) { Modified: branches/astwrite/src/org/python/antlr/ast/Expr.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Expr.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/Expr.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class Expr extends stmtType { private exprType value; - public exprType getValue() { + public exprType getInternalValue() { return value; } public void setValue(exprType value) { Modified: branches/astwrite/src/org/python/antlr/ast/Expression.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Expression.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/Expression.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class Expression extends modType { private exprType body; - public exprType getBody() { + public exprType getInternalBody() { return body; } public void setBody(exprType body) { Modified: branches/astwrite/src/org/python/antlr/ast/ExtSlice.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/ExtSlice.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/ExtSlice.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class ExtSlice extends sliceType { private ListWrapper<sliceType> dims; - public ListWrapper<sliceType> getDims() { + public ListWrapper<sliceType> getInternalDims() { return dims; } public void setDims(java.util.List<sliceType> dims) { Modified: branches/astwrite/src/org/python/antlr/ast/For.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/For.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/For.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class For extends stmtType { private exprType target; - public exprType getTarget() { + public exprType getInternalTarget() { return target; } public void setTarget(exprType target) { @@ -17,7 +17,7 @@ } private exprType iter; - public exprType getIter() { + public exprType getInternalIter() { return iter; } public void setIter(exprType iter) { @@ -25,7 +25,7 @@ } private ListWrapper<stmtType> body; - public ListWrapper<stmtType> getBody() { + public ListWrapper<stmtType> getInternalBody() { return body; } public void setBody(java.util.List<stmtType> body) { @@ -33,7 +33,7 @@ } private ListWrapper<stmtType> orelse; - public ListWrapper<stmtType> getOrelse() { + public ListWrapper<stmtType> getInternalOrelse() { return orelse; } public void setOrelse(java.util.List<stmtType> orelse) { Modified: branches/astwrite/src/org/python/antlr/ast/FunctionDef.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/FunctionDef.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/FunctionDef.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class FunctionDef extends stmtType { private String name; - public String getName() { + public String getInternalName() { return name; } public void setName(String name) { @@ -17,7 +17,7 @@ } private argumentsType args; - public argumentsType getArgs() { + public argumentsType getInternalArgs() { return args; } public void setArgs(argumentsType args) { @@ -25,7 +25,7 @@ } private ListWrapper<stmtType> body; - public ListWrapper<stmtType> getBody() { + public ListWrapper<stmtType> getInternalBody() { return body; } public void setBody(java.util.List<stmtType> body) { @@ -33,7 +33,7 @@ } private ListWrapper<exprType> decorators; - public ListWrapper<exprType> getDecorators() { + public ListWrapper<exprType> getInternalDecorators() { return decorators; } public void setDecorators(java.util.List<exprType> decorators) { Modified: branches/astwrite/src/org/python/antlr/ast/GeneratorExp.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/GeneratorExp.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/GeneratorExp.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class GeneratorExp extends exprType { private exprType elt; - public exprType getElt() { + public exprType getInternalElt() { return elt; } public void setElt(exprType elt) { @@ -17,7 +17,7 @@ } private ListWrapper<comprehensionType> generators; - public ListWrapper<comprehensionType> getGenerators() { + public ListWrapper<comprehensionType> getInternalGenerators() { return generators; } public void setGenerators(java.util.List<comprehensionType> generators) { Modified: branches/astwrite/src/org/python/antlr/ast/Global.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Global.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/Global.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class Global extends stmtType { private ListWrapper<String> names; - public ListWrapper<String> getNames() { + public ListWrapper<String> getInternalNames() { return names; } public void setNames(java.util.List<String> names) { Modified: branches/astwrite/src/org/python/antlr/ast/If.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/If.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/If.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class If extends stmtType { private exprType test; - public exprType getTest() { + public exprType getInternalTest() { return test; } public void setTest(exprType test) { @@ -17,7 +17,7 @@ } private ListWrapper<stmtType> body; - public ListWrapper<stmtType> getBody() { + public ListWrapper<stmtType> getInternalBody() { return body; } public void setBody(java.util.List<stmtType> body) { @@ -25,7 +25,7 @@ } private ListWrapper<stmtType> orelse; - public ListWrapper<stmtType> getOrelse() { + public ListWrapper<stmtType> getInternalOrelse() { return orelse; } public void setOrelse(java.util.List<stmtType> orelse) { Modified: branches/astwrite/src/org/python/antlr/ast/IfExp.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/IfExp.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/IfExp.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class IfExp extends exprType { private exprType test; - public exprType getTest() { + public exprType getInternalTest() { return test; } public void setTest(exprType test) { @@ -17,7 +17,7 @@ } private exprType body; - public exprType getBody() { + public exprType getInternalBody() { return body; } public void setBody(exprType body) { @@ -25,7 +25,7 @@ } private exprType orelse; - public exprType getOrelse() { + public exprType getInternalOrelse() { return orelse; } public void setOrelse(exprType orelse) { Modified: branches/astwrite/src/org/python/antlr/ast/Import.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Import.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/Import.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class Import extends stmtType { private ListWrapper<aliasType> names; - public ListWrapper<aliasType> getNames() { + public ListWrapper<aliasType> getInternalNames() { return names; } public void setNames(java.util.List<aliasType> names) { Modified: branches/astwrite/src/org/python/antlr/ast/ImportFrom.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/ImportFrom.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/ImportFrom.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class ImportFrom extends stmtType { private String module; - public String getModule() { + public String getInternalModule() { return module; } public void setModule(String module) { @@ -17,7 +17,7 @@ } private ListWrapper<aliasType> names; - public ListWrapper<aliasType> getNames() { + public ListWrapper<aliasType> getInternalNames() { return names; } public void setNames(java.util.List<aliasType> names) { @@ -25,7 +25,7 @@ } private int level; - public int getLevel() { + public int getInternalLevel() { return level; } public void setLevel(int level) { Modified: branches/astwrite/src/org/python/antlr/ast/Index.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Index.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/Index.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class Index extends sliceType { private exprType value; - public exprType getValue() { + public exprType getInternalValue() { return value; } public void setValue(exprType value) { Modified: branches/astwrite/src/org/python/antlr/ast/Interactive.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Interactive.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/Interactive.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class Interactive extends modType { private ListWrapper<stmtType> body; - public ListWrapper<stmtType> getBody() { + public ListWrapper<stmtType> getInternalBody() { return body; } public void setBody(java.util.List<stmtType> body) { Modified: branches/astwrite/src/org/python/antlr/ast/Lambda.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Lambda.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/Lambda.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class Lambda extends exprType { private argumentsType args; - public argumentsType getArgs() { + public argumentsType getInternalArgs() { return args; } public void setArgs(argumentsType args) { @@ -17,7 +17,7 @@ } private exprType body; - public exprType getBody() { + public exprType getInternalBody() { return body; } public void setBody(exprType body) { Modified: branches/astwrite/src/org/python/antlr/ast/List.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/List.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/List.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class List extends exprType implements Context { private ListWrapper<exprType> elts; - public ListWrapper<exprType> getElts() { + public ListWrapper<exprType> getInternalElts() { return elts; } public void setElts(java.util.List<exprType> elts) { @@ -17,7 +17,7 @@ } private expr_contextType ctx; - public expr_contextType getCtx() { + public expr_contextType getInternalCtx() { return ctx; } public void setCtx(expr_contextType ctx) { Modified: branches/astwrite/src/org/python/antlr/ast/ListComp.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/ListComp.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/ListComp.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class ListComp extends exprType { private exprType elt; - public exprType getElt() { + public exprType getInternalElt() { return elt; } public void setElt(exprType elt) { @@ -17,7 +17,7 @@ } private ListWrapper<comprehensionType> generators; - public ListWrapper<comprehensionType> getGenerators() { + public ListWrapper<comprehensionType> getInternalGenerators() { return generators; } public void setGenerators(java.util.List<comprehensionType> generators) { Modified: branches/astwrite/src/org/python/antlr/ast/Module.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Module.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/Module.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class Module extends modType { private ListWrapper<stmtType> body; - public ListWrapper<stmtType> getBody() { + public ListWrapper<stmtType> getInternalBody() { return body; } public void setBody(java.util.List<stmtType> body) { Modified: branches/astwrite/src/org/python/antlr/ast/Name.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Name.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/Name.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class Name extends exprType implements Context { private String id; - public String getId() { + public String getInternalId() { return id; } public void setId(String id) { @@ -17,7 +17,7 @@ } private expr_contextType ctx; - public expr_contextType getCtx() { + public expr_contextType getInternalCtx() { return ctx; } public void setCtx(expr_contextType ctx) { Modified: branches/astwrite/src/org/python/antlr/ast/Num.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Num.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/Num.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class Num extends exprType { private Object n; - public Object getN() { + public Object getInternalN() { return n; } public void setN(Object n) { Modified: branches/astwrite/src/org/python/antlr/ast/Print.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Print.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/Print.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class Print extends stmtType { private exprType dest; - public exprType getDest() { + public exprType getInternalDest() { return dest; } public void setDest(exprType dest) { @@ -17,7 +17,7 @@ } private ListWrapper<exprType> values; - public ListWrapper<exprType> getValues() { + public ListWrapper<exprType> getInternalValues() { return values; } public void setValues(java.util.List<exprType> values) { @@ -25,7 +25,7 @@ } private boolean nl; - public boolean getNl() { + public boolean getInternalNl() { return nl; } public void setNl(boolean nl) { Modified: branches/astwrite/src/org/python/antlr/ast/Raise.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Raise.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/Raise.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class Raise extends stmtType { private exprType excepttype; - public exprType getExcepttype() { + public exprType getInternalExcepttype() { return excepttype; } public void setExcepttype(exprType excepttype) { @@ -17,7 +17,7 @@ } private exprType inst; - public exprType getInst() { + public exprType getInternalInst() { return inst; } public void setInst(exprType inst) { @@ -25,7 +25,7 @@ } private exprType tback; - public exprType getTback() { + public exprType getInternalTback() { return tback; } public void setTback(exprType tback) { Modified: branches/astwrite/src/org/python/antlr/ast/Repr.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Repr.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/Repr.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class Repr extends exprType { private exprType value; - public exprType getValue() { + public exprType getInternalValue() { return value; } public void setValue(exprType value) { Modified: branches/astwrite/src/org/python/antlr/ast/Return.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Return.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/Return.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class Return extends stmtType { private exprType value; - public exprType getValue() { + public exprType getInternalValue() { return value; } public void setValue(exprType value) { Modified: branches/astwrite/src/org/python/antlr/ast/Slice.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Slice.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/Slice.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class Slice extends sliceType { private exprType lower; - public exprType getLower() { + public exprType getInternalLower() { return lower; } public void setLower(exprType lower) { @@ -17,7 +17,7 @@ } private exprType upper; - public exprType getUpper() { + public exprType getInternalUpper() { return upper; } public void setUpper(exprType upper) { @@ -25,7 +25,7 @@ } private exprType step; - public exprType getStep() { + public exprType getInternalStep() { return step; } public void setStep(exprType step) { Modified: branches/astwrite/src/org/python/antlr/ast/Str.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Str.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/Str.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class Str extends exprType { private Object s; - public Object getS() { + public Object getInternalS() { return s; } public void setS(Object s) { Modified: branches/astwrite/src/org/python/antlr/ast/Subscript.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Subscript.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/Subscript.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class Subscript extends exprType implements Context { private exprType value; - public exprType getValue() { + public exprType getInternalValue() { return value; } public void setValue(exprType value) { @@ -17,7 +17,7 @@ } private sliceType slice; - public sliceType getSlice() { + public sliceType getInternalSlice() { return slice; } public void setSlice(sliceType slice) { @@ -25,7 +25,7 @@ } private expr_contextType ctx; - public expr_contextType getCtx() { + public expr_contextType getInternalCtx() { return ctx; } public void setCtx(expr_contextType ctx) { Modified: branches/astwrite/src/org/python/antlr/ast/Suite.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Suite.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/Suite.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class Suite extends modType { private ListWrapper<stmtType> body; - public ListWrapper<stmtType> getBody() { + public ListWrapper<stmtType> getInternalBody() { return body; } public void setBody(java.util.List<stmtType> body) { Modified: branches/astwrite/src/org/python/antlr/ast/TryExcept.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/TryExcept.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/TryExcept.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class TryExcept extends stmtType { private ListWrapper<stmtType> body; - public ListWrapper<stmtType> getBody() { + public ListWrapper<stmtType> getInternalBody() { return body; } public void setBody(java.util.List<stmtType> body) { @@ -17,7 +17,7 @@ } private ListWrapper<excepthandlerType> handlers; - public ListWrapper<excepthandlerType> getHandlers() { + public ListWrapper<excepthandlerType> getInternalHandlers() { return handlers; } public void setHandlers(java.util.List<excepthandlerType> handlers) { @@ -25,7 +25,7 @@ } private ListWrapper<stmtType> orelse; - public ListWrapper<stmtType> getOrelse() { + public ListWrapper<stmtType> getInternalOrelse() { return orelse; } public void setOrelse(java.util.List<stmtType> orelse) { Modified: branches/astwrite/src/org/python/antlr/ast/TryFinally.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/TryFinally.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/TryFinally.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class TryFinally extends stmtType { private ListWrapper<stmtType> body; - public ListWrapper<stmtType> getBody() { + public ListWrapper<stmtType> getInternalBody() { return body; } public void setBody(java.util.List<stmtType> body) { @@ -17,7 +17,7 @@ } private ListWrapper<stmtType> finalbody; - public ListWrapper<stmtType> getFinalbody() { + public ListWrapper<stmtType> getInternalFinalbody() { return finalbody; } public void setFinalbody(java.util.List<stmtType> finalbody) { Modified: branches/astwrite/src/org/python/antlr/ast/Tuple.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Tuple.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/Tuple.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class Tuple extends exprType implements Context { private ListWrapper<exprType> elts; - public ListWrapper<exprType> getElts() { + public ListWrapper<exprType> getInternalElts() { return elts; } public void setElts(java.util.List<exprType> elts) { @@ -17,7 +17,7 @@ } private expr_contextType ctx; - public expr_contextType getCtx() { + public expr_contextType getInternalCtx() { return ctx; } public void setCtx(expr_contextType ctx) { Modified: branches/astwrite/src/org/python/antlr/ast/UnaryOp.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/UnaryOp.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/UnaryOp.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class UnaryOp extends exprType { private unaryopType op; - public unaryopType getOp() { + public unaryopType getInternalOp() { return op; } public void setOp(unaryopType op) { @@ -17,7 +17,7 @@ } private exprType operand; - public exprType getOperand() { + public exprType getInternalOperand() { return operand; } public void setOperand(exprType operand) { Modified: branches/astwrite/src/org/python/antlr/ast/While.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/While.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/While.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class While extends stmtType { private exprType test; - public exprType getTest() { + public exprType getInternalTest() { return test; } public void setTest(exprType test) { @@ -17,7 +17,7 @@ } private ListWrapper<stmtType> body; - public ListWrapper<stmtType> getBody() { + public ListWrapper<stmtType> getInternalBody() { return body; } public void setBody(java.util.List<stmtType> body) { @@ -25,7 +25,7 @@ } private ListWrapper<stmtType> orelse; - public ListWrapper<stmtType> getOrelse() { + public ListWrapper<stmtType> getInternalOrelse() { return orelse; } public void setOrelse(java.util.List<stmtType> orelse) { Modified: branches/astwrite/src/org/python/antlr/ast/With.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/With.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/With.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class With extends stmtType { private exprType context_expr; - public exprType getContext_expr() { + public exprType getInternalContext_expr() { return context_expr; } public void setContext_expr(exprType context_expr) { @@ -17,7 +17,7 @@ } private exprType optional_vars; - public exprType getOptional_vars() { + public exprType getInternalOptional_vars() { return optional_vars; } public void setOptional_vars(exprType optional_vars) { @@ -25,7 +25,7 @@ } private ListWrapper<stmtType> body; - public ListWrapper<stmtType> getBody() { + public ListWrapper<stmtType> getInternalBody() { return body; } public void setBody(java.util.List<stmtType> body) { Modified: branches/astwrite/src/org/python/antlr/ast/Yield.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/Yield.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/Yield.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class Yield extends exprType { private exprType value; - public exprType getValue() { + public exprType getInternalValue() { return value; } public void setValue(exprType value) { Modified: branches/astwrite/src/org/python/antlr/ast/aliasType.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/aliasType.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/aliasType.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class aliasType extends PythonTree { private String name; - public String getName() { + public String getInternalName() { return name; } public void setName(String name) { @@ -17,7 +17,7 @@ } private String asname; - public String getAsname() { + public String getInternalAsname() { return asname; } public void setAsname(String asname) { Modified: branches/astwrite/src/org/python/antlr/ast/argumentsType.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/argumentsType.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/argumentsType.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class argumentsType extends PythonTree { private ListWrapper<exprType> args; - public ListWrapper<exprType> getArgs() { + public ListWrapper<exprType> getInternalArgs() { return args; } public void setArgs(java.util.List<exprType> args) { @@ -17,7 +17,7 @@ } private String vararg; - public String getVararg() { + public String getInternalVararg() { return vararg; } public void setVararg(String vararg) { @@ -25,7 +25,7 @@ } private String kwarg; - public String getKwarg() { + public String getInternalKwarg() { return kwarg; } public void setKwarg(String kwarg) { @@ -33,7 +33,7 @@ } private ListWrapper<exprType> defaults; - public ListWrapper<exprType> getDefaults() { + public ListWrapper<exprType> getInternalDefaults() { return defaults; } public void setDefaults(java.util.List<exprType> defaults) { Modified: branches/astwrite/src/org/python/antlr/ast/comprehensionType.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/comprehensionType.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/comprehensionType.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class comprehensionType extends PythonTree { private exprType target; - public exprType getTarget() { + public exprType getInternalTarget() { return target; } public void setTarget(exprType target) { @@ -17,7 +17,7 @@ } private exprType iter; - public exprType getIter() { + public exprType getInternalIter() { return iter; } public void setIter(exprType iter) { @@ -25,7 +25,7 @@ } private ListWrapper<exprType> ifs; - public ListWrapper<exprType> getIfs() { + public ListWrapper<exprType> getInternalIfs() { return ifs; } public void setIfs(java.util.List<exprType> ifs) { Modified: branches/astwrite/src/org/python/antlr/ast/excepthandlerType.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/excepthandlerType.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/excepthandlerType.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class excepthandlerType extends PythonTree { private exprType excepttype; - public exprType getExcepttype() { + public exprType getInternalExcepttype() { return excepttype; } public void setExcepttype(exprType excepttype) { @@ -17,7 +17,7 @@ } private exprType name; - public exprType getName() { + public exprType getInternalName() { return name; } public void setName(exprType name) { @@ -25,7 +25,7 @@ } private ListWrapper<stmtType> body; - public ListWrapper<stmtType> getBody() { + public ListWrapper<stmtType> getInternalBody() { return body; } public void setBody(java.util.List<stmtType> body) { @@ -33,7 +33,7 @@ } private int lineno; - public int getLineno() { + public int getInternalLineno() { return lineno; } public void setLineno(int lineno) { @@ -41,7 +41,7 @@ } private int col_offset; - public int getCol_offset() { + public int getInternalCol_offset() { return col_offset; } public void setCol_offset(int col_offset) { Modified: branches/astwrite/src/org/python/antlr/ast/keywordType.java =================================================================== --- branches/astwrite/src/org/python/antlr/ast/keywordType.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/antlr/ast/keywordType.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -9,7 +9,7 @@ public class keywordType extends PythonTree { private String arg; - public String getArg() { + public String getInternalArg() { return arg; } public void setArg(String arg) { @@ -17,7 +17,7 @@ } private exprType value; - public exprType getValue() { + public exprType getInternalValue() { return value; } public void setValue(exprType value) { Property changes on: branches/astwrite/src/org/python/compiler ___________________________________________________________________ Modified: svn:ignore - .AppleDouble *.class + .AppleDouble *.class .CodeCompiler.java.swp .ArgListCompiler.java.swp .ScopesCompiler.java.swp Modified: branches/astwrite/src/org/python/compiler/ArgListCompiler.java =================================================================== --- branches/astwrite/src/org/python/compiler/ArgListCompiler.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/compiler/ArgListCompiler.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -40,10 +40,10 @@ } public void appendInitCode(Suite node) { - int n = node.getBody().size(); + int n = node.getInternalBody().size(); List<stmtType> newtree = new ArrayList<stmtType>(); newtree.addAll(init_code); - newtree.addAll(node.getBody()); + newtree.addAll(node.getInternalBody()); node.setBody(newtree); } @@ -52,60 +52,60 @@ } public void visitArgs(argumentsType args) throws Exception { - for (int i = 0; i < args.getArgs().size(); i++) { - String name = (String) visit(args.getArgs().get(i)); + for (int i = 0; i < args.getInternalArgs().size(); i++) { + String name = (String) visit(args.getInternalArgs().get(i)); names.add(name); - if (args.getArgs().get(i) instanceof Tuple) { + if (args.getInternalArgs().get(i) instanceof Tuple) { List<exprType> targets = new ArrayList<exprType>(); - targets.add(args.getArgs().get(i)); - Assign ass = new Assign(args.getArgs().get(i), + targets.add(args.getInternalArgs().get(i)); + Assign ass = new Assign(args.getInternalArgs().get(i), targets, - new Name(args.getArgs().get(i), name, expr_contextType.Load)); + new Name(args.getInternalArgs().get(i), name, expr_contextType.Load)); init_code.add(ass); } } - if (args.getVararg() != null) { + if (args.getInternalVararg() != null) { arglist = true; - names.add(args.getVararg()); + names.add(args.getInternalVararg()); } - if (args.getKwarg() != null) { + if (args.getInternalKwarg() != null) { keywordlist = true; - names.add(args.getKwarg()); + names.add(args.getInternalKwarg()); } - defaults = args.getDefaults(); + defaults = args.getInternalDefaults(); for (int i = 0; i < defaults.size(); i++) { if (defaults.get(i) == null) throw new ParseException( "non-default argument follows default argument", - args.getArgs().get(args.getArgs().size() - defaults.size() + i)); + args.getInternalArgs().get(args.getInternalArgs().size() - defaults.size() + i)); } } @Override public Object visitName(Name node) throws Exception { //FIXME: do we need Store and Param, or just Param? - if (node.getCtx() != expr_contextType.Store && node.getCtx() != expr_contextType.Param) { + if (node.getInternalCtx() != expr_contextType.Store && node.getInternalCtx() != expr_contextType.Param) { return null; } - if (fpnames.contains(node.getId())) { + if (fpnames.contains(node.getInternalId())) { throw new ParseException("duplicate argument name found: " + - node.getId(), node); + node.getInternalId(), node); } - fpnames.add(node.getId()); - return node.getId(); + fpnames.add(node.getInternalId()); + return node.getInternalId(); } @Override public Object visitTuple(Tuple node) throws Exception { StringBuffer name = new StringBuffer("("); - int n = node.getElts().size(); + int n = node.getInternalElts().size(); for (int i = 0; i < n-1; i++) { - name.append(visit(node.getElts().get(i))); + name.append(visit(node.getInternalElts().get(i))); name.append(", "); } - name.append(visit(node.getElts().get(n - 1))); + name.append(visit(node.getInternalElts().get(n - 1))); name.append(")"); return name.toString(); } Modified: branches/astwrite/src/org/python/compiler/CodeCompiler.java =================================================================== --- branches/astwrite/src/org/python/compiler/CodeCompiler.java 2008-11-21 02:00:11 UTC (rev 5596) +++ branches/astwrite/src/org/python/compiler/CodeCompiler.java 2008-11-21 14:59:28 UTC (rev 5597) @@ -297,13 +297,13 @@ public Object visitModule(org.python.antlr.ast.Module suite) throws Exception { - if (suite.getBody().size() > 0 && - suite.getBody().get(0) instanceof Expr && - ((Expr) suite.getBody().get(0)).getValue() instanceof Str) + if (suite.getInternalBody().size() > 0 && + suite.getInternalBody().get(0) instanceof Expr && + ((Expr) suite.getInternalBody().get(0)).getInternalValue() instanceof Str) { loadFrame(); code.ldc("__doc__"); - visit(((Expr) suite.getBody().get(0)).getValue()); + visit(((Expr) suite.getInternalBody().get(0)).getInternalValue()); code.invokevirtual("org/python/core/PyFrame", "setglobal", "(" +$str ... [truncated message content] |