Message5398
Hi Frank, I see you were at Sun until recently :(. I'm at Sun but I
also teach a Programming Languages course at the University of Texas in
Austin. I'm considering teaching the internals of Jython in my course
but I'm just getting familiar with them myself. Would you mind
answering a question?
In src/org/python/antlr/ast/Assign.java I'd like to see the values
of "a" and "b" in the execution below.
>>> a, b = 1, 2
PHIL - Assign 2
Target is Tuple(elts=[Name, Name],ctx=Store,)
Value is Tuple(elts=[Num, Num],ctx=Load,)
>>> x=a+b
PHIL - Assign 2
Target is Name(id=x,ctx=Store,)
Value is BinOp(left=Name(id=a,ctx=Load,),op=Add,right=Name
(id=b,ctx=Load,),)
I tried the following in the code:
public Assign(Integer ttype, Token token, java.util.List<expr>
targets, expr value) {
super(ttype, token);
System.out.println("PHIL - Assign 2");
this.targets = targets;
if (targets == null) {
this.targets = new ArrayList<expr>();
}
for(PythonTree t : this.targets) {
System.out.println("Target is " + t.toStringTree());
addChild(t);
}
System.out.println("Value is " + value.toStringTree());
this.value = value;
addChild(value);
}
but toStringTree() doesn't give the values of the variables. Is there
some way to get them inside of Assign.java?
thanks
phil
I tried to respond to your email about the but but I got the following:
Subject: Failed issue tracker submission
To: Phil.Cannata@Sun.COM
You are not a registered user. |
|
Date |
User |
Action |
Args |
2009-12-30 14:59:29 | pcannata | set | messageid: <1262185169.29.0.414778414085.issue1530@psf.upfronthosting.co.za> |
2009-12-30 14:59:29 | pcannata | set | recipients:
+ pcannata, fwierzbicki |
2009-12-30 14:59:29 | pcannata | link | issue1530 messages |
2009-12-30 14:59:28 | pcannata | create | |
|