Invalid comparison operator (=) causes EmptyStackException in DRLParser/ParserHelper
------------------------------------------------------------------------------------
Key: JBRULES-3002
URL:
https://issues.jboss.org/browse/JBRULES-3002
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-compiler (expert)
Affects Versions: 5.2.0.M2
Reporter: Wolfgang Laun
Assignee: Mark Proctor
class Customer {
int custid; //...
}
rule x
when
$c: Customer( custid = 100 ) // Typo, wanted: "=="
then end
[0,0]: Line 47:0 unexpected exception at input 'rule'. Exception:
java.util.EmptyStackException. Stack trace:
java.util.EmptyStackException
at java.util.Stack.peek(Stack.java:102)
at java.util.Stack.pop(Stack.java:84)
at org.drools.lang.ParserHelper.popParaphrases(ParserHelper.java:409)
at org.drools.lang.ParserHelper.end(ParserHelper.java:723)
at org.drools.lang.DRLParser.rule(DRLParser.java:915)
at org.drools.lang.DRLParser.statement(DRLParser.java:248)
at org.drools.lang.DRLParser.compilationUnit(DRLParser.java:143)
at org.drools.compiler.DrlParser.compile(DrlParser.java:225)
at org.drools.compiler.DrlParser.parse(DrlParser.java:136)
at org.drools.compiler.DrlParser.parse(DrlParser.java:141)
at org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:292)
at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:471)
at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:28)
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira