Dear Sir/Madame,
I'm trying to learn the ClassAd java library (Version 2.2)
for my research and I am having problems in understanding the use of
indented classads.
I have a problem with indented classads.
I have a test classad.
--------------------------------------------
String p1 = new String(
"[" +
"value = 10;" +
"inner = " +
"[" +
"v = root.value;" +
"];" +
"];");
--------------------------------------------
I create a RecordExpr with this String:
-----------------------------------------------------------
ClassAdParser parser = new ClassAdParser(p1);
RecordExpr expr1 = (RecordExpr) parser.parse();
-----------------------------------------------------------
And I try to evaluate the various expressions:
System.out.println("- expr1 : " + expr1.eval());
System.out.println("- expr1.value : " + expr1.lookup("value").eval());
System.out.println("- expr1.inner : " + expr1.lookup("inner").eval());
System.out.println("- expr1.inner.v : "
+((RecordExpr)expr1.lookup("inner")).lookup("v").eval());
The problem is that the value of v in the inner classad is undefined
and I cannot understand why. Probably the lookup function is restricting
the scope.
-----------------------------------------
- expr1 : [value=10;inner=[v=root.value]]
- expr1.value : 10
- expr1.inner : [v=root.value]
- expr1.inner.v : UNDEFINED
-----------------------------------------
I was wondering if you could give me pointer to any documentation
(expecially regarding the Java implementation) besides the papers
listed in the ClassAd website or put me in contact with anybody
able to help me.
I am very grateful for any help you could provide.
All the very best,
Gabriele Pierantoni
--
With Best Regards. \|||/
(o o)
----------------------------------ooO-(_)-Ooo-----------------
- -
- _/_/_/_/_/ _/_/_/ __/_/_/_/ Gabriele Pierantoni -
- _/ _/ _/ _/ _/ Dept.Computer Science -
- _/ _/ _/ _/ Trinity College Dublin -
- _/ _/ _/ _/ tel : 00+353-1-8961536 -
- _/ _/ _/ _/ _/ fax : 00+353-1-6772204 -
- _/ _/_/_/ __/_/_/_/ email : pierantg@xxxxxxxxx -
- -
- WWW : http://www.cs.tcd.ie/~pierantg -
- Map : http://www.tcd.ie/Maps/tcd_east.html -
- -
- "A bad craftsman blames his tools, an even worse one -
- blames the nail" -
- -
--------------------------------------------------------------
|