google / mangle

Apache License 2.0
1.07k stars 38 forks source link

ANTLR Management Tasks #16

Closed rkrishnasanka closed 1 year ago

rkrishnasanka commented 1 year ago

I've been sneaking peeks at the source code and here are a couple of things we need to the repo:

These were some of the lesson's I've learnt when using ANTLR for my Ph.D. projects since I heavily relied on ANTLR for generating the parsers. If we don't port it to visitors right now, we will have a lot more trouble in the future as the execution logic will become more complicated and become quite a pain in the ass to rewrite.

rkrishnasanka commented 1 year ago

@burakemir Let me know if this sounds good ? I can start on the PR this weekend

burakemir commented 1 year ago

I don't currently see the advantages of either of these. Let's not do this.

aaronbee commented 1 year ago

Without including the antlr generate code, it becomes really hard to use this package as a dependency. Go modules assume that all Go code you need to build them is included when you go get the code and it is standard practice for a Go module to include their generated sources. Lots of things break when this is not the case, for example, go mod tidy is unable to run:


example.com/mypackage imports
    github.com/google/mangle/parse imports
    github.com/google/mangle/parse/gen: module github.com/google/mangle@latest found (v0.0.0-20230707132936-395177d4b5ed), but does not contain package github.com/google/mangle/parse/gen```
burakemir commented 1 year ago

Makes sense. I will check in the sources.