Skip to content

Conversation

rrbutani
Copy link

The file paths that are passed to ANTLR end up in the generated output so using absolute paths breaks caching.


This PR makes it so that the relative paths to the grammar files that we get from Bazel are passed straight through to ANTLR.

To keep ANTLR from trying to recreate the directory structure containing the grammar files within the output directory I had to add -Xexact-output-dir for ANTLR4 and -fo for ANTLR3. ANTLR2 doesn't seem to have an equivalent flag and doesn't seem to have the same behavior for relative grammar file input paths.


Fixes #12.

The file paths that are passed to antlr end up in the generated output
so using absolute paths breaks caching.

Fixes marcohu#12.
@albertocavalcante
Copy link

@rrbutani FYI this has ben partially merged at albertocavalcante#30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deterministic comments in the generated go files
2 participants