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

Rules are detected as import statements #33

Closed
ferraith opened this issue Jul 25, 2018 · 0 comments
Closed

Rules are detected as import statements #33

ferraith opened this issue Jul 25, 2018 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@ferraith
Copy link
Owner

In rare situations it's possible that setuptools-antlr detects an ANTLR rule as a grammar import statement.
The bug can be reproduced with the following rule:

fImport
    :   'import' (importedNamespace=fImportedFqn 'from' | 'model')
        importURI=STRING
    ;

The root cause is a wrong regular expression to find import statements:
^\s*import\s*(.*)\s*;

@ferraith ferraith added the bug Something isn't working label Jul 25, 2018
@ferraith ferraith added this to the 0.2.2 milestone Jul 25, 2018
@ferraith ferraith self-assigned this Jul 25, 2018
@ferraith ferraith added this to To do in setuptools-antlr via automation Jul 25, 2018
@ferraith ferraith moved this from To do to In progress in setuptools-antlr Jul 25, 2018
ferraith added a commit that referenced this issue Jul 25, 2018
ferraith added a commit that referenced this issue Jul 25, 2018
setuptools-antlr automation moved this from In progress to Done Jul 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

1 participant