Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use relative paths for the grammar input files #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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