[antlr-interest] gunit problem

Kaleb Pederson kaleb.pederson at gmail.com
Fri Jan 22 07:46:43 PST 2010


On Thu, Jan 21, 2010 at 2:22 AM, Ian Moor <iwm at doc.ic.ac.uk> wrote:
> I am using the gunit which is provided with antlr 3.2 and
> I am trying to test parts of an tree, for example
>   statement walks statements:
>    "x=1" -> "ok"
>
> I expect an error message saying the code produced to System.out is
> not  "ok", but gunit prints no output, ans stops with a non zero return
> value.

Although it takes some work, you can debug gunit.  You'll need to grab
the source and then set appropriate breakpoints as one normally would
in working with a debugger, but it's possible.

> Is there a way finding what is happening, or a later gunit ?

A patched version of gunit is available that includes better support
for custom ASTs:

http://www.antlr.org/wiki/pages/viewpageattachments.action?pageId=3244061&metadataLink=true

I know I found source for it somewhere and was able to debug another
problem, so hopefully you can do the same.

--
Kaleb Pederson

Blog - http://kalebpederson.com
Twitter - http://twitter.com/kalebpederson


More information about the antlr-interest mailing list