pboyer / antlr4

ANTLR (ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, or translating structured text or binary files.
http://antlr.org
Other
26 stars 1 forks source link

Golang visitor example? #93

Open PaulCapestany opened 7 years ago

PaulCapestany commented 7 years ago

I've been working through the ANTLR book, however, not knowing Java I'm a bit unsure how a Visitor implementation should look like in Go. Would be great to get a code snippet showing this (and maybe include in official documentation?) if it's not too much trouble.

Weltraumschaf commented 7 years ago

I would appreciate such an example too. I'm used to the visitor pattern with the Java target. but as novice in Go I got lot of SIGSEVS or compile errors...

Would be very nice if you may provide a simple example such as the TreeShapeListener provided in the go target Markdown.

cyberfox commented 7 years ago

If you're still interested in this, can you see if PR #1807 helps? I had the same problem, and determined that the existing Visitor code was not quite done.