Antlr: parse tree not showed in Eclipse
Asked Answered
Z

0

5

The view Parse Tree in Eclipse Oxygen is empty and white. I can compile my Hello.g4 grammar, see the Syntax Diagram but the Parse Tree view is empty. How can I fix it? enter image description here

Zig answered 24/8, 2017 at 20:37 Comment(2)
Did you actually do a parse run? The parse tree is the result of parsing and hence cannot be shown until you parsed something.Drouin
Acutally, I have only thoose 2 files: Hello.g4 and input. I go in the arrow near the run button, run configurations. There, I add a new Java application, called TestRig, with org.antlr.v4.gui.TestRig as main class and Hello simbolo_iniziale input as arguments. To launch it, I go in the arrow near the run button and I press TestRig. If I write something wrong in the input file, I have errors, otherwise everything seems ok. This is a parse run, isn't it?Zig

© 2022 - 2024 — McMap. All rights reserved.