0

I can't find basic practical examples anywhere online about ASTs represent real code.

Can anyone tell me how System.out.println("shadoobee") is represented in the tree? What elements are used (i.e. System.out appears to be a QualifiedName, I'm assuming) and how they are arranged in the tree?

CodyBugstein
  • 21,984
  • 61
  • 207
  • 363
  • Whose grammar are you using? – duffymo Jun 06 '13 at 17:58
  • Which parser or library are you using ? – Guillaume Darmont Jun 06 '13 at 18:01
  • I'd expect it have a root node called statment, child node method-call, with method-call left-child being path containing a.b.c.d, and right child containing arguments. You can see a real parse for Java code (not your specific example) here: http://stackoverflow.com/a/6378997/120163 – Ira Baxter Jun 07 '13 at 06:24

0 Answers0