debug new antlr4 target language

45 views
Skip to first unread message

Moof

unread,
Nov 28, 2022, 7:13:16 PM11/28/22
to antlr-discussion
Hi,

I downloaded the antlr4 4.11.2-SNAPSHOT and added the necessary files for a new target language, Xx for this example.  I'm sure I have a typo in the .stg file, so I want to run the new antlr4 in a debugger and watch it try to read the .stg files.   Here's the error

$ antlr4 -Dlanguage=Xx FooLexer.g4 FooParser.g4
error(33):  missing code generation template SerializedATN

How should I proceed with debugging antlr4?  What do the developers use for debugging?  Can I load antlr4 in an ide like eclipse, or should I add a new target to the pom.xml?  I have not done this before.  

Thanks,

    --Michael

Wanadoo

unread,
Nov 29, 2022, 2:37:50 AM11/29/22
to antlr-di...@googlegroups.com
Hi
we use IntelliJ
Eric

Envoyé de mon iPhone

Le 29 nov. 2022 à 01:13, Moof <mo...@camooflage.com> a écrit :

Hi,
--
You received this message because you are subscribed to the Google Groups "antlr-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to antlr-discussi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/antlr-discussion/e412aaaf-b294-4167-b92b-e415f5064c5bn%40googlegroups.com.

Terence Parr

unread,
Dec 2, 2022, 2:27:48 PM12/2/22
to antlr-di...@googlegroups.com
Hi Michael, we use intellij primarily.  I typically run the tool tests and then the Java runtime tests or others from within intellij as it makes it easy to see what's going on and you can set I'll break point in the debugger to see what's going on.

That error message you get is because there's a missing template called SerializedATN in the Xx.stg file.

Ter

Reply all
Reply to author
Forward
0 new messages