Open rrbutani opened 3 years ago
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.
-Xexact-output-dir
-fo
Fixes #12.
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.