You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by "yurloc (via GitHub)" <gi...@apache.org> on 2024/05/08 13:54:19 UTC

[I] [new-parser] Rule named `default` (without quotes) cannot be parsed [incubator-kie-drools]

yurloc opened a new issue, #5910:
URL: https://github.com/apache/incubator-kie-drools/issues/5910

   ## Parent issue
   - #5678 
   
   ## Failing tests
   - `org.drools.mvel.integrationtests.VarargsTest#testVarargs`
   
   ## Rule code snippet
   ```
   rule default when
   then ...
   ```
   
   ## Error output
   ```
   ### parse : ANTLR4_PARSER_ENABLED = true
   line 22:5 extraneous input 'default' expecting {'unit', 'function', 'global', 'declare', 'trait', 'rule', 'query', 'when', 'then', 'end', 'and', 'or', 'exists', 'not', 'in', 'from', 'collect', 'accumulate', 'acc', 'init', 'action', 'reverse', 'result', 'entry-point', 'eval', 'forall', 'over', 'matches', 'memberOf', 'contains', 'excludes', 'soundslike', 'str', 'after', 'before', 'coincides', 'during', 'includes', 'finishes', 'finishedby', 'meets', 'metby', 'overlaps', 'overlappedby', 'starts', 'startedby', 'window', 'salience', 'enabled', 'no-loop', 'auto-focus', 'lock-on-active', 'refract', 'direct', 'agenda-group', 'activation-group', 'ruleflow-group', 'date-effective', 'date-expires', 'dialect', 'calendars', 'timer', 'duration', DRL_STRING_LITERAL, 'this', 'module', 'open', 'requires', 'exports', 'opens', 'to', 'uses', 'provides', 'with', 'transitive', 'var', 'yield', 'record', 'sealed', 'permits', IDENTIFIER}
   14:42:59.320 [main] ERROR o.d.c.k.b.impl.AbstractKieProject.buildKnowledgePackages:280 - Unable to build KieBaseModel:KieBaseModelName
   [22,5]: extraneous input 'default' expecting {'unit', 'function', 'global', 'declare', 'trait', 'rule', 'query', 'when', 'then', 'end', 'and', 'or', 'exists', 'not', 'in', 'from', 'collect', 'accumulate', 'acc', 'init', 'action', 'reverse', 'result', 'entry-point', 'eval', 'forall', 'over', 'matches', 'memberOf', 'contains', 'excludes', 'soundslike', 'str', 'after', 'before', 'coincides', 'during', 'includes', 'finishes', 'finishedby', 'meets', 'metby', 'overlaps', 'overlappedby', 'starts', 'startedby', 'window', 'salience', 'enabled', 'no-loop', 'auto-focus', 'lock-on-active', 'refract', 'direct', 'agenda-group', 'activation-group', 'ruleflow-group', 'date-effective', 'date-expires', 'dialect', 'calendars', 'timer', 'duration', DRL_STRING_LITERAL, 'this', 'module', 'open', 'requires', 'exports', 'opens', 'to', 'uses', 'provides', 'with', 'transitive', 'var', 'yield', 'record', 'sealed', 'permits', IDENTIFIER}
   [0,0]: Parser returned a null Package
   
   14:42:59.320 [main] ERROR o.d.testcoverage.common.util.KieUtil.getKieBuilderFromKieFileSystem:165 - KieBuilder errors: [Message [id=1, kieBase=KieBaseModelName, level=ERROR, path=varargs2.drl, line=22, column=0
      text=extraneous input 'default' expecting {'unit', 'function', 'global', 'declare', 'trait', 'rule', 'query', 'when', 'then', 'end', 'and', 'or', 'exists', 'not', 'in', 'from', 'collect', 'accumulate', 'acc', 'init', 'action', 'reverse', 'result', 'entry-point', 'eval', 'forall', 'over', 'matches', 'memberOf', 'contains', 'excludes', 'soundslike', 'str', 'after', 'before', 'coincides', 'during', 'includes', 'finishes', 'finishedby', 'meets', 'metby', 'overlaps', 'overlappedby', 'starts', 'startedby', 'window', 'salience', 'enabled', 'no-loop', 'auto-focus', 'lock-on-active', 'refract', 'direct', 'agenda-group', 'activation-group', 'ruleflow-group', 'date-effective', 'date-expires', 'dialect', 'calendars', 'timer', 'duration', DRL_STRING_LITERAL, 'this', 'module', 'open', 'requires', 'exports', 'opens', 'to', 'uses', 'provides', 'with', 'transitive', 'var', 'yield', 'record', 'sealed', 'permits', IDENTIFIER}], Message [id=2, kieBase=KieBaseModelName, level=ERROR, path=varargs2.d
 rl, line=0, column=0
      text=Parser returned a null Package]]
   
   java.lang.AssertionError: [[Message [id=1, kieBase=KieBaseModelName, level=ERROR, path=varargs2.drl, line=22, column=0
      text=extraneous input 'default' expecting {'unit', 'function', 'global', 'declare', 'trait', 'rule', 'query', 'when', 'then', 'end', 'and', 'or', 'exists', 'not', 'in', 'from', 'collect', 'accumulate', 'acc', 'init', 'action', 'reverse', 'result', 'entry-point', 'eval', 'forall', 'over', 'matches', 'memberOf', 'contains', 'excludes', 'soundslike', 'str', 'after', 'before', 'coincides', 'during', 'includes', 'finishes', 'finishedby', 'meets', 'metby', 'overlaps', 'overlappedby', 'starts', 'startedby', 'window', 'salience', 'enabled', 'no-loop', 'auto-focus', 'lock-on-active', 'refract', 'direct', 'agenda-group', 'activation-group', 'ruleflow-group', 'date-effective', 'date-expires', 'dialect', 'calendars', 'timer', 'duration', DRL_STRING_LITERAL, 'this', 'module', 'open', 'requires', 'exports', 'opens', 'to', 'uses', 'provides', 'with', 'transitive', 'var', 'yield', 'record', 'sealed', 'permits', IDENTIFIER}], Message [id=2, kieBase=KieBaseModelName, level=ERROR, path=varargs2.d
 rl, line=0, column=0
      text=Parser returned a null Package]]] 
   Expecting empty but was: [Message [id=1, kieBase=KieBaseModelName, level=ERROR, path=varargs2.drl, line=22, column=0
      text=extraneous input 'default' expecting {'unit', 'function', 'global', 'declare', 'trait', 'rule', 'query', 'when', 'then', 'end', 'and', 'or', 'exists', 'not', 'in', 'from', 'collect', 'accumulate', 'acc', 'init', 'action', 'reverse', 'result', 'entry-point', 'eval', 'forall', 'over', 'matches', 'memberOf', 'contains', 'excludes', 'soundslike', 'str', 'after', 'before', 'coincides', 'during', 'includes', 'finishes', 'finishedby', 'meets', 'metby', 'overlaps', 'overlappedby', 'starts', 'startedby', 'window', 'salience', 'enabled', 'no-loop', 'auto-focus', 'lock-on-active', 'refract', 'direct', 'agenda-group', 'activation-group', 'ruleflow-group', 'date-effective', 'date-expires', 'dialect', 'calendars', 'timer', 'duration', DRL_STRING_LITERAL, 'this', 'module', 'open', 'requires', 'exports', 'opens', 'to', 'uses', 'provides', 'with', 'transitive', 'var', 'yield', 'record', 'sealed', 'permits', IDENTIFIER}],
       Message [id=2, kieBase=KieBaseModelName, level=ERROR, path=varargs2.drl, line=0, column=0
      text=Parser returned a null Package]]
   
   	at org.drools.testcoverage.common.util.KieUtil.getKieBuilderFromKieFileSystem(KieUtil.java:169)
   	at org.drools.testcoverage.common.util.KieUtil.getKieBuilderFromKieFileSystem(KieUtil.java:134)
   	at org.drools.testcoverage.common.util.KieUtil.getKieBuilderFromResources(KieUtil.java:121)
   	at org.drools.testcoverage.common.util.KieUtil.getKieBuilderFromClasspathResources(KieUtil.java:187)
   	at org.drools.testcoverage.common.util.KieBaseUtil.getKieBaseFromClasspathResources(KieBaseUtil.java:57)
   	at org.drools.mvel.integrationtests.VarargsTest.testVarargs(VarargsTest.java:70)
   ```


-- 
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.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: [I] [new-parser] Rule named `default` (without quotes) cannot be parsed [incubator-kie-drools]

Posted by "yurloc (via GitHub)" <gi...@apache.org>.
yurloc closed issue #5910: [new-parser] Rule named `default` (without quotes) cannot be parsed
URL: https://github.com/apache/incubator-kie-drools/issues/5910


-- 
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: [I] [new-parser] Rule named `default` (without quotes) cannot be parsed [incubator-kie-drools]

Posted by "yurloc (via GitHub)" <gi...@apache.org>.
yurloc commented on issue #5910:
URL: https://github.com/apache/incubator-kie-drools/issues/5910#issuecomment-2122039426

   Fixed by #5958.


-- 
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: [I] [new-parser] Rule named `default` (without quotes) cannot be parsed [incubator-kie-drools]

Posted by "tkobayas (via GitHub)" <gi...@apache.org>.
tkobayas commented on issue #5910:
URL: https://github.com/apache/incubator-kie-drools/issues/5910#issuecomment-2117022226

   `/take`


-- 
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