Using ANLR4 code generated code in v4.13.1 walker.walk() doesn't work for me.

24 views
Skip to first unread message

Richard Wallace

unread,
Mar 21, 2024, 10:48:18 AMMar 21
to antlr-di...@googlegroups.com
Using the example JSON to XML example, it works as advertised, but when I use a similar structure, the sequence of code

        ParseTreeWalker walker = new ParseTreeWalker();
        AADLEmitter converter = new AADLEmitter();
        walker.walk(converter, tree);

does not produce the output as it should.  It only outputs the first element in the input file.  I've used the IntelliJ debugger and have seen the other elements in the runtime class structures from the input file. When I use printf() in the methods that do the transformation, I get exactly what I should.

So, what am I missing here with the walker.walk()?

Thanks in advance.

Cheers,
      Richard    
Reply all
Reply to author
Forward
Message has been deleted
0 new messages