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

Tool path handling on Windows #1087

Closed
egonelbre opened this issue Dec 27, 2015 · 1 comment
Closed

Tool path handling on Windows #1087

egonelbre opened this issue Dec 27, 2015 · 1 comment

Comments

@egonelbre
Copy link

antlr-4.5.1-complete.jar doesn't behave consistently with "/" and "" on Windows.

Initial folder structure:

|   antlr-4.5.1-complete.jar
\---src
    \---main
        \---antlr
                example.g4

Case 1. After java -jar antlr-4.5.1-complete.jar -o src\main\generated src\main\antlr\example.g4:

|   antlr-4.5.1-complete.jar
\---src
    \---main
        +---antlr
        |       example.g4
        \---generated
            \---src
                \---main
                    \---antlr
                            example.tokens
                            exampleBaseListener.java
                            exampleLexer.java
                            exampleLexer.tokens
                            exampleListener.java
                            exampleParser.java

Case 2. After java -jar antlr-4.5.1-complete.jar -o src/main/generated src/main/antlr/example.g4:

|   antlr-4.5.1-complete.jar
\---src
    \---main
        +---antlr
        |       example.g4
        \---generated
                example.tokens
                exampleBaseListener.java
                exampleLexer.java
                exampleLexer.tokens
                exampleListener.java
                exampleParser.java

According to #683 the Case 1. behavior is correct, however in cross-platform scripts you are quite likely to use the path in Case 2.

Ideally both would behave exactly the same way.

@mike-lischke
Copy link
Member

Also this one is likely a duplicate of #638.

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

No branches or pull requests

3 participants