You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by "tkobayas (via GitHub)" <gi...@apache.org> on 2024/02/08 03:07:46 UTC
[PR] [DROOLS-7591] Experiment branch : migrate a new drools-lsp parser int… [incubator-kie-drools]
tkobayas opened a new pull request, #5677:
URL: https://github.com/apache/incubator-kie-drools/pull/5677
…o drools
- New parser is migrated in `drools-drl/drools-drl-parser` with org.drools.drl10.parser package
- To enable the new parser, run `mvn test -PDRL10`
- At the moment, we get lots of test failures especially in `drools-model/drools-model-codegen` and `drools-test-coverage/test-compiler-integration`
This PR is an experiment to migrate a new DRL parser in a feature branch `dev-new-parser`.
Currently, we get test failures with the new parser enabled `mvn test -PDRL10`.
Especially,
`drools-model/drools-model-codegen`
[ERROR] Tests run: 2433, Failures: 592, Errors: 19, Skipped: 9
`drools-test-coverage/test-compiler-integration`
[ERROR] Tests run: 5396, Failures: 1249, Errors: 269, Skipped: 71
I will split and fix the issues,
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [DROOLS-7591] Experiment branch : migrate a new drools-lsp parser int… [incubator-kie-drools]
Posted by "tkobayas (via GitHub)" <gi...@apache.org>.
tkobayas commented on PR #5677:
URL: https://github.com/apache/incubator-kie-drools/pull/5677#issuecomment-1933321083
Do not forget to set a profile `DRL10`. -> `mvn test -PDRL10`. Otherwise, you would run default `DRL6`. You may activate `DRL10` by default by editing pom.xml.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [DROOLS-7591] Experiment branch : migrate a new drools-lsp parser int… [incubator-kie-drools]
Posted by "tkobayas (via GitHub)" <gi...@apache.org>.
tkobayas commented on code in PR #5677:
URL: https://github.com/apache/incubator-kie-drools/pull/5677#discussion_r1482374949
##########
drools-drl/drools-drl-parser/src/main/java/org/drools/drl10/parser/Drl10ExprParser.java:
##########
@@ -0,0 +1,87 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.drl10.parser;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.antlr.v4.runtime.CharStreams;
+import org.antlr.v4.runtime.CommonTokenStream;
+import org.antlr.v4.runtime.RecognitionException;
+import org.drools.drl.ast.descr.BaseDescr;
+import org.drools.drl.ast.descr.ConstraintConnectiveDescr;
+import org.drools.drl.parser.DrlExprParser;
+import org.drools.drl.parser.DroolsParserException;
+import org.kie.internal.builder.conf.LanguageLevelOption;
+
+/**
+ * This is a helper class that provides helper methods to parse expressions
+ * using both the DRLExpressions parser and the DRLExprTree parser.
+ */
+public class Drl10ExprParser implements DrlExprParser {
Review Comment:
If we accept that the new parser is `DRL10`, then I would rename other classes with `DRL10` prefix.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [DROOLS-7591] Experiment branch : migrate a new drools-lsp parser int… [incubator-kie-drools]
Posted by "tkobayas (via GitHub)" <gi...@apache.org>.
tkobayas commented on code in PR #5677:
URL: https://github.com/apache/incubator-kie-drools/pull/5677#discussion_r1482376042
##########
drools-drl/drools-drl-parser/pom.xml:
##########
@@ -66,7 +66,32 @@
<groupId>org.antlr</groupId>
<artifactId>antlr-runtime</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.antlr</groupId>
+ <artifactId>antlr4-runtime</artifactId>
+ </dependency>
Review Comment:
At first, I tried to create a separated module `drools-drl10-parser`, but it resulted in circular dependency with `drools-drl-parser`, so I ended up with migrating the new parser into `drools-drl-parser`. I used a new package `org.drools.drl10.parser` for a better separation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [DROOLS-7591] Experiment branch : migrate a new drools-lsp parser int… [incubator-kie-drools]
Posted by "tkobayas (via GitHub)" <gi...@apache.org>.
tkobayas commented on PR #5677:
URL: https://github.com/apache/incubator-kie-drools/pull/5677#issuecomment-1935378980
I know that `DrlParser`, `DRLFactory` integration with the new parser is not enough in this PR. We can incrementally improve using unit tests.
For example) https://github.com/apache/incubator-kie-drools/issues/5681
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [DROOLS-7591] Experiment branch : migrate a new drools-lsp parser int… [incubator-kie-drools]
Posted by "tkobayas (via GitHub)" <gi...@apache.org>.
tkobayas commented on code in PR #5677:
URL: https://github.com/apache/incubator-kie-drools/pull/5677#discussion_r1482381776
##########
drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/DrlParser.java:
##########
@@ -164,10 +166,35 @@ public PackageDescr parse(final boolean isEditor,
final InputStream is) throws DroolsParserException, IOException {
this.resource = resource;
String encoding = resource instanceof InternalResource ? ((InternalResource) resource).getEncoding() : null;
-
- lexer = DRLFactory.buildLexer(is, encoding, languageLevel);
- DRLParser parser = DRLFactory.buildParser(lexer, languageLevel);
- return compile(isEditor, parser);
+ System.out.println("### parse : languageLevel = " + languageLevel);
Review Comment:
While running unit tests, you would see STDOUT everytime
```
### parse : languageLevel = DRL10
```
I print this just to be sure that I'm running DRL10, but if you think it's verbose, feel free to remove on your side.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [DROOLS-7591] Experiment branch : migrate a new drools-lsp parser int… [incubator-kie-drools]
Posted by "tkobayas (via GitHub)" <gi...@apache.org>.
tkobayas commented on code in PR #5677:
URL: https://github.com/apache/incubator-kie-drools/pull/5677#discussion_r1484059428
##########
kie-internal/src/main/java/org/kie/internal/builder/conf/LanguageLevelOption.java:
##########
@@ -25,7 +25,7 @@
*/
public enum LanguageLevelOption implements SingleValueRuleBuilderOption {
- DRL5(false), DRL6(false), DRL6_STRICT(true);
+ DRL5(false), DRL6(false), DRL6_STRICT(true), DRL10(false);
Review Comment:
> Implementation details should not proliferate to the public API.
@yurloc Totally agreed. I just couldn't come up with other Option to switch this implementation. Any idea? (of course, we can change it after merging this PR)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [DROOLS-7591] Experiment branch : migrate a new drools-lsp parser int… [incubator-kie-drools]
Posted by "tkobayas (via GitHub)" <gi...@apache.org>.
tkobayas commented on code in PR #5677:
URL: https://github.com/apache/incubator-kie-drools/pull/5677#discussion_r1484061363
##########
drools-drl/drools-drl-parser/src/main/java/org/drools/drl10/parser/Drl10ExprParser.java:
##########
@@ -0,0 +1,87 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.drl10.parser;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.antlr.v4.runtime.CharStreams;
+import org.antlr.v4.runtime.CommonTokenStream;
+import org.antlr.v4.runtime.RecognitionException;
+import org.drools.drl.ast.descr.BaseDescr;
+import org.drools.drl.ast.descr.ConstraintConnectiveDescr;
+import org.drools.drl.parser.DrlExprParser;
+import org.drools.drl.parser.DroolsParserException;
+import org.kie.internal.builder.conf.LanguageLevelOption;
+
+/**
+ * This is a helper class that provides helper methods to parse expressions
+ * using both the DRLExpressions parser and the DRLExprTree parser.
+ */
+public class Drl10ExprParser implements DrlExprParser {
Review Comment:
> Ideally, if could drop DRL5 and DRL6_STRICT as part of the final step
True, but it may take some time to drop the old implementation (antlr3 based)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [DROOLS-7591] Experiment branch : migrate a new drools-lsp parser int… [incubator-kie-drools]
Posted by "tkobayas (via GitHub)" <gi...@apache.org>.
tkobayas commented on code in PR #5677:
URL: https://github.com/apache/incubator-kie-drools/pull/5677#discussion_r1484079068
##########
kie-internal/src/main/java/org/kie/internal/builder/conf/LanguageLevelOption.java:
##########
@@ -25,7 +25,7 @@
*/
public enum LanguageLevelOption implements SingleValueRuleBuilderOption {
- DRL5(false), DRL6(false), DRL6_STRICT(true);
+ DRL5(false), DRL6(false), DRL6_STRICT(true), DRL10(false);
Review Comment:
Even system property like `drools.new.parser.enabled` = true, may work.
Then a consideration would be a "name" which we will use for class name or package name while we keep the existing classes like `DRL6Parser`. `NewDRL6Parser`? :D
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [DROOLS-7591] Experiment branch : migrate a new drools-lsp parser int… [incubator-kie-drools]
Posted by "tkobayas (via GitHub)" <gi...@apache.org>.
tkobayas commented on code in PR #5677:
URL: https://github.com/apache/incubator-kie-drools/pull/5677#discussion_r1482374949
##########
drools-drl/drools-drl-parser/src/main/java/org/drools/drl10/parser/Drl10ExprParser.java:
##########
@@ -0,0 +1,87 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.drl10.parser;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.antlr.v4.runtime.CharStreams;
+import org.antlr.v4.runtime.CommonTokenStream;
+import org.antlr.v4.runtime.RecognitionException;
+import org.drools.drl.ast.descr.BaseDescr;
+import org.drools.drl.ast.descr.ConstraintConnectiveDescr;
+import org.drools.drl.parser.DrlExprParser;
+import org.drools.drl.parser.DroolsParserException;
+import org.kie.internal.builder.conf.LanguageLevelOption;
+
+/**
+ * This is a helper class that provides helper methods to parse expressions
+ * using both the DRLExpressions parser and the DRLExprTree parser.
+ */
+public class Drl10ExprParser implements DrlExprParser {
Review Comment:
If we accept that the new parser is called `DRL10`, then I would rename other classes with `DRL10` prefix.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [DROOLS-7591] Experiment branch : migrate a new drools-lsp parser int… [incubator-kie-drools]
Posted by "tkobayas (via GitHub)" <gi...@apache.org>.
tkobayas commented on code in PR #5677:
URL: https://github.com/apache/incubator-kie-drools/pull/5677#discussion_r1482381776
##########
drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/DrlParser.java:
##########
@@ -164,10 +166,35 @@ public PackageDescr parse(final boolean isEditor,
final InputStream is) throws DroolsParserException, IOException {
this.resource = resource;
String encoding = resource instanceof InternalResource ? ((InternalResource) resource).getEncoding() : null;
-
- lexer = DRLFactory.buildLexer(is, encoding, languageLevel);
- DRLParser parser = DRLFactory.buildParser(lexer, languageLevel);
- return compile(isEditor, parser);
+ System.out.println("### parse : languageLevel = " + languageLevel);
Review Comment:
While running unit tests, you would see STDOUT
```
### parse : languageLevel = DRL10
```
I print this just to be sure that I'm running DRL10, but if you think it's verbose, feel free to remove on your side.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [DROOLS-7591] Experiment branch : migrate a new drools-lsp parser int… [incubator-kie-drools]
Posted by "mariofusco (via GitHub)" <gi...@apache.org>.
mariofusco closed pull request #5677: [DROOLS-7591] Experiment branch : migrate a new drools-lsp parser int…
URL: https://github.com/apache/incubator-kie-drools/pull/5677
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [DROOLS-7591] Experiment branch : migrate a new drools-lsp parser int… [incubator-kie-drools]
Posted by "yurloc (via GitHub)" <gi...@apache.org>.
yurloc commented on code in PR #5677:
URL: https://github.com/apache/incubator-kie-drools/pull/5677#discussion_r1484050035
##########
drools-drl/drools-drl-parser/src/main/java/org/drools/drl10/parser/Drl10ExprParser.java:
##########
@@ -0,0 +1,87 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.drools.drl10.parser;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.antlr.v4.runtime.CharStreams;
+import org.antlr.v4.runtime.CommonTokenStream;
+import org.antlr.v4.runtime.RecognitionException;
+import org.drools.drl.ast.descr.BaseDescr;
+import org.drools.drl.ast.descr.ConstraintConnectiveDescr;
+import org.drools.drl.parser.DrlExprParser;
+import org.drools.drl.parser.DroolsParserException;
+import org.kie.internal.builder.conf.LanguageLevelOption;
+
+/**
+ * This is a helper class that provides helper methods to parse expressions
+ * using both the DRLExpressions parser and the DRLExprTree parser.
+ */
+public class Drl10ExprParser implements DrlExprParser {
Review Comment:
Temporarily, definitely yes. Ideally, if could drop DRL5 and DRL6_STRICT as part of the final step, this should become something like `Drl6ExpressionParser`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [DROOLS-7591] Experiment branch : migrate a new drools-lsp parser int… [incubator-kie-drools]
Posted by "yurloc (via GitHub)" <gi...@apache.org>.
yurloc commented on code in PR #5677:
URL: https://github.com/apache/incubator-kie-drools/pull/5677#discussion_r1484046003
##########
kie-internal/src/main/java/org/kie/internal/builder/conf/LanguageLevelOption.java:
##########
@@ -25,7 +25,7 @@
*/
public enum LanguageLevelOption implements SingleValueRuleBuilderOption {
- DRL5(false), DRL6(false), DRL6_STRICT(true);
+ DRL5(false), DRL6(false), DRL6_STRICT(true), DRL10(false);
Review Comment:
Temporarily, yes. But it should be removed in the final step in my opinion.
1. The language level stays the same. We're just changing an implementation detail that deals with how the source code in DRL6 language is being parsed.
2. Is the language level option a public API? If yes, it's one more reason not to introduce DRL10. Implementation details should not proliferate to the public API.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [DROOLS-7591] Experiment branch : migrate a new drools-lsp parser int… [incubator-kie-drools]
Posted by "tkobayas (via GitHub)" <gi...@apache.org>.
tkobayas commented on PR #5677:
URL: https://github.com/apache/incubator-kie-drools/pull/5677#issuecomment-1935586412
Replaced by https://github.com/apache/incubator-kie-drools/pull/5682 to preserve commit history in drools-lsp.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [DROOLS-7591] Experiment branch : migrate a new drools-lsp parser int… [incubator-kie-drools]
Posted by "tkobayas (via GitHub)" <gi...@apache.org>.
tkobayas commented on code in PR #5677:
URL: https://github.com/apache/incubator-kie-drools/pull/5677#discussion_r1482373903
##########
kie-internal/src/main/java/org/kie/internal/builder/conf/LanguageLevelOption.java:
##########
@@ -25,7 +25,7 @@
*/
public enum LanguageLevelOption implements SingleValueRuleBuilderOption {
- DRL5(false), DRL6(false), DRL6_STRICT(true);
+ DRL5(false), DRL6(false), DRL6_STRICT(true), DRL10(false);
Review Comment:
@mariofusco @yurloc Do you think it's fine to call the new parser `DRL10`? This doesn't introduce a new syntax, but we need a clear separation. So I use `LanguageLevelOption`. Feel free to share your thoughts.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [DROOLS-7591] Experiment branch : migrate a new drools-lsp parser int… [incubator-kie-drools]
Posted by "mariofusco (via GitHub)" <gi...@apache.org>.
mariofusco commented on PR #5677:
URL: https://github.com/apache/incubator-kie-drools/pull/5677#issuecomment-1935603465
Replaced by https://github.com/apache/incubator-kie-drools/pull/5682
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [DROOLS-7591] Experiment branch : migrate a new drools-lsp parser int… [incubator-kie-drools]
Posted by "tkobayas (via GitHub)" <gi...@apache.org>.
tkobayas commented on code in PR #5677:
URL: https://github.com/apache/incubator-kie-drools/pull/5677#discussion_r1482378183
##########
drools-drl/drools-drl-parser-tests/pom.xml:
##########
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.drools</groupId>
+ <artifactId>drools-drl</artifactId>
+ <version>999-SNAPSHOT</version>
+ </parent>
+
+ <groupId>org.drools</groupId>
+ <artifactId>drools-drl-parser-tests</artifactId>
Review Comment:
I created a separate module for `drools-drl-parser-tests`. Having tests inside `drools-drl-parser` is also okay from maven point of view, but Intellij IDEA complained about the circular dependency with `drools-compiler` and `drools-mvel`. Anyway, these tests were originally copied from `drools-test-coverage/test-compiler-integration`, so finally, we would be able to remove this module. If we can distill pure parser tests, we would move them to `drools-drl-parser` test.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [DROOLS-7591] Experiment branch : migrate a new drools-lsp parser int… [incubator-kie-drools]
Posted by "tkobayas (via GitHub)" <gi...@apache.org>.
tkobayas commented on code in PR #5677:
URL: https://github.com/apache/incubator-kie-drools/pull/5677#discussion_r1482378183
##########
drools-drl/drools-drl-parser-tests/pom.xml:
##########
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.drools</groupId>
+ <artifactId>drools-drl</artifactId>
+ <version>999-SNAPSHOT</version>
+ </parent>
+
+ <groupId>org.drools</groupId>
+ <artifactId>drools-drl-parser-tests</artifactId>
Review Comment:
I created a separate module for `drools-drl-parser-tests`. Having tests inside `drools-drl-parser` is also okay from Maven point of view, but Intellij IDEA complained about the circular dependency with `drools-compiler` and `drools-mvel`. Anyway, these tests were originally copied from `drools-test-coverage/test-compiler-integration`, so finally, we would be able to remove this module. If we can distill pure parser tests, we would move them to `drools-drl-parser` test.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [DROOLS-7591] Experiment branch : migrate a new drools-lsp parser int… [incubator-kie-drools]
Posted by "tkobayas (via GitHub)" <gi...@apache.org>.
tkobayas commented on code in PR #5677:
URL: https://github.com/apache/incubator-kie-drools/pull/5677#discussion_r1482376042
##########
drools-drl/drools-drl-parser/pom.xml:
##########
@@ -66,7 +66,32 @@
<groupId>org.antlr</groupId>
<artifactId>antlr-runtime</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.antlr</groupId>
+ <artifactId>antlr4-runtime</artifactId>
+ </dependency>
Review Comment:
At first, I tried to create a separated module `drools-drl10-parser` for the new parser, but it resulted in circular dependency with `drools-drl-parser`, so I ended up with migrating the new parser into `drools-drl-parser`. I used a new package `org.drools.drl10.parser` for a better separation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org