In the PicoJava example, at least as far as I can see, Main.scala
doesn't invoke initTree after parsing the program, whereas all test
cases do so, e.g. test/BasicNameResolutionTests.scala. Is initTree
somehow invoked implicitly when running Main?
I adopted the example, but when I don't invoke initTree myself the
children iterator in collectErrors is always empty.
Thanks,
Malte
Thanks for noticing this one; initTree should be called. It's a bug in the trunk version. I've pushed a fix.
BTW, the collectErrors style in the picojava example is designed to mimic the way the JastAdd Java version of the example works.
If you're starting from scratch would recommend more the style used in (say) the semantic analysis phase of the Obr example, since it uses the Kiama message module to record the errors.
cheers,
Tony