We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
unit
package
At least the old parser does not allow it.
This is my proposal:
diff --git a/drools-drl/drools-drl-parser/src/main/antlr4/org/drools/drl/parser/antlr4/DRLParser.g4 b/drools-drl/drools-drl-parser/src/main/antlr4/org/drools/drl/parser/antlr4/DRLParser.g4 index da397785c1..16f5200354 100644 --- a/drools-drl/drools-drl-parser/src/main/antlr4/org/drools/drl/parser/antlr4/DRLParser.g4 +++ b/drools-drl/drools-drl-parser/src/main/antlr4/org/drools/drl/parser/antlr4/DRLParser.g4 @@ -14,7 +14,7 @@ import DRL6Expressions, JavaParser; * | query * ; */ -compilationUnit : packagedef? unitdef? drlStatementdef* EOF ; +compilationUnit : (packagedef unitdef?)? drlStatementdef* EOF ; drlStatementdef : importdef SEMI?
In other words, package is still optional, and unit is also optional but it requires package.
The text was updated successfully, but these errors were encountered:
good-first-issue
Sorry, something went wrong.
No branches or pull requests
At least the old parser does not allow it.
This is my proposal:
In other words,
package
is still optional, andunit
is also optional but it requirespackage
.The text was updated successfully, but these errors were encountered: