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

[parser] Allow @source anywhere #184

Open
mkroetzsch opened this issue Sep 11, 2020 · 0 comments
Open

[parser] Allow @source anywhere #184

mkroetzsch opened this issue Sep 11, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@mkroetzsch
Copy link
Member

Currently an @source declaration does not work after an @import declaration. The resulting parser error is:

Error: Failed to parse Rulewerk file: Encountered " "source" "@source "" at line 7, column 1.
Was expecting one of:
    <EOF> 
    <VARORPREDNAME> ...
    <PNAME_LN> ...
    <IRI_ABSOLUTE> ...
    <CUSTOM_DIRECTIVE> ...

This restriction does not seem reasonable and should be relaxed. In general, while good practice might be to have @source at the beginning of a file, there is no need to force users here. @prefix is a different story and should stay on top though.

@mkroetzsch mkroetzsch added the enhancement New feature or request label Sep 11, 2020
@mkroetzsch mkroetzsch changed the title Parser: allow @source anywhere [parser] Allow @source anywhere Oct 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant