[jboss-svn-commits] JBL Code SVN: r8874 - in labs/jbossrules/trunk: drools-compiler/src/main/java/org/drools/lang/descr and 18 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Tue Jan 16 15:16:13 EST 2007
Author: tirelli
Date: 2007-01-16 15:15:09 -0500 (Tue, 16 Jan 2007)
New Revision: 8874
Added:
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/descr/ForallDescr.java
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/semantics/java/builder/ForallBuilder.java
labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_DeclarationUsage.drl
labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_Forall.drl
labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_UnbalancedTrees.drl
labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/lang/forall.drl
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/builder/ForallBuilder.java
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/rule/Forall.java
Modified:
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/DRLLexer.java
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/DRLParser.java
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/descr/DescrFactory.java
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/semantics/java/RuleBuilder.java
labs/jbossrules/trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g
labs/jbossrules/trunk/drools-compiler/src/main/resources/org/drools/semantics/java/javaInvokers.stg
labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/compiler/PackageBuilderTest.java
labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/IntegrationCases.java
labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/RuleParserTest.java
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/base/DefaultKnowledgeHelper.java
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/common/AgendaItem.java
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/common/ScheduledAgendaItem.java
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/QueryTerminalNode.java
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/ReteooBuilder.java
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/RuleTerminalNode.java
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/builder/BuildUtils.java
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/builder/ColumnBuilder.java
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/builder/ReteooRuleBuilder.java
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/rule/Column.java
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/rule/ConditionalElement.java
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/rule/LogicTransformer.java
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/rule/Rule.java
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/rule/RuleConditionElement.java
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/spi/Activation.java
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/spi/KnowledgeHelper.java
labs/jbossrules/trunk/drools-core/src/test/java/org/drools/reteoo/AgendaTest.java
labs/jbossrules/trunk/drools-core/src/test/java/org/drools/reteoo/LogicalAssertionTest.java
labs/jbossrules/trunk/drools-core/src/test/java/org/drools/reteoo/QueryTerminalNodeTest.java
labs/jbossrules/trunk/drools-core/src/test/java/org/drools/reteoo/SchedulerTest.java
labs/jbossrules/trunk/drools-core/src/test/java/org/drools/rule/LogicTransformerTest.java
labs/jbossrules/trunk/drools-core/src/test/resources/correct_processTree1.dat
labs/jbossrules/trunk/drools-core/src/test/resources/correct_transform1.dat
Log:
JBRULES-218:
* forall conditional element added
* support to unbalanced logical branches added
* test cases added
Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/DRLLexer.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/DRLLexer.java 2007-01-16 17:19:41 UTC (rev 8873)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/DRLLexer.java 2007-01-16 20:15:09 UTC (rev 8874)
@@ -1,8 +1,8 @@
-// $ANTLR 3.0b5 /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g 2007-01-11 21:47:59
+// $ANTLR 3.0b5 D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g 2007-01-15 18:11:00
+
+ package org.drools.lang;
- package org.drools.lang;
-
import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
@@ -34,6 +34,7 @@
public static final int LEFT_SQUARE=15;
public static final int SH_STYLE_SINGLE_LINE_COMMENT=25;
public static final int T46=46;
+ public static final int T77=77;
public static final int T38=38;
public static final int T41=41;
public static final int LEFT_CURLY=13;
@@ -73,7 +74,7 @@
public static final int T67=67;
public static final int T47=47;
public static final int EOL=19;
- public static final int Tokens=77;
+ public static final int Tokens=78;
public static final int T53=53;
public static final int T60=60;
public static final int T31=31;
@@ -88,9 +89,9 @@
public DRLLexer() {;}
public DRLLexer(CharStream input) {
super(input);
- ruleMemo = new HashMap[75+1];
+ ruleMemo = new HashMap[76+1];
}
- public String getGrammarFileName() { return "/home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g"; }
+ public String getGrammarFileName() { return "D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g"; }
// $ANTLR start T29
public void mT29() throws RecognitionException {
@@ -101,8 +102,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:6:7: ( ';' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:6:7: ';'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:6:7: ( ';' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:6:7: ';'
{
match(';'); if (failed) return ;
@@ -132,8 +133,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:7:7: ( 'package' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:7:7: 'package'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:7:7: ( 'package' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:7:7: 'package'
{
match("package"); if (failed) return ;
@@ -164,8 +165,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:8:7: ( 'import' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:8:7: 'import'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:8:7: ( 'import' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:8:7: 'import'
{
match("import"); if (failed) return ;
@@ -196,8 +197,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:9:7: ( 'function' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:9:7: 'function'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:9:7: ( 'function' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:9:7: 'function'
{
match("function"); if (failed) return ;
@@ -228,8 +229,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:10:7: ( '.' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:10:7: '.'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:10:7: ( '.' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:10:7: '.'
{
match('.'); if (failed) return ;
@@ -259,8 +260,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:11:7: ( '.*' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:11:7: '.*'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:11:7: ( '.*' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:11:7: '.*'
{
match(".*"); if (failed) return ;
@@ -291,8 +292,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:12:7: ( 'global' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:12:7: 'global'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:12:7: ( 'global' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:12:7: 'global'
{
match("global"); if (failed) return ;
@@ -323,8 +324,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:13:7: ( ',' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:13:7: ','
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:13:7: ( ',' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:13:7: ','
{
match(','); if (failed) return ;
@@ -354,8 +355,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:14:7: ( 'query' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:14:7: 'query'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:14:7: ( 'query' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:14:7: 'query'
{
match("query"); if (failed) return ;
@@ -386,8 +387,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:15:7: ( 'template' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:15:7: 'template'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:15:7: ( 'template' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:15:7: 'template'
{
match("template"); if (failed) return ;
@@ -418,8 +419,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:16:7: ( ':' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:16:7: ':'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:16:7: ( ':' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:16:7: ':'
{
match(':'); if (failed) return ;
@@ -449,8 +450,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:17:7: ( 'attributes' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:17:7: 'attributes'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:17:7: ( 'attributes' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:17:7: 'attributes'
{
match("attributes"); if (failed) return ;
@@ -481,8 +482,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:18:7: ( 'date-effective' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:18:7: 'date-effective'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:18:7: ( 'date-effective' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:18:7: 'date-effective'
{
match("date-effective"); if (failed) return ;
@@ -513,8 +514,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:19:7: ( 'date-expires' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:19:7: 'date-expires'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:19:7: ( 'date-expires' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:19:7: 'date-expires'
{
match("date-expires"); if (failed) return ;
@@ -545,8 +546,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:20:7: ( 'enabled' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:20:7: 'enabled'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:20:7: ( 'enabled' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:20:7: 'enabled'
{
match("enabled"); if (failed) return ;
@@ -577,8 +578,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:21:7: ( 'salience' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:21:7: 'salience'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:21:7: ( 'salience' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:21:7: 'salience'
{
match("salience"); if (failed) return ;
@@ -609,8 +610,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:22:7: ( 'no-loop' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:22:7: 'no-loop'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:22:7: ( 'no-loop' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:22:7: 'no-loop'
{
match("no-loop"); if (failed) return ;
@@ -641,8 +642,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:23:7: ( 'auto-focus' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:23:7: 'auto-focus'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:23:7: ( 'auto-focus' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:23:7: 'auto-focus'
{
match("auto-focus"); if (failed) return ;
@@ -673,8 +674,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:24:7: ( 'activation-group' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:24:7: 'activation-group'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:24:7: ( 'activation-group' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:24:7: 'activation-group'
{
match("activation-group"); if (failed) return ;
@@ -705,8 +706,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:25:7: ( 'agenda-group' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:25:7: 'agenda-group'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:25:7: ( 'agenda-group' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:25:7: 'agenda-group'
{
match("agenda-group"); if (failed) return ;
@@ -737,8 +738,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:26:7: ( 'duration' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:26:7: 'duration'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:26:7: ( 'duration' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:26:7: 'duration'
{
match("duration"); if (failed) return ;
@@ -769,8 +770,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:27:7: ( 'from' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:27:7: 'from'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:27:7: ( 'from' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:27:7: 'from'
{
match("from"); if (failed) return ;
@@ -801,8 +802,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:28:7: ( 'accumulate' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:28:7: 'accumulate'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:28:7: ( 'accumulate' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:28:7: 'accumulate'
{
match("accumulate"); if (failed) return ;
@@ -833,8 +834,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:29:7: ( 'init' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:29:7: 'init'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:29:7: ( 'init' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:29:7: 'init'
{
match("init"); if (failed) return ;
@@ -865,8 +866,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:30:7: ( 'action' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:30:7: 'action'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:30:7: ( 'action' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:30:7: 'action'
{
match("action"); if (failed) return ;
@@ -897,8 +898,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:31:7: ( 'result' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:31:7: 'result'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:31:7: ( 'result' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:31:7: 'result'
{
match("result"); if (failed) return ;
@@ -929,8 +930,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:32:7: ( 'collect' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:32:7: 'collect'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:32:7: ( 'collect' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:32:7: 'collect'
{
match("collect"); if (failed) return ;
@@ -961,8 +962,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:33:7: ( 'or' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:33:7: 'or'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:33:7: ( 'or' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:33:7: 'or'
{
match("or"); if (failed) return ;
@@ -993,8 +994,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:34:7: ( '||' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:34:7: '||'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:34:7: ( '||' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:34:7: '||'
{
match("||"); if (failed) return ;
@@ -1025,8 +1026,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:35:7: ( '&' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:35:7: '&'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:35:7: ( '&' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:35:7: '&'
{
match('&'); if (failed) return ;
@@ -1056,8 +1057,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:36:7: ( '|' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:36:7: '|'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:36:7: ( '|' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:36:7: '|'
{
match('|'); if (failed) return ;
@@ -1087,8 +1088,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:37:7: ( '==' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:37:7: '=='
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:37:7: ( '==' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:37:7: '=='
{
match("=="); if (failed) return ;
@@ -1119,8 +1120,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:38:7: ( '>' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:38:7: '>'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:38:7: ( '>' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:38:7: '>'
{
match('>'); if (failed) return ;
@@ -1150,8 +1151,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:39:7: ( '>=' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:39:7: '>='
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:39:7: ( '>=' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:39:7: '>='
{
match(">="); if (failed) return ;
@@ -1182,8 +1183,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:40:7: ( '<' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:40:7: '<'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:40:7: ( '<' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:40:7: '<'
{
match('<'); if (failed) return ;
@@ -1213,8 +1214,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:41:7: ( '<=' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:41:7: '<='
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:41:7: ( '<=' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:41:7: '<='
{
match("<="); if (failed) return ;
@@ -1245,8 +1246,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:42:7: ( '!=' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:42:7: '!='
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:42:7: ( '!=' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:42:7: '!='
{
match("!="); if (failed) return ;
@@ -1277,8 +1278,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:43:7: ( 'contains' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:43:7: 'contains'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:43:7: ( 'contains' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:43:7: 'contains'
{
match("contains"); if (failed) return ;
@@ -1309,8 +1310,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:44:7: ( 'matches' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:44:7: 'matches'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:44:7: ( 'matches' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:44:7: 'matches'
{
match("matches"); if (failed) return ;
@@ -1341,8 +1342,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:45:7: ( 'excludes' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:45:7: 'excludes'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:45:7: ( 'excludes' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:45:7: 'excludes'
{
match("excludes"); if (failed) return ;
@@ -1373,8 +1374,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:46:7: ( 'null' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:46:7: 'null'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:46:7: ( 'null' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:46:7: 'null'
{
match("null"); if (failed) return ;
@@ -1405,8 +1406,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:47:7: ( '->' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:47:7: '->'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:47:7: ( '->' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:47:7: '->'
{
match("->"); if (failed) return ;
@@ -1437,8 +1438,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:48:7: ( 'and' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:48:7: 'and'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:48:7: ( 'and' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:48:7: 'and'
{
match("and"); if (failed) return ;
@@ -1469,8 +1470,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:49:7: ( '&&' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:49:7: '&&'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:49:7: ( '&&' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:49:7: '&&'
{
match("&&"); if (failed) return ;
@@ -1501,8 +1502,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:50:7: ( 'exists' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:50:7: 'exists'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:50:7: ( 'exists' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:50:7: 'exists'
{
match("exists"); if (failed) return ;
@@ -1533,8 +1534,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:51:7: ( 'not' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:51:7: 'not'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:51:7: ( 'not' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:51:7: 'not'
{
match("not"); if (failed) return ;
@@ -1565,8 +1566,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:52:7: ( 'eval' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:52:7: 'eval'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:52:7: ( 'eval' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:52:7: 'eval'
{
match("eval"); if (failed) return ;
@@ -1597,10 +1598,10 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:53:7: ( 'use' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:53:7: 'use'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:53:7: ( 'forall' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:53:7: 'forall'
{
- match("use"); if (failed) return ;
+ match("forall"); if (failed) return ;
}
@@ -1620,6 +1621,38 @@
}
// $ANTLR end T76
+ // $ANTLR start T77
+ public void mT77() throws RecognitionException {
+ try {
+ ruleNestingLevel++;
+ int _type = T77;
+ int _start = getCharIndex();
+ int _line = getLine();
+ int _charPosition = getCharPositionInLine();
+ int _channel = Token.DEFAULT_CHANNEL;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:54:7: ( 'use' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:54:7: 'use'
+ {
+ match("use"); if (failed) return ;
+
+
+ }
+
+
+ if ( backtracking==0 ) {
+
+ if ( token==null && ruleNestingLevel==1 ) {
+ emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+ }
+
+
+ } }
+ finally {
+ ruleNestingLevel--;
+ }
+ }
+ // $ANTLR end T77
+
// $ANTLR start WS
public void mWS() throws RecognitionException {
try {
@@ -1629,10 +1662,10 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1412:17: ( ( ' ' | '\\t' | '\\f' | EOL ) )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1412:17: ( ' ' | '\\t' | '\\f' | EOL )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1432:17: ( ( ' ' | '\\t' | '\\f' | EOL ) )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1432:17: ( ' ' | '\\t' | '\\f' | EOL )
{
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1412:17: ( ' ' | '\\t' | '\\f' | EOL )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1432:17: ( ' ' | '\\t' | '\\f' | EOL )
int alt1=4;
switch ( input.LA(1) ) {
case ' ':
@@ -1651,35 +1684,35 @@
default:
if (backtracking>0) {failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("1412:17: ( ' ' | '\\t' | '\\f' | EOL )", 1, 0, input);
+ new NoViableAltException("1432:17: ( ' ' | '\\t' | '\\f' | EOL )", 1, 0, input);
throw nvae;
}
switch (alt1) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1412:19: ' '
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1432:19: ' '
{
match(' '); if (failed) return ;
}
break;
case 2 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1413:19: '\\t'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1433:19: '\\t'
{
match('\t'); if (failed) return ;
}
break;
case 3 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1414:19: '\\f'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1434:19: '\\f'
{
match('\f'); if (failed) return ;
}
break;
case 4 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1415:19: EOL
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1435:19: EOL
{
mEOL(); if (failed) return ;
@@ -1713,10 +1746,10 @@
public void mEOL() throws RecognitionException {
try {
ruleNestingLevel++;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1422:6: ( ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' ) )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1422:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1442:6: ( ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' ) )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1442:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
{
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1422:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1442:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
int alt2=3;
int LA2_0 = input.LA(1);
if ( (LA2_0=='\r') ) {
@@ -1733,13 +1766,13 @@
else {
if (backtracking>0) {failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("1422:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )", 2, 0, input);
+ new NoViableAltException("1442:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )", 2, 0, input);
throw nvae;
}
switch (alt2) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1422:14: ( '\\r\\n' )=> '\\r\\n'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1442:14: ( '\\r\\n' )=> '\\r\\n'
{
match("\r\n"); if (failed) return ;
@@ -1747,14 +1780,14 @@
}
break;
case 2 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1423:25: '\\r'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1443:25: '\\r'
{
match('\r'); if (failed) return ;
}
break;
case 3 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1424:25: '\\n'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1444:25: '\\n'
{
match('\n'); if (failed) return ;
@@ -1782,10 +1815,10 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1429:4: ( ( '-' )? ( '0' .. '9' )+ )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1429:4: ( '-' )? ( '0' .. '9' )+
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1449:4: ( ( '-' )? ( '0' .. '9' )+ )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1449:4: ( '-' )? ( '0' .. '9' )+
{
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1429:4: ( '-' )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1449:4: ( '-' )?
int alt3=2;
int LA3_0 = input.LA(1);
if ( (LA3_0=='-') ) {
@@ -1793,7 +1826,7 @@
}
switch (alt3) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1429:5: '-'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1449:5: '-'
{
match('-'); if (failed) return ;
@@ -1802,7 +1835,7 @@
}
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1429:10: ( '0' .. '9' )+
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1449:10: ( '0' .. '9' )+
int cnt4=0;
loop4:
do {
@@ -1815,7 +1848,7 @@
switch (alt4) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1429:11: '0' .. '9'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1449:11: '0' .. '9'
{
matchRange('0','9'); if (failed) return ;
@@ -1859,10 +1892,10 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1433:4: ( ( '-' )? ( '0' .. '9' )+ '.' ( '0' .. '9' )+ )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1433:4: ( '-' )? ( '0' .. '9' )+ '.' ( '0' .. '9' )+
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1453:4: ( ( '-' )? ( '0' .. '9' )+ '.' ( '0' .. '9' )+ )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1453:4: ( '-' )? ( '0' .. '9' )+ '.' ( '0' .. '9' )+
{
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1433:4: ( '-' )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1453:4: ( '-' )?
int alt5=2;
int LA5_0 = input.LA(1);
if ( (LA5_0=='-') ) {
@@ -1870,7 +1903,7 @@
}
switch (alt5) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1433:5: '-'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1453:5: '-'
{
match('-'); if (failed) return ;
@@ -1879,7 +1912,7 @@
}
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1433:10: ( '0' .. '9' )+
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1453:10: ( '0' .. '9' )+
int cnt6=0;
loop6:
do {
@@ -1892,7 +1925,7 @@
switch (alt6) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1433:11: '0' .. '9'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1453:11: '0' .. '9'
{
matchRange('0','9'); if (failed) return ;
@@ -1910,7 +1943,7 @@
} while (true);
match('.'); if (failed) return ;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1433:26: ( '0' .. '9' )+
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1453:26: ( '0' .. '9' )+
int cnt7=0;
loop7:
do {
@@ -1923,7 +1956,7 @@
switch (alt7) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1433:27: '0' .. '9'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1453:27: '0' .. '9'
{
matchRange('0','9'); if (failed) return ;
@@ -1967,7 +2000,7 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1437:8: ( ( '\"' ( EscapeSequence | ~ ('\\\\'|'\"'))* '\"' ) | ( '\\'' ( EscapeSequence | ~ ('\\\\'|'\\''))* '\\'' ) )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1457:8: ( ( '\"' ( EscapeSequence | ~ ('\\\\'|'\"'))* '\"' ) | ( '\\'' ( EscapeSequence | ~ ('\\\\'|'\\''))* '\\'' ) )
int alt10=2;
int LA10_0 = input.LA(1);
if ( (LA10_0=='\"') ) {
@@ -1979,19 +2012,19 @@
else {
if (backtracking>0) {failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("1436:1: STRING : ( ( '\"' ( EscapeSequence | ~ ('\\\\'|'\"'))* '\"' ) | ( '\\'' ( EscapeSequence | ~ ('\\\\'|'\\''))* '\\'' ) );", 10, 0, input);
+ new NoViableAltException("1456:1: STRING : ( ( '\"' ( EscapeSequence | ~ ('\\\\'|'\"'))* '\"' ) | ( '\\'' ( EscapeSequence | ~ ('\\\\'|'\\''))* '\\'' ) );", 10, 0, input);
throw nvae;
}
switch (alt10) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1437:8: ( '\"' ( EscapeSequence | ~ ('\\\\'|'\"'))* '\"' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1457:8: ( '\"' ( EscapeSequence | ~ ('\\\\'|'\"'))* '\"' )
{
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1437:8: ( '\"' ( EscapeSequence | ~ ('\\\\'|'\"'))* '\"' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1437:9: '\"' ( EscapeSequence | ~ ('\\\\'|'\"'))* '\"'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1457:8: ( '\"' ( EscapeSequence | ~ ('\\\\'|'\"'))* '\"' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1457:9: '\"' ( EscapeSequence | ~ ('\\\\'|'\"'))* '\"'
{
match('\"'); if (failed) return ;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1437:13: ( EscapeSequence | ~ ('\\\\'|'\"'))*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1457:13: ( EscapeSequence | ~ ('\\\\'|'\"'))*
loop8:
do {
int alt8=3;
@@ -2006,14 +2039,14 @@
switch (alt8) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1437:15: EscapeSequence
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1457:15: EscapeSequence
{
mEscapeSequence(); if (failed) return ;
}
break;
case 2 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1437:32: ~ ('\\\\'|'\"')
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1457:32: ~ ('\\\\'|'\"')
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFE') ) {
input.consume();
@@ -2043,13 +2076,13 @@
}
break;
case 2 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1438:8: ( '\\'' ( EscapeSequence | ~ ('\\\\'|'\\''))* '\\'' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1458:8: ( '\\'' ( EscapeSequence | ~ ('\\\\'|'\\''))* '\\'' )
{
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1438:8: ( '\\'' ( EscapeSequence | ~ ('\\\\'|'\\''))* '\\'' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1438:9: '\\'' ( EscapeSequence | ~ ('\\\\'|'\\''))* '\\''
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1458:8: ( '\\'' ( EscapeSequence | ~ ('\\\\'|'\\''))* '\\'' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1458:9: '\\'' ( EscapeSequence | ~ ('\\\\'|'\\''))* '\\''
{
match('\''); if (failed) return ;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1438:14: ( EscapeSequence | ~ ('\\\\'|'\\''))*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1458:14: ( EscapeSequence | ~ ('\\\\'|'\\''))*
loop9:
do {
int alt9=3;
@@ -2064,14 +2097,14 @@
switch (alt9) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1438:16: EscapeSequence
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1458:16: EscapeSequence
{
mEscapeSequence(); if (failed) return ;
}
break;
case 2 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1438:33: ~ ('\\\\'|'\\'')
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1458:33: ~ ('\\\\'|'\\'')
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFE') ) {
input.consume();
@@ -2121,8 +2154,8 @@
public void mHexDigit() throws RecognitionException {
try {
ruleNestingLevel++;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1442:12: ( ('0'..'9'|'a'..'f'|'A'..'F'))
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1442:12: ('0'..'9'|'a'..'f'|'A'..'F')
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1462:12: ( ('0'..'9'|'a'..'f'|'A'..'F'))
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1462:12: ('0'..'9'|'a'..'f'|'A'..'F')
{
if ( (input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='F')||(input.LA(1)>='a' && input.LA(1)<='f') ) {
input.consume();
@@ -2149,14 +2182,11 @@
public void mEscapeSequence() throws RecognitionException {
try {
ruleNestingLevel++;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1446:9: ( '\\\\' ('b'|'t'|'n'|'f'|'r'|'\\\"'|'\\''|'\\\\') | UnicodeEscape | OctalEscape )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1466:9: ( '\\\\' ('b'|'t'|'n'|'f'|'r'|'\\\"'|'\\''|'\\\\') | UnicodeEscape | OctalEscape )
int alt11=3;
int LA11_0 = input.LA(1);
if ( (LA11_0=='\\') ) {
switch ( input.LA(2) ) {
- case 'u':
- alt11=2;
- break;
case '\"':
case '\'':
case '\\':
@@ -2167,6 +2197,9 @@
case 't':
alt11=1;
break;
+ case 'u':
+ alt11=2;
+ break;
case '0':
case '1':
case '2':
@@ -2180,7 +2213,7 @@
default:
if (backtracking>0) {failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("1444:1: fragment EscapeSequence : ( '\\\\' ('b'|'t'|'n'|'f'|'r'|'\\\"'|'\\''|'\\\\') | UnicodeEscape | OctalEscape );", 11, 1, input);
+ new NoViableAltException("1464:1: fragment EscapeSequence : ( '\\\\' ('b'|'t'|'n'|'f'|'r'|'\\\"'|'\\''|'\\\\') | UnicodeEscape | OctalEscape );", 11, 1, input);
throw nvae;
}
@@ -2189,13 +2222,13 @@
else {
if (backtracking>0) {failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("1444:1: fragment EscapeSequence : ( '\\\\' ('b'|'t'|'n'|'f'|'r'|'\\\"'|'\\''|'\\\\') | UnicodeEscape | OctalEscape );", 11, 0, input);
+ new NoViableAltException("1464:1: fragment EscapeSequence : ( '\\\\' ('b'|'t'|'n'|'f'|'r'|'\\\"'|'\\''|'\\\\') | UnicodeEscape | OctalEscape );", 11, 0, input);
throw nvae;
}
switch (alt11) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1446:9: '\\\\' ('b'|'t'|'n'|'f'|'r'|'\\\"'|'\\''|'\\\\')
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1466:9: '\\\\' ('b'|'t'|'n'|'f'|'r'|'\\\"'|'\\''|'\\\\')
{
match('\\'); if (failed) return ;
if ( input.LA(1)=='\"'||input.LA(1)=='\''||input.LA(1)=='\\'||input.LA(1)=='b'||input.LA(1)=='f'||input.LA(1)=='n'||input.LA(1)=='r'||input.LA(1)=='t' ) {
@@ -2213,14 +2246,14 @@
}
break;
case 2 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1447:9: UnicodeEscape
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1467:9: UnicodeEscape
{
mUnicodeEscape(); if (failed) return ;
}
break;
case 3 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1448:9: OctalEscape
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1468:9: OctalEscape
{
mOctalEscape(); if (failed) return ;
@@ -2239,7 +2272,7 @@
public void mOctalEscape() throws RecognitionException {
try {
ruleNestingLevel++;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1453:9: ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1473:9: ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) )
int alt12=3;
int LA12_0 = input.LA(1);
if ( (LA12_0=='\\') ) {
@@ -2247,8 +2280,8 @@
if ( ((LA12_1>='0' && LA12_1<='3')) ) {
int LA12_2 = input.LA(3);
if ( ((LA12_2>='0' && LA12_2<='7')) ) {
- int LA12_5 = input.LA(4);
- if ( ((LA12_5>='0' && LA12_5<='7')) ) {
+ int LA12_4 = input.LA(4);
+ if ( ((LA12_4>='0' && LA12_4<='7')) ) {
alt12=1;
}
else {
@@ -2268,7 +2301,7 @@
else {
if (backtracking>0) {failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("1451:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 12, 1, input);
+ new NoViableAltException("1471:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 12, 1, input);
throw nvae;
}
@@ -2276,31 +2309,31 @@
else {
if (backtracking>0) {failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("1451:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 12, 0, input);
+ new NoViableAltException("1471:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 12, 0, input);
throw nvae;
}
switch (alt12) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1453:9: '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1473:9: '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' )
{
match('\\'); if (failed) return ;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1453:14: ( '0' .. '3' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1453:15: '0' .. '3'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1473:14: ( '0' .. '3' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1473:15: '0' .. '3'
{
matchRange('0','3'); if (failed) return ;
}
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1453:25: ( '0' .. '7' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1453:26: '0' .. '7'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1473:25: ( '0' .. '7' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1473:26: '0' .. '7'
{
matchRange('0','7'); if (failed) return ;
}
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1453:36: ( '0' .. '7' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1453:37: '0' .. '7'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1473:36: ( '0' .. '7' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1473:37: '0' .. '7'
{
matchRange('0','7'); if (failed) return ;
@@ -2310,18 +2343,18 @@
}
break;
case 2 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1454:9: '\\\\' ( '0' .. '7' ) ( '0' .. '7' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1474:9: '\\\\' ( '0' .. '7' ) ( '0' .. '7' )
{
match('\\'); if (failed) return ;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1454:14: ( '0' .. '7' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1454:15: '0' .. '7'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1474:14: ( '0' .. '7' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1474:15: '0' .. '7'
{
matchRange('0','7'); if (failed) return ;
}
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1454:25: ( '0' .. '7' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1454:26: '0' .. '7'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1474:25: ( '0' .. '7' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1474:26: '0' .. '7'
{
matchRange('0','7'); if (failed) return ;
@@ -2331,11 +2364,11 @@
}
break;
case 3 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1455:9: '\\\\' ( '0' .. '7' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1475:9: '\\\\' ( '0' .. '7' )
{
match('\\'); if (failed) return ;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1455:14: ( '0' .. '7' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1455:15: '0' .. '7'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1475:14: ( '0' .. '7' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1475:15: '0' .. '7'
{
matchRange('0','7'); if (failed) return ;
@@ -2357,8 +2390,8 @@
public void mUnicodeEscape() throws RecognitionException {
try {
ruleNestingLevel++;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1460:9: ( '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1460:9: '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1480:9: ( '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1480:9: '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit
{
match('\\'); if (failed) return ;
match('u'); if (failed) return ;
@@ -2385,10 +2418,10 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1464:4: ( ( 'true' | 'false' ) )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1464:4: ( 'true' | 'false' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1484:4: ( ( 'true' | 'false' ) )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1484:4: ( 'true' | 'false' )
{
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1464:4: ( 'true' | 'false' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1484:4: ( 'true' | 'false' )
int alt13=2;
int LA13_0 = input.LA(1);
if ( (LA13_0=='t') ) {
@@ -2400,13 +2433,13 @@
else {
if (backtracking>0) {failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("1464:4: ( 'true' | 'false' )", 13, 0, input);
+ new NoViableAltException("1484:4: ( 'true' | 'false' )", 13, 0, input);
throw nvae;
}
switch (alt13) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1464:5: 'true'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1484:5: 'true'
{
match("true"); if (failed) return ;
@@ -2414,7 +2447,7 @@
}
break;
case 2 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1464:12: 'false'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1484:12: 'false'
{
match("false"); if (failed) return ;
@@ -2451,8 +2484,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1467:11: ( 'rule' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1467:11: 'rule'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1487:11: ( 'rule' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1487:11: 'rule'
{
match("rule"); if (failed) return ;
@@ -2483,8 +2516,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1469:11: ( 'when' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1469:11: 'when'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1489:11: ( 'when' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1489:11: 'when'
{
match("when"); if (failed) return ;
@@ -2515,8 +2548,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1471:12: ( 'then' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1471:12: 'then'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1491:12: ( 'then' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1491:12: 'then'
{
match("then"); if (failed) return ;
@@ -2547,8 +2580,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1473:11: ( 'end' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1473:11: 'end'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1493:11: ( 'end' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1493:11: 'end'
{
match("end"); if (failed) return ;
@@ -2579,8 +2612,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1476:4: ( ('a'..'z'|'A'..'Z'|'_'|'$'|'\\u00c0'..'\\u00ff') ( ('a'..'z'|'A'..'Z'|'_'|'0'..'9'|'\\u00c0'..'\\u00ff'))* )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1476:4: ('a'..'z'|'A'..'Z'|'_'|'$'|'\\u00c0'..'\\u00ff') ( ('a'..'z'|'A'..'Z'|'_'|'0'..'9'|'\\u00c0'..'\\u00ff'))*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1496:4: ( ('a'..'z'|'A'..'Z'|'_'|'$'|'\\u00c0'..'\\u00ff') ( ('a'..'z'|'A'..'Z'|'_'|'0'..'9'|'\\u00c0'..'\\u00ff'))* )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1496:4: ('a'..'z'|'A'..'Z'|'_'|'$'|'\\u00c0'..'\\u00ff') ( ('a'..'z'|'A'..'Z'|'_'|'0'..'9'|'\\u00c0'..'\\u00ff'))*
{
if ( input.LA(1)=='$'||(input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z')||(input.LA(1)>='\u00C0' && input.LA(1)<='\u00FF') ) {
input.consume();
@@ -2593,7 +2626,7 @@
recover(mse); throw mse;
}
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1476:50: ( ('a'..'z'|'A'..'Z'|'_'|'0'..'9'|'\\u00c0'..'\\u00ff'))*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1496:50: ( ('a'..'z'|'A'..'Z'|'_'|'0'..'9'|'\\u00c0'..'\\u00ff'))*
loop14:
do {
int alt14=2;
@@ -2605,7 +2638,7 @@
switch (alt14) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1476:51: ('a'..'z'|'A'..'Z'|'_'|'0'..'9'|'\\u00c0'..'\\u00ff')
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1496:51: ('a'..'z'|'A'..'Z'|'_'|'0'..'9'|'\\u00c0'..'\\u00ff')
{
if ( (input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z')||(input.LA(1)>='\u00C0' && input.LA(1)<='\u00FF') ) {
input.consume();
@@ -2654,11 +2687,11 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1481:4: ( '#' ( options {greedy=false; } : . )* EOL )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1481:4: '#' ( options {greedy=false; } : . )* EOL
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1501:4: ( '#' ( options {greedy=false; } : . )* EOL )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1501:4: '#' ( options {greedy=false; } : . )* EOL
{
match('#'); if (failed) return ;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1481:8: ( options {greedy=false; } : . )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1501:8: ( options {greedy=false; } : . )*
loop15:
do {
int alt15=2;
@@ -2676,7 +2709,7 @@
switch (alt15) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1481:35: .
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1501:35: .
{
matchAny(); if (failed) return ;
@@ -2719,12 +2752,12 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1487:4: ( '//' ( options {greedy=false; } : . )* EOL )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1487:4: '//' ( options {greedy=false; } : . )* EOL
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1507:4: ( '//' ( options {greedy=false; } : . )* EOL )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1507:4: '//' ( options {greedy=false; } : . )* EOL
{
match("//"); if (failed) return ;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1487:9: ( options {greedy=false; } : . )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1507:9: ( options {greedy=false; } : . )*
loop16:
do {
int alt16=2;
@@ -2742,7 +2775,7 @@
switch (alt16) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1487:36: .
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1507:36: .
{
matchAny(); if (failed) return ;
@@ -2785,8 +2818,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1493:11: ( '(' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1493:11: '('
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1513:11: ( '(' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1513:11: '('
{
match('('); if (failed) return ;
@@ -2816,8 +2849,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1497:11: ( ')' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1497:11: ')'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1517:11: ( ')' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1517:11: ')'
{
match(')'); if (failed) return ;
@@ -2847,8 +2880,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1501:11: ( '[' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1501:11: '['
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1521:11: ( '[' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1521:11: '['
{
match('['); if (failed) return ;
@@ -2878,8 +2911,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1505:11: ( ']' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1505:11: ']'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1525:11: ( ']' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1525:11: ']'
{
match(']'); if (failed) return ;
@@ -2909,8 +2942,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1509:11: ( '{' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1509:11: '{'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1529:11: ( '{' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1529:11: '{'
{
match('{'); if (failed) return ;
@@ -2940,8 +2973,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1513:11: ( '}' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1513:11: '}'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1533:11: ( '}' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1533:11: '}'
{
match('}'); if (failed) return ;
@@ -2971,12 +3004,12 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1517:4: ( '/*' ( options {greedy=false; } : . )* '*/' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1517:4: '/*' ( options {greedy=false; } : . )* '*/'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1537:4: ( '/*' ( options {greedy=false; } : . )* '*/' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1537:4: '/*' ( options {greedy=false; } : . )* '*/'
{
match("/*"); if (failed) return ;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1517:9: ( options {greedy=false; } : . )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1537:9: ( options {greedy=false; } : . )*
loop17:
do {
int alt17=2;
@@ -2999,7 +3032,7 @@
switch (alt17) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1517:35: .
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1537:35: .
{
matchAny(); if (failed) return ;
@@ -3043,8 +3076,8 @@
int _line = getLine();
int _charPosition = getCharPositionInLine();
int _channel = Token.DEFAULT_CHANNEL;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1521:7: ( ('!'|'@'|'$'|'%'|'^'|'&'|'*'|'_'|'-'|'+'|'?'|'|'|','|'='|'/'|'\\''|'\\\\'))
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1522:3: ('!'|'@'|'$'|'%'|'^'|'&'|'*'|'_'|'-'|'+'|'?'|'|'|','|'='|'/'|'\\''|'\\\\')
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1541:7: ( ('!'|'@'|'$'|'%'|'^'|'&'|'*'|'_'|'-'|'+'|'?'|'|'|','|'='|'/'|'\\''|'\\\\'))
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1542:3: ('!'|'@'|'$'|'%'|'^'|'&'|'*'|'_'|'-'|'+'|'?'|'|'|','|'='|'/'|'\\''|'\\\\')
{
if ( input.LA(1)=='!'||(input.LA(1)>='$' && input.LA(1)<='\'')||(input.LA(1)>='*' && input.LA(1)<='-')||input.LA(1)=='/'||input.LA(1)=='='||(input.LA(1)>='?' && input.LA(1)<='@')||input.LA(1)=='\\'||(input.LA(1)>='^' && input.LA(1)<='_')||input.LA(1)=='|' ) {
input.consume();
@@ -3076,482 +3109,489 @@
// $ANTLR end MISC
public void mTokens() throws RecognitionException {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:10: ( T29 | T30 | T31 | T32 | T33 | T34 | T35 | T36 | T37 | T38 | T39 | T40 | T41 | T42 | T43 | T44 | T45 | T46 | T47 | T48 | T49 | T50 | T51 | T52 | T53 | T54 | T55 | T56 | T57 | T58 | T59 | T60 | T61 | T62 | T63 | T64 | T65 | T66 | T67 | T68 | T69 | T70 | T71 | T72 | T73 | T74 | T75 | T76 | WS | INT | FLOAT | STRING | BOOL | RULE | WHEN | THEN | END | ID | SH_STYLE_SINGLE_LINE_COMMENT | C_STYLE_SINGLE_LINE_COMMENT | LEFT_PAREN | RIGHT_PAREN | LEFT_SQUARE | RIGHT_SQUARE | LEFT_CURLY | RIGHT_CURLY | MULTI_LINE_COMMENT | MISC )
- int alt18=68;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:10: ( T29 | T30 | T31 | T32 | T33 | T34 | T35 | T36 | T37 | T38 | T39 | T40 | T41 | T42 | T43 | T44 | T45 | T46 | T47 | T48 | T49 | T50 | T51 | T52 | T53 | T54 | T55 | T56 | T57 | T58 | T59 | T60 | T61 | T62 | T63 | T64 | T65 | T66 | T67 | T68 | T69 | T70 | T71 | T72 | T73 | T74 | T75 | T76 | T77 | WS | INT | FLOAT | STRING | BOOL | RULE | WHEN | THEN | END | ID | SH_STYLE_SINGLE_LINE_COMMENT | C_STYLE_SINGLE_LINE_COMMENT | LEFT_PAREN | RIGHT_PAREN | LEFT_SQUARE | RIGHT_SQUARE | LEFT_CURLY | RIGHT_CURLY | MULTI_LINE_COMMENT | MISC )
+ int alt18=69;
alt18 = dfa18.predict(input);
switch (alt18) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:10: T29
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:10: T29
{
mT29(); if (failed) return ;
}
break;
case 2 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:14: T30
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:14: T30
{
mT30(); if (failed) return ;
}
break;
case 3 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:18: T31
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:18: T31
{
mT31(); if (failed) return ;
}
break;
case 4 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:22: T32
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:22: T32
{
mT32(); if (failed) return ;
}
break;
case 5 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:26: T33
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:26: T33
{
mT33(); if (failed) return ;
}
break;
case 6 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:30: T34
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:30: T34
{
mT34(); if (failed) return ;
}
break;
case 7 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:34: T35
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:34: T35
{
mT35(); if (failed) return ;
}
break;
case 8 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:38: T36
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:38: T36
{
mT36(); if (failed) return ;
}
break;
case 9 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:42: T37
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:42: T37
{
mT37(); if (failed) return ;
}
break;
case 10 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:46: T38
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:46: T38
{
mT38(); if (failed) return ;
}
break;
case 11 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:50: T39
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:50: T39
{
mT39(); if (failed) return ;
}
break;
case 12 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:54: T40
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:54: T40
{
mT40(); if (failed) return ;
}
break;
case 13 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:58: T41
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:58: T41
{
mT41(); if (failed) return ;
}
break;
case 14 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:62: T42
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:62: T42
{
mT42(); if (failed) return ;
}
break;
case 15 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:66: T43
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:66: T43
{
mT43(); if (failed) return ;
}
break;
case 16 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:70: T44
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:70: T44
{
mT44(); if (failed) return ;
}
break;
case 17 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:74: T45
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:74: T45
{
mT45(); if (failed) return ;
}
break;
case 18 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:78: T46
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:78: T46
{
mT46(); if (failed) return ;
}
break;
case 19 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:82: T47
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:82: T47
{
mT47(); if (failed) return ;
}
break;
case 20 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:86: T48
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:86: T48
{
mT48(); if (failed) return ;
}
break;
case 21 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:90: T49
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:90: T49
{
mT49(); if (failed) return ;
}
break;
case 22 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:94: T50
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:94: T50
{
mT50(); if (failed) return ;
}
break;
case 23 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:98: T51
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:98: T51
{
mT51(); if (failed) return ;
}
break;
case 24 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:102: T52
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:102: T52
{
mT52(); if (failed) return ;
}
break;
case 25 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:106: T53
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:106: T53
{
mT53(); if (failed) return ;
}
break;
case 26 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:110: T54
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:110: T54
{
mT54(); if (failed) return ;
}
break;
case 27 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:114: T55
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:114: T55
{
mT55(); if (failed) return ;
}
break;
case 28 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:118: T56
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:118: T56
{
mT56(); if (failed) return ;
}
break;
case 29 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:122: T57
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:122: T57
{
mT57(); if (failed) return ;
}
break;
case 30 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:126: T58
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:126: T58
{
mT58(); if (failed) return ;
}
break;
case 31 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:130: T59
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:130: T59
{
mT59(); if (failed) return ;
}
break;
case 32 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:134: T60
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:134: T60
{
mT60(); if (failed) return ;
}
break;
case 33 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:138: T61
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:138: T61
{
mT61(); if (failed) return ;
}
break;
case 34 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:142: T62
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:142: T62
{
mT62(); if (failed) return ;
}
break;
case 35 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:146: T63
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:146: T63
{
mT63(); if (failed) return ;
}
break;
case 36 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:150: T64
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:150: T64
{
mT64(); if (failed) return ;
}
break;
case 37 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:154: T65
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:154: T65
{
mT65(); if (failed) return ;
}
break;
case 38 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:158: T66
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:158: T66
{
mT66(); if (failed) return ;
}
break;
case 39 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:162: T67
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:162: T67
{
mT67(); if (failed) return ;
}
break;
case 40 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:166: T68
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:166: T68
{
mT68(); if (failed) return ;
}
break;
case 41 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:170: T69
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:170: T69
{
mT69(); if (failed) return ;
}
break;
case 42 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:174: T70
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:174: T70
{
mT70(); if (failed) return ;
}
break;
case 43 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:178: T71
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:178: T71
{
mT71(); if (failed) return ;
}
break;
case 44 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:182: T72
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:182: T72
{
mT72(); if (failed) return ;
}
break;
case 45 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:186: T73
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:186: T73
{
mT73(); if (failed) return ;
}
break;
case 46 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:190: T74
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:190: T74
{
mT74(); if (failed) return ;
}
break;
case 47 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:194: T75
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:194: T75
{
mT75(); if (failed) return ;
}
break;
case 48 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:198: T76
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:198: T76
{
mT76(); if (failed) return ;
}
break;
case 49 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:202: WS
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:202: T77
{
- mWS(); if (failed) return ;
+ mT77(); if (failed) return ;
}
break;
case 50 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:205: INT
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:206: WS
{
- mINT(); if (failed) return ;
+ mWS(); if (failed) return ;
}
break;
case 51 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:209: FLOAT
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:209: INT
{
- mFLOAT(); if (failed) return ;
+ mINT(); if (failed) return ;
}
break;
case 52 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:215: STRING
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:213: FLOAT
{
- mSTRING(); if (failed) return ;
+ mFLOAT(); if (failed) return ;
}
break;
case 53 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:222: BOOL
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:219: STRING
{
- mBOOL(); if (failed) return ;
+ mSTRING(); if (failed) return ;
}
break;
case 54 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:227: RULE
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:226: BOOL
{
- mRULE(); if (failed) return ;
+ mBOOL(); if (failed) return ;
}
break;
case 55 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:232: WHEN
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:231: RULE
{
- mWHEN(); if (failed) return ;
+ mRULE(); if (failed) return ;
}
break;
case 56 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:237: THEN
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:236: WHEN
{
- mTHEN(); if (failed) return ;
+ mWHEN(); if (failed) return ;
}
break;
case 57 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:242: END
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:241: THEN
{
- mEND(); if (failed) return ;
+ mTHEN(); if (failed) return ;
}
break;
case 58 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:246: ID
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:246: END
{
- mID(); if (failed) return ;
+ mEND(); if (failed) return ;
}
break;
case 59 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:249: SH_STYLE_SINGLE_LINE_COMMENT
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:250: ID
{
- mSH_STYLE_SINGLE_LINE_COMMENT(); if (failed) return ;
+ mID(); if (failed) return ;
}
break;
case 60 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:278: C_STYLE_SINGLE_LINE_COMMENT
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:253: SH_STYLE_SINGLE_LINE_COMMENT
{
- mC_STYLE_SINGLE_LINE_COMMENT(); if (failed) return ;
+ mSH_STYLE_SINGLE_LINE_COMMENT(); if (failed) return ;
}
break;
case 61 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:306: LEFT_PAREN
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:282: C_STYLE_SINGLE_LINE_COMMENT
{
- mLEFT_PAREN(); if (failed) return ;
+ mC_STYLE_SINGLE_LINE_COMMENT(); if (failed) return ;
}
break;
case 62 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:317: RIGHT_PAREN
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:310: LEFT_PAREN
{
- mRIGHT_PAREN(); if (failed) return ;
+ mLEFT_PAREN(); if (failed) return ;
}
break;
case 63 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:329: LEFT_SQUARE
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:321: RIGHT_PAREN
{
- mLEFT_SQUARE(); if (failed) return ;
+ mRIGHT_PAREN(); if (failed) return ;
}
break;
case 64 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:341: RIGHT_SQUARE
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:333: LEFT_SQUARE
{
- mRIGHT_SQUARE(); if (failed) return ;
+ mLEFT_SQUARE(); if (failed) return ;
}
break;
case 65 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:354: LEFT_CURLY
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:345: RIGHT_SQUARE
{
- mLEFT_CURLY(); if (failed) return ;
+ mRIGHT_SQUARE(); if (failed) return ;
}
break;
case 66 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:365: RIGHT_CURLY
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:358: LEFT_CURLY
{
- mRIGHT_CURLY(); if (failed) return ;
+ mLEFT_CURLY(); if (failed) return ;
}
break;
case 67 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:377: MULTI_LINE_COMMENT
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:369: RIGHT_CURLY
{
- mMULTI_LINE_COMMENT(); if (failed) return ;
+ mRIGHT_CURLY(); if (failed) return ;
}
break;
case 68 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1:396: MISC
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:381: MULTI_LINE_COMMENT
{
+ mMULTI_LINE_COMMENT(); if (failed) return ;
+
+ }
+ break;
+ case 69 :
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:400: MISC
+ {
mMISC(); if (failed) return ;
}
@@ -3564,84 +3604,83 @@
protected DFA18 dfa18 = new DFA18(this);
public static final String DFA18_eotS =
- "\2\uffff\3\52\1\63\1\52\1\uffff\2\52\1\uffff\10\52\1\114\1\116\1"+
- "\53\1\121\1\123\1\53\1\52\1\53\1\52\1\uffff\1\130\1\uffff\1\53\1"+
- "\52\2\uffff\1\53\10\uffff\6\52\2\uffff\1\52\1\uffff\24\52\1\175"+
- "\12\uffff\1\52\1\uffff\1\52\2\uffff\1\52\2\uffff\15\52\1\u008e\10"+
- "\52\1\u0097\2\52\1\uffff\1\u009a\5\52\1\uffff\1\52\1\u00a1\2\52"+
- "\1\u00a4\3\52\1\u00a8\2\52\1\u00ab\1\u00ac\3\52\1\uffff\7\52\1\u00b8"+
- "\1\uffff\2\52\1\uffff\1\u00bb\1\52\1\u00bd\3\52\1\uffff\1\u00c1"+
- "\1\52\1\uffff\1\52\1\u00ab\1\52\1\uffff\1\52\1\u00c6\2\uffff\6\52"+
- "\2\uffff\3\52\1\uffff\2\52\1\uffff\1\52\1\uffff\3\52\1\uffff\1\52"+
- "\1\u00d8\1\52\1\u00da\1\uffff\2\52\1\u00dd\3\52\1\uffff\2\52\1\u00e5"+
- "\2\52\1\u00e8\3\52\1\u00ec\1\uffff\1\52\1\uffff\2\52\1\uffff\1\52"+
- "\1\uffff\1\52\2\uffff\2\52\1\uffff\1\u00f4\1\52\1\uffff\1\u00f6"+
- "\1\52\1\u00f8\1\uffff\1\u00f9\1\u00fa\3\52\1\u00fe\1\u00ff\1\uffff"+
- "\1\u0100\1\uffff\1\u0101\3\uffff\3\52\4\uffff\1\52\1\u0106\1\u0107"+
- "\3\uffff";
+ "\2\uffff\3\52\1\64\1\52\1\uffff\2\52\1\uffff\10\52\1\115\1\117\1"+
+ "\53\1\122\1\124\1\53\1\52\1\53\1\52\1\uffff\1\131\1\uffff\1\53\1"+
+ "\52\2\uffff\1\53\10\uffff\7\52\2\uffff\1\52\1\uffff\24\52\1\177"+
+ "\12\uffff\1\52\1\uffff\1\52\2\uffff\1\52\2\uffff\21\52\1\u0094\3"+
+ "\52\1\u0098\4\52\1\u009d\1\uffff\5\52\1\uffff\1\52\1\u00a4\3\52"+
+ "\1\u00a8\2\52\1\u00ab\3\52\1\u00af\1\u00b0\6\52\1\uffff\3\52\1\uffff"+
+ "\2\52\1\u00bd\1\52\1\uffff\1\u00bf\1\u00c0\4\52\1\uffff\1\u00c5"+
+ "\2\52\1\uffff\1\52\1\u00b0\1\uffff\2\52\1\u00cb\2\uffff\1\52\1\uffff"+
+ "\5\52\1\uffff\4\52\1\uffff\1\52\2\uffff\4\52\1\uffff\1\52\1\u00dd"+
+ "\1\52\1\u00df\1\u00e0\1\uffff\2\52\1\u00e3\3\52\1\uffff\2\52\1\u00eb"+
+ "\2\52\1\u00ee\3\52\1\u00f2\1\uffff\1\52\2\uffff\2\52\1\uffff\2\52"+
+ "\3\uffff\1\52\1\u00f9\1\uffff\2\52\1\uffff\1\u00fc\1\52\1\u00fe"+
+ "\1\uffff\1\u00ff\1\u0100\3\52\1\u0104\1\uffff\1\u0105\1\u0106\1"+
+ "\uffff\1\u0107\3\uffff\3\52\4\uffff\1\u010b\1\52\1\u010d\3\uffff";
public static final String DFA18_eofS =
- "\u0108\uffff";
+ "\u010e\uffff";
public static final String DFA18_minS =
"\1\11\1\uffff\1\141\1\155\1\141\1\52\1\154\1\uffff\1\165\1\145\1"+
"\uffff\1\143\1\141\1\156\1\141\1\157\1\145\1\157\1\162\1\174\1\46"+
"\4\75\1\141\1\60\1\163\1\uffff\1\56\1\uffff\1\0\1\150\2\uffff\1"+
- "\52\10\uffff\1\143\1\151\1\160\1\154\1\156\1\157\2\uffff\1\157\1"+
- "\uffff\1\145\1\165\1\145\1\155\1\143\1\144\1\145\3\164\1\162\1\143"+
- "\2\141\1\154\1\55\1\154\1\163\2\154\1\60\12\uffff\1\164\1\uffff"+
- "\1\145\2\uffff\1\145\2\uffff\1\153\1\164\1\157\1\163\1\143\1\155"+
- "\1\142\1\162\1\145\1\156\1\160\1\151\1\165\1\60\1\156\1\162\1\157"+
- "\1\145\1\141\1\154\1\163\1\154\1\60\1\142\1\151\1\uffff\1\60\1\154"+
- "\1\165\1\145\1\154\1\164\1\uffff\1\143\1\60\1\156\1\141\1\60\1\162"+
- "\1\145\1\164\1\60\1\141\1\171\2\60\1\154\1\157\1\155\1\uffff\1\144"+
- "\1\151\2\55\1\164\1\165\1\164\1\60\1\uffff\1\154\1\145\1\uffff\1"+
- "\60\1\154\1\60\1\145\1\141\1\150\1\uffff\1\60\1\147\1\uffff\1\164"+
- "\1\60\1\151\1\uffff\1\154\1\60\2\uffff\2\141\1\156\1\165\1\141\1"+
- "\142\1\uffff\1\145\1\151\1\144\1\163\1\uffff\1\145\1\156\1\uffff"+
- "\1\164\1\uffff\1\143\1\151\1\145\1\uffff\1\145\1\60\1\157\1\60\1"+
- "\uffff\2\164\1\60\1\154\1\55\1\165\1\146\1\157\1\145\1\60\1\144"+
- "\1\143\1\60\1\164\1\156\1\163\1\60\1\uffff\1\156\1\uffff\1\145\1"+
- "\151\1\uffff\1\141\1\uffff\1\164\2\uffff\1\156\1\163\1\uffff\1\60"+
- "\1\145\1\uffff\1\60\1\163\1\60\1\uffff\2\60\1\157\1\164\1\145\2"+
- "\60\1\uffff\1\60\1\uffff\1\60\3\uffff\1\156\1\145\1\163\4\uffff"+
- "\1\55\2\60\3\uffff";
+ "\52\10\uffff\1\143\1\160\1\151\1\156\1\154\1\157\1\162\2\uffff\1"+
+ "\157\1\uffff\2\145\1\165\1\155\1\164\1\143\1\164\1\145\1\144\1\164"+
+ "\1\162\1\141\1\143\1\141\1\154\1\55\2\154\1\163\1\154\1\60\12\uffff"+
+ "\1\164\1\uffff\1\145\2\uffff\1\145\2\uffff\1\153\1\157\1\164\1\143"+
+ "\1\163\1\155\1\141\1\142\1\162\1\156\1\145\1\160\1\157\1\165\1\151"+
+ "\1\162\1\156\1\60\1\145\1\141\1\142\1\60\1\163\2\154\1\151\1\60"+
+ "\1\uffff\1\154\1\145\1\165\1\154\1\164\1\uffff\1\143\1\60\1\156"+
+ "\1\141\1\162\1\60\1\164\1\145\1\60\1\154\1\141\1\171\2\60\1\154"+
+ "\1\55\1\155\1\157\1\151\1\144\1\uffff\1\55\1\164\1\154\1\uffff\1"+
+ "\164\1\165\1\60\1\145\1\uffff\2\60\1\154\1\145\1\141\1\150\1\uffff"+
+ "\1\60\1\147\1\164\1\uffff\1\151\1\60\1\uffff\2\154\1\60\2\uffff"+
+ "\1\141\1\uffff\1\165\1\156\1\141\1\142\1\141\1\145\1\151\1\145\1"+
+ "\163\1\144\1\uffff\1\156\2\uffff\1\164\1\143\1\151\1\145\1\uffff"+
+ "\1\145\1\60\1\157\2\60\1\uffff\1\164\1\154\1\60\1\164\1\165\1\55"+
+ "\1\146\1\157\1\144\1\60\1\145\1\143\1\60\1\164\1\156\1\163\1\60"+
+ "\1\uffff\1\156\2\uffff\1\145\1\141\1\uffff\1\151\1\164\3\uffff\1"+
+ "\156\1\60\1\uffff\1\163\1\145\1\uffff\1\60\1\163\1\60\1\uffff\2"+
+ "\60\1\164\1\157\1\145\1\60\1\uffff\2\60\1\uffff\1\60\3\uffff\1\145"+
+ "\1\156\1\163\4\uffff\1\60\1\55\1\60\3\uffff";
public static final String DFA18_maxS =
"\1\u00ff\1\uffff\1\141\1\156\1\165\1\52\1\154\1\uffff\1\165\1\162"+
"\1\uffff\2\165\1\170\1\141\2\165\1\157\1\162\1\174\1\46\4\75\1\141"+
"\1\76\1\163\1\uffff\1\71\1\uffff\1\ufffe\1\150\2\uffff\1\57\10\uffff"+
- "\1\143\1\151\1\160\1\154\1\156\1\157\2\uffff\1\157\1\uffff\1\145"+
- "\1\165\1\145\1\155\1\164\1\144\1\145\3\164\1\162\1\151\1\141\1\144"+
- "\1\154\1\164\1\154\1\163\1\154\1\156\1\u00ff\12\uffff\1\164\1\uffff"+
- "\1\145\2\uffff\1\145\2\uffff\1\153\1\164\1\157\1\163\1\143\1\155"+
- "\1\142\1\162\1\145\1\156\1\160\1\151\1\165\1\u00ff\1\156\1\162\1"+
- "\157\1\145\1\141\1\154\1\163\1\154\1\u00ff\1\142\1\151\1\uffff\1"+
- "\u00ff\1\154\1\165\1\145\1\154\1\164\1\uffff\1\143\1\u00ff\1\156"+
- "\1\141\1\u00ff\1\162\1\145\1\164\1\u00ff\1\141\1\171\2\u00ff\1\154"+
- "\1\166\1\155\1\uffff\1\144\1\151\2\55\1\164\1\165\1\164\1\u00ff"+
- "\1\uffff\1\154\1\145\1\uffff\1\u00ff\1\154\1\u00ff\1\145\1\141\1"+
- "\150\1\uffff\1\u00ff\1\147\1\uffff\1\164\1\u00ff\1\151\1\uffff\1"+
- "\154\1\u00ff\2\uffff\2\141\1\156\1\165\1\141\1\142\1\uffff\1\145"+
- "\1\151\1\144\1\163\1\uffff\1\145\1\156\1\uffff\1\164\1\uffff\1\143"+
- "\1\151\1\145\1\uffff\1\145\1\u00ff\1\157\1\u00ff\1\uffff\2\164\1"+
- "\u00ff\1\154\1\55\1\165\1\170\1\157\1\145\1\u00ff\1\144\1\143\1"+
- "\u00ff\1\164\1\156\1\163\1\u00ff\1\uffff\1\156\1\uffff\1\145\1\151"+
- "\1\uffff\1\141\1\uffff\1\164\2\uffff\1\156\1\163\1\uffff\1\u00ff"+
- "\1\145\1\uffff\1\u00ff\1\163\1\u00ff\1\uffff\2\u00ff\1\157\1\164"+
- "\1\145\2\u00ff\1\uffff\1\u00ff\1\uffff\1\u00ff\3\uffff\1\156\1\145"+
- "\1\163\4\uffff\1\55\2\u00ff\3\uffff";
+ "\1\143\1\160\1\151\1\156\1\154\1\157\1\162\2\uffff\1\157\1\uffff"+
+ "\2\145\1\165\1\155\3\164\1\145\1\144\1\164\1\162\1\144\1\151\1\141"+
+ "\1\154\1\164\2\154\1\163\1\156\1\u00ff\12\uffff\1\164\1\uffff\1"+
+ "\145\2\uffff\1\145\2\uffff\1\153\1\157\1\164\1\143\1\163\1\155\1"+
+ "\141\1\142\1\162\1\156\1\145\1\160\1\157\1\165\1\151\1\162\1\156"+
+ "\1\u00ff\1\145\1\141\1\142\1\u00ff\1\163\2\154\1\151\1\u00ff\1\uffff"+
+ "\1\154\1\145\1\165\1\154\1\164\1\uffff\1\143\1\u00ff\1\156\1\141"+
+ "\1\162\1\u00ff\1\164\1\145\1\u00ff\1\154\1\141\1\171\2\u00ff\1\154"+
+ "\1\55\1\155\1\166\1\151\1\144\1\uffff\1\55\1\164\1\154\1\uffff\1"+
+ "\164\1\165\1\u00ff\1\145\1\uffff\2\u00ff\1\154\1\145\1\141\1\150"+
+ "\1\uffff\1\u00ff\1\147\1\164\1\uffff\1\151\1\u00ff\1\uffff\2\154"+
+ "\1\u00ff\2\uffff\1\141\1\uffff\1\165\1\156\1\141\1\142\1\141\1\145"+
+ "\1\151\1\145\1\163\1\144\1\uffff\1\156\2\uffff\1\164\1\143\1\151"+
+ "\1\145\1\uffff\1\145\1\u00ff\1\157\2\u00ff\1\uffff\1\164\1\154\1"+
+ "\u00ff\1\164\1\165\1\55\1\170\1\157\1\144\1\u00ff\1\145\1\143\1"+
+ "\u00ff\1\164\1\156\1\163\1\u00ff\1\uffff\1\156\2\uffff\1\145\1\141"+
+ "\1\uffff\1\151\1\164\3\uffff\1\156\1\u00ff\1\uffff\1\163\1\145\1"+
+ "\uffff\1\u00ff\1\163\1\u00ff\1\uffff\2\u00ff\1\164\1\157\1\145\1"+
+ "\u00ff\1\uffff\2\u00ff\1\uffff\1\u00ff\3\uffff\1\145\1\156\1\163"+
+ "\4\uffff\1\u00ff\1\55\1\u00ff\3\uffff";
public static final String DFA18_acceptS =
- "\1\uffff\1\1\5\uffff\1\10\2\uffff\1\13\21\uffff\1\61\1\uffff\1\64"+
- "\2\uffff\1\72\1\73\1\uffff\1\75\1\76\1\77\1\100\1\101\1\102\1\72"+
- "\1\104\6\uffff\1\6\1\5\1\uffff\1\10\25\uffff\1\35\1\37\1\54\1\36"+
- "\1\40\1\42\1\41\1\44\1\43\1\45\1\uffff\1\52\1\uffff\1\62\1\63\1"+
- "\uffff\1\74\1\103\31\uffff\1\21\6\uffff\1\34\20\uffff\1\53\10\uffff"+
- "\1\71\2\uffff\1\56\6\uffff\1\60\2\uffff\1\30\3\uffff\1\26\2\uffff"+
- "\1\65\1\70\6\uffff\1\22\4\uffff\1\57\2\uffff\1\51\1\uffff\1\66\3"+
- "\uffff\1\67\4\uffff\1\11\21\uffff\1\3\1\uffff\1\7\2\uffff\1\31\1"+
- "\uffff\1\24\1\uffff\1\15\1\16\2\uffff\1\55\2\uffff\1\32\3\uffff"+
- "\1\2\7\uffff\1\17\1\uffff\1\33\1\uffff\1\47\1\4\1\12\3\uffff\1\25"+
- "\1\50\1\20\1\46\3\uffff\1\23\1\27\1\14";
+ "\1\uffff\1\1\5\uffff\1\10\2\uffff\1\13\21\uffff\1\62\1\uffff\1\65"+
+ "\2\uffff\1\73\1\74\1\uffff\1\76\1\77\1\100\1\101\1\102\1\103\1\73"+
+ "\1\105\7\uffff\1\6\1\5\1\uffff\1\10\25\uffff\1\35\1\37\1\54\1\36"+
+ "\1\40\1\42\1\41\1\44\1\43\1\45\1\uffff\1\52\1\uffff\1\63\1\64\1"+
+ "\uffff\1\75\1\104\33\uffff\1\21\5\uffff\1\34\24\uffff\1\53\3\uffff"+
+ "\1\72\4\uffff\1\56\6\uffff\1\61\3\uffff\1\30\2\uffff\1\26\3\uffff"+
+ "\1\71\1\66\1\uffff\1\22\12\uffff\1\57\1\uffff\1\51\1\67\4\uffff"+
+ "\1\70\5\uffff\1\11\21\uffff\1\3\1\uffff\1\60\1\7\2\uffff\1\31\2"+
+ "\uffff\1\24\1\15\1\16\2\uffff\1\55\2\uffff\1\32\3\uffff\1\2\6\uffff"+
+ "\1\17\2\uffff\1\33\1\uffff\1\47\1\4\1\12\3\uffff\1\25\1\50\1\20"+
+ "\1\46\3\uffff\1\27\1\23\1\14";
public static final String DFA18_specialS =
- "\u0108\uffff}>";
+ "\u010e\uffff}>";
public static final String[] DFA18_transition = {
"\2\34\1\uffff\2\34\22\uffff\1\34\1\30\1\36\1\42\1\41\1\53\1\24\1"+
"\37\1\44\1\45\2\53\1\7\1\32\1\5\1\43\12\35\1\12\1\1\1\27\1\25\1"+
@@ -3650,39 +3689,39 @@
"\1\11\1\33\1\52\1\40\3\52\1\50\1\23\1\51\102\uffff\100\52",
"",
"\1\54",
- "\1\56\1\55",
- "\1\57\20\uffff\1\61\2\uffff\1\60",
- "\1\62",
- "\1\64",
+ "\1\55\1\56",
+ "\1\60\15\uffff\1\62\2\uffff\1\61\2\uffff\1\57",
+ "\1\63",
+ "\1\65",
"",
- "\1\66",
- "\1\71\2\uffff\1\70\11\uffff\1\67",
+ "\1\67",
+ "\1\72\2\uffff\1\70\11\uffff\1\71",
"",
- "\1\72\3\uffff\1\74\6\uffff\1\73\5\uffff\1\75\1\76",
- "\1\77\23\uffff\1\100",
- "\1\103\7\uffff\1\102\1\uffff\1\101",
- "\1\104",
- "\1\105\5\uffff\1\106",
- "\1\107\17\uffff\1\110",
- "\1\111",
+ "\1\74\3\uffff\1\76\6\uffff\1\77\5\uffff\1\75\1\73",
+ "\1\100\23\uffff\1\101",
+ "\1\102\7\uffff\1\104\1\uffff\1\103",
+ "\1\105",
+ "\1\106\5\uffff\1\107",
+ "\1\111\17\uffff\1\110",
"\1\112",
"\1\113",
- "\1\115",
- "\1\117",
+ "\1\114",
+ "\1\116",
"\1\120",
- "\1\122",
- "\1\124",
+ "\1\121",
+ "\1\123",
"\1\125",
- "\12\35\4\uffff\1\126",
- "\1\127",
+ "\1\126",
+ "\12\35\4\uffff\1\127",
+ "\1\130",
"",
- "\1\131\1\uffff\12\35",
+ "\1\132\1\uffff\12\35",
"",
"\uffff\36",
- "\1\132",
+ "\1\133",
"",
"",
- "\1\134\4\uffff\1\133",
+ "\1\135\4\uffff\1\134",
"",
"",
"",
@@ -3691,36 +3730,37 @@
"",
"",
"",
- "\1\135",
"\1\136",
"\1\137",
"\1\140",
"\1\141",
"\1\142",
+ "\1\143",
+ "\1\144",
"",
"",
- "\1\143",
+ "\1\145",
"",
- "\1\144",
- "\1\145",
"\1\146",
"\1\147",
- "\1\151\20\uffff\1\150",
+ "\1\150",
+ "\1\151",
"\1\152",
- "\1\153",
- "\1\154",
+ "\1\153\20\uffff\1\154",
"\1\155",
"\1\156",
"\1\157",
- "\1\160\5\uffff\1\161",
- "\1\162",
- "\1\164\2\uffff\1\163",
- "\1\165",
- "\1\166\106\uffff\1\167",
- "\1\170",
- "\1\171",
+ "\1\160",
+ "\1\161",
+ "\1\162\2\uffff\1\163",
+ "\1\165\5\uffff\1\164",
+ "\1\166",
+ "\1\167",
+ "\1\171\106\uffff\1\170",
"\1\172",
- "\1\173\1\uffff\1\174",
+ "\1\173",
+ "\1\174",
+ "\1\175\1\uffff\1\176",
"\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100\52",
"",
"",
@@ -3732,16 +3772,14 @@
"",
"",
"",
- "\1\176",
+ "\1\u0080",
"",
- "\1\177",
+ "\1\u0081",
"",
"",
- "\1\u0080",
+ "\1\u0082",
"",
"",
- "\1\u0081",
- "\1\u0082",
"\1\u0083",
"\1\u0084",
"\1\u0085",
@@ -3753,29 +3791,29 @@
"\1\u008b",
"\1\u008c",
"\1\u008d",
- "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100\52",
+ "\1\u008e",
"\1\u008f",
"\1\u0090",
"\1\u0091",
"\1\u0092",
"\1\u0093",
- "\1\u0094",
+ "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100\52",
"\1\u0095",
"\1\u0096",
+ "\1\u0097",
"\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100\52",
- "\1\u0098",
"\1\u0099",
- "",
- "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100\52",
+ "\1\u009a",
"\1\u009b",
"\1\u009c",
- "\1\u009d",
+ "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100\52",
+ "",
"\1\u009e",
"\1\u009f",
- "",
"\1\u00a0",
- "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100\52",
+ "\1\u00a1",
"\1\u00a2",
+ "",
"\1\u00a3",
"\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100\52",
"\1\u00a5",
@@ -3785,128 +3823,135 @@
"\1\u00a9",
"\1\u00aa",
"\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100\52",
+ "\1\u00ac",
+ "\1\u00ad",
+ "\1\u00ae",
"\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100\52",
- "\1\u00ad",
- "\1\u00af\6\uffff\1\u00ae",
- "\1\u00b0",
- "",
+ "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100\52",
"\1\u00b1",
"\1\u00b2",
"\1\u00b3",
- "\1\u00b4",
- "\1\u00b5",
+ "\1\u00b4\6\uffff\1\u00b5",
"\1\u00b6",
"\1\u00b7",
- "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100\52",
"",
+ "\1\u00b8",
"\1\u00b9",
"\1\u00ba",
"",
- "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100\52",
+ "\1\u00bb",
"\1\u00bc",
"\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100\52",
"\1\u00be",
- "\1\u00bf",
- "\1\u00c0",
"",
"\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100\52",
+ "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100\52",
+ "\1\u00c1",
"\1\u00c2",
- "",
"\1\u00c3",
- "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100\52",
"\1\u00c4",
"",
- "\1\u00c5",
"\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100\52",
+ "\1\u00c6",
+ "\1\u00c7",
"",
+ "\1\u00c8",
+ "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100\52",
"",
- "\1\u00c7",
- "\1\u00c8",
"\1\u00c9",
"\1\u00ca",
- "\1\u00cb",
+ "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100\52",
+ "",
+ "",
"\1\u00cc",
"",
"\1\u00cd",
"\1\u00ce",
"\1\u00cf",
"\1\u00d0",
- "",
"\1\u00d1",
"\1\u00d2",
- "",
"\1\u00d3",
- "",
"\1\u00d4",
"\1\u00d5",
"\1\u00d6",
"",
"\1\u00d7",
- "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100\52",
+ "",
+ "",
+ "\1\u00d8",
"\1\u00d9",
- "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100\52",
+ "\1\u00da",
+ "\1\u00db",
"",
- "\1\u00db",
"\1\u00dc",
"\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100\52",
"\1\u00de",
- "\1\u00df",
- "\1\u00e0",
- "\1\u00e1\21\uffff\1\u00e2",
- "\1\u00e3",
+ "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100\52",
+ "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100\52",
+ "",
+ "\1\u00e1",
+ "\1\u00e2",
+ "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100\52",
"\1\u00e4",
- "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100\52",
+ "\1\u00e5",
"\1\u00e6",
- "\1\u00e7",
- "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100\52",
+ "\1\u00e7\21\uffff\1\u00e8",
"\1\u00e9",
"\1\u00ea",
- "\1\u00eb",
"\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100\52",
- "",
+ "\1\u00ec",
"\1\u00ed",
- "",
- "\1\u00ee",
+ "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100\52",
"\1\u00ef",
- "",
"\1\u00f0",
- "",
"\1\u00f1",
+ "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100\52",
"",
- "",
- "\1\u00f2",
"\1\u00f3",
"",
- "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100\52",
+ "",
+ "\1\u00f4",
"\1\u00f5",
"",
- "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100\52",
+ "\1\u00f6",
"\1\u00f7",
+ "",
+ "",
+ "",
+ "\1\u00f8",
"\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100\52",
"",
+ "\1\u00fa",
+ "\1\u00fb",
+ "",
"\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100\52",
- "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100\52",
- "\1\u00fb",
- "\1\u00fc",
"\1\u00fd",
"\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100\52",
+ "",
"\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100\52",
+ "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100\52",
+ "\1\u0101",
+ "\1\u0102",
+ "\1\u0103",
+ "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100\52",
"",
"\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100\52",
+ "\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100\52",
"",
"\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100\52",
"",
"",
"",
- "\1\u0102",
- "\1\u0103",
- "\1\u0104",
+ "\1\u0108",
+ "\1\u0109",
+ "\1\u010a",
"",
"",
"",
"",
- "\1\u0105",
"\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100\52",
+ "\1\u010c",
"\12\52\7\uffff\32\52\4\uffff\1\52\1\uffff\32\52\105\uffff\100\52",
"",
"",
@@ -3930,7 +3975,7 @@
}
}
public String getDescription() {
- return "1:1: Tokens : ( T29 | T30 | T31 | T32 | T33 | T34 | T35 | T36 | T37 | T38 | T39 | T40 | T41 | T42 | T43 | T44 | T45 | T46 | T47 | T48 | T49 | T50 | T51 | T52 | T53 | T54 | T55 | T56 | T57 | T58 | T59 | T60 | T61 | T62 | T63 | T64 | T65 | T66 | T67 | T68 | T69 | T70 | T71 | T72 | T73 | T74 | T75 | T76 | WS | INT | FLOAT | STRING | BOOL | RULE | WHEN | THEN | END | ID | SH_STYLE_SINGLE_LINE_COMMENT | C_STYLE_SINGLE_LINE_COMMENT | LEFT_PAREN | RIGHT_PAREN | LEFT_SQUARE | RIGHT_SQUARE | LEFT_CURLY | RIGHT_CURLY | MULTI_LINE_COMMENT | MISC );";
+ return "1:1: Tokens : ( T29 | T30 | T31 | T32 | T33 | T34 | T35 | T36 | T37 | T38 | T39 | T40 | T41 | T42 | T43 | T44 | T45 | T46 | T47 | T48 | T49 | T50 | T51 | T52 | T53 | T54 | T55 | T56 | T57 | T58 | T59 | T60 | T61 | T62 | T63 | T64 | T65 | T66 | T67 | T68 | T69 | T70 | T71 | T72 | T73 | T74 | T75 | T76 | T77 | WS | INT | FLOAT | STRING | BOOL | RULE | WHEN | THEN | END | ID | SH_STYLE_SINGLE_LINE_COMMENT | C_STYLE_SINGLE_LINE_COMMENT | LEFT_PAREN | RIGHT_PAREN | LEFT_SQUARE | RIGHT_SQUARE | LEFT_CURLY | RIGHT_CURLY | MULTI_LINE_COMMENT | MISC );";
}
}
Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/DRLParser.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/DRLParser.java 2007-01-16 17:19:41 UTC (rev 8873)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/DRLParser.java 2007-01-16 20:15:09 UTC (rev 8874)
@@ -1,16 +1,16 @@
-// $ANTLR 3.0b5 /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g 2007-01-11 21:47:58
+// $ANTLR 3.0b5 D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g 2007-01-15 18:10:59
+
+ package org.drools.lang;
+ import java.util.List;
+ import java.util.ArrayList;
+ import java.util.Iterator;
+ import java.util.Map;
+ import java.util.HashMap;
+ import java.util.StringTokenizer;
+ import org.drools.lang.descr.*;
+ import org.drools.compiler.SwitchingCommonTokenStream;
- package org.drools.lang;
- import java.util.List;
- import java.util.ArrayList;
- import java.util.Iterator;
- import java.util.Map;
- import java.util.HashMap;
- import java.util.StringTokenizer;
- import org.drools.lang.descr.*;
- import org.drools.compiler.SwitchingCommonTokenStream;
-
import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
@@ -19,7 +19,7 @@
import java.util.HashMap;
public class DRLParser extends Parser {
public static final String[] tokenNames = new String[] {
- "<invalid>", "<EOR>", "<DOWN>", "<UP>", "ID", "RULE", "WHEN", "STRING", "BOOL", "INT", "FLOAT", "LEFT_PAREN", "RIGHT_PAREN", "LEFT_CURLY", "RIGHT_CURLY", "LEFT_SQUARE", "RIGHT_SQUARE", "END", "THEN", "EOL", "WS", "EscapeSequence", "HexDigit", "UnicodeEscape", "OctalEscape", "SH_STYLE_SINGLE_LINE_COMMENT", "C_STYLE_SINGLE_LINE_COMMENT", "MULTI_LINE_COMMENT", "MISC", "';'", "'package'", "'import'", "'function'", "'.'", "'.*'", "'global'", "','", "'query'", "'template'", "':'", "'attributes'", "'date-effective'", "'date-expires'", "'enabled'", "'salience'", "'no-loop'", "'auto-focus'", "'activation-group'", "'agenda-group'", "'duration'", "'from'", "'accumulate'", "'init'", "'action'", "'result'", "'collect'", "'or'", "'||'", "'&'", "'|'", "'=='", "'>'", "'>='", "'<'", "'<='", "'!='", "'contains'", "'matches'", "'excludes'", "'null'", "'->'", "'and'", "'&&'", "'exists'", "'not'", "'eval'", "'use'"
+ "<invalid>", "<EOR>", "<DOWN>", "<UP>", "ID", "RULE", "WHEN", "STRING", "BOOL", "INT", "FLOAT", "LEFT_PAREN", "RIGHT_PAREN", "LEFT_CURLY", "RIGHT_CURLY", "LEFT_SQUARE", "RIGHT_SQUARE", "END", "THEN", "EOL", "WS", "EscapeSequence", "HexDigit", "UnicodeEscape", "OctalEscape", "SH_STYLE_SINGLE_LINE_COMMENT", "C_STYLE_SINGLE_LINE_COMMENT", "MULTI_LINE_COMMENT", "MISC", "';'", "'package'", "'import'", "'function'", "'.'", "'.*'", "'global'", "','", "'query'", "'template'", "':'", "'attributes'", "'date-effective'", "'date-expires'", "'enabled'", "'salience'", "'no-loop'", "'auto-focus'", "'activation-group'", "'agenda-group'", "'duration'", "'from'", "'accumulate'", "'init'", "'action'", "'result'", "'collect'", "'or'", "'||'", "'&'", "'|'", "'=='", "'>'", "'>='", "'<'", "'<='", "'!='", "'contains'", "'matches'", "'excludes'", "'null'", "'->'", "'and'", "'&&'", "'exists'", "'not'", "'eval'", "'forall'", "'use'"
};
public static final int LEFT_PAREN=11;
public static final int RIGHT_CURLY=14;
@@ -50,284 +50,284 @@
public DRLParser(TokenStream input) {
super(input);
- ruleMemo = new HashMap[144+1];
+ ruleMemo = new HashMap[148+1];
}
public String[] getTokenNames() { return tokenNames; }
- public String getGrammarFileName() { return "/home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g"; }
+ public String getGrammarFileName() { return "D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g"; }
+
+ private ExpanderResolver expanderResolver;
+ private Expander expander;
+ private boolean expanderDebug = false;
+ private PackageDescr packageDescr;
+ private List errors = new ArrayList();
+ private String source = "unknown";
+ private int lineOffset = 0;
+ private DescrFactory factory = new DescrFactory();
+ private boolean parserDebug = false;
+
+ public void setParserDebug(boolean parserDebug) {
+ this.parserDebug = parserDebug;
+ }
+
+ public void debug(String message) {
+ if ( parserDebug )
+ System.err.println( "drl parser: " + message );
+ }
+
+ public void setSource(String source) {
+ this.source = source;
+ }
+ public DescrFactory getFactory() {
+ return factory;
+ }
+
+ /**
+ * This may be set to enable debuggin of DSLs/expanders.
+ * If set to true, expander stuff will be sent to the Std out.
+ */
+ public void setExpanderDebug(boolean status) {
+ expanderDebug = status;
+ }
+ public String getSource() {
+ return this.source;
+ }
+
+ public PackageDescr getPackageDescr() {
+ return packageDescr;
+ }
+
+ private int offset(int line) {
+ return line + lineOffset;
+ }
+
+ /**
+ * This will set the offset to record when reparsing. Normally is zero of course
+ */
+ public void setLineOffset(int i) {
+ this.lineOffset = i;
+ }
+
+ public void setExpanderResolver(ExpanderResolver expanderResolver) {
+ this.expanderResolver = expanderResolver;
+ }
+
+ public ExpanderResolver getExpanderResolver() {
+ return expanderResolver;
+ }
+
+ /** Expand the LHS */
+ private String runWhenExpander(String text, int line) throws RecognitionException {
+ String expanded = text.trim();
+ if (expanded.startsWith(">")) {
+ expanded = expanded.substring(1); //escape !!
+ } else {
+ try {
+ expanded = expander.expand( "when", text );
+ } catch (Exception e) {
+ this.errors.add(new ExpanderException("Unable to expand: " + text + ". Due to " + e.getMessage(), line));
+ return "";
+ }
+ }
+ if (expanderDebug) {
+ System.out.println("Expanding LHS: " + text + " ----> " + expanded + " --> from line: " + line);
+ }
+ return expanded;
+
+ }
+
+ /** This will apply a list of constraints to an LHS block */
+ private String applyConstraints(List constraints, String block) {
+ //apply the constraints as a comma seperated list inside the previous block
+ //the block will end in something like "foo()" and the constraint patterns will be put in the ()
+ if (constraints == null) {
+ return block;
+ }
+ StringBuffer list = new StringBuffer();
+ for (Iterator iter = constraints.iterator(); iter.hasNext();) {
+ String con = (String) iter.next();
+ list.append("\n\t\t");
+ list.append(con);
+ if (iter.hasNext()) {
+ list.append(",");
+ }
+ }
+ if (block.endsWith("()")) {
+ return block.substring(0, block.length() - 2) + "(" + list.toString() + ")";
+ } else {
+ return block + "(" + list.toString() + ")";
+ }
+ }
+
+ /** Reparse the results of the expansion */
+ private void reparseLhs(String text, AndDescr descrs) throws RecognitionException {
+ CharStream charStream = new ANTLRStringStream( text );
+ DRLLexer lexer = new DRLLexer( charStream );
+ TokenStream tokenStream = new CommonTokenStream( lexer );
+ DRLParser parser = new DRLParser( tokenStream );
+ parser.setLineOffset( descrs.getLine() );
+ parser.normal_lhs_block(descrs);
+
+ if (parser.hasErrors()) {
+ this.errors.addAll(parser.getErrors());
+ }
+ if (expanderDebug) {
+ System.out.println("Reparsing LHS: " + text + " --> successful:" + !parser.hasErrors());
+ }
+
+ }
+
+ /** Expand a line on the RHS */
+ private String runThenExpander(String text, int startLine) {
+ //System.err.println( "expand THEN [" + text + "]" );
+ StringTokenizer lines = new StringTokenizer( text, "\n\r" );
+
+ StringBuffer expanded = new StringBuffer();
+
+ String eol = System.getProperty( "line.separator" );
+
+ while ( lines.hasMoreTokens() ) {
+ startLine++;
+ String line = lines.nextToken();
+ line = line.trim();
+ if ( line.length() > 0 ) {
+ if ( line.startsWith( ">" ) ) {
+ expanded.append( line.substring( 1 ) );
+ expanded.append( eol );
+ } else {
+ try {
+ expanded.append( expander.expand( "then", line ) );
+ expanded.append( eol );
+ } catch (Exception e) {
+ this.errors.add(new ExpanderException("Unable to expand: " + line + ". Due to " + e.getMessage(), startLine));
+ }
+ }
+ }
+ }
+
+ if (expanderDebug) {
+ System.out.println("Expanding RHS: " + text + " ----> " + expanded.toString() + " --> from line starting: " + startLine);
+ }
+
+ return expanded.toString();
+ }
+
+
+
+ private String getString(Token token) {
+ String orig = token.getText();
+ return orig.substring( 1, orig.length() -1 );
+ }
+
+ public void reportError(RecognitionException ex) {
+ // if we've already reported an error and have not matched a token
+ // yet successfully, don't report any errors.
+ if ( errorRecovery ) {
+ return;
+ }
+ errorRecovery = true;
+
+ ex.line = offset(ex.line); //add the offset if there is one
+ errors.add( ex );
+ }
+
+ /** return the raw RecognitionException errors */
+ public List getErrors() {
+ return errors;
+ }
+
+ /** Return a list of pretty strings summarising the errors */
+ public List getErrorMessages() {
+ List messages = new ArrayList();
+ for ( Iterator errorIter = errors.iterator() ; errorIter.hasNext() ; ) {
+ messages.add( createErrorMessage( (RecognitionException) errorIter.next() ) );
+ }
+ return messages;
+ }
+
+ /** return true if any parser errors were accumulated */
+ public boolean hasErrors() {
+ return ! errors.isEmpty();
+ }
+
+ /** This will take a RecognitionException, and create a sensible error message out of it */
+ public String createErrorMessage(RecognitionException e)
+ {
+ StringBuffer message = new StringBuffer();
+ message.append( source + ":"+e.line+":"+e.charPositionInLine+" ");
+ if ( e instanceof MismatchedTokenException ) {
+ MismatchedTokenException mte = (MismatchedTokenException)e;
+ message.append("mismatched token: "+
+ e.token+
+ "; expecting type "+
+ tokenNames[mte.expecting]);
+ }
+ else if ( e instanceof MismatchedTreeNodeException ) {
+ MismatchedTreeNodeException mtne = (MismatchedTreeNodeException)e;
+ message.append("mismatched tree node: "+
+ mtne.foundNode+
+ "; expecting type "+
+ tokenNames[mtne.expecting]);
+ }
+ else if ( e instanceof NoViableAltException ) {
+ NoViableAltException nvae = (NoViableAltException)e;
+ message.append( "Unexpected token '" + e.token.getText() + "'" );
+ /*
+ message.append("decision=<<"+nvae.grammarDecisionDescription+">>"+
+ " state "+nvae.stateNumber+
+ " (decision="+nvae.decisionNumber+
+ ") no viable alt; token="+
+ e.token);
+ */
+ }
+ else if ( e instanceof EarlyExitException ) {
+ EarlyExitException eee = (EarlyExitException)e;
+ message.append("required (...)+ loop (decision="+
+ eee.decisionNumber+
+ ") did not match anything; token="+
+ e.token);
+ }
+ else if ( e instanceof MismatchedSetException ) {
+ MismatchedSetException mse = (MismatchedSetException)e;
+ message.append("mismatched token '"+
+ e.token+
+ "' expecting set "+mse.expecting);
+ }
+ else if ( e instanceof MismatchedNotSetException ) {
+ MismatchedNotSetException mse = (MismatchedNotSetException)e;
+ message.append("mismatched token '"+
+ e.token+
+ "' expecting set "+mse.expecting);
+ }
+ else if ( e instanceof FailedPredicateException ) {
+ FailedPredicateException fpe = (FailedPredicateException)e;
+ message.append("rule "+fpe.ruleName+" failed predicate: {"+
+ fpe.predicateText+"}?");
+ } else if (e instanceof GeneralParseException) {
+ message.append(" " + e.getMessage());
+ }
+ return message.toString();
+ }
+
+ void checkTrailingSemicolon(String text, int line) {
+ if (text.trim().endsWith( ";" ) ) {
+ this.errors.add( new GeneralParseException( "Trailing semi-colon not allowed", offset(line) ) );
+ }
+ }
+
- private ExpanderResolver expanderResolver;
- private Expander expander;
- private boolean expanderDebug = false;
- private PackageDescr packageDescr;
- private List errors = new ArrayList();
- private String source = "unknown";
- private int lineOffset = 0;
- private DescrFactory factory = new DescrFactory();
- private boolean parserDebug = false;
-
- public void setParserDebug(boolean parserDebug) {
- this.parserDebug = parserDebug;
- }
-
- public void debug(String message) {
- if ( parserDebug )
- System.err.println( "drl parser: " + message );
- }
-
- public void setSource(String source) {
- this.source = source;
- }
- public DescrFactory getFactory() {
- return factory;
- }
- /**
- * This may be set to enable debuggin of DSLs/expanders.
- * If set to true, expander stuff will be sent to the Std out.
- */
- public void setExpanderDebug(boolean status) {
- expanderDebug = status;
- }
- public String getSource() {
- return this.source;
- }
-
- public PackageDescr getPackageDescr() {
- return packageDescr;
- }
-
- private int offset(int line) {
- return line + lineOffset;
- }
-
- /**
- * This will set the offset to record when reparsing. Normally is zero of course
- */
- public void setLineOffset(int i) {
- this.lineOffset = i;
- }
-
- public void setExpanderResolver(ExpanderResolver expanderResolver) {
- this.expanderResolver = expanderResolver;
- }
-
- public ExpanderResolver getExpanderResolver() {
- return expanderResolver;
- }
-
- /** Expand the LHS */
- private String runWhenExpander(String text, int line) throws RecognitionException {
- String expanded = text.trim();
- if (expanded.startsWith(">")) {
- expanded = expanded.substring(1); //escape !!
- } else {
- try {
- expanded = expander.expand( "when", text );
- } catch (Exception e) {
- this.errors.add(new ExpanderException("Unable to expand: " + text + ". Due to " + e.getMessage(), line));
- return "";
- }
- }
- if (expanderDebug) {
- System.out.println("Expanding LHS: " + text + " ----> " + expanded + " --> from line: " + line);
- }
- return expanded;
-
- }
-
- /** This will apply a list of constraints to an LHS block */
- private String applyConstraints(List constraints, String block) {
- //apply the constraints as a comma seperated list inside the previous block
- //the block will end in something like "foo()" and the constraint patterns will be put in the ()
- if (constraints == null) {
- return block;
- }
- StringBuffer list = new StringBuffer();
- for (Iterator iter = constraints.iterator(); iter.hasNext();) {
- String con = (String) iter.next();
- list.append("\n\t\t");
- list.append(con);
- if (iter.hasNext()) {
- list.append(",");
- }
- }
- if (block.endsWith("()")) {
- return block.substring(0, block.length() - 2) + "(" + list.toString() + ")";
- } else {
- return block + "(" + list.toString() + ")";
- }
- }
- /** Reparse the results of the expansion */
- private void reparseLhs(String text, AndDescr descrs) throws RecognitionException {
- CharStream charStream = new ANTLRStringStream( text );
- DRLLexer lexer = new DRLLexer( charStream );
- TokenStream tokenStream = new CommonTokenStream( lexer );
- DRLParser parser = new DRLParser( tokenStream );
- parser.setLineOffset( descrs.getLine() );
- parser.normal_lhs_block(descrs);
-
- if (parser.hasErrors()) {
- this.errors.addAll(parser.getErrors());
- }
- if (expanderDebug) {
- System.out.println("Reparsing LHS: " + text + " --> successful:" + !parser.hasErrors());
- }
-
- }
-
- /** Expand a line on the RHS */
- private String runThenExpander(String text, int startLine) {
- //System.err.println( "expand THEN [" + text + "]" );
- StringTokenizer lines = new StringTokenizer( text, "\n\r" );
-
- StringBuffer expanded = new StringBuffer();
-
- String eol = System.getProperty( "line.separator" );
-
- while ( lines.hasMoreTokens() ) {
- startLine++;
- String line = lines.nextToken();
- line = line.trim();
- if ( line.length() > 0 ) {
- if ( line.startsWith( ">" ) ) {
- expanded.append( line.substring( 1 ) );
- expanded.append( eol );
- } else {
- try {
- expanded.append( expander.expand( "then", line ) );
- expanded.append( eol );
- } catch (Exception e) {
- this.errors.add(new ExpanderException("Unable to expand: " + line + ". Due to " + e.getMessage(), startLine));
- }
- }
- }
- }
-
- if (expanderDebug) {
- System.out.println("Expanding RHS: " + text + " ----> " + expanded.toString() + " --> from line starting: " + startLine);
- }
-
- return expanded.toString();
- }
-
-
-
- private String getString(Token token) {
- String orig = token.getText();
- return orig.substring( 1, orig.length() -1 );
- }
-
- public void reportError(RecognitionException ex) {
- // if we've already reported an error and have not matched a token
- // yet successfully, don't report any errors.
- if ( errorRecovery ) {
- return;
- }
- errorRecovery = true;
-
- ex.line = offset(ex.line); //add the offset if there is one
- errors.add( ex );
- }
-
- /** return the raw RecognitionException errors */
- public List getErrors() {
- return errors;
- }
-
- /** Return a list of pretty strings summarising the errors */
- public List getErrorMessages() {
- List messages = new ArrayList();
- for ( Iterator errorIter = errors.iterator() ; errorIter.hasNext() ; ) {
- messages.add( createErrorMessage( (RecognitionException) errorIter.next() ) );
- }
- return messages;
- }
-
- /** return true if any parser errors were accumulated */
- public boolean hasErrors() {
- return ! errors.isEmpty();
- }
-
- /** This will take a RecognitionException, and create a sensible error message out of it */
- public String createErrorMessage(RecognitionException e)
- {
- StringBuffer message = new StringBuffer();
- message.append( source + ":"+e.line+":"+e.charPositionInLine+" ");
- if ( e instanceof MismatchedTokenException ) {
- MismatchedTokenException mte = (MismatchedTokenException)e;
- message.append("mismatched token: "+
- e.token+
- "; expecting type "+
- tokenNames[mte.expecting]);
- }
- else if ( e instanceof MismatchedTreeNodeException ) {
- MismatchedTreeNodeException mtne = (MismatchedTreeNodeException)e;
- message.append("mismatched tree node: "+
- mtne.foundNode+
- "; expecting type "+
- tokenNames[mtne.expecting]);
- }
- else if ( e instanceof NoViableAltException ) {
- NoViableAltException nvae = (NoViableAltException)e;
- message.append( "Unexpected token '" + e.token.getText() + "'" );
- /*
- message.append("decision=<<"+nvae.grammarDecisionDescription+">>"+
- " state "+nvae.stateNumber+
- " (decision="+nvae.decisionNumber+
- ") no viable alt; token="+
- e.token);
- */
- }
- else if ( e instanceof EarlyExitException ) {
- EarlyExitException eee = (EarlyExitException)e;
- message.append("required (...)+ loop (decision="+
- eee.decisionNumber+
- ") did not match anything; token="+
- e.token);
- }
- else if ( e instanceof MismatchedSetException ) {
- MismatchedSetException mse = (MismatchedSetException)e;
- message.append("mismatched token '"+
- e.token+
- "' expecting set "+mse.expecting);
- }
- else if ( e instanceof MismatchedNotSetException ) {
- MismatchedNotSetException mse = (MismatchedNotSetException)e;
- message.append("mismatched token '"+
- e.token+
- "' expecting set "+mse.expecting);
- }
- else if ( e instanceof FailedPredicateException ) {
- FailedPredicateException fpe = (FailedPredicateException)e;
- message.append("rule "+fpe.ruleName+" failed predicate: {"+
- fpe.predicateText+"}?");
- } else if (e instanceof GeneralParseException) {
- message.append(" " + e.getMessage());
- }
- return message.toString();
- }
-
- void checkTrailingSemicolon(String text, int line) {
- if (text.trim().endsWith( ";" ) ) {
- this.errors.add( new GeneralParseException( "Trailing semi-colon not allowed", offset(line) ) );
- }
- }
-
-
-
-
// $ANTLR start opt_semicolon
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:282:1: opt_semicolon : ( ( ';' )=> ';' )? ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:282:1: opt_semicolon : ( ( ';' )=> ';' )? ;
public void opt_semicolon() throws RecognitionException {
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:283:4: ( ( ( ';' )=> ';' )? )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:283:4: ( ( ';' )=> ';' )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:283:4: ( ( ( ';' )=> ';' )? )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:283:4: ( ( ';' )=> ';' )?
{
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:283:4: ( ( ';' )=> ';' )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:283:4: ( ( ';' )=> ';' )?
int alt1=2;
int LA1_0 = input.LA(1);
if ( (LA1_0==29) ) {
@@ -335,7 +335,7 @@
}
switch (alt1) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:0:0: ( ';' )=> ';'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:0:0: ( ';' )=> ';'
{
match(input,29,FOLLOW_29_in_opt_semicolon46); if (failed) return ;
@@ -360,17 +360,17 @@
// $ANTLR start compilation_unit
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:286:1: compilation_unit : prolog ( ( statement )=> statement )+ ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:286:1: compilation_unit : prolog ( ( statement )=> statement )+ ;
public void compilation_unit() throws RecognitionException {
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:287:4: ( prolog ( ( statement )=> statement )+ )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:287:4: prolog ( ( statement )=> statement )+
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:287:4: ( prolog ( ( statement )=> statement )+ )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:287:4: prolog ( ( statement )=> statement )+
{
pushFollow(FOLLOW_prolog_in_compilation_unit58);
prolog();
_fsp--;
if (failed) return ;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:288:3: ( ( statement )=> statement )+
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:288:3: ( ( statement )=> statement )+
int cnt2=0;
loop2:
do {
@@ -383,7 +383,7 @@
switch (alt2) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:288:5: ( statement )=> statement
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:288:5: ( statement )=> statement
{
pushFollow(FOLLOW_statement_in_compilation_unit65);
statement();
@@ -419,19 +419,19 @@
// $ANTLR start prolog
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:291:1: prolog : ( ( package_statement )=>name= package_statement )? ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:291:1: prolog : ( ( package_statement )=>name= package_statement )? ;
public void prolog() throws RecognitionException {
String name = null;
-
- String packageName = "";
+
+ String packageName = "";
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:295:4: ( ( ( package_statement )=>name= package_statement )? )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:295:4: ( ( package_statement )=>name= package_statement )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:295:4: ( ( ( package_statement )=>name= package_statement )? )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:295:4: ( ( package_statement )=>name= package_statement )?
{
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:295:4: ( ( package_statement )=>name= package_statement )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:295:4: ( ( package_statement )=>name= package_statement )?
int alt3=2;
int LA3_0 = input.LA(1);
if ( (LA3_0==30) ) {
@@ -439,7 +439,7 @@
}
switch (alt3) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:295:6: ( package_statement )=>name= package_statement
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:295:6: ( package_statement )=>name= package_statement
{
pushFollow(FOLLOW_package_statement_in_prolog90);
name=package_statement();
@@ -455,8 +455,8 @@
}
if ( backtracking==0 ) {
-
- this.packageDescr = new PackageDescr( name );
+
+ this.packageDescr = new PackageDescr( name );
}
@@ -475,7 +475,7 @@
// $ANTLR start statement
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:301:1: statement : ( ( import_statement )=> import_statement | ( function_import_statement )=> function_import_statement | ( global )=> global | ( function )=> function | ( template )=>t= template | ( rule )=>r= rule | q= query ) ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:301:1: statement : ( ( import_statement )=> import_statement | ( function_import_statement )=> function_import_statement | ( global )=> global | ( function )=> function | ( template )=>t= template | ( rule )=>r= rule | q= query ) ;
public void statement() throws RecognitionException {
FactTemplateDescr t = null;
@@ -485,10 +485,10 @@
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:303:2: ( ( ( import_statement )=> import_statement | ( function_import_statement )=> function_import_statement | ( global )=> global | ( function )=> function | ( template )=>t= template | ( rule )=>r= rule | q= query ) )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:303:2: ( ( import_statement )=> import_statement | ( function_import_statement )=> function_import_statement | ( global )=> global | ( function )=> function | ( template )=>t= template | ( rule )=>r= rule | q= query )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:303:2: ( ( ( import_statement )=> import_statement | ( function_import_statement )=> function_import_statement | ( global )=> global | ( function )=> function | ( template )=>t= template | ( rule )=>r= rule | q= query ) )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:303:2: ( ( import_statement )=> import_statement | ( function_import_statement )=> function_import_statement | ( global )=> global | ( function )=> function | ( template )=>t= template | ( rule )=>r= rule | q= query )
{
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:303:2: ( ( import_statement )=> import_statement | ( function_import_statement )=> function_import_statement | ( global )=> global | ( function )=> function | ( template )=>t= template | ( rule )=>r= rule | q= query )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:303:2: ( ( import_statement )=> import_statement | ( function_import_statement )=> function_import_statement | ( global )=> global | ( function )=> function | ( template )=>t= template | ( rule )=>r= rule | q= query )
int alt4=7;
switch ( input.LA(1) ) {
case 31:
@@ -532,7 +532,7 @@
switch (alt4) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:303:4: ( import_statement )=> import_statement
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:303:4: ( import_statement )=> import_statement
{
pushFollow(FOLLOW_import_statement_in_statement114);
import_statement();
@@ -542,7 +542,7 @@
}
break;
case 2 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:304:10: ( function_import_statement )=> function_import_statement
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:304:10: ( function_import_statement )=> function_import_statement
{
pushFollow(FOLLOW_function_import_statement_in_statement126);
function_import_statement();
@@ -552,7 +552,7 @@
}
break;
case 3 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:305:4: ( global )=> global
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:305:4: ( global )=> global
{
pushFollow(FOLLOW_global_in_statement132);
global();
@@ -562,7 +562,7 @@
}
break;
case 4 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:306:4: ( function )=> function
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:306:4: ( function )=> function
{
pushFollow(FOLLOW_function_in_statement138);
function();
@@ -572,7 +572,7 @@
}
break;
case 5 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:307:10: ( template )=>t= template
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:307:10: ( template )=>t= template
{
pushFollow(FOLLOW_template_in_statement152);
t=template();
@@ -585,7 +585,7 @@
}
break;
case 6 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:308:4: ( rule )=>r= rule
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:308:4: ( rule )=>r= rule
{
pushFollow(FOLLOW_rule_in_statement161);
r=rule();
@@ -598,7 +598,7 @@
}
break;
case 7 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:309:4: q= query
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:309:4: q= query
{
pushFollow(FOLLOW_query_in_statement171);
q=query();
@@ -629,19 +629,19 @@
// $ANTLR start package_statement
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:313:1: package_statement returns [String packageName] : 'package' name= dotted_name opt_semicolon ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:313:1: package_statement returns [String packageName] : 'package' name= dotted_name opt_semicolon ;
public String package_statement() throws RecognitionException {
String packageName = null;
String name = null;
-
- packageName = null;
+
+ packageName = null;
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:318:3: ( 'package' name= dotted_name opt_semicolon )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:318:3: 'package' name= dotted_name opt_semicolon
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:318:3: ( 'package' name= dotted_name opt_semicolon )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:318:3: 'package' name= dotted_name opt_semicolon
{
match(input,30,FOLLOW_30_in_package_statement200); if (failed) return packageName;
pushFollow(FOLLOW_dotted_name_in_package_statement204);
@@ -653,8 +653,8 @@
_fsp--;
if (failed) return packageName;
if ( backtracking==0 ) {
-
- packageName = name;
+
+ packageName = name;
}
@@ -673,14 +673,14 @@
// $ANTLR start import_statement
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:325:1: import_statement : 'import' name= import_name opt_semicolon ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:325:1: import_statement : 'import' name= import_name opt_semicolon ;
public void import_statement() throws RecognitionException {
String name = null;
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:326:4: ( 'import' name= import_name opt_semicolon )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:326:4: 'import' name= import_name opt_semicolon
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:326:4: ( 'import' name= import_name opt_semicolon )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:326:4: 'import' name= import_name opt_semicolon
{
match(input,31,FOLLOW_31_in_import_statement223); if (failed) return ;
pushFollow(FOLLOW_import_name_in_import_statement227);
@@ -692,9 +692,9 @@
_fsp--;
if (failed) return ;
if ( backtracking==0 ) {
-
- if (packageDescr != null)
- packageDescr.addImport( name );
+
+ if (packageDescr != null)
+ packageDescr.addImport( name );
}
@@ -713,14 +713,14 @@
// $ANTLR start function_import_statement
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:333:1: function_import_statement : 'import' 'function' name= import_name opt_semicolon ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:333:1: function_import_statement : 'import' 'function' name= import_name opt_semicolon ;
public void function_import_statement() throws RecognitionException {
String name = null;
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:334:4: ( 'import' 'function' name= import_name opt_semicolon )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:334:4: 'import' 'function' name= import_name opt_semicolon
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:334:4: ( 'import' 'function' name= import_name opt_semicolon )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:334:4: 'import' 'function' name= import_name opt_semicolon
{
match(input,31,FOLLOW_31_in_function_import_statement245); if (failed) return ;
match(input,32,FOLLOW_32_in_function_import_statement247); if (failed) return ;
@@ -733,9 +733,9 @@
_fsp--;
if (failed) return ;
if ( backtracking==0 ) {
-
- if (packageDescr != null)
- packageDescr.addFunctionImport( name );
+
+ if (packageDescr != null)
+ packageDescr.addFunctionImport( name );
}
@@ -754,26 +754,26 @@
// $ANTLR start import_name
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:342:1: import_name returns [String name] : id= ID ( ( '.' ID )=> '.' id= ID )* ( ( '.*' )=>star= '.*' )? ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:342:1: import_name returns [String name] : id= ID ( ( '.' ID )=> '.' id= ID )* ( ( '.*' )=>star= '.*' )? ;
public String import_name() throws RecognitionException {
String name = null;
Token id=null;
Token star=null;
-
- name = null;
+
+ name = null;
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:347:3: (id= ID ( ( '.' ID )=> '.' id= ID )* ( ( '.*' )=>star= '.*' )? )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:347:3: id= ID ( ( '.' ID )=> '.' id= ID )* ( ( '.*' )=>star= '.*' )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:347:3: (id= ID ( ( '.' ID )=> '.' id= ID )* ( ( '.*' )=>star= '.*' )? )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:347:3: id= ID ( ( '.' ID )=> '.' id= ID )* ( ( '.*' )=>star= '.*' )?
{
id=(Token)input.LT(1);
match(input,ID,FOLLOW_ID_in_import_name285); if (failed) return name;
if ( backtracking==0 ) {
name=id.getText();
}
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:347:32: ( ( '.' ID )=> '.' id= ID )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:347:32: ( ( '.' ID )=> '.' id= ID )*
loop5:
do {
int alt5=2;
@@ -785,7 +785,7 @@
switch (alt5) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:347:34: ( '.' ID )=> '.' id= ID
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:347:34: ( '.' ID )=> '.' id= ID
{
match(input,33,FOLLOW_33_in_import_name291); if (failed) return name;
id=(Token)input.LT(1);
@@ -802,7 +802,7 @@
}
} while (true);
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:347:85: ( ( '.*' )=>star= '.*' )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:347:85: ( ( '.*' )=>star= '.*' )?
int alt6=2;
int LA6_0 = input.LA(1);
if ( (LA6_0==34) ) {
@@ -810,7 +810,7 @@
}
switch (alt6) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:347:86: ( '.*' )=>star= '.*'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:347:86: ( '.*' )=>star= '.*'
{
star=(Token)input.LT(1);
match(input,34,FOLLOW_34_in_import_name305); if (failed) return name;
@@ -839,17 +839,17 @@
// $ANTLR start global
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:351:1: global : 'global' type= dotted_name id= ID opt_semicolon ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:351:1: global : 'global' type= dotted_name id= ID opt_semicolon ;
public void global() throws RecognitionException {
Token id=null;
String type = null;
-
+
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:355:3: ( 'global' type= dotted_name id= ID opt_semicolon )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:355:3: 'global' type= dotted_name id= ID opt_semicolon
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:355:3: ( 'global' type= dotted_name id= ID opt_semicolon )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:355:3: 'global' type= dotted_name id= ID opt_semicolon
{
match(input,35,FOLLOW_35_in_global329); if (failed) return ;
pushFollow(FOLLOW_dotted_name_in_global333);
@@ -863,8 +863,8 @@
_fsp--;
if (failed) return ;
if ( backtracking==0 ) {
-
- packageDescr.addGlobal( id.getText(), type );
+
+ packageDescr.addGlobal( id.getText(), type );
}
@@ -883,7 +883,7 @@
// $ANTLR start function
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:362:1: function : loc= 'function' ( ( dotted_name )=>retType= dotted_name )? name= ID '(' ( ( ( ( dotted_name )=> dotted_name )? argument ( ( ',' ( ( dotted_name )=> dotted_name )? argument )=> ',' ( ( dotted_name )=> dotted_name )? argument )* )=> ( ( dotted_name )=>paramType= dotted_name )? paramName= argument ( ( ',' ( ( dotted_name )=> dotted_name )? argument )=> ',' ( ( dotted_name )=>paramType= dotted_name )? paramName= argument )* )? ')' body= curly_chunk ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:362:1: function : loc= 'function' ( ( dotted_name )=>retType= dotted_name )? name= ID '(' ( ( ( ( dotted_name )=> dotted_name )? argument ( ( ',' ( ( dotted_name )=> dotted_name )? argument )=> ',' ( ( dotted_name )=> dotted_name )? argument )* )=> ( ( dotted_name )=>paramType= dotted_name )? paramName= argument ( ( ',' ( ( dotted_name )=> dotted_name )? argument )=> ',' ( ( dotted_name )=>paramType= dotted_name )? paramName= argument )* )? ')' body= curly_chunk ;
public void function() throws RecognitionException {
Token loc=null;
Token name=null;
@@ -896,16 +896,16 @@
String body = null;
-
- FunctionDescr f = null;
+
+ FunctionDescr f = null;
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:367:3: (loc= 'function' ( ( dotted_name )=>retType= dotted_name )? name= ID '(' ( ( ( ( dotted_name )=> dotted_name )? argument ( ( ',' ( ( dotted_name )=> dotted_name )? argument )=> ',' ( ( dotted_name )=> dotted_name )? argument )* )=> ( ( dotted_name )=>paramType= dotted_name )? paramName= argument ( ( ',' ( ( dotted_name )=> dotted_name )? argument )=> ',' ( ( dotted_name )=>paramType= dotted_name )? paramName= argument )* )? ')' body= curly_chunk )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:367:3: loc= 'function' ( ( dotted_name )=>retType= dotted_name )? name= ID '(' ( ( ( ( dotted_name )=> dotted_name )? argument ( ( ',' ( ( dotted_name )=> dotted_name )? argument )=> ',' ( ( dotted_name )=> dotted_name )? argument )* )=> ( ( dotted_name )=>paramType= dotted_name )? paramName= argument ( ( ',' ( ( dotted_name )=> dotted_name )? argument )=> ',' ( ( dotted_name )=>paramType= dotted_name )? paramName= argument )* )? ')' body= curly_chunk
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:367:3: (loc= 'function' ( ( dotted_name )=>retType= dotted_name )? name= ID '(' ( ( ( ( dotted_name )=> dotted_name )? argument ( ( ',' ( ( dotted_name )=> dotted_name )? argument )=> ',' ( ( dotted_name )=> dotted_name )? argument )* )=> ( ( dotted_name )=>paramType= dotted_name )? paramName= argument ( ( ',' ( ( dotted_name )=> dotted_name )? argument )=> ',' ( ( dotted_name )=>paramType= dotted_name )? paramName= argument )* )? ')' body= curly_chunk )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:367:3: loc= 'function' ( ( dotted_name )=>retType= dotted_name )? name= ID '(' ( ( ( ( dotted_name )=> dotted_name )? argument ( ( ',' ( ( dotted_name )=> dotted_name )? argument )=> ',' ( ( dotted_name )=> dotted_name )? argument )* )=> ( ( dotted_name )=>paramType= dotted_name )? paramName= argument ( ( ',' ( ( dotted_name )=> dotted_name )? argument )=> ',' ( ( dotted_name )=>paramType= dotted_name )? paramName= argument )* )? ')' body= curly_chunk
{
loc=(Token)input.LT(1);
match(input,32,FOLLOW_32_in_function366); if (failed) return ;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:367:18: ( ( dotted_name )=>retType= dotted_name )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:367:18: ( ( dotted_name )=>retType= dotted_name )?
int alt7=2;
int LA7_0 = input.LA(1);
if ( (LA7_0==ID) ) {
@@ -916,7 +916,7 @@
}
switch (alt7) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:367:19: ( dotted_name )=>retType= dotted_name
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:367:19: ( dotted_name )=>retType= dotted_name
{
pushFollow(FOLLOW_dotted_name_in_function371);
retType=dotted_name();
@@ -931,14 +931,14 @@
name=(Token)input.LT(1);
match(input,ID,FOLLOW_ID_in_function377); if (failed) return ;
if ( backtracking==0 ) {
-
- //System.err.println( "function :: " + name.getText() );
- f = new FunctionDescr( name.getText(), retType );
- f.setLocation(offset(loc.getLine()), loc.getCharPositionInLine());
+
+ //System.err.println( "function :: " + name.getText() );
+ f = new FunctionDescr( name.getText(), retType );
+ f.setLocation(offset(loc.getLine()), loc.getCharPositionInLine());
}
match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_function386); if (failed) return ;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:374:4: ( ( ( ( dotted_name )=> dotted_name )? argument ( ( ',' ( ( dotted_name )=> dotted_name )? argument )=> ',' ( ( dotted_name )=> dotted_name )? argument )* )=> ( ( dotted_name )=>paramType= dotted_name )? paramName= argument ( ( ',' ( ( dotted_name )=> dotted_name )? argument )=> ',' ( ( dotted_name )=>paramType= dotted_name )? paramName= argument )* )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:374:4: ( ( ( ( dotted_name )=> dotted_name )? argument ( ( ',' ( ( dotted_name )=> dotted_name )? argument )=> ',' ( ( dotted_name )=> dotted_name )? argument )* )=> ( ( dotted_name )=>paramType= dotted_name )? paramName= argument ( ( ',' ( ( dotted_name )=> dotted_name )? argument )=> ',' ( ( dotted_name )=>paramType= dotted_name )? paramName= argument )* )?
int alt11=2;
int LA11_0 = input.LA(1);
if ( (LA11_0==ID) ) {
@@ -946,14 +946,14 @@
}
switch (alt11) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:374:6: ( ( ( dotted_name )=> dotted_name )? argument ( ( ',' ( ( dotted_name )=> dotted_name )? argument )=> ',' ( ( dotted_name )=> dotted_name )? argument )* )=> ( ( dotted_name )=>paramType= dotted_name )? paramName= argument ( ( ',' ( ( dotted_name )=> dotted_name )? argument )=> ',' ( ( dotted_name )=>paramType= dotted_name )? paramName= argument )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:374:6: ( ( ( dotted_name )=> dotted_name )? argument ( ( ',' ( ( dotted_name )=> dotted_name )? argument )=> ',' ( ( dotted_name )=> dotted_name )? argument )* )=> ( ( dotted_name )=>paramType= dotted_name )? paramName= argument ( ( ',' ( ( dotted_name )=> dotted_name )? argument )=> ',' ( ( dotted_name )=>paramType= dotted_name )? paramName= argument )*
{
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:374:6: ( ( dotted_name )=>paramType= dotted_name )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:374:6: ( ( dotted_name )=>paramType= dotted_name )?
int alt8=2;
alt8 = dfa8.predict(input);
switch (alt8) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:374:7: ( dotted_name )=>paramType= dotted_name
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:374:7: ( dotted_name )=>paramType= dotted_name
{
pushFollow(FOLLOW_dotted_name_in_function396);
paramType=dotted_name();
@@ -970,11 +970,11 @@
_fsp--;
if (failed) return ;
if ( backtracking==0 ) {
-
- f.addParameter( paramType, paramName );
+
+ f.addParameter( paramType, paramName );
}
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:378:5: ( ( ',' ( ( dotted_name )=> dotted_name )? argument )=> ',' ( ( dotted_name )=>paramType= dotted_name )? paramName= argument )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:378:5: ( ( ',' ( ( dotted_name )=> dotted_name )? argument )=> ',' ( ( dotted_name )=>paramType= dotted_name )? paramName= argument )*
loop10:
do {
int alt10=2;
@@ -986,15 +986,15 @@
switch (alt10) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:378:7: ( ',' ( ( dotted_name )=> dotted_name )? argument )=> ',' ( ( dotted_name )=>paramType= dotted_name )? paramName= argument
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:378:7: ( ',' ( ( dotted_name )=> dotted_name )? argument )=> ',' ( ( dotted_name )=>paramType= dotted_name )? paramName= argument
{
match(input,36,FOLLOW_36_in_function416); if (failed) return ;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:378:11: ( ( dotted_name )=>paramType= dotted_name )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:378:11: ( ( dotted_name )=>paramType= dotted_name )?
int alt9=2;
alt9 = dfa9.predict(input);
switch (alt9) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:378:12: ( dotted_name )=>paramType= dotted_name
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:378:12: ( dotted_name )=>paramType= dotted_name
{
pushFollow(FOLLOW_dotted_name_in_function421);
paramType=dotted_name();
@@ -1011,8 +1011,8 @@
_fsp--;
if (failed) return ;
if ( backtracking==0 ) {
-
- f.addParameter( paramType, paramName );
+
+ f.addParameter( paramType, paramName );
}
@@ -1036,11 +1036,11 @@
_fsp--;
if (failed) return ;
if ( backtracking==0 ) {
-
- //strip out '{','}'
- f.setText( body.substring( 1, body.length()-1 ) );
-
- packageDescr.addFunction( f );
+
+ //strip out '{','}'
+ f.setText( body.substring( 1, body.length()-1 ) );
+
+ packageDescr.addFunction( f );
}
@@ -1059,7 +1059,7 @@
// $ANTLR start query
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:396:1: query returns [QueryDescr query] : loc= 'query' queryName= word ( normal_lhs_block[lhs] ) 'end' ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:396:1: query returns [QueryDescr query] : loc= 'query' queryName= word ( normal_lhs_block[lhs] ) 'end' ;
public QueryDescr query() throws RecognitionException {
QueryDescr query = null;
@@ -1067,13 +1067,13 @@
String queryName = null;
-
- query = null;
- AndDescr lhs = null;
+
+ query = null;
+ AndDescr lhs = null;
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:402:3: (loc= 'query' queryName= word ( normal_lhs_block[lhs] ) 'end' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:402:3: loc= 'query' queryName= word ( normal_lhs_block[lhs] ) 'end'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:402:3: (loc= 'query' queryName= word ( normal_lhs_block[lhs] ) 'end' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:402:3: loc= 'query' queryName= word ( normal_lhs_block[lhs] ) 'end'
{
loc=(Token)input.LT(1);
match(input,37,FOLLOW_37_in_query488); if (failed) return query;
@@ -1082,15 +1082,15 @@
_fsp--;
if (failed) return query;
if ( backtracking==0 ) {
-
- query = new QueryDescr( queryName, null );
- query.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
- lhs = new AndDescr(); query.setLhs( lhs );
- lhs.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+
+ query = new QueryDescr( queryName, null );
+ query.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+ lhs = new AndDescr(); query.setLhs( lhs );
+ lhs.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
}
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:409:3: ( normal_lhs_block[lhs] )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:411:4: normal_lhs_block[lhs]
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:409:3: ( normal_lhs_block[lhs] )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:411:4: normal_lhs_block[lhs]
{
pushFollow(FOLLOW_normal_lhs_block_in_query506);
normal_lhs_block(lhs);
@@ -1116,7 +1116,7 @@
// $ANTLR start template
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:418:1: template returns [FactTemplateDescr template] : loc= 'template' templateName= ID opt_semicolon ( ( template_slot )=>slot= template_slot )+ 'end' opt_semicolon ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:418:1: template returns [FactTemplateDescr template] : loc= 'template' templateName= ID opt_semicolon ( ( template_slot )=>slot= template_slot )+ 'end' opt_semicolon ;
public FactTemplateDescr template() throws RecognitionException {
FactTemplateDescr template = null;
@@ -1125,12 +1125,12 @@
FieldTemplateDescr slot = null;
-
- template = null;
+
+ template = null;
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:423:3: (loc= 'template' templateName= ID opt_semicolon ( ( template_slot )=>slot= template_slot )+ 'end' opt_semicolon )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:423:3: loc= 'template' templateName= ID opt_semicolon ( ( template_slot )=>slot= template_slot )+ 'end' opt_semicolon
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:423:3: (loc= 'template' templateName= ID opt_semicolon ( ( template_slot )=>slot= template_slot )+ 'end' opt_semicolon )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:423:3: loc= 'template' templateName= ID opt_semicolon ( ( template_slot )=>slot= template_slot )+ 'end' opt_semicolon
{
loc=(Token)input.LT(1);
match(input,38,FOLLOW_38_in_template547); if (failed) return template;
@@ -1141,12 +1141,12 @@
_fsp--;
if (failed) return template;
if ( backtracking==0 ) {
-
- template = new FactTemplateDescr(templateName.getText());
- template.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+
+ template = new FactTemplateDescr(templateName.getText());
+ template.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
}
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:428:3: ( ( template_slot )=>slot= template_slot )+
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:428:3: ( ( template_slot )=>slot= template_slot )+
int cnt12=0;
loop12:
do {
@@ -1159,15 +1159,15 @@
switch (alt12) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:429:4: ( template_slot )=>slot= template_slot
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:429:4: ( template_slot )=>slot= template_slot
{
pushFollow(FOLLOW_template_slot_in_template568);
slot=template_slot();
_fsp--;
if (failed) return template;
if ( backtracking==0 ) {
-
- template.addFieldTemplate(slot);
+
+ template.addFieldTemplate(slot);
}
@@ -1205,7 +1205,7 @@
// $ANTLR start template_slot
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:437:1: template_slot returns [FieldTemplateDescr field] : fieldType= dotted_name name= ID opt_semicolon ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:437:1: template_slot returns [FieldTemplateDescr field] : fieldType= dotted_name name= ID opt_semicolon ;
public FieldTemplateDescr template_slot() throws RecognitionException {
FieldTemplateDescr field = null;
@@ -1213,12 +1213,12 @@
String fieldType = null;
-
- field = null;
+
+ field = null;
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:443:4: (fieldType= dotted_name name= ID opt_semicolon )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:443:4: fieldType= dotted_name name= ID opt_semicolon
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:443:4: (fieldType= dotted_name name= ID opt_semicolon )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:443:4: fieldType= dotted_name name= ID opt_semicolon
{
pushFollow(FOLLOW_dotted_name_in_template_slot617);
fieldType=dotted_name();
@@ -1231,11 +1231,11 @@
_fsp--;
if (failed) return field;
if ( backtracking==0 ) {
-
-
-
- field = new FieldTemplateDescr(name.getText(), fieldType);
- field.setLocation( offset(name.getLine()), name.getCharPositionInLine() );
+
+
+
+ field = new FieldTemplateDescr(name.getText(), fieldType);
+ field.setLocation( offset(name.getLine()), name.getCharPositionInLine() );
}
@@ -1254,7 +1254,7 @@
// $ANTLR start rule
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:452:1: rule returns [RuleDescr rule] : loc= RULE ruleName= word rule_attributes[rule] ( ( WHEN ( ( ':' )=> ':' )? ( normal_lhs_block[lhs] ) )=>loc= WHEN ( ( ':' )=> ':' )? ( normal_lhs_block[lhs] ) )? rhs_chunk[rule] ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:452:1: rule returns [RuleDescr rule] : loc= RULE ruleName= word rule_attributes[rule] ( ( WHEN ( ( ':' )=> ':' )? ( normal_lhs_block[lhs] ) )=>loc= WHEN ( ( ':' )=> ':' )? ( normal_lhs_block[lhs] ) )? rhs_chunk[rule] ;
public RuleDescr rule() throws RecognitionException {
RuleDescr rule = null;
@@ -1262,14 +1262,14 @@
String ruleName = null;
-
- rule = null;
- String consequence = "";
- AndDescr lhs = null;
+
+ rule = null;
+ String consequence = "";
+ AndDescr lhs = null;
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:459:3: (loc= RULE ruleName= word rule_attributes[rule] ( ( WHEN ( ( ':' )=> ':' )? ( normal_lhs_block[lhs] ) )=>loc= WHEN ( ( ':' )=> ':' )? ( normal_lhs_block[lhs] ) )? rhs_chunk[rule] )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:459:3: loc= RULE ruleName= word rule_attributes[rule] ( ( WHEN ( ( ':' )=> ':' )? ( normal_lhs_block[lhs] ) )=>loc= WHEN ( ( ':' )=> ':' )? ( normal_lhs_block[lhs] ) )? rhs_chunk[rule]
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:459:3: (loc= RULE ruleName= word rule_attributes[rule] ( ( WHEN ( ( ':' )=> ':' )? ( normal_lhs_block[lhs] ) )=>loc= WHEN ( ( ':' )=> ':' )? ( normal_lhs_block[lhs] ) )? rhs_chunk[rule] )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:459:3: loc= RULE ruleName= word rule_attributes[rule] ( ( WHEN ( ( ':' )=> ':' )? ( normal_lhs_block[lhs] ) )=>loc= WHEN ( ( ':' )=> ':' )? ( normal_lhs_block[lhs] ) )? rhs_chunk[rule]
{
loc=(Token)input.LT(1);
match(input,RULE,FOLLOW_RULE_in_rule654); if (failed) return rule;
@@ -1278,17 +1278,17 @@
_fsp--;
if (failed) return rule;
if ( backtracking==0 ) {
-
- debug( "start rule: " + ruleName );
- rule = new RuleDescr( ruleName, null );
- rule.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+
+ debug( "start rule: " + ruleName );
+ rule = new RuleDescr( ruleName, null );
+ rule.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
}
pushFollow(FOLLOW_rule_attributes_in_rule667);
rule_attributes(rule);
_fsp--;
if (failed) return rule;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:466:3: ( ( WHEN ( ( ':' )=> ':' )? ( normal_lhs_block[lhs] ) )=>loc= WHEN ( ( ':' )=> ':' )? ( normal_lhs_block[lhs] ) )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:466:3: ( ( WHEN ( ( ':' )=> ':' )? ( normal_lhs_block[lhs] ) )=>loc= WHEN ( ( ':' )=> ':' )? ( normal_lhs_block[lhs] ) )?
int alt14=2;
int LA14_0 = input.LA(1);
if ( (LA14_0==WHEN) ) {
@@ -1296,11 +1296,11 @@
}
switch (alt14) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:466:5: ( WHEN ( ( ':' )=> ':' )? ( normal_lhs_block[lhs] ) )=>loc= WHEN ( ( ':' )=> ':' )? ( normal_lhs_block[lhs] )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:466:5: ( WHEN ( ( ':' )=> ':' )? ( normal_lhs_block[lhs] ) )=>loc= WHEN ( ( ':' )=> ':' )? ( normal_lhs_block[lhs] )
{
loc=(Token)input.LT(1);
match(input,WHEN,FOLLOW_WHEN_in_rule676); if (failed) return rule;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:466:14: ( ( ':' )=> ':' )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:466:14: ( ( ':' )=> ':' )?
int alt13=2;
int LA13_0 = input.LA(1);
if ( (LA13_0==39) ) {
@@ -1308,7 +1308,7 @@
}
switch (alt13) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:0:0: ( ':' )=> ':'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:0:0: ( ':' )=> ':'
{
match(input,39,FOLLOW_39_in_rule678); if (failed) return rule;
@@ -1318,13 +1318,13 @@
}
if ( backtracking==0 ) {
-
- lhs = new AndDescr(); rule.setLhs( lhs );
- lhs.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+
+ lhs = new AndDescr(); rule.setLhs( lhs );
+ lhs.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
}
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:471:4: ( normal_lhs_block[lhs] )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:473:5: normal_lhs_block[lhs]
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:471:4: ( normal_lhs_block[lhs] )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:473:5: normal_lhs_block[lhs]
{
pushFollow(FOLLOW_normal_lhs_block_in_rule696);
normal_lhs_block(lhs);
@@ -1359,16 +1359,16 @@
// $ANTLR start rule_attributes
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:482:1: rule_attributes[RuleDescr rule] : ( ( 'attributes' ':' )=> 'attributes' ':' )? ( ( ( ( ',' )=> ',' )? rule_attribute )=> ( ( ',' )=> ',' )? a= rule_attribute )* ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:482:1: rule_attributes[RuleDescr rule] : ( ( 'attributes' ':' )=> 'attributes' ':' )? ( ( ( ( ',' )=> ',' )? rule_attribute )=> ( ( ',' )=> ',' )? a= rule_attribute )* ;
public void rule_attributes(RuleDescr rule) throws RecognitionException {
AttributeDescr a = null;
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:484:4: ( ( ( 'attributes' ':' )=> 'attributes' ':' )? ( ( ( ( ',' )=> ',' )? rule_attribute )=> ( ( ',' )=> ',' )? a= rule_attribute )* )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:484:4: ( ( 'attributes' ':' )=> 'attributes' ':' )? ( ( ( ( ',' )=> ',' )? rule_attribute )=> ( ( ',' )=> ',' )? a= rule_attribute )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:484:4: ( ( ( 'attributes' ':' )=> 'attributes' ':' )? ( ( ( ( ',' )=> ',' )? rule_attribute )=> ( ( ',' )=> ',' )? a= rule_attribute )* )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:484:4: ( ( 'attributes' ':' )=> 'attributes' ':' )? ( ( ( ( ',' )=> ',' )? rule_attribute )=> ( ( ',' )=> ',' )? a= rule_attribute )*
{
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:484:4: ( ( 'attributes' ':' )=> 'attributes' ':' )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:484:4: ( ( 'attributes' ':' )=> 'attributes' ':' )?
int alt15=2;
int LA15_0 = input.LA(1);
if ( (LA15_0==40) ) {
@@ -1376,7 +1376,7 @@
}
switch (alt15) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:484:5: ( 'attributes' ':' )=> 'attributes' ':'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:484:5: ( 'attributes' ':' )=> 'attributes' ':'
{
match(input,40,FOLLOW_40_in_rule_attributes738); if (failed) return ;
match(input,39,FOLLOW_39_in_rule_attributes740); if (failed) return ;
@@ -1386,7 +1386,7 @@
}
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:485:4: ( ( ( ( ',' )=> ',' )? rule_attribute )=> ( ( ',' )=> ',' )? a= rule_attribute )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:485:4: ( ( ( ( ',' )=> ',' )? rule_attribute )=> ( ( ',' )=> ',' )? a= rule_attribute )*
loop17:
do {
int alt17=2;
@@ -1398,9 +1398,9 @@
switch (alt17) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:485:6: ( ( ( ',' )=> ',' )? rule_attribute )=> ( ( ',' )=> ',' )? a= rule_attribute
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:485:6: ( ( ( ',' )=> ',' )? rule_attribute )=> ( ( ',' )=> ',' )? a= rule_attribute
{
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:485:6: ( ( ',' )=> ',' )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:485:6: ( ( ',' )=> ',' )?
int alt16=2;
int LA16_0 = input.LA(1);
if ( (LA16_0==36) ) {
@@ -1408,7 +1408,7 @@
}
switch (alt16) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:0:0: ( ',' )=> ','
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:0:0: ( ',' )=> ','
{
match(input,36,FOLLOW_36_in_rule_attributes749); if (failed) return ;
@@ -1422,8 +1422,8 @@
_fsp--;
if (failed) return ;
if ( backtracking==0 ) {
-
- rule.addAttribute( a );
+
+ rule.addAttribute( a );
}
@@ -1451,18 +1451,18 @@
// $ANTLR start rule_attribute
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:494:1: rule_attribute returns [AttributeDescr d] : ( ( salience )=>a= salience | ( no_loop )=>a= no_loop | ( agenda_group )=>a= agenda_group | ( duration )=>a= duration | ( activation_group )=>a= activation_group | ( auto_focus )=>a= auto_focus | ( date_effective )=>a= date_effective | ( date_expires )=>a= date_expires | a= enabled );
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:494:1: rule_attribute returns [AttributeDescr d] : ( ( salience )=>a= salience | ( no_loop )=>a= no_loop | ( agenda_group )=>a= agenda_group | ( duration )=>a= duration | ( activation_group )=>a= activation_group | ( auto_focus )=>a= auto_focus | ( date_effective )=>a= date_effective | ( date_expires )=>a= date_expires | a= enabled );
public AttributeDescr rule_attribute() throws RecognitionException {
AttributeDescr d = null;
AttributeDescr a = null;
-
- d = null;
+
+ d = null;
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:499:4: ( ( salience )=>a= salience | ( no_loop )=>a= no_loop | ( agenda_group )=>a= agenda_group | ( duration )=>a= duration | ( activation_group )=>a= activation_group | ( auto_focus )=>a= auto_focus | ( date_effective )=>a= date_effective | ( date_expires )=>a= date_expires | a= enabled )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:499:4: ( ( salience )=>a= salience | ( no_loop )=>a= no_loop | ( agenda_group )=>a= agenda_group | ( duration )=>a= duration | ( activation_group )=>a= activation_group | ( auto_focus )=>a= auto_focus | ( date_effective )=>a= date_effective | ( date_expires )=>a= date_expires | a= enabled )
int alt18=9;
switch ( input.LA(1) ) {
case 44:
@@ -1502,7 +1502,7 @@
switch (alt18) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:499:4: ( salience )=>a= salience
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:499:4: ( salience )=>a= salience
{
pushFollow(FOLLOW_salience_in_rule_attribute795);
a=salience();
@@ -1515,7 +1515,7 @@
}
break;
case 2 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:500:5: ( no_loop )=>a= no_loop
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:500:5: ( no_loop )=>a= no_loop
{
pushFollow(FOLLOW_no_loop_in_rule_attribute805);
a=no_loop();
@@ -1528,7 +1528,7 @@
}
break;
case 3 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:501:5: ( agenda_group )=>a= agenda_group
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:501:5: ( agenda_group )=>a= agenda_group
{
pushFollow(FOLLOW_agenda_group_in_rule_attribute816);
a=agenda_group();
@@ -1541,7 +1541,7 @@
}
break;
case 4 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:502:5: ( duration )=>a= duration
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:502:5: ( duration )=>a= duration
{
pushFollow(FOLLOW_duration_in_rule_attribute829);
a=duration();
@@ -1554,7 +1554,7 @@
}
break;
case 5 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:503:5: ( activation_group )=>a= activation_group
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:503:5: ( activation_group )=>a= activation_group
{
pushFollow(FOLLOW_activation_group_in_rule_attribute843);
a=activation_group();
@@ -1567,7 +1567,7 @@
}
break;
case 6 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:504:5: ( auto_focus )=>a= auto_focus
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:504:5: ( auto_focus )=>a= auto_focus
{
pushFollow(FOLLOW_auto_focus_in_rule_attribute854);
a=auto_focus();
@@ -1580,7 +1580,7 @@
}
break;
case 7 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:505:29: ( date_effective )=>a= date_effective
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:505:29: ( date_effective )=>a= date_effective
{
pushFollow(FOLLOW_date_effective_in_rule_attribute889);
a=date_effective();
@@ -1593,7 +1593,7 @@
}
break;
case 8 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:506:5: ( date_expires )=>a= date_expires
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:506:5: ( date_expires )=>a= date_expires
{
pushFollow(FOLLOW_date_expires_in_rule_attribute899);
a=date_expires();
@@ -1606,7 +1606,7 @@
}
break;
case 9 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:507:29: a= enabled
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:507:29: a= enabled
{
pushFollow(FOLLOW_enabled_in_rule_attribute933);
a=enabled();
@@ -1633,28 +1633,28 @@
// $ANTLR start date_effective
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:511:1: date_effective returns [AttributeDescr d] : loc= 'date-effective' val= STRING ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:511:1: date_effective returns [AttributeDescr d] : loc= 'date-effective' val= STRING ;
public AttributeDescr date_effective() throws RecognitionException {
AttributeDescr d = null;
Token loc=null;
Token val=null;
-
- d = null;
+
+ d = null;
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:516:3: (loc= 'date-effective' val= STRING )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:516:3: loc= 'date-effective' val= STRING
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:516:3: (loc= 'date-effective' val= STRING )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:516:3: loc= 'date-effective' val= STRING
{
loc=(Token)input.LT(1);
match(input,41,FOLLOW_41_in_date_effective965); if (failed) return d;
val=(Token)input.LT(1);
match(input,STRING,FOLLOW_STRING_in_date_effective969); if (failed) return d;
if ( backtracking==0 ) {
-
- d = new AttributeDescr( "date-effective", getString( val ) );
- d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+
+ d = new AttributeDescr( "date-effective", getString( val ) );
+ d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
}
@@ -1673,28 +1673,28 @@
// $ANTLR start date_expires
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:524:1: date_expires returns [AttributeDescr d] : loc= 'date-expires' val= STRING ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:524:1: date_expires returns [AttributeDescr d] : loc= 'date-expires' val= STRING ;
public AttributeDescr date_expires() throws RecognitionException {
AttributeDescr d = null;
Token loc=null;
Token val=null;
-
- d = null;
+
+ d = null;
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:529:3: (loc= 'date-expires' val= STRING )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:529:3: loc= 'date-expires' val= STRING
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:529:3: (loc= 'date-expires' val= STRING )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:529:3: loc= 'date-expires' val= STRING
{
loc=(Token)input.LT(1);
match(input,42,FOLLOW_42_in_date_expires1000); if (failed) return d;
val=(Token)input.LT(1);
match(input,STRING,FOLLOW_STRING_in_date_expires1004); if (failed) return d;
if ( backtracking==0 ) {
-
- d = new AttributeDescr( "date-expires", getString( val ) );
- d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+
+ d = new AttributeDescr( "date-expires", getString( val ) );
+ d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
}
@@ -1713,19 +1713,19 @@
// $ANTLR start enabled
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:538:1: enabled returns [AttributeDescr d] : loc= 'enabled' t= BOOL opt_semicolon ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:538:1: enabled returns [AttributeDescr d] : loc= 'enabled' t= BOOL opt_semicolon ;
public AttributeDescr enabled() throws RecognitionException {
AttributeDescr d = null;
Token loc=null;
Token t=null;
-
- d = null;
+
+ d = null;
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:543:4: (loc= 'enabled' t= BOOL opt_semicolon )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:543:4: loc= 'enabled' t= BOOL opt_semicolon
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:543:4: (loc= 'enabled' t= BOOL opt_semicolon )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:543:4: loc= 'enabled' t= BOOL opt_semicolon
{
loc=(Token)input.LT(1);
match(input,43,FOLLOW_43_in_enabled1037); if (failed) return d;
@@ -1736,9 +1736,9 @@
_fsp--;
if (failed) return d;
if ( backtracking==0 ) {
-
- d = new AttributeDescr( "enabled", t.getText() );
- d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+
+ d = new AttributeDescr( "enabled", t.getText() );
+ d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
}
@@ -1757,19 +1757,19 @@
// $ANTLR start salience
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:554:1: salience returns [AttributeDescr d ] : loc= 'salience' i= INT opt_semicolon ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:554:1: salience returns [AttributeDescr d ] : loc= 'salience' i= INT opt_semicolon ;
public AttributeDescr salience() throws RecognitionException {
AttributeDescr d = null;
Token loc=null;
Token i=null;
-
- d = null;
+
+ d = null;
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:559:3: (loc= 'salience' i= INT opt_semicolon )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:559:3: loc= 'salience' i= INT opt_semicolon
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:559:3: (loc= 'salience' i= INT opt_semicolon )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:559:3: loc= 'salience' i= INT opt_semicolon
{
loc=(Token)input.LT(1);
match(input,44,FOLLOW_44_in_salience1085); if (failed) return d;
@@ -1780,9 +1780,9 @@
_fsp--;
if (failed) return d;
if ( backtracking==0 ) {
-
- d = new AttributeDescr( "salience", i.getText() );
- d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+
+ d = new AttributeDescr( "salience", i.getText() );
+ d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
}
@@ -1801,18 +1801,18 @@
// $ANTLR start no_loop
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:566:1: no_loop returns [AttributeDescr d] : ( ( ( 'no-loop' opt_semicolon ) )=> (loc= 'no-loop' opt_semicolon ) | (loc= 'no-loop' t= BOOL opt_semicolon ) );
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:566:1: no_loop returns [AttributeDescr d] : ( ( ( 'no-loop' opt_semicolon ) )=> (loc= 'no-loop' opt_semicolon ) | (loc= 'no-loop' t= BOOL opt_semicolon ) );
public AttributeDescr no_loop() throws RecognitionException {
AttributeDescr d = null;
Token loc=null;
Token t=null;
-
- d = null;
+
+ d = null;
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:571:3: ( ( ( 'no-loop' opt_semicolon ) )=> (loc= 'no-loop' opt_semicolon ) | (loc= 'no-loop' t= BOOL opt_semicolon ) )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:571:3: ( ( ( 'no-loop' opt_semicolon ) )=> (loc= 'no-loop' opt_semicolon ) | (loc= 'no-loop' t= BOOL opt_semicolon ) )
int alt19=2;
int LA19_0 = input.LA(1);
if ( (LA19_0==45) ) {
@@ -1840,10 +1840,10 @@
}
switch (alt19) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:571:3: ( ( 'no-loop' opt_semicolon ) )=> (loc= 'no-loop' opt_semicolon )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:571:3: ( ( 'no-loop' opt_semicolon ) )=> (loc= 'no-loop' opt_semicolon )
{
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:571:3: (loc= 'no-loop' opt_semicolon )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:572:4: loc= 'no-loop' opt_semicolon
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:571:3: (loc= 'no-loop' opt_semicolon )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:572:4: loc= 'no-loop' opt_semicolon
{
loc=(Token)input.LT(1);
match(input,45,FOLLOW_45_in_no_loop1126); if (failed) return d;
@@ -1852,9 +1852,9 @@
_fsp--;
if (failed) return d;
if ( backtracking==0 ) {
-
- d = new AttributeDescr( "no-loop", "true" );
- d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+
+ d = new AttributeDescr( "no-loop", "true" );
+ d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
}
@@ -1864,10 +1864,10 @@
}
break;
case 2 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:579:3: (loc= 'no-loop' t= BOOL opt_semicolon )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:579:3: (loc= 'no-loop' t= BOOL opt_semicolon )
{
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:579:3: (loc= 'no-loop' t= BOOL opt_semicolon )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:580:4: loc= 'no-loop' t= BOOL opt_semicolon
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:579:3: (loc= 'no-loop' t= BOOL opt_semicolon )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:580:4: loc= 'no-loop' t= BOOL opt_semicolon
{
loc=(Token)input.LT(1);
match(input,45,FOLLOW_45_in_no_loop1153); if (failed) return d;
@@ -1878,9 +1878,9 @@
_fsp--;
if (failed) return d;
if ( backtracking==0 ) {
-
- d = new AttributeDescr( "no-loop", t.getText() );
- d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+
+ d = new AttributeDescr( "no-loop", t.getText() );
+ d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
}
@@ -1904,18 +1904,18 @@
// $ANTLR start auto_focus
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:590:1: auto_focus returns [AttributeDescr d] : ( ( ( 'auto-focus' opt_semicolon ) )=> (loc= 'auto-focus' opt_semicolon ) | (loc= 'auto-focus' t= BOOL opt_semicolon ) );
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:590:1: auto_focus returns [AttributeDescr d] : ( ( ( 'auto-focus' opt_semicolon ) )=> (loc= 'auto-focus' opt_semicolon ) | (loc= 'auto-focus' t= BOOL opt_semicolon ) );
public AttributeDescr auto_focus() throws RecognitionException {
AttributeDescr d = null;
Token loc=null;
Token t=null;
-
- d = null;
+
+ d = null;
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:595:3: ( ( ( 'auto-focus' opt_semicolon ) )=> (loc= 'auto-focus' opt_semicolon ) | (loc= 'auto-focus' t= BOOL opt_semicolon ) )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:595:3: ( ( ( 'auto-focus' opt_semicolon ) )=> (loc= 'auto-focus' opt_semicolon ) | (loc= 'auto-focus' t= BOOL opt_semicolon ) )
int alt20=2;
int LA20_0 = input.LA(1);
if ( (LA20_0==46) ) {
@@ -1943,10 +1943,10 @@
}
switch (alt20) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:595:3: ( ( 'auto-focus' opt_semicolon ) )=> (loc= 'auto-focus' opt_semicolon )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:595:3: ( ( 'auto-focus' opt_semicolon ) )=> (loc= 'auto-focus' opt_semicolon )
{
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:595:3: (loc= 'auto-focus' opt_semicolon )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:596:4: loc= 'auto-focus' opt_semicolon
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:595:3: (loc= 'auto-focus' opt_semicolon )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:596:4: loc= 'auto-focus' opt_semicolon
{
loc=(Token)input.LT(1);
match(input,46,FOLLOW_46_in_auto_focus1205); if (failed) return d;
@@ -1955,9 +1955,9 @@
_fsp--;
if (failed) return d;
if ( backtracking==0 ) {
-
- d = new AttributeDescr( "auto-focus", "true" );
- d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+
+ d = new AttributeDescr( "auto-focus", "true" );
+ d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
}
@@ -1967,10 +1967,10 @@
}
break;
case 2 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:603:3: (loc= 'auto-focus' t= BOOL opt_semicolon )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:603:3: (loc= 'auto-focus' t= BOOL opt_semicolon )
{
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:603:3: (loc= 'auto-focus' t= BOOL opt_semicolon )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:604:4: loc= 'auto-focus' t= BOOL opt_semicolon
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:603:3: (loc= 'auto-focus' t= BOOL opt_semicolon )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:604:4: loc= 'auto-focus' t= BOOL opt_semicolon
{
loc=(Token)input.LT(1);
match(input,46,FOLLOW_46_in_auto_focus1232); if (failed) return d;
@@ -1981,9 +1981,9 @@
_fsp--;
if (failed) return d;
if ( backtracking==0 ) {
-
- d = new AttributeDescr( "auto-focus", t.getText() );
- d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+
+ d = new AttributeDescr( "auto-focus", t.getText() );
+ d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
}
@@ -2007,19 +2007,19 @@
// $ANTLR start activation_group
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:614:1: activation_group returns [AttributeDescr d] : loc= 'activation-group' name= STRING opt_semicolon ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:614:1: activation_group returns [AttributeDescr d] : loc= 'activation-group' name= STRING opt_semicolon ;
public AttributeDescr activation_group() throws RecognitionException {
AttributeDescr d = null;
Token loc=null;
Token name=null;
-
- d = null;
+
+ d = null;
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:619:3: (loc= 'activation-group' name= STRING opt_semicolon )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:619:3: loc= 'activation-group' name= STRING opt_semicolon
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:619:3: (loc= 'activation-group' name= STRING opt_semicolon )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:619:3: loc= 'activation-group' name= STRING opt_semicolon
{
loc=(Token)input.LT(1);
match(input,47,FOLLOW_47_in_activation_group1280); if (failed) return d;
@@ -2030,9 +2030,9 @@
_fsp--;
if (failed) return d;
if ( backtracking==0 ) {
-
- d = new AttributeDescr( "activation-group", getString( name ) );
- d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+
+ d = new AttributeDescr( "activation-group", getString( name ) );
+ d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
}
@@ -2051,19 +2051,19 @@
// $ANTLR start agenda_group
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:626:1: agenda_group returns [AttributeDescr d] : loc= 'agenda-group' name= STRING opt_semicolon ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:626:1: agenda_group returns [AttributeDescr d] : loc= 'agenda-group' name= STRING opt_semicolon ;
public AttributeDescr agenda_group() throws RecognitionException {
AttributeDescr d = null;
Token loc=null;
Token name=null;
-
- d = null;
+
+ d = null;
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:631:3: (loc= 'agenda-group' name= STRING opt_semicolon )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:631:3: loc= 'agenda-group' name= STRING opt_semicolon
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:631:3: (loc= 'agenda-group' name= STRING opt_semicolon )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:631:3: loc= 'agenda-group' name= STRING opt_semicolon
{
loc=(Token)input.LT(1);
match(input,48,FOLLOW_48_in_agenda_group1315); if (failed) return d;
@@ -2074,9 +2074,9 @@
_fsp--;
if (failed) return d;
if ( backtracking==0 ) {
-
- d = new AttributeDescr( "agenda-group", getString( name ) );
- d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+
+ d = new AttributeDescr( "agenda-group", getString( name ) );
+ d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
}
@@ -2095,28 +2095,28 @@
// $ANTLR start duration
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:639:1: duration returns [AttributeDescr d] : loc= 'duration' i= INT ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:639:1: duration returns [AttributeDescr d] : loc= 'duration' i= INT ;
public AttributeDescr duration() throws RecognitionException {
AttributeDescr d = null;
Token loc=null;
Token i=null;
-
- d = null;
+
+ d = null;
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:644:3: (loc= 'duration' i= INT )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:644:3: loc= 'duration' i= INT
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:644:3: (loc= 'duration' i= INT )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:644:3: loc= 'duration' i= INT
{
loc=(Token)input.LT(1);
match(input,49,FOLLOW_49_in_duration1353); if (failed) return d;
i=(Token)input.LT(1);
match(input,INT,FOLLOW_INT_in_duration1357); if (failed) return d;
if ( backtracking==0 ) {
-
- d = new AttributeDescr( "duration", i.getText() );
- d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+
+ d = new AttributeDescr( "duration", i.getText() );
+ d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
}
@@ -2135,28 +2135,28 @@
// $ANTLR start normal_lhs_block
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:652:1: normal_lhs_block[AndDescr descrs] : ( ( lhs )=>d= lhs )* ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:652:1: normal_lhs_block[AndDescr descrs] : ( ( lhs )=>d= lhs )* ;
public void normal_lhs_block(AndDescr descrs) throws RecognitionException {
BaseDescr d = null;
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:654:3: ( ( ( lhs )=>d= lhs )* )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:654:3: ( ( lhs )=>d= lhs )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:654:3: ( ( ( lhs )=>d= lhs )* )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:654:3: ( ( lhs )=>d= lhs )*
{
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:654:3: ( ( lhs )=>d= lhs )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:654:3: ( ( lhs )=>d= lhs )*
loop21:
do {
int alt21=2;
int LA21_0 = input.LA(1);
- if ( (LA21_0==ID||LA21_0==LEFT_PAREN||(LA21_0>=73 && LA21_0<=75)) ) {
+ if ( (LA21_0==ID||LA21_0==LEFT_PAREN||(LA21_0>=73 && LA21_0<=76)) ) {
alt21=1;
}
switch (alt21) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:654:5: ( lhs )=>d= lhs
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:654:5: ( lhs )=>d= lhs
{
pushFollow(FOLLOW_lhs_in_normal_lhs_block1383);
d=lhs();
@@ -2190,19 +2190,19 @@
// $ANTLR start lhs
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:708:1: lhs returns [BaseDescr d] : l= lhs_or ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:708:1: lhs returns [BaseDescr d] : l= lhs_or ;
public BaseDescr lhs() throws RecognitionException {
BaseDescr d = null;
BaseDescr l = null;
-
- d=null;
+
+ d=null;
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:712:4: (l= lhs_or )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:712:4: l= lhs_or
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:712:4: (l= lhs_or )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:712:4: l= lhs_or
{
pushFollow(FOLLOW_lhs_or_in_lhs1421);
l=lhs_or();
@@ -2227,18 +2227,18 @@
// $ANTLR start lhs_column
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:716:1: lhs_column returns [BaseDescr d] : ( ( fact_binding )=>f= fact_binding | f= fact );
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:716:1: lhs_column returns [BaseDescr d] : ( ( fact_binding )=>f= fact_binding | f= fact );
public BaseDescr lhs_column() throws RecognitionException {
BaseDescr d = null;
BaseDescr f = null;
-
- d=null;
+
+ d=null;
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:720:4: ( ( fact_binding )=>f= fact_binding | f= fact )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:720:4: ( ( fact_binding )=>f= fact_binding | f= fact )
int alt22=2;
int LA22_0 = input.LA(1);
if ( (LA22_0==ID) ) {
@@ -2266,7 +2266,7 @@
}
switch (alt22) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:720:4: ( fact_binding )=>f= fact_binding
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:720:4: ( fact_binding )=>f= fact_binding
{
pushFollow(FOLLOW_fact_binding_in_lhs_column1449);
f=fact_binding();
@@ -2279,7 +2279,7 @@
}
break;
case 2 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:721:4: f= fact
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:721:4: f= fact
{
pushFollow(FOLLOW_fact_in_lhs_column1458);
f=fact();
@@ -2306,19 +2306,19 @@
// $ANTLR start from_statement
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:724:1: from_statement returns [FromDescr d] : 'from' ds= from_source ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:724:1: from_statement returns [FromDescr d] : 'from' ds= from_source ;
public FromDescr from_statement() throws RecognitionException {
FromDescr d = null;
DeclarativeInvokerDescr ds = null;
-
- d=factory.createFrom();
+
+ d=factory.createFrom();
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:729:2: ( 'from' ds= from_source )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:729:2: 'from' ds= from_source
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:729:2: ( 'from' ds= from_source )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:729:2: 'from' ds= from_source
{
match(input,50,FOLLOW_50_in_from_statement1483); if (failed) return d;
pushFollow(FOLLOW_from_source_in_from_statement1487);
@@ -2326,10 +2326,10 @@
_fsp--;
if (failed) return d;
if ( backtracking==0 ) {
-
- d.setDataSource(ds);
+
+ d.setDataSource(ds);
+
-
}
}
@@ -2347,7 +2347,7 @@
// $ANTLR start from_source
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:739:1: from_source returns [DeclarativeInvokerDescr ds] : ( ( ( ID paren_chunk ) )=> (functionName= ID args= paren_chunk ) | (var= ID ) ) ( ( expression_chain[ad] )=> expression_chain[ad] )? ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:739:1: from_source returns [DeclarativeInvokerDescr ds] : ( ( ( ID paren_chunk ) )=> (functionName= ID args= paren_chunk ) | (var= ID ) ) ( ( expression_chain[ad] )=> expression_chain[ad] )? ;
public DeclarativeInvokerDescr from_source() throws RecognitionException {
DeclarativeInvokerDescr ds = null;
@@ -2356,15 +2356,15 @@
String args = null;
-
- ds = null;
- AccessorDescr ad = null;
+
+ ds = null;
+ AccessorDescr ad = null;
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:745:3: ( ( ( ( ID paren_chunk ) )=> (functionName= ID args= paren_chunk ) | (var= ID ) ) ( ( expression_chain[ad] )=> expression_chain[ad] )? )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:745:3: ( ( ( ID paren_chunk ) )=> (functionName= ID args= paren_chunk ) | (var= ID ) ) ( ( expression_chain[ad] )=> expression_chain[ad] )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:745:3: ( ( ( ( ID paren_chunk ) )=> (functionName= ID args= paren_chunk ) | (var= ID ) ) ( ( expression_chain[ad] )=> expression_chain[ad] )? )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:745:3: ( ( ( ID paren_chunk ) )=> (functionName= ID args= paren_chunk ) | (var= ID ) ) ( ( expression_chain[ad] )=> expression_chain[ad] )?
{
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:745:3: ( ( ( ID paren_chunk ) )=> (functionName= ID args= paren_chunk ) | (var= ID ) )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:745:3: ( ( ( ID paren_chunk ) )=> (functionName= ID args= paren_chunk ) | (var= ID ) )
int alt23=2;
int LA23_0 = input.LA(1);
if ( (LA23_0==ID) ) {
@@ -2391,10 +2391,10 @@
}
switch (alt23) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:745:4: ( ( ID paren_chunk ) )=> (functionName= ID args= paren_chunk )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:745:4: ( ( ID paren_chunk ) )=> (functionName= ID args= paren_chunk )
{
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:745:4: (functionName= ID args= paren_chunk )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:745:6: functionName= ID args= paren_chunk
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:745:4: (functionName= ID args= paren_chunk )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:745:6: functionName= ID args= paren_chunk
{
functionName=(Token)input.LT(1);
match(input,ID,FOLLOW_ID_in_from_source1530); if (failed) return ds;
@@ -2403,14 +2403,14 @@
_fsp--;
if (failed) return ds;
if ( backtracking==0 ) {
-
- ad = new AccessorDescr();
- ad.setLocation( offset(functionName.getLine()), functionName.getCharPositionInLine() );
- ds = ad;
- FunctionCallDescr fc = new FunctionCallDescr(functionName.getText());
- fc.setLocation( offset(functionName.getLine()), functionName.getCharPositionInLine() );
- fc.setArguments(args);
- ad.addInvoker(fc);
+
+ ad = new AccessorDescr();
+ ad.setLocation( offset(functionName.getLine()), functionName.getCharPositionInLine() );
+ ds = ad;
+ FunctionCallDescr fc = new FunctionCallDescr(functionName.getText());
+ fc.setLocation( offset(functionName.getLine()), functionName.getCharPositionInLine() );
+ fc.setArguments(args);
+ ad.addInvoker(fc);
}
@@ -2420,18 +2420,18 @@
}
break;
case 2 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:757:3: (var= ID )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:757:3: (var= ID )
{
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:757:3: (var= ID )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:757:7: var= ID
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:757:3: (var= ID )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:757:7: var= ID
{
var=(Token)input.LT(1);
match(input,ID,FOLLOW_ID_in_from_source1567); if (failed) return ds;
if ( backtracking==0 ) {
-
- ad = new AccessorDescr(var.getText());
- ad.setLocation( offset(var.getLine()), var.getCharPositionInLine() );
- ds = ad;
+
+ ad = new AccessorDescr(var.getText());
+ ad.setLocation( offset(var.getLine()), var.getCharPositionInLine() );
+ ds = ad;
}
@@ -2443,7 +2443,7 @@
}
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:765:3: ( ( expression_chain[ad] )=> expression_chain[ad] )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:765:3: ( ( expression_chain[ad] )=> expression_chain[ad] )?
int alt24=2;
int LA24_0 = input.LA(1);
if ( (LA24_0==33) ) {
@@ -2451,7 +2451,7 @@
}
switch (alt24) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:0:0: ( expression_chain[ad] )=> expression_chain[ad]
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:0:0: ( expression_chain[ad] )=> expression_chain[ad]
{
pushFollow(FOLLOW_expression_chain_in_from_source1590);
expression_chain(ad);
@@ -2479,7 +2479,7 @@
// $ANTLR start expression_chain
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:768:1: expression_chain[AccessorDescr as] : ( '.' field= ID ( ( LEFT_SQUARE )=>sqarg= square_chunk | ( LEFT_PAREN )=>paarg= paren_chunk )? ( ( expression_chain[as] )=> expression_chain[as] )? ) ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:768:1: expression_chain[AccessorDescr as] : ( '.' field= ID ( ( LEFT_SQUARE )=>sqarg= square_chunk | ( LEFT_PAREN )=>paarg= paren_chunk )? ( ( expression_chain[as] )=> expression_chain[as] )? ) ;
public void expression_chain(AccessorDescr as) throws RecognitionException {
Token field=null;
String sqarg = null;
@@ -2487,27 +2487,27 @@
String paarg = null;
-
- FieldAccessDescr fa = null;
- MethodAccessDescr ma = null;
+
+ FieldAccessDescr fa = null;
+ MethodAccessDescr ma = null;
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:774:2: ( ( '.' field= ID ( ( LEFT_SQUARE )=>sqarg= square_chunk | ( LEFT_PAREN )=>paarg= paren_chunk )? ( ( expression_chain[as] )=> expression_chain[as] )? ) )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:774:2: ( '.' field= ID ( ( LEFT_SQUARE )=>sqarg= square_chunk | ( LEFT_PAREN )=>paarg= paren_chunk )? ( ( expression_chain[as] )=> expression_chain[as] )? )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:774:2: ( ( '.' field= ID ( ( LEFT_SQUARE )=>sqarg= square_chunk | ( LEFT_PAREN )=>paarg= paren_chunk )? ( ( expression_chain[as] )=> expression_chain[as] )? ) )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:774:2: ( '.' field= ID ( ( LEFT_SQUARE )=>sqarg= square_chunk | ( LEFT_PAREN )=>paarg= paren_chunk )? ( ( expression_chain[as] )=> expression_chain[as] )? )
{
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:774:2: ( '.' field= ID ( ( LEFT_SQUARE )=>sqarg= square_chunk | ( LEFT_PAREN )=>paarg= paren_chunk )? ( ( expression_chain[as] )=> expression_chain[as] )? )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:774:4: '.' field= ID ( ( LEFT_SQUARE )=>sqarg= square_chunk | ( LEFT_PAREN )=>paarg= paren_chunk )? ( ( expression_chain[as] )=> expression_chain[as] )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:774:2: ( '.' field= ID ( ( LEFT_SQUARE )=>sqarg= square_chunk | ( LEFT_PAREN )=>paarg= paren_chunk )? ( ( expression_chain[as] )=> expression_chain[as] )? )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:774:4: '.' field= ID ( ( LEFT_SQUARE )=>sqarg= square_chunk | ( LEFT_PAREN )=>paarg= paren_chunk )? ( ( expression_chain[as] )=> expression_chain[as] )?
{
match(input,33,FOLLOW_33_in_expression_chain1615); if (failed) return ;
field=(Token)input.LT(1);
match(input,ID,FOLLOW_ID_in_expression_chain1619); if (failed) return ;
if ( backtracking==0 ) {
-
- fa = new FieldAccessDescr(field.getText());
- fa.setLocation( offset(field.getLine()), field.getCharPositionInLine() );
+
+ fa = new FieldAccessDescr(field.getText());
+ fa.setLocation( offset(field.getLine()), field.getCharPositionInLine() );
}
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:779:4: ( ( LEFT_SQUARE )=>sqarg= square_chunk | ( LEFT_PAREN )=>paarg= paren_chunk )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:779:4: ( ( LEFT_SQUARE )=>sqarg= square_chunk | ( LEFT_PAREN )=>paarg= paren_chunk )?
int alt25=3;
int LA25_0 = input.LA(1);
if ( (LA25_0==LEFT_SQUARE) ) {
@@ -2520,31 +2520,31 @@
}
switch (alt25) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:780:6: ( LEFT_SQUARE )=>sqarg= square_chunk
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:780:6: ( LEFT_SQUARE )=>sqarg= square_chunk
{
pushFollow(FOLLOW_square_chunk_in_expression_chain1650);
sqarg=square_chunk();
_fsp--;
if (failed) return ;
if ( backtracking==0 ) {
-
- fa.setArgument( sqarg );
+
+ fa.setArgument( sqarg );
}
}
break;
case 2 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:785:6: ( LEFT_PAREN )=>paarg= paren_chunk
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:785:6: ( LEFT_PAREN )=>paarg= paren_chunk
{
pushFollow(FOLLOW_paren_chunk_in_expression_chain1683);
paarg=paren_chunk();
_fsp--;
if (failed) return ;
if ( backtracking==0 ) {
-
- ma = new MethodAccessDescr( field.getText(), paarg );
- ma.setLocation( offset(field.getLine()), field.getCharPositionInLine() );
+
+ ma = new MethodAccessDescr( field.getText(), paarg );
+ ma.setLocation( offset(field.getLine()), field.getCharPositionInLine() );
}
@@ -2554,15 +2554,15 @@
}
if ( backtracking==0 ) {
-
- if( ma != null ) {
- as.addInvoker( ma );
- } else {
- as.addInvoker( fa );
- }
+
+ if( ma != null ) {
+ as.addInvoker( ma );
+ } else {
+ as.addInvoker( fa );
+ }
}
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:798:4: ( ( expression_chain[as] )=> expression_chain[as] )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:798:4: ( ( expression_chain[as] )=> expression_chain[as] )?
int alt26=2;
int LA26_0 = input.LA(1);
if ( (LA26_0==33) ) {
@@ -2570,7 +2570,7 @@
}
switch (alt26) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:0:0: ( expression_chain[as] )=> expression_chain[as]
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:0:0: ( expression_chain[as] )=> expression_chain[as]
{
pushFollow(FOLLOW_expression_chain_in_expression_chain1703);
expression_chain(as);
@@ -2601,7 +2601,7 @@
// $ANTLR start accumulate_statement
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:802:1: accumulate_statement returns [AccumulateDescr d] : loc= 'from' 'accumulate' '(' column= lhs_column ',' 'init' text= paren_chunk ',' 'action' text= paren_chunk ',' 'result' text= paren_chunk ')' ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:802:1: accumulate_statement returns [AccumulateDescr d] : loc= 'from' 'accumulate' '(' column= lhs_column ',' 'init' text= paren_chunk ',' 'action' text= paren_chunk ',' 'result' text= paren_chunk ')' ;
public AccumulateDescr accumulate_statement() throws RecognitionException {
AccumulateDescr d = null;
@@ -2611,19 +2611,19 @@
String text = null;
-
- d = factory.createAccumulate();
+
+ d = factory.createAccumulate();
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:807:10: (loc= 'from' 'accumulate' '(' column= lhs_column ',' 'init' text= paren_chunk ',' 'action' text= paren_chunk ',' 'result' text= paren_chunk ')' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:807:10: loc= 'from' 'accumulate' '(' column= lhs_column ',' 'init' text= paren_chunk ',' 'action' text= paren_chunk ',' 'result' text= paren_chunk ')'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:807:10: (loc= 'from' 'accumulate' '(' column= lhs_column ',' 'init' text= paren_chunk ',' 'action' text= paren_chunk ',' 'result' text= paren_chunk ')' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:807:10: loc= 'from' 'accumulate' '(' column= lhs_column ',' 'init' text= paren_chunk ',' 'action' text= paren_chunk ',' 'result' text= paren_chunk ')'
{
loc=(Token)input.LT(1);
match(input,50,FOLLOW_50_in_accumulate_statement1744); if (failed) return d;
match(input,51,FOLLOW_51_in_accumulate_statement1746); if (failed) return d;
if ( backtracking==0 ) {
-
- d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+
+ d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
}
match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_accumulate_statement1756); if (failed) return d;
@@ -2633,8 +2633,8 @@
if (failed) return d;
match(input,36,FOLLOW_36_in_accumulate_statement1762); if (failed) return d;
if ( backtracking==0 ) {
-
- d.setSourceColumn( (ColumnDescr)column );
+
+ d.setSourceColumn( (ColumnDescr)column );
}
match(input,52,FOLLOW_52_in_accumulate_statement1771); if (failed) return d;
@@ -2644,8 +2644,8 @@
if (failed) return d;
match(input,36,FOLLOW_36_in_accumulate_statement1777); if (failed) return d;
if ( backtracking==0 ) {
-
- d.setInitCode( text.substring(1, text.length()-1) );
+
+ d.setInitCode( text.substring(1, text.length()-1) );
}
match(input,53,FOLLOW_53_in_accumulate_statement1786); if (failed) return d;
@@ -2655,8 +2655,8 @@
if (failed) return d;
match(input,36,FOLLOW_36_in_accumulate_statement1792); if (failed) return d;
if ( backtracking==0 ) {
-
- d.setActionCode( text.substring(1, text.length()-1) );
+
+ d.setActionCode( text.substring(1, text.length()-1) );
}
match(input,54,FOLLOW_54_in_accumulate_statement1801); if (failed) return d;
@@ -2666,8 +2666,8 @@
if (failed) return d;
match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_accumulate_statement1807); if (failed) return d;
if ( backtracking==0 ) {
-
- d.setResultCode( text.substring(1, text.length()-1) );
+
+ d.setResultCode( text.substring(1, text.length()-1) );
}
@@ -2686,7 +2686,7 @@
// $ANTLR start collect_statement
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:829:1: collect_statement returns [CollectDescr d] : loc= 'from' 'collect' '(' column= lhs_column ')' ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:829:1: collect_statement returns [CollectDescr d] : loc= 'from' 'collect' '(' column= lhs_column ')' ;
public CollectDescr collect_statement() throws RecognitionException {
CollectDescr d = null;
@@ -2694,19 +2694,19 @@
BaseDescr column = null;
-
- d = factory.createCollect();
+
+ d = factory.createCollect();
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:834:10: (loc= 'from' 'collect' '(' column= lhs_column ')' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:834:10: loc= 'from' 'collect' '(' column= lhs_column ')'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:834:10: (loc= 'from' 'collect' '(' column= lhs_column ')' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:834:10: loc= 'from' 'collect' '(' column= lhs_column ')'
{
loc=(Token)input.LT(1);
match(input,50,FOLLOW_50_in_collect_statement1850); if (failed) return d;
match(input,55,FOLLOW_55_in_collect_statement1852); if (failed) return d;
if ( backtracking==0 ) {
-
- d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+
+ d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
}
match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_collect_statement1862); if (failed) return d;
@@ -2716,8 +2716,8 @@
if (failed) return d;
match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_collect_statement1868); if (failed) return d;
if ( backtracking==0 ) {
-
- d.setSourceColumn( (ColumnDescr)column );
+
+ d.setSourceColumn( (ColumnDescr)column );
}
@@ -2736,7 +2736,7 @@
// $ANTLR start fact_binding
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:915:1: fact_binding returns [BaseDescr d] : id= ID ':' fe= fact_expression[id.getText()] ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:915:1: fact_binding returns [BaseDescr d] : id= ID ':' fe= fact_expression[id.getText()] ;
public BaseDescr fact_binding() throws RecognitionException {
BaseDescr d = null;
@@ -2744,13 +2744,13 @@
BaseDescr fe = null;
-
- d=null;
- boolean multi=false;
+
+ d=null;
+ boolean multi=false;
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:921:4: (id= ID ':' fe= fact_expression[id.getText()] )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:921:4: id= ID ':' fe= fact_expression[id.getText()]
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:921:4: (id= ID ':' fe= fact_expression[id.getText()] )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:921:4: id= ID ':' fe= fact_expression[id.getText()]
{
id=(Token)input.LT(1);
match(input,ID,FOLLOW_ID_in_fact_binding1903); if (failed) return d;
@@ -2760,8 +2760,8 @@
_fsp--;
if (failed) return d;
if ( backtracking==0 ) {
-
- d=fe;
+
+ d=fe;
}
@@ -2780,7 +2780,7 @@
// $ANTLR start fact_expression
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:929:2: fact_expression[String id] returns [BaseDescr pd] : ( ( '(' fact_expression_in_paren[id] ')' )=> '(' fe= fact_expression_in_paren[id] ')' | f= fact );
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:929:2: fact_expression[String id] returns [BaseDescr pd] : ( ( '(' fact_expression_in_paren[id] ')' )=> '(' fe= fact_expression_in_paren[id] ')' | f= fact );
public BaseDescr fact_expression(String id) throws RecognitionException {
BaseDescr pd = null;
@@ -2789,12 +2789,12 @@
BaseDescr f = null;
-
- pd = null;
- boolean multi = false;
+
+ pd = null;
+ boolean multi = false;
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:934:5: ( ( '(' fact_expression_in_paren[id] ')' )=> '(' fe= fact_expression_in_paren[id] ')' | f= fact )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:934:5: ( ( '(' fact_expression_in_paren[id] ')' )=> '(' fe= fact_expression_in_paren[id] ')' | f= fact )
int alt27=2;
int LA27_0 = input.LA(1);
if ( (LA27_0==LEFT_PAREN) ) {
@@ -2812,7 +2812,7 @@
}
switch (alt27) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:934:5: ( '(' fact_expression_in_paren[id] ')' )=> '(' fe= fact_expression_in_paren[id] ')'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:934:5: ( '(' fact_expression_in_paren[id] ')' )=> '(' fe= fact_expression_in_paren[id] ')'
{
match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_fact_expression1949); if (failed) return pd;
pushFollow(FOLLOW_fact_expression_in_paren_in_fact_expression1953);
@@ -2827,16 +2827,16 @@
}
break;
case 2 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:935:6: f= fact
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:935:6: f= fact
{
pushFollow(FOLLOW_fact_in_fact_expression1967);
f=fact();
_fsp--;
if (failed) return pd;
if ( backtracking==0 ) {
-
- ((ColumnDescr)f).setIdentifier( id );
- pd = f;
+
+ ((ColumnDescr)f).setIdentifier( id );
+ pd = f;
}
@@ -2857,7 +2857,7 @@
// $ANTLR start fact_expression_in_paren
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:943:2: fact_expression_in_paren[String id] returns [BaseDescr pd] : ( ( '(' fact_expression_in_paren[id] ')' )=> '(' fe= fact_expression_in_paren[id] ')' | f= fact ( ( ('or'|'||') fact )=> ('or'|'||')f= fact )* );
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:943:2: fact_expression_in_paren[String id] returns [BaseDescr pd] : ( ( '(' fact_expression_in_paren[id] ')' )=> '(' fe= fact_expression_in_paren[id] ')' | f= fact ( ( ('or'|'||') fact )=> ('or'|'||')f= fact )* );
public BaseDescr fact_expression_in_paren(String id) throws RecognitionException {
BaseDescr pd = null;
@@ -2866,12 +2866,12 @@
BaseDescr f = null;
-
- pd = null;
- boolean multi = false;
+
+ pd = null;
+ boolean multi = false;
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:948:5: ( ( '(' fact_expression_in_paren[id] ')' )=> '(' fe= fact_expression_in_paren[id] ')' | f= fact ( ( ('or'|'||') fact )=> ('or'|'||')f= fact )* )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:948:5: ( ( '(' fact_expression_in_paren[id] ')' )=> '(' fe= fact_expression_in_paren[id] ')' | f= fact ( ( ('or'|'||') fact )=> ('or'|'||')f= fact )* )
int alt29=2;
int LA29_0 = input.LA(1);
if ( (LA29_0==LEFT_PAREN) ) {
@@ -2889,7 +2889,7 @@
}
switch (alt29) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:948:5: ( '(' fact_expression_in_paren[id] ')' )=> '(' fe= fact_expression_in_paren[id] ')'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:948:5: ( '(' fact_expression_in_paren[id] ')' )=> '(' fe= fact_expression_in_paren[id] ')'
{
match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_fact_expression_in_paren1998); if (failed) return pd;
pushFollow(FOLLOW_fact_expression_in_paren_in_fact_expression_in_paren2002);
@@ -2904,19 +2904,19 @@
}
break;
case 2 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:949:6: f= fact ( ( ('or'|'||') fact )=> ('or'|'||')f= fact )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:949:6: f= fact ( ( ('or'|'||') fact )=> ('or'|'||')f= fact )*
{
pushFollow(FOLLOW_fact_in_fact_expression_in_paren2015);
f=fact();
_fsp--;
if (failed) return pd;
if ( backtracking==0 ) {
-
- ((ColumnDescr)f).setIdentifier( id );
- pd = f;
+
+ ((ColumnDescr)f).setIdentifier( id );
+ pd = f;
}
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:954:4: ( ( ('or'|'||') fact )=> ('or'|'||')f= fact )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:954:4: ( ( ('or'|'||') fact )=> ('or'|'||')f= fact )*
loop28:
do {
int alt28=2;
@@ -2928,7 +2928,7 @@
switch (alt28) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:954:6: ( ('or'|'||') fact )=> ('or'|'||')f= fact
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:954:6: ( ('or'|'||') fact )=> ('or'|'||')f= fact
{
if ( (input.LA(1)>=56 && input.LA(1)<=57) ) {
input.consume();
@@ -2942,12 +2942,12 @@
}
if ( backtracking==0 ) {
- if ( ! multi ) {
- BaseDescr first = pd;
- pd = new OrDescr();
- ((OrDescr)pd).addDescr( first );
- multi=true;
- }
+ if ( ! multi ) {
+ BaseDescr first = pd;
+ pd = new OrDescr();
+ ((OrDescr)pd).addDescr( first );
+ multi=true;
+ }
}
pushFollow(FOLLOW_fact_in_fact_expression_in_paren2045);
@@ -2955,9 +2955,9 @@
_fsp--;
if (failed) return pd;
if ( backtracking==0 ) {
-
- ((ColumnDescr)f).setIdentifier( id );
- ((OrDescr)pd).addDescr( f );
+
+ ((ColumnDescr)f).setIdentifier( id );
+ ((OrDescr)pd).addDescr( f );
}
@@ -2987,7 +2987,7 @@
// $ANTLR start fact
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:970:1: fact returns [BaseDescr d] : id= dotted_name loc= '(' ( ( constraints )=>c= constraints )? endLoc= ')' ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:970:1: fact returns [BaseDescr d] : id= dotted_name loc= '(' ( ( constraints )=>c= constraints )? endLoc= ')' ;
public BaseDescr fact() throws RecognitionException {
BaseDescr d = null;
@@ -2998,30 +2998,30 @@
List c = null;
-
- d=null;
+
+ d=null;
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:974:5: (id= dotted_name loc= '(' ( ( constraints )=>c= constraints )? endLoc= ')' )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:974:5: id= dotted_name loc= '(' ( ( constraints )=>c= constraints )? endLoc= ')'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:974:5: (id= dotted_name loc= '(' ( ( constraints )=>c= constraints )? endLoc= ')' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:974:5: id= dotted_name loc= '(' ( ( constraints )=>c= constraints )? endLoc= ')'
{
pushFollow(FOLLOW_dotted_name_in_fact2084);
id=dotted_name();
_fsp--;
if (failed) return d;
if ( backtracking==0 ) {
-
- d = new ColumnDescr( id );
+
+ d = new ColumnDescr( id );
}
loc=(Token)input.LT(1);
match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_fact2097); if (failed) return d;
if ( backtracking==0 ) {
-
- d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+
+ d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
}
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:981:4: ( ( constraints )=>c= constraints )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:981:4: ( ( constraints )=>c= constraints )?
int alt30=2;
int LA30_0 = input.LA(1);
if ( (LA30_0==ID) ) {
@@ -3029,17 +3029,17 @@
}
switch (alt30) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:981:6: ( constraints )=>c= constraints
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:981:6: ( constraints )=>c= constraints
{
pushFollow(FOLLOW_constraints_in_fact2109);
c=constraints();
_fsp--;
if (failed) return d;
if ( backtracking==0 ) {
-
- for ( Iterator cIter = c.iterator() ; cIter.hasNext() ; ) {
- ((ColumnDescr)d).addDescr( (BaseDescr) cIter.next() );
- }
+
+ for ( Iterator cIter = c.iterator() ; cIter.hasNext() ; ) {
+ ((ColumnDescr)d).addDescr( (BaseDescr) cIter.next() );
+ }
}
@@ -3051,8 +3051,8 @@
endLoc=(Token)input.LT(1);
match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_fact2130); if (failed) return d;
if ( backtracking==0 ) {
-
- d.setEndLocation( offset(endLoc.getLine()), endLoc.getCharPositionInLine() );
+
+ d.setEndLocation( offset(endLoc.getLine()), endLoc.getCharPositionInLine() );
}
@@ -3071,18 +3071,18 @@
// $ANTLR start constraints
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:995:1: constraints returns [List constraints] : ( ( constraint[constraints] )=> constraint[constraints] | predicate[constraints] ) ( ( ',' ( ( constraint[constraints] )=> constraint[constraints] | predicate[constraints] ) )=> ',' ( ( constraint[constraints] )=> constraint[constraints] | predicate[constraints] ) )* ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:995:1: constraints returns [List constraints] : ( ( constraint[constraints] )=> constraint[constraints] | predicate[constraints] ) ( ( ',' ( ( constraint[constraints] )=> constraint[constraints] | predicate[constraints] ) )=> ',' ( ( constraint[constraints] )=> constraint[constraints] | predicate[constraints] ) )* ;
public List constraints() throws RecognitionException {
List constraints = null;
-
- constraints = new ArrayList();
+
+ constraints = new ArrayList();
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:999:4: ( ( ( constraint[constraints] )=> constraint[constraints] | predicate[constraints] ) ( ( ',' ( ( constraint[constraints] )=> constraint[constraints] | predicate[constraints] ) )=> ',' ( ( constraint[constraints] )=> constraint[constraints] | predicate[constraints] ) )* )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:999:4: ( ( constraint[constraints] )=> constraint[constraints] | predicate[constraints] ) ( ( ',' ( ( constraint[constraints] )=> constraint[constraints] | predicate[constraints] ) )=> ',' ( ( constraint[constraints] )=> constraint[constraints] | predicate[constraints] ) )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:999:4: ( ( ( constraint[constraints] )=> constraint[constraints] | predicate[constraints] ) ( ( ',' ( ( constraint[constraints] )=> constraint[constraints] | predicate[constraints] ) )=> ',' ( ( constraint[constraints] )=> constraint[constraints] | predicate[constraints] ) )* )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:999:4: ( ( constraint[constraints] )=> constraint[constraints] | predicate[constraints] ) ( ( ',' ( ( constraint[constraints] )=> constraint[constraints] | predicate[constraints] ) )=> ',' ( ( constraint[constraints] )=> constraint[constraints] | predicate[constraints] ) )*
{
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:999:4: ( ( constraint[constraints] )=> constraint[constraints] | predicate[constraints] )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:999:4: ( ( constraint[constraints] )=> constraint[constraints] | predicate[constraints] )
int alt31=2;
int LA31_0 = input.LA(1);
if ( (LA31_0==ID) ) {
@@ -3133,7 +3133,7 @@
}
switch (alt31) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:999:5: ( constraint[constraints] )=> constraint[constraints]
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:999:5: ( constraint[constraints] )=> constraint[constraints]
{
pushFollow(FOLLOW_constraint_in_constraints2160);
constraint(constraints);
@@ -3143,7 +3143,7 @@
}
break;
case 2 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:999:29: predicate[constraints]
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:999:29: predicate[constraints]
{
pushFollow(FOLLOW_predicate_in_constraints2163);
predicate(constraints);
@@ -3155,7 +3155,7 @@
}
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1000:3: ( ( ',' ( ( constraint[constraints] )=> constraint[constraints] | predicate[constraints] ) )=> ',' ( ( constraint[constraints] )=> constraint[constraints] | predicate[constraints] ) )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1000:3: ( ( ',' ( ( constraint[constraints] )=> constraint[constraints] | predicate[constraints] ) )=> ',' ( ( constraint[constraints] )=> constraint[constraints] | predicate[constraints] ) )*
loop33:
do {
int alt33=2;
@@ -3167,10 +3167,10 @@
switch (alt33) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1000:5: ( ',' ( ( constraint[constraints] )=> constraint[constraints] | predicate[constraints] ) )=> ',' ( ( constraint[constraints] )=> constraint[constraints] | predicate[constraints] )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1000:5: ( ',' ( ( constraint[constraints] )=> constraint[constraints] | predicate[constraints] ) )=> ',' ( ( constraint[constraints] )=> constraint[constraints] | predicate[constraints] )
{
match(input,36,FOLLOW_36_in_constraints2171); if (failed) return constraints;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1000:9: ( ( constraint[constraints] )=> constraint[constraints] | predicate[constraints] )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1000:9: ( ( constraint[constraints] )=> constraint[constraints] | predicate[constraints] )
int alt32=2;
int LA32_0 = input.LA(1);
if ( (LA32_0==ID) ) {
@@ -3221,7 +3221,7 @@
}
switch (alt32) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1000:10: ( constraint[constraints] )=> constraint[constraints]
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1000:10: ( constraint[constraints] )=> constraint[constraints]
{
pushFollow(FOLLOW_constraint_in_constraints2174);
constraint(constraints);
@@ -3231,7 +3231,7 @@
}
break;
case 2 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1000:34: predicate[constraints]
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1000:34: predicate[constraints]
{
pushFollow(FOLLOW_predicate_in_constraints2177);
predicate(constraints);
@@ -3268,7 +3268,7 @@
// $ANTLR start constraint
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1003:1: constraint[List constraints] : ( ( ID ':' )=>fb= ID ':' )? f= ID ( ( constraint_expression ( ( ('&'|'|') constraint_expression )=> ('&'|'|') constraint_expression )* )=>rd= constraint_expression ( ( ('&'|'|') constraint_expression )=>con= ('&'|'|')rd= constraint_expression )* )? ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1003:1: constraint[List constraints] : ( ( ID ':' )=>fb= ID ':' )? f= ID ( ( constraint_expression ( ( ('&'|'|') constraint_expression )=> ('&'|'|') constraint_expression )* )=>rd= constraint_expression ( ( ('&'|'|') constraint_expression )=>con= ('&'|'|')rd= constraint_expression )* )? ;
public void constraint(List constraints) throws RecognitionException {
Token fb=null;
Token f=null;
@@ -3276,15 +3276,15 @@
RestrictionDescr rd = null;
-
- BaseDescr d = null;
- FieldConstraintDescr fc = null;
+
+ BaseDescr d = null;
+ FieldConstraintDescr fc = null;
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1009:3: ( ( ( ID ':' )=>fb= ID ':' )? f= ID ( ( constraint_expression ( ( ('&'|'|') constraint_expression )=> ('&'|'|') constraint_expression )* )=>rd= constraint_expression ( ( ('&'|'|') constraint_expression )=>con= ('&'|'|')rd= constraint_expression )* )? )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1009:3: ( ( ID ':' )=>fb= ID ':' )? f= ID ( ( constraint_expression ( ( ('&'|'|') constraint_expression )=> ('&'|'|') constraint_expression )* )=>rd= constraint_expression ( ( ('&'|'|') constraint_expression )=>con= ('&'|'|')rd= constraint_expression )* )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1009:3: ( ( ( ID ':' )=>fb= ID ':' )? f= ID ( ( constraint_expression ( ( ('&'|'|') constraint_expression )=> ('&'|'|') constraint_expression )* )=>rd= constraint_expression ( ( ('&'|'|') constraint_expression )=>con= ('&'|'|')rd= constraint_expression )* )? )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1009:3: ( ( ID ':' )=>fb= ID ':' )? f= ID ( ( constraint_expression ( ( ('&'|'|') constraint_expression )=> ('&'|'|') constraint_expression )* )=>rd= constraint_expression ( ( ('&'|'|') constraint_expression )=>con= ('&'|'|')rd= constraint_expression )* )?
{
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1009:3: ( ( ID ':' )=>fb= ID ':' )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1009:3: ( ( ID ':' )=>fb= ID ':' )?
int alt34=2;
int LA34_0 = input.LA(1);
if ( (LA34_0==ID) ) {
@@ -3295,7 +3295,7 @@
}
switch (alt34) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1009:5: ( ID ':' )=>fb= ID ':'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1009:5: ( ID ':' )=>fb= ID ':'
{
fb=(Token)input.LT(1);
match(input,ID,FOLLOW_ID_in_constraint2206); if (failed) return ;
@@ -3309,17 +3309,17 @@
f=(Token)input.LT(1);
match(input,ID,FOLLOW_ID_in_constraint2218); if (failed) return ;
if ( backtracking==0 ) {
-
- if ( fb != null ) {
- d = new FieldBindingDescr( f.getText(), fb.getText() );
- d.setLocation( offset(f.getLine()), f.getCharPositionInLine() );
- constraints.add( d );
- }
- fc = new FieldConstraintDescr(f.getText());
- fc.setLocation( offset(f.getLine()), f.getCharPositionInLine() );
+
+ if ( fb != null ) {
+ d = new FieldBindingDescr( f.getText(), fb.getText() );
+ d.setLocation( offset(f.getLine()), f.getCharPositionInLine() );
+ constraints.add( d );
+ }
+ fc = new FieldConstraintDescr(f.getText());
+ fc.setLocation( offset(f.getLine()), f.getCharPositionInLine() );
}
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1020:3: ( ( constraint_expression ( ( ('&'|'|') constraint_expression )=> ('&'|'|') constraint_expression )* )=>rd= constraint_expression ( ( ('&'|'|') constraint_expression )=>con= ('&'|'|')rd= constraint_expression )* )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1020:3: ( ( constraint_expression ( ( ('&'|'|') constraint_expression )=> ('&'|'|') constraint_expression )* )=>rd= constraint_expression ( ( ('&'|'|') constraint_expression )=>con= ('&'|'|')rd= constraint_expression )* )?
int alt36=2;
int LA36_0 = input.LA(1);
if ( ((LA36_0>=60 && LA36_0<=68)) ) {
@@ -3327,19 +3327,19 @@
}
switch (alt36) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1021:4: ( constraint_expression ( ( ('&'|'|') constraint_expression )=> ('&'|'|') constraint_expression )* )=>rd= constraint_expression ( ( ('&'|'|') constraint_expression )=>con= ('&'|'|')rd= constraint_expression )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1021:4: ( constraint_expression ( ( ('&'|'|') constraint_expression )=> ('&'|'|') constraint_expression )* )=>rd= constraint_expression ( ( ('&'|'|') constraint_expression )=>con= ('&'|'|')rd= constraint_expression )*
{
pushFollow(FOLLOW_constraint_expression_in_constraint2234);
rd=constraint_expression();
_fsp--;
if (failed) return ;
if ( backtracking==0 ) {
-
- fc.addRestriction(rd);
- constraints.add(fc);
+
+ fc.addRestriction(rd);
+ constraints.add(fc);
}
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1026:4: ( ( ('&'|'|') constraint_expression )=>con= ('&'|'|')rd= constraint_expression )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1026:4: ( ( ('&'|'|') constraint_expression )=>con= ('&'|'|')rd= constraint_expression )*
loop35:
do {
int alt35=2;
@@ -3351,7 +3351,7 @@
switch (alt35) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1027:5: ( ('&'|'|') constraint_expression )=>con= ('&'|'|')rd= constraint_expression
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1027:5: ( ('&'|'|') constraint_expression )=>con= ('&'|'|')rd= constraint_expression
{
con=(Token)input.LT(1);
if ( (input.LA(1)>=58 && input.LA(1)<=59) ) {
@@ -3366,12 +3366,12 @@
}
if ( backtracking==0 ) {
-
- if (con.getText().equals("&") ) {
- fc.addRestriction(new RestrictionConnectiveDescr(RestrictionConnectiveDescr.AND));
- } else {
- fc.addRestriction(new RestrictionConnectiveDescr(RestrictionConnectiveDescr.OR));
- }
+
+ if (con.getText().equals("&") ) {
+ fc.addRestriction(new RestrictionConnectiveDescr(RestrictionConnectiveDescr.AND));
+ } else {
+ fc.addRestriction(new RestrictionConnectiveDescr(RestrictionConnectiveDescr.OR));
+ }
}
pushFollow(FOLLOW_constraint_expression_in_constraint2270);
@@ -3379,8 +3379,8 @@
_fsp--;
if (failed) return ;
if ( backtracking==0 ) {
-
- fc.addRestriction(rd);
+
+ fc.addRestriction(rd);
}
@@ -3414,7 +3414,7 @@
// $ANTLR start constraint_expression
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1043:1: constraint_expression returns [RestrictionDescr rd] : op= ('=='|'>'|'>='|'<'|'<='|'!='|'contains'|'matches'|'excludes') ( ( ID )=>bvc= ID | ( enum_constraint )=>lc= enum_constraint | ( literal_constraint )=>lc= literal_constraint | rvc= retval_constraint ) ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1043:1: constraint_expression returns [RestrictionDescr rd] : op= ('=='|'>'|'>='|'<'|'<='|'!='|'contains'|'matches'|'excludes') ( ( ID )=>bvc= ID | ( enum_constraint )=>lc= enum_constraint | ( literal_constraint )=>lc= literal_constraint | rvc= retval_constraint ) ;
public RestrictionDescr constraint_expression() throws RecognitionException {
RestrictionDescr rd = null;
@@ -3426,8 +3426,8 @@
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1045:3: (op= ('=='|'>'|'>='|'<'|'<='|'!='|'contains'|'matches'|'excludes') ( ( ID )=>bvc= ID | ( enum_constraint )=>lc= enum_constraint | ( literal_constraint )=>lc= literal_constraint | rvc= retval_constraint ) )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1045:3: op= ('=='|'>'|'>='|'<'|'<='|'!='|'contains'|'matches'|'excludes') ( ( ID )=>bvc= ID | ( enum_constraint )=>lc= enum_constraint | ( literal_constraint )=>lc= literal_constraint | rvc= retval_constraint )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1045:3: (op= ('=='|'>'|'>='|'<'|'<='|'!='|'contains'|'matches'|'excludes') ( ( ID )=>bvc= ID | ( enum_constraint )=>lc= enum_constraint | ( literal_constraint )=>lc= literal_constraint | rvc= retval_constraint ) )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1045:3: op= ('=='|'>'|'>='|'<'|'<='|'!='|'contains'|'matches'|'excludes') ( ( ID )=>bvc= ID | ( enum_constraint )=>lc= enum_constraint | ( literal_constraint )=>lc= literal_constraint | rvc= retval_constraint )
{
op=(Token)input.LT(1);
if ( (input.LA(1)>=60 && input.LA(1)<=68) ) {
@@ -3441,7 +3441,7 @@
recoverFromMismatchedSet(input,mse,FOLLOW_set_in_constraint_expression2322); throw mse;
}
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1055:3: ( ( ID )=>bvc= ID | ( enum_constraint )=>lc= enum_constraint | ( literal_constraint )=>lc= literal_constraint | rvc= retval_constraint )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1055:3: ( ( ID )=>bvc= ID | ( enum_constraint )=>lc= enum_constraint | ( literal_constraint )=>lc= literal_constraint | rvc= retval_constraint )
int alt37=4;
switch ( input.LA(1) ) {
case ID:
@@ -3480,58 +3480,58 @@
switch (alt37) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1055:5: ( ID )=>bvc= ID
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1055:5: ( ID )=>bvc= ID
{
bvc=(Token)input.LT(1);
match(input,ID,FOLLOW_ID_in_constraint_expression2389); if (failed) return rd;
if ( backtracking==0 ) {
-
- rd = new VariableRestrictionDescr(op.getText(), bvc.getText());
+
+ rd = new VariableRestrictionDescr(op.getText(), bvc.getText());
}
}
break;
case 2 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1060:4: ( enum_constraint )=>lc= enum_constraint
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1060:4: ( enum_constraint )=>lc= enum_constraint
{
pushFollow(FOLLOW_enum_constraint_in_constraint_expression2405);
lc=enum_constraint();
_fsp--;
if (failed) return rd;
if ( backtracking==0 ) {
-
- rd = new LiteralRestrictionDescr(op.getText(), lc, true);
+
+ rd = new LiteralRestrictionDescr(op.getText(), lc, true);
}
}
break;
case 3 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1065:4: ( literal_constraint )=>lc= literal_constraint
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1065:4: ( literal_constraint )=>lc= literal_constraint
{
pushFollow(FOLLOW_literal_constraint_in_constraint_expression2428);
lc=literal_constraint();
_fsp--;
if (failed) return rd;
if ( backtracking==0 ) {
-
- rd = new LiteralRestrictionDescr(op.getText(), lc);
+
+ rd = new LiteralRestrictionDescr(op.getText(), lc);
}
}
break;
case 4 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1069:5: rvc= retval_constraint
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1069:5: rvc= retval_constraint
{
pushFollow(FOLLOW_retval_constraint_in_constraint_expression2442);
rvc=retval_constraint();
_fsp--;
if (failed) return rd;
if ( backtracking==0 ) {
-
- rd = new ReturnValueRestrictionDescr(op.getText(), rvc);
+
+ rd = new ReturnValueRestrictionDescr(op.getText(), rvc);
}
@@ -3556,20 +3556,20 @@
// $ANTLR start literal_constraint
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1076:1: literal_constraint returns [String text] : ( ( STRING )=>t= STRING | ( INT )=>t= INT | ( FLOAT )=>t= FLOAT | ( BOOL )=>t= BOOL | t= 'null' ) ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1076:1: literal_constraint returns [String text] : ( ( STRING )=>t= STRING | ( INT )=>t= INT | ( FLOAT )=>t= FLOAT | ( BOOL )=>t= BOOL | t= 'null' ) ;
public String literal_constraint() throws RecognitionException {
String text = null;
Token t=null;
-
- text = null;
+
+ text = null;
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1080:4: ( ( ( STRING )=>t= STRING | ( INT )=>t= INT | ( FLOAT )=>t= FLOAT | ( BOOL )=>t= BOOL | t= 'null' ) )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1080:4: ( ( STRING )=>t= STRING | ( INT )=>t= INT | ( FLOAT )=>t= FLOAT | ( BOOL )=>t= BOOL | t= 'null' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1080:4: ( ( ( STRING )=>t= STRING | ( INT )=>t= INT | ( FLOAT )=>t= FLOAT | ( BOOL )=>t= BOOL | t= 'null' ) )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1080:4: ( ( STRING )=>t= STRING | ( INT )=>t= INT | ( FLOAT )=>t= FLOAT | ( BOOL )=>t= BOOL | t= 'null' )
{
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1080:4: ( ( STRING )=>t= STRING | ( INT )=>t= INT | ( FLOAT )=>t= FLOAT | ( BOOL )=>t= BOOL | t= 'null' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1080:4: ( ( STRING )=>t= STRING | ( INT )=>t= INT | ( FLOAT )=>t= FLOAT | ( BOOL )=>t= BOOL | t= 'null' )
int alt38=5;
switch ( input.LA(1) ) {
case STRING:
@@ -3597,7 +3597,7 @@
switch (alt38) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1080:6: ( STRING )=>t= STRING
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1080:6: ( STRING )=>t= STRING
{
t=(Token)input.LT(1);
match(input,STRING,FOLLOW_STRING_in_literal_constraint2481); if (failed) return text;
@@ -3608,7 +3608,7 @@
}
break;
case 2 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1081:5: ( INT )=>t= INT
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1081:5: ( INT )=>t= INT
{
t=(Token)input.LT(1);
match(input,INT,FOLLOW_INT_in_literal_constraint2492); if (failed) return text;
@@ -3619,7 +3619,7 @@
}
break;
case 3 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1082:5: ( FLOAT )=>t= FLOAT
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1082:5: ( FLOAT )=>t= FLOAT
{
t=(Token)input.LT(1);
match(input,FLOAT,FOLLOW_FLOAT_in_literal_constraint2505); if (failed) return text;
@@ -3630,7 +3630,7 @@
}
break;
case 4 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1083:5: ( BOOL )=>t= BOOL
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1083:5: ( BOOL )=>t= BOOL
{
t=(Token)input.LT(1);
match(input,BOOL,FOLLOW_BOOL_in_literal_constraint2516); if (failed) return text;
@@ -3641,7 +3641,7 @@
}
break;
case 5 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1084:5: t= 'null'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1084:5: t= 'null'
{
t=(Token)input.LT(1);
match(input,69,FOLLOW_69_in_literal_constraint2528); if (failed) return text;
@@ -3670,22 +3670,22 @@
// $ANTLR start enum_constraint
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1088:1: enum_constraint returns [String text] : (cls= ID '.' en= ID ) ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1088:1: enum_constraint returns [String text] : (cls= ID '.' en= ID ) ;
public String enum_constraint() throws RecognitionException {
String text = null;
Token cls=null;
Token en=null;
-
- text = null;
+
+ text = null;
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1092:4: ( (cls= ID '.' en= ID ) )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1092:4: (cls= ID '.' en= ID )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1092:4: ( (cls= ID '.' en= ID ) )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1092:4: (cls= ID '.' en= ID )
{
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1092:4: (cls= ID '.' en= ID )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1092:5: cls= ID '.' en= ID
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1092:4: (cls= ID '.' en= ID )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1092:5: cls= ID '.' en= ID
{
cls=(Token)input.LT(1);
match(input,ID,FOLLOW_ID_in_enum_constraint2559); if (failed) return text;
@@ -3714,7 +3714,7 @@
// $ANTLR start predicate
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1096:1: predicate[List constraints] : decl= ID ':' field= ID '->' text= paren_chunk ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1096:1: predicate[List constraints] : decl= ID ':' field= ID '->' text= paren_chunk ;
public void predicate(List constraints) throws RecognitionException {
Token decl=null;
Token field=null;
@@ -3722,8 +3722,8 @@
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1098:3: (decl= ID ':' field= ID '->' text= paren_chunk )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1098:3: decl= ID ':' field= ID '->' text= paren_chunk
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1098:3: (decl= ID ':' field= ID '->' text= paren_chunk )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1098:3: decl= ID ':' field= ID '->' text= paren_chunk
{
decl=(Token)input.LT(1);
match(input,ID,FOLLOW_ID_in_predicate2587); if (failed) return ;
@@ -3736,10 +3736,10 @@
_fsp--;
if (failed) return ;
if ( backtracking==0 ) {
-
- String body = text.substring(1, text.length()-1);
- PredicateDescr d = new PredicateDescr(field.getText(), decl.getText(), body );
- constraints.add( d );
+
+ String body = text.substring(1, text.length()-1);
+ PredicateDescr d = new PredicateDescr(field.getText(), decl.getText(), body );
+ constraints.add( d );
}
@@ -3758,7 +3758,7 @@
// $ANTLR start paren_chunk
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1106:1: paren_chunk returns [String text] : loc= LEFT_PAREN ( (~ (LEFT_PAREN|RIGHT_PAREN))=>~ (LEFT_PAREN|RIGHT_PAREN) | ( paren_chunk )=>chunk= paren_chunk )* loc= RIGHT_PAREN ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1106:1: paren_chunk returns [String text] : loc= LEFT_PAREN ( (~ (LEFT_PAREN|RIGHT_PAREN))=>~ (LEFT_PAREN|RIGHT_PAREN) | ( paren_chunk )=>chunk= paren_chunk )* loc= RIGHT_PAREN ;
public String paren_chunk() throws RecognitionException {
String text = null;
@@ -3766,35 +3766,35 @@
String chunk = null;
-
- StringBuffer buf = null;
- Integer channel = null;
+
+ StringBuffer buf = null;
+ Integer channel = null;
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1112:10: (loc= LEFT_PAREN ( (~ (LEFT_PAREN|RIGHT_PAREN))=>~ (LEFT_PAREN|RIGHT_PAREN) | ( paren_chunk )=>chunk= paren_chunk )* loc= RIGHT_PAREN )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1112:10: loc= LEFT_PAREN ( (~ (LEFT_PAREN|RIGHT_PAREN))=>~ (LEFT_PAREN|RIGHT_PAREN) | ( paren_chunk )=>chunk= paren_chunk )* loc= RIGHT_PAREN
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1112:10: (loc= LEFT_PAREN ( (~ (LEFT_PAREN|RIGHT_PAREN))=>~ (LEFT_PAREN|RIGHT_PAREN) | ( paren_chunk )=>chunk= paren_chunk )* loc= RIGHT_PAREN )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1112:10: loc= LEFT_PAREN ( (~ (LEFT_PAREN|RIGHT_PAREN))=>~ (LEFT_PAREN|RIGHT_PAREN) | ( paren_chunk )=>chunk= paren_chunk )* loc= RIGHT_PAREN
{
if ( backtracking==0 ) {
-
- channel = ((SwitchingCommonTokenStream)input).getTokenTypeChannel( WS );
- ((SwitchingCommonTokenStream)input).setTokenTypeChannel( WS, Token.DEFAULT_CHANNEL );
- buf = new StringBuffer();
+
+ channel = ((SwitchingCommonTokenStream)input).getTokenTypeChannel( WS );
+ ((SwitchingCommonTokenStream)input).setTokenTypeChannel( WS, Token.DEFAULT_CHANNEL );
+ buf = new StringBuffer();
}
loc=(Token)input.LT(1);
match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_paren_chunk2646); if (failed) return text;
if ( backtracking==0 ) {
-
- buf.append( loc.getText());
-
+
+ buf.append( loc.getText());
+
}
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1122:3: ( (~ (LEFT_PAREN|RIGHT_PAREN))=>~ (LEFT_PAREN|RIGHT_PAREN) | ( paren_chunk )=>chunk= paren_chunk )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1122:3: ( (~ (LEFT_PAREN|RIGHT_PAREN))=>~ (LEFT_PAREN|RIGHT_PAREN) | ( paren_chunk )=>chunk= paren_chunk )*
loop39:
do {
int alt39=3;
int LA39_0 = input.LA(1);
- if ( ((LA39_0>=ID && LA39_0<=FLOAT)||(LA39_0>=LEFT_CURLY && LA39_0<=76)) ) {
+ if ( ((LA39_0>=ID && LA39_0<=FLOAT)||(LA39_0>=LEFT_CURLY && LA39_0<=77)) ) {
alt39=1;
}
else if ( (LA39_0==LEFT_PAREN) ) {
@@ -3804,9 +3804,9 @@
switch (alt39) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1123:4: (~ (LEFT_PAREN|RIGHT_PAREN))=>~ (LEFT_PAREN|RIGHT_PAREN)
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1123:4: (~ (LEFT_PAREN|RIGHT_PAREN))=>~ (LEFT_PAREN|RIGHT_PAREN)
{
- if ( (input.LA(1)>=ID && input.LA(1)<=FLOAT)||(input.LA(1)>=LEFT_CURLY && input.LA(1)<=76) ) {
+ if ( (input.LA(1)>=ID && input.LA(1)<=FLOAT)||(input.LA(1)>=LEFT_CURLY && input.LA(1)<=77) ) {
input.consume();
errorRecovery=false;failed=false;
}
@@ -3818,23 +3818,23 @@
}
if ( backtracking==0 ) {
-
- buf.append( input.LT(-1).getText() );
+
+ buf.append( input.LT(-1).getText() );
}
}
break;
case 2 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1128:4: ( paren_chunk )=>chunk= paren_chunk
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1128:4: ( paren_chunk )=>chunk= paren_chunk
{
pushFollow(FOLLOW_paren_chunk_in_paren_chunk2686);
chunk=paren_chunk();
_fsp--;
if (failed) return text;
if ( backtracking==0 ) {
-
- buf.append( chunk );
+
+ buf.append( chunk );
}
@@ -3847,20 +3847,20 @@
} while (true);
if ( backtracking==0 ) {
-
- if( channel != null ) {
- ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, channel.intValue());
- } else {
- ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, Token.HIDDEN_CHANNEL);
- }
+
+ if( channel != null ) {
+ ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, channel.intValue());
+ } else {
+ ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, Token.HIDDEN_CHANNEL);
+ }
}
loc=(Token)input.LT(1);
match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_paren_chunk2722); if (failed) return text;
if ( backtracking==0 ) {
-
- buf.append( loc.getText() );
- text = buf.toString();
+
+ buf.append( loc.getText() );
+ text = buf.toString();
}
@@ -3879,7 +3879,7 @@
// $ANTLR start curly_chunk
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1147:1: curly_chunk returns [String text] : loc= LEFT_CURLY ( (~ (LEFT_CURLY|RIGHT_CURLY))=>~ (LEFT_CURLY|RIGHT_CURLY) | ( curly_chunk )=>chunk= curly_chunk )* loc= RIGHT_CURLY ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1147:1: curly_chunk returns [String text] : loc= LEFT_CURLY ( (~ (LEFT_CURLY|RIGHT_CURLY))=>~ (LEFT_CURLY|RIGHT_CURLY) | ( curly_chunk )=>chunk= curly_chunk )* loc= RIGHT_CURLY ;
public String curly_chunk() throws RecognitionException {
String text = null;
@@ -3887,31 +3887,31 @@
String chunk = null;
-
- StringBuffer buf = null;
- Integer channel = null;
+
+ StringBuffer buf = null;
+ Integer channel = null;
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1153:3: (loc= LEFT_CURLY ( (~ (LEFT_CURLY|RIGHT_CURLY))=>~ (LEFT_CURLY|RIGHT_CURLY) | ( curly_chunk )=>chunk= curly_chunk )* loc= RIGHT_CURLY )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1153:3: loc= LEFT_CURLY ( (~ (LEFT_CURLY|RIGHT_CURLY))=>~ (LEFT_CURLY|RIGHT_CURLY) | ( curly_chunk )=>chunk= curly_chunk )* loc= RIGHT_CURLY
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1153:3: (loc= LEFT_CURLY ( (~ (LEFT_CURLY|RIGHT_CURLY))=>~ (LEFT_CURLY|RIGHT_CURLY) | ( curly_chunk )=>chunk= curly_chunk )* loc= RIGHT_CURLY )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1153:3: loc= LEFT_CURLY ( (~ (LEFT_CURLY|RIGHT_CURLY))=>~ (LEFT_CURLY|RIGHT_CURLY) | ( curly_chunk )=>chunk= curly_chunk )* loc= RIGHT_CURLY
{
loc=(Token)input.LT(1);
match(input,LEFT_CURLY,FOLLOW_LEFT_CURLY_in_curly_chunk2772); if (failed) return text;
if ( backtracking==0 ) {
-
- channel = ((SwitchingCommonTokenStream)input).getTokenTypeChannel( WS );
- ((SwitchingCommonTokenStream)input).setTokenTypeChannel( WS, Token.DEFAULT_CHANNEL );
- buf = new StringBuffer();
-
- buf.append( loc.getText() );
+
+ channel = ((SwitchingCommonTokenStream)input).getTokenTypeChannel( WS );
+ ((SwitchingCommonTokenStream)input).setTokenTypeChannel( WS, Token.DEFAULT_CHANNEL );
+ buf = new StringBuffer();
+
+ buf.append( loc.getText() );
}
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1161:3: ( (~ (LEFT_CURLY|RIGHT_CURLY))=>~ (LEFT_CURLY|RIGHT_CURLY) | ( curly_chunk )=>chunk= curly_chunk )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1161:3: ( (~ (LEFT_CURLY|RIGHT_CURLY))=>~ (LEFT_CURLY|RIGHT_CURLY) | ( curly_chunk )=>chunk= curly_chunk )*
loop40:
do {
int alt40=3;
int LA40_0 = input.LA(1);
- if ( ((LA40_0>=ID && LA40_0<=RIGHT_PAREN)||(LA40_0>=LEFT_SQUARE && LA40_0<=76)) ) {
+ if ( ((LA40_0>=ID && LA40_0<=RIGHT_PAREN)||(LA40_0>=LEFT_SQUARE && LA40_0<=77)) ) {
alt40=1;
}
else if ( (LA40_0==LEFT_CURLY) ) {
@@ -3921,9 +3921,9 @@
switch (alt40) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1162:4: (~ (LEFT_CURLY|RIGHT_CURLY))=>~ (LEFT_CURLY|RIGHT_CURLY)
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1162:4: (~ (LEFT_CURLY|RIGHT_CURLY))=>~ (LEFT_CURLY|RIGHT_CURLY)
{
- if ( (input.LA(1)>=ID && input.LA(1)<=RIGHT_PAREN)||(input.LA(1)>=LEFT_SQUARE && input.LA(1)<=76) ) {
+ if ( (input.LA(1)>=ID && input.LA(1)<=RIGHT_PAREN)||(input.LA(1)>=LEFT_SQUARE && input.LA(1)<=77) ) {
input.consume();
errorRecovery=false;failed=false;
}
@@ -3935,23 +3935,23 @@
}
if ( backtracking==0 ) {
-
- buf.append( input.LT(-1).getText() );
+
+ buf.append( input.LT(-1).getText() );
}
}
break;
case 2 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1167:4: ( curly_chunk )=>chunk= curly_chunk
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1167:4: ( curly_chunk )=>chunk= curly_chunk
{
pushFollow(FOLLOW_curly_chunk_in_curly_chunk2812);
chunk=curly_chunk();
_fsp--;
if (failed) return text;
if ( backtracking==0 ) {
-
- buf.append( chunk );
+
+ buf.append( chunk );
}
@@ -3964,20 +3964,20 @@
} while (true);
if ( backtracking==0 ) {
-
- if( channel != null ) {
- ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, channel.intValue());
- } else {
- ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, Token.HIDDEN_CHANNEL);
- }
+
+ if( channel != null ) {
+ ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, channel.intValue());
+ } else {
+ ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, Token.HIDDEN_CHANNEL);
+ }
}
loc=(Token)input.LT(1);
match(input,RIGHT_CURLY,FOLLOW_RIGHT_CURLY_in_curly_chunk2848); if (failed) return text;
if ( backtracking==0 ) {
-
- buf.append( loc.getText() );
- text = buf.toString();
+
+ buf.append( loc.getText() );
+ text = buf.toString();
}
@@ -3996,7 +3996,7 @@
// $ANTLR start square_chunk
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1186:1: square_chunk returns [String text] : loc= LEFT_SQUARE ( (~ (LEFT_SQUARE|RIGHT_SQUARE))=>~ (LEFT_SQUARE|RIGHT_SQUARE) | ( square_chunk )=>chunk= square_chunk )* loc= RIGHT_SQUARE ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1186:1: square_chunk returns [String text] : loc= LEFT_SQUARE ( (~ (LEFT_SQUARE|RIGHT_SQUARE))=>~ (LEFT_SQUARE|RIGHT_SQUARE) | ( square_chunk )=>chunk= square_chunk )* loc= RIGHT_SQUARE ;
public String square_chunk() throws RecognitionException {
String text = null;
@@ -4004,35 +4004,35 @@
String chunk = null;
-
- StringBuffer buf = null;
- Integer channel = null;
+
+ StringBuffer buf = null;
+ Integer channel = null;
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1192:10: (loc= LEFT_SQUARE ( (~ (LEFT_SQUARE|RIGHT_SQUARE))=>~ (LEFT_SQUARE|RIGHT_SQUARE) | ( square_chunk )=>chunk= square_chunk )* loc= RIGHT_SQUARE )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1192:10: loc= LEFT_SQUARE ( (~ (LEFT_SQUARE|RIGHT_SQUARE))=>~ (LEFT_SQUARE|RIGHT_SQUARE) | ( square_chunk )=>chunk= square_chunk )* loc= RIGHT_SQUARE
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1192:10: (loc= LEFT_SQUARE ( (~ (LEFT_SQUARE|RIGHT_SQUARE))=>~ (LEFT_SQUARE|RIGHT_SQUARE) | ( square_chunk )=>chunk= square_chunk )* loc= RIGHT_SQUARE )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1192:10: loc= LEFT_SQUARE ( (~ (LEFT_SQUARE|RIGHT_SQUARE))=>~ (LEFT_SQUARE|RIGHT_SQUARE) | ( square_chunk )=>chunk= square_chunk )* loc= RIGHT_SQUARE
{
if ( backtracking==0 ) {
-
- channel = ((SwitchingCommonTokenStream)input).getTokenTypeChannel( WS );
- ((SwitchingCommonTokenStream)input).setTokenTypeChannel( WS, Token.DEFAULT_CHANNEL );
- buf = new StringBuffer();
+
+ channel = ((SwitchingCommonTokenStream)input).getTokenTypeChannel( WS );
+ ((SwitchingCommonTokenStream)input).setTokenTypeChannel( WS, Token.DEFAULT_CHANNEL );
+ buf = new StringBuffer();
}
loc=(Token)input.LT(1);
match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_square_chunk2909); if (failed) return text;
if ( backtracking==0 ) {
-
- buf.append( loc.getText());
-
+
+ buf.append( loc.getText());
+
}
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1202:3: ( (~ (LEFT_SQUARE|RIGHT_SQUARE))=>~ (LEFT_SQUARE|RIGHT_SQUARE) | ( square_chunk )=>chunk= square_chunk )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1202:3: ( (~ (LEFT_SQUARE|RIGHT_SQUARE))=>~ (LEFT_SQUARE|RIGHT_SQUARE) | ( square_chunk )=>chunk= square_chunk )*
loop41:
do {
int alt41=3;
int LA41_0 = input.LA(1);
- if ( ((LA41_0>=ID && LA41_0<=RIGHT_CURLY)||(LA41_0>=END && LA41_0<=76)) ) {
+ if ( ((LA41_0>=ID && LA41_0<=RIGHT_CURLY)||(LA41_0>=END && LA41_0<=77)) ) {
alt41=1;
}
else if ( (LA41_0==LEFT_SQUARE) ) {
@@ -4042,9 +4042,9 @@
switch (alt41) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1203:4: (~ (LEFT_SQUARE|RIGHT_SQUARE))=>~ (LEFT_SQUARE|RIGHT_SQUARE)
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1203:4: (~ (LEFT_SQUARE|RIGHT_SQUARE))=>~ (LEFT_SQUARE|RIGHT_SQUARE)
{
- if ( (input.LA(1)>=ID && input.LA(1)<=RIGHT_CURLY)||(input.LA(1)>=END && input.LA(1)<=76) ) {
+ if ( (input.LA(1)>=ID && input.LA(1)<=RIGHT_CURLY)||(input.LA(1)>=END && input.LA(1)<=77) ) {
input.consume();
errorRecovery=false;failed=false;
}
@@ -4056,23 +4056,23 @@
}
if ( backtracking==0 ) {
-
- buf.append( input.LT(-1).getText() );
+
+ buf.append( input.LT(-1).getText() );
}
}
break;
case 2 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1208:4: ( square_chunk )=>chunk= square_chunk
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1208:4: ( square_chunk )=>chunk= square_chunk
{
pushFollow(FOLLOW_square_chunk_in_square_chunk2949);
chunk=square_chunk();
_fsp--;
if (failed) return text;
if ( backtracking==0 ) {
-
- buf.append( chunk );
+
+ buf.append( chunk );
}
@@ -4085,20 +4085,20 @@
} while (true);
if ( backtracking==0 ) {
-
- if( channel != null ) {
- ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, channel.intValue());
- } else {
- ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, Token.HIDDEN_CHANNEL);
- }
+
+ if( channel != null ) {
+ ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, channel.intValue());
+ } else {
+ ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, Token.HIDDEN_CHANNEL);
+ }
}
loc=(Token)input.LT(1);
match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_square_chunk2985); if (failed) return text;
if ( backtracking==0 ) {
-
- buf.append( loc.getText() );
- text = buf.toString();
+
+ buf.append( loc.getText() );
+ text = buf.toString();
}
@@ -4117,19 +4117,19 @@
// $ANTLR start retval_constraint
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1227:1: retval_constraint returns [String text] : c= paren_chunk ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1227:1: retval_constraint returns [String text] : c= paren_chunk ;
public String retval_constraint() throws RecognitionException {
String text = null;
String c = null;
-
- text = null;
+
+ text = null;
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1232:3: (c= paren_chunk )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1232:3: c= paren_chunk
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1232:3: (c= paren_chunk )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1232:3: c= paren_chunk
{
pushFollow(FOLLOW_paren_chunk_in_retval_constraint3030);
c=paren_chunk();
@@ -4154,7 +4154,7 @@
// $ANTLR start lhs_or
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1240:1: lhs_or returns [BaseDescr d] : left= lhs_and ( ( ('or'|'||') lhs_and )=> ('or'|'||')right= lhs_and )* ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1240:1: lhs_or returns [BaseDescr d] : left= lhs_and ( ( ('or'|'||') lhs_and )=> ('or'|'||')right= lhs_and )* ;
public BaseDescr lhs_or() throws RecognitionException {
BaseDescr d = null;
@@ -4163,13 +4163,13 @@
BaseDescr right = null;
-
- d = null;
- OrDescr or = null;
+
+ d = null;
+ OrDescr or = null;
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1246:3: (left= lhs_and ( ( ('or'|'||') lhs_and )=> ('or'|'||')right= lhs_and )* )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1246:3: left= lhs_and ( ( ('or'|'||') lhs_and )=> ('or'|'||')right= lhs_and )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1246:3: (left= lhs_and ( ( ('or'|'||') lhs_and )=> ('or'|'||')right= lhs_and )* )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1246:3: left= lhs_and ( ( ('or'|'||') lhs_and )=> ('or'|'||')right= lhs_and )*
{
pushFollow(FOLLOW_lhs_and_in_lhs_or3063);
left=lhs_and();
@@ -4178,7 +4178,7 @@
if ( backtracking==0 ) {
d = left;
}
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1247:3: ( ( ('or'|'||') lhs_and )=> ('or'|'||')right= lhs_and )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1247:3: ( ( ('or'|'||') lhs_and )=> ('or'|'||')right= lhs_and )*
loop42:
do {
int alt42=2;
@@ -4190,7 +4190,7 @@
switch (alt42) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1247:5: ( ('or'|'||') lhs_and )=> ('or'|'||')right= lhs_and
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1247:5: ( ('or'|'||') lhs_and )=> ('or'|'||')right= lhs_and
{
if ( (input.LA(1)>=56 && input.LA(1)<=57) ) {
input.consume();
@@ -4208,14 +4208,14 @@
_fsp--;
if (failed) return d;
if ( backtracking==0 ) {
-
- if ( or == null ) {
- or = new OrDescr();
- or.addDescr( left );
- d = or;
- }
-
- or.addDescr( right );
+
+ if ( or == null ) {
+ or = new OrDescr();
+ or.addDescr( left );
+ d = or;
+ }
+
+ or.addDescr( right );
}
@@ -4243,7 +4243,7 @@
// $ANTLR start lhs_and
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1261:1: lhs_and returns [BaseDescr d] : left= lhs_unary ( ( ('and'|'&&') lhs_unary )=> ('and'|'&&')right= lhs_unary )* ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1261:1: lhs_and returns [BaseDescr d] : left= lhs_unary ( ( ('and'|'&&') lhs_unary )=> ('and'|'&&')right= lhs_unary )* ;
public BaseDescr lhs_and() throws RecognitionException {
BaseDescr d = null;
@@ -4252,13 +4252,13 @@
BaseDescr right = null;
-
- d = null;
- AndDescr and = null;
+
+ d = null;
+ AndDescr and = null;
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1267:3: (left= lhs_unary ( ( ('and'|'&&') lhs_unary )=> ('and'|'&&')right= lhs_unary )* )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1267:3: left= lhs_unary ( ( ('and'|'&&') lhs_unary )=> ('and'|'&&')right= lhs_unary )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1267:3: (left= lhs_unary ( ( ('and'|'&&') lhs_unary )=> ('and'|'&&')right= lhs_unary )* )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1267:3: left= lhs_unary ( ( ('and'|'&&') lhs_unary )=> ('and'|'&&')right= lhs_unary )*
{
pushFollow(FOLLOW_lhs_unary_in_lhs_and3118);
left=lhs_unary();
@@ -4267,7 +4267,7 @@
if ( backtracking==0 ) {
d = left;
}
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1268:3: ( ( ('and'|'&&') lhs_unary )=> ('and'|'&&')right= lhs_unary )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1268:3: ( ( ('and'|'&&') lhs_unary )=> ('and'|'&&')right= lhs_unary )*
loop43:
do {
int alt43=2;
@@ -4279,7 +4279,7 @@
switch (alt43) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1268:5: ( ('and'|'&&') lhs_unary )=> ('and'|'&&')right= lhs_unary
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1268:5: ( ('and'|'&&') lhs_unary )=> ('and'|'&&')right= lhs_unary
{
if ( (input.LA(1)>=71 && input.LA(1)<=72) ) {
input.consume();
@@ -4297,14 +4297,14 @@
_fsp--;
if (failed) return d;
if ( backtracking==0 ) {
-
- if ( and == null ) {
- and = new AndDescr();
- and.addDescr( left );
- d = and;
- }
-
- and.addDescr( right );
+
+ if ( and == null ) {
+ and = new AndDescr();
+ and.addDescr( left );
+ d = and;
+ }
+
+ and.addDescr( right );
}
@@ -4332,7 +4332,7 @@
// $ANTLR start lhs_unary
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1282:1: lhs_unary returns [BaseDescr d] : ( ( lhs_exist )=>u= lhs_exist | ( lhs_not )=>u= lhs_not | ( lhs_eval )=>u= lhs_eval | ( lhs_column ( ( ( from_statement ) )=> ( from_statement ) | ( ( accumulate_statement ) )=> ( accumulate_statement ) | ( ( collect_statement ) )=> ( collect_statement ) )? )=>u= lhs_column ( ( ( from_statement ) )=> (fm= from_statement ) | ( ( accumulate_statement ) )=> (ac= accumulate_statement ) | ( ( collect_statement ) )=> (cs= collect_statement ) )? | '(' u= lhs ')' ) opt_semicolon ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1282:1: lhs_unary returns [BaseDescr d] : ( ( lhs_exist )=>u= lhs_exist | ( lhs_not )=>u= lhs_not | ( lhs_eval )=>u= lhs_eval | ( lhs_column ( ( ( from_statement ) )=> ( from_statement ) | ( ( accumulate_statement ) )=> ( accumulate_statement ) | ( ( collect_statement ) )=> ( collect_statement ) )? )=>u= lhs_column ( ( ( from_statement ) )=> (fm= from_statement ) | ( ( accumulate_statement ) )=> (ac= accumulate_statement ) | ( ( collect_statement ) )=> (cs= collect_statement ) )? | ( lhs_forall )=>u= lhs_forall | '(' u= lhs ')' ) opt_semicolon ;
public BaseDescr lhs_unary() throws RecognitionException {
BaseDescr d = null;
@@ -4345,15 +4345,15 @@
CollectDescr cs = null;
-
- d = null;
+
+ d = null;
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1286:4: ( ( ( lhs_exist )=>u= lhs_exist | ( lhs_not )=>u= lhs_not | ( lhs_eval )=>u= lhs_eval | ( lhs_column ( ( ( from_statement ) )=> ( from_statement ) | ( ( accumulate_statement ) )=> ( accumulate_statement ) | ( ( collect_statement ) )=> ( collect_statement ) )? )=>u= lhs_column ( ( ( from_statement ) )=> (fm= from_statement ) | ( ( accumulate_statement ) )=> (ac= accumulate_statement ) | ( ( collect_statement ) )=> (cs= collect_statement ) )? | '(' u= lhs ')' ) opt_semicolon )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1286:4: ( ( lhs_exist )=>u= lhs_exist | ( lhs_not )=>u= lhs_not | ( lhs_eval )=>u= lhs_eval | ( lhs_column ( ( ( from_statement ) )=> ( from_statement ) | ( ( accumulate_statement ) )=> ( accumulate_statement ) | ( ( collect_statement ) )=> ( collect_statement ) )? )=>u= lhs_column ( ( ( from_statement ) )=> (fm= from_statement ) | ( ( accumulate_statement ) )=> (ac= accumulate_statement ) | ( ( collect_statement ) )=> (cs= collect_statement ) )? | '(' u= lhs ')' ) opt_semicolon
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1286:4: ( ( ( lhs_exist )=>u= lhs_exist | ( lhs_not )=>u= lhs_not | ( lhs_eval )=>u= lhs_eval | ( lhs_column ( ( ( from_statement ) )=> ( from_statement ) | ( ( accumulate_statement ) )=> ( accumulate_statement ) | ( ( collect_statement ) )=> ( collect_statement ) )? )=>u= lhs_column ( ( ( from_statement ) )=> (fm= from_statement ) | ( ( accumulate_statement ) )=> (ac= accumulate_statement ) | ( ( collect_statement ) )=> (cs= collect_statement ) )? | ( lhs_forall )=>u= lhs_forall | '(' u= lhs ')' ) opt_semicolon )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1286:4: ( ( lhs_exist )=>u= lhs_exist | ( lhs_not )=>u= lhs_not | ( lhs_eval )=>u= lhs_eval | ( lhs_column ( ( ( from_statement ) )=> ( from_statement ) | ( ( accumulate_statement ) )=> ( accumulate_statement ) | ( ( collect_statement ) )=> ( collect_statement ) )? )=>u= lhs_column ( ( ( from_statement ) )=> (fm= from_statement ) | ( ( accumulate_statement ) )=> (ac= accumulate_statement ) | ( ( collect_statement ) )=> (cs= collect_statement ) )? | ( lhs_forall )=>u= lhs_forall | '(' u= lhs ')' ) opt_semicolon
{
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1286:4: ( ( lhs_exist )=>u= lhs_exist | ( lhs_not )=>u= lhs_not | ( lhs_eval )=>u= lhs_eval | ( lhs_column ( ( ( from_statement ) )=> ( from_statement ) | ( ( accumulate_statement ) )=> ( accumulate_statement ) | ( ( collect_statement ) )=> ( collect_statement ) )? )=>u= lhs_column ( ( ( from_statement ) )=> (fm= from_statement ) | ( ( accumulate_statement ) )=> (ac= accumulate_statement ) | ( ( collect_statement ) )=> (cs= collect_statement ) )? | '(' u= lhs ')' )
- int alt45=5;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1286:4: ( ( lhs_exist )=>u= lhs_exist | ( lhs_not )=>u= lhs_not | ( lhs_eval )=>u= lhs_eval | ( lhs_column ( ( ( from_statement ) )=> ( from_statement ) | ( ( accumulate_statement ) )=> ( accumulate_statement ) | ( ( collect_statement ) )=> ( collect_statement ) )? )=>u= lhs_column ( ( ( from_statement ) )=> (fm= from_statement ) | ( ( accumulate_statement ) )=> (ac= accumulate_statement ) | ( ( collect_statement ) )=> (cs= collect_statement ) )? | ( lhs_forall )=>u= lhs_forall | '(' u= lhs ')' )
+ int alt45=6;
switch ( input.LA(1) ) {
case 73:
alt45=1;
@@ -4367,20 +4367,23 @@
case ID:
alt45=4;
break;
- case LEFT_PAREN:
+ case 76:
alt45=5;
break;
+ case LEFT_PAREN:
+ alt45=6;
+ break;
default:
if (backtracking>0) {failed=true; return d;}
NoViableAltException nvae =
- new NoViableAltException("1286:4: ( ( lhs_exist )=>u= lhs_exist | ( lhs_not )=>u= lhs_not | ( lhs_eval )=>u= lhs_eval | ( lhs_column ( ( ( from_statement ) )=> ( from_statement ) | ( ( accumulate_statement ) )=> ( accumulate_statement ) | ( ( collect_statement ) )=> ( collect_statement ) )? )=>u= lhs_column ( ( ( from_statement ) )=> (fm= from_statement ) | ( ( accumulate_statement ) )=> (ac= accumulate_statement ) | ( ( collect_statement ) )=> (cs= collect_statement ) )? | '(' u= lhs ')' )", 45, 0, input);
+ new NoViableAltException("1286:4: ( ( lhs_exist )=>u= lhs_exist | ( lhs_not )=>u= lhs_not | ( lhs_eval )=>u= lhs_eval | ( lhs_column ( ( ( from_statement ) )=> ( from_statement ) | ( ( accumulate_statement ) )=> ( accumulate_statement ) | ( ( collect_statement ) )=> ( collect_statement ) )? )=>u= lhs_column ( ( ( from_statement ) )=> (fm= from_statement ) | ( ( accumulate_statement ) )=> (ac= accumulate_statement ) | ( ( collect_statement ) )=> (cs= collect_statement ) )? | ( lhs_forall )=>u= lhs_forall | '(' u= lhs ')' )", 45, 0, input);
throw nvae;
}
switch (alt45) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1286:6: ( lhs_exist )=>u= lhs_exist
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1286:6: ( lhs_exist )=>u= lhs_exist
{
pushFollow(FOLLOW_lhs_exist_in_lhs_unary3174);
u=lhs_exist();
@@ -4390,7 +4393,7 @@
}
break;
case 2 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1287:5: ( lhs_not )=>u= lhs_not
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1287:5: ( lhs_not )=>u= lhs_not
{
pushFollow(FOLLOW_lhs_not_in_lhs_unary3182);
u=lhs_not();
@@ -4400,7 +4403,7 @@
}
break;
case 3 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1288:5: ( lhs_eval )=>u= lhs_eval
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1288:5: ( lhs_eval )=>u= lhs_eval
{
pushFollow(FOLLOW_lhs_eval_in_lhs_unary3190);
u=lhs_eval();
@@ -4410,13 +4413,13 @@
}
break;
case 4 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1289:5: ( lhs_column ( ( ( from_statement ) )=> ( from_statement ) | ( ( accumulate_statement ) )=> ( accumulate_statement ) | ( ( collect_statement ) )=> ( collect_statement ) )? )=>u= lhs_column ( ( ( from_statement ) )=> (fm= from_statement ) | ( ( accumulate_statement ) )=> (ac= accumulate_statement ) | ( ( collect_statement ) )=> (cs= collect_statement ) )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1289:5: ( lhs_column ( ( ( from_statement ) )=> ( from_statement ) | ( ( accumulate_statement ) )=> ( accumulate_statement ) | ( ( collect_statement ) )=> ( collect_statement ) )? )=>u= lhs_column ( ( ( from_statement ) )=> (fm= from_statement ) | ( ( accumulate_statement ) )=> (ac= accumulate_statement ) | ( ( collect_statement ) )=> (cs= collect_statement ) )?
{
pushFollow(FOLLOW_lhs_column_in_lhs_unary3198);
u=lhs_column();
_fsp--;
if (failed) return d;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1289:18: ( ( ( from_statement ) )=> (fm= from_statement ) | ( ( accumulate_statement ) )=> (ac= accumulate_statement ) | ( ( collect_statement ) )=> (cs= collect_statement ) )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1289:18: ( ( ( from_statement ) )=> (fm= from_statement ) | ( ( accumulate_statement ) )=> (ac= accumulate_statement ) | ( ( collect_statement ) )=> (cs= collect_statement ) )?
int alt44=4;
int LA44_0 = input.LA(1);
if ( (LA44_0==50) ) {
@@ -4435,10 +4438,10 @@
}
switch (alt44) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1290:14: ( ( from_statement ) )=> (fm= from_statement )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1290:14: ( ( from_statement ) )=> (fm= from_statement )
{
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1290:14: (fm= from_statement )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1290:15: fm= from_statement
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1290:14: (fm= from_statement )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1290:15: fm= from_statement
{
pushFollow(FOLLOW_from_statement_in_lhs_unary3218);
fm=from_statement();
@@ -4454,10 +4457,10 @@
}
break;
case 2 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1291:14: ( ( accumulate_statement ) )=> (ac= accumulate_statement )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1291:14: ( ( accumulate_statement ) )=> (ac= accumulate_statement )
{
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1291:14: (ac= accumulate_statement )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1291:15: ac= accumulate_statement
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1291:14: (ac= accumulate_statement )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1291:15: ac= accumulate_statement
{
pushFollow(FOLLOW_accumulate_statement_in_lhs_unary3240);
ac=accumulate_statement();
@@ -4473,10 +4476,10 @@
}
break;
case 3 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1292:14: ( ( collect_statement ) )=> (cs= collect_statement )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1292:14: ( ( collect_statement ) )=> (cs= collect_statement )
{
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1292:14: (cs= collect_statement )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1292:15: cs= collect_statement
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1292:14: (cs= collect_statement )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1292:15: cs= collect_statement
{
pushFollow(FOLLOW_collect_statement_in_lhs_unary3261);
cs=collect_statement();
@@ -4498,14 +4501,24 @@
}
break;
case 5 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1294:5: '(' u= lhs ')'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1294:5: ( lhs_forall )=>u= lhs_forall
{
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_lhs_unary3284); if (failed) return d;
- pushFollow(FOLLOW_lhs_in_lhs_unary3288);
+ pushFollow(FOLLOW_lhs_forall_in_lhs_unary3286);
+ u=lhs_forall();
+ _fsp--;
+ if (failed) return d;
+
+ }
+ break;
+ case 6 :
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1295:5: '(' u= lhs ')'
+ {
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_lhs_unary3294); if (failed) return d;
+ pushFollow(FOLLOW_lhs_in_lhs_unary3298);
u=lhs();
_fsp--;
if (failed) return d;
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_lhs_unary3290); if (failed) return d;
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_lhs_unary3300); if (failed) return d;
}
break;
@@ -4515,7 +4528,7 @@
if ( backtracking==0 ) {
d = u;
}
- pushFollow(FOLLOW_opt_semicolon_in_lhs_unary3300);
+ pushFollow(FOLLOW_opt_semicolon_in_lhs_unary3310);
opt_semicolon();
_fsp--;
if (failed) return d;
@@ -4535,7 +4548,7 @@
// $ANTLR start lhs_exist
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1299:1: lhs_exist returns [BaseDescr d] : loc= 'exists' ( ( '(' lhs_or ')' )=> '(' column= lhs_or ')' | column= lhs_column ) ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1300:1: lhs_exist returns [BaseDescr d] : loc= 'exists' ( ( '(' lhs_or ')' )=> '(' column= lhs_or ')' | column= lhs_column ) ;
public BaseDescr lhs_exist() throws RecognitionException {
BaseDescr d = null;
@@ -4543,16 +4556,16 @@
BaseDescr column = null;
-
- d = null;
+
+ d = null;
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1303:4: (loc= 'exists' ( ( '(' lhs_or ')' )=> '(' column= lhs_or ')' | column= lhs_column ) )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1303:4: loc= 'exists' ( ( '(' lhs_or ')' )=> '(' column= lhs_or ')' | column= lhs_column )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1304:4: (loc= 'exists' ( ( '(' lhs_or ')' )=> '(' column= lhs_or ')' | column= lhs_column ) )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1304:4: loc= 'exists' ( ( '(' lhs_or ')' )=> '(' column= lhs_or ')' | column= lhs_column )
{
loc=(Token)input.LT(1);
- match(input,73,FOLLOW_73_in_lhs_exist3324); if (failed) return d;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1303:17: ( ( '(' lhs_or ')' )=> '(' column= lhs_or ')' | column= lhs_column )
+ match(input,73,FOLLOW_73_in_lhs_exist3334); if (failed) return d;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1304:17: ( ( '(' lhs_or ')' )=> '(' column= lhs_or ')' | column= lhs_column )
int alt46=2;
int LA46_0 = input.LA(1);
if ( (LA46_0==LEFT_PAREN) ) {
@@ -4564,27 +4577,27 @@
else {
if (backtracking>0) {failed=true; return d;}
NoViableAltException nvae =
- new NoViableAltException("1303:17: ( ( '(' lhs_or ')' )=> '(' column= lhs_or ')' | column= lhs_column )", 46, 0, input);
+ new NoViableAltException("1304:17: ( ( '(' lhs_or ')' )=> '(' column= lhs_or ')' | column= lhs_column )", 46, 0, input);
throw nvae;
}
switch (alt46) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1303:18: ( '(' lhs_or ')' )=> '(' column= lhs_or ')'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1304:18: ( '(' lhs_or ')' )=> '(' column= lhs_or ')'
{
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_lhs_exist3327); if (failed) return d;
- pushFollow(FOLLOW_lhs_or_in_lhs_exist3331);
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_lhs_exist3337); if (failed) return d;
+ pushFollow(FOLLOW_lhs_or_in_lhs_exist3341);
column=lhs_or();
_fsp--;
if (failed) return d;
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_lhs_exist3333); if (failed) return d;
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_lhs_exist3343); if (failed) return d;
}
break;
case 2 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1303:42: column= lhs_column
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1304:42: column= lhs_column
{
- pushFollow(FOLLOW_lhs_column_in_lhs_exist3339);
+ pushFollow(FOLLOW_lhs_column_in_lhs_exist3349);
column=lhs_column();
_fsp--;
if (failed) return d;
@@ -4595,9 +4608,9 @@
}
if ( backtracking==0 ) {
-
- d = new ExistsDescr( (ColumnDescr) column );
- d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+
+ d = new ExistsDescr( (ColumnDescr) column );
+ d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
}
@@ -4616,7 +4629,7 @@
// $ANTLR start lhs_not
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1310:1: lhs_not returns [NotDescr d] : loc= 'not' ( ( '(' lhs_or ')' )=> '(' column= lhs_or ')' | column= lhs_column ) ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1311:1: lhs_not returns [NotDescr d] : loc= 'not' ( ( '(' lhs_or ')' )=> '(' column= lhs_or ')' | column= lhs_column ) ;
public NotDescr lhs_not() throws RecognitionException {
NotDescr d = null;
@@ -4624,16 +4637,16 @@
BaseDescr column = null;
-
- d = null;
+
+ d = null;
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1314:4: (loc= 'not' ( ( '(' lhs_or ')' )=> '(' column= lhs_or ')' | column= lhs_column ) )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1314:4: loc= 'not' ( ( '(' lhs_or ')' )=> '(' column= lhs_or ')' | column= lhs_column )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1315:4: (loc= 'not' ( ( '(' lhs_or ')' )=> '(' column= lhs_or ')' | column= lhs_column ) )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1315:4: loc= 'not' ( ( '(' lhs_or ')' )=> '(' column= lhs_or ')' | column= lhs_column )
{
loc=(Token)input.LT(1);
- match(input,74,FOLLOW_74_in_lhs_not3369); if (failed) return d;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1314:14: ( ( '(' lhs_or ')' )=> '(' column= lhs_or ')' | column= lhs_column )
+ match(input,74,FOLLOW_74_in_lhs_not3379); if (failed) return d;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1315:14: ( ( '(' lhs_or ')' )=> '(' column= lhs_or ')' | column= lhs_column )
int alt47=2;
int LA47_0 = input.LA(1);
if ( (LA47_0==LEFT_PAREN) ) {
@@ -4645,27 +4658,27 @@
else {
if (backtracking>0) {failed=true; return d;}
NoViableAltException nvae =
- new NoViableAltException("1314:14: ( ( '(' lhs_or ')' )=> '(' column= lhs_or ')' | column= lhs_column )", 47, 0, input);
+ new NoViableAltException("1315:14: ( ( '(' lhs_or ')' )=> '(' column= lhs_or ')' | column= lhs_column )", 47, 0, input);
throw nvae;
}
switch (alt47) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1314:15: ( '(' lhs_or ')' )=> '(' column= lhs_or ')'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1315:15: ( '(' lhs_or ')' )=> '(' column= lhs_or ')'
{
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_lhs_not3372); if (failed) return d;
- pushFollow(FOLLOW_lhs_or_in_lhs_not3376);
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_lhs_not3382); if (failed) return d;
+ pushFollow(FOLLOW_lhs_or_in_lhs_not3386);
column=lhs_or();
_fsp--;
if (failed) return d;
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_lhs_not3379); if (failed) return d;
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_lhs_not3389); if (failed) return d;
}
break;
case 2 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1314:40: column= lhs_column
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1315:40: column= lhs_column
{
- pushFollow(FOLLOW_lhs_column_in_lhs_not3385);
+ pushFollow(FOLLOW_lhs_column_in_lhs_not3395);
column=lhs_column();
_fsp--;
if (failed) return d;
@@ -4676,9 +4689,9 @@
}
if ( backtracking==0 ) {
-
- d = new NotDescr( column );
- d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+
+ d = new NotDescr( column );
+ d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
}
@@ -4697,7 +4710,7 @@
// $ANTLR start lhs_eval
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1321:1: lhs_eval returns [BaseDescr d] : loc= 'eval' c= paren_chunk ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1322:1: lhs_eval returns [BaseDescr d] : loc= 'eval' c= paren_chunk ;
public BaseDescr lhs_eval() throws RecognitionException {
BaseDescr d = null;
@@ -4705,24 +4718,24 @@
String c = null;
-
- d = null;
+
+ d = null;
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1325:4: (loc= 'eval' c= paren_chunk )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1325:4: loc= 'eval' c= paren_chunk
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1326:4: (loc= 'eval' c= paren_chunk )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1326:4: loc= 'eval' c= paren_chunk
{
loc=(Token)input.LT(1);
- match(input,75,FOLLOW_75_in_lhs_eval3413); if (failed) return d;
- pushFollow(FOLLOW_paren_chunk_in_lhs_eval3417);
+ match(input,75,FOLLOW_75_in_lhs_eval3423); if (failed) return d;
+ pushFollow(FOLLOW_paren_chunk_in_lhs_eval3427);
c=paren_chunk();
_fsp--;
if (failed) return d;
if ( backtracking==0 ) {
-
- String body = c.substring(1, c.length()-1);
- checkTrailingSemicolon( body, offset(loc.getLine()) );
- d = new EvalDescr( body );
+
+ String body = c.substring(1, c.length()-1);
+ checkTrailingSemicolon( body, offset(loc.getLine()) );
+ d = new EvalDescr( body );
}
@@ -4740,42 +4753,146 @@
// $ANTLR end lhs_eval
+ // $ANTLR start lhs_forall
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1334:1: lhs_forall returns [ForallDescr d] : loc= 'forall' '(' base= lhs_column ( ( ( ( ',' )=> ',' )? lhs_column )=> ( ( ',' )=> ',' )? column= lhs_column )+ ')' ;
+ public ForallDescr lhs_forall() throws RecognitionException {
+ ForallDescr d = null;
+
+ Token loc=null;
+ BaseDescr base = null;
+
+ BaseDescr column = null;
+
+
+
+ d = factory.createForall();
+
+ try {
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1338:4: (loc= 'forall' '(' base= lhs_column ( ( ( ( ',' )=> ',' )? lhs_column )=> ( ( ',' )=> ',' )? column= lhs_column )+ ')' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1338:4: loc= 'forall' '(' base= lhs_column ( ( ( ( ',' )=> ',' )? lhs_column )=> ( ( ',' )=> ',' )? column= lhs_column )+ ')'
+ {
+ loc=(Token)input.LT(1);
+ match(input,76,FOLLOW_76_in_lhs_forall3455); if (failed) return d;
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_lhs_forall3457); if (failed) return d;
+ pushFollow(FOLLOW_lhs_column_in_lhs_forall3461);
+ base=lhs_column();
+ _fsp--;
+ if (failed) return d;
+ if ( backtracking==0 ) {
+
+ // adding the base column
+ d.addDescr( base );
+ d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+
+ }
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1344:3: ( ( ( ( ',' )=> ',' )? lhs_column )=> ( ( ',' )=> ',' )? column= lhs_column )+
+ int cnt49=0;
+ loop49:
+ do {
+ int alt49=2;
+ int LA49_0 = input.LA(1);
+ if ( (LA49_0==ID||LA49_0==36) ) {
+ alt49=1;
+ }
+
+
+ switch (alt49) {
+ case 1 :
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1344:5: ( ( ( ',' )=> ',' )? lhs_column )=> ( ( ',' )=> ',' )? column= lhs_column
+ {
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1344:5: ( ( ',' )=> ',' )?
+ int alt48=2;
+ int LA48_0 = input.LA(1);
+ if ( (LA48_0==36) ) {
+ alt48=1;
+ }
+ switch (alt48) {
+ case 1 :
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1344:6: ( ',' )=> ','
+ {
+ match(input,36,FOLLOW_36_in_lhs_forall3475); if (failed) return d;
+
+ }
+ break;
+
+ }
+
+ pushFollow(FOLLOW_lhs_column_in_lhs_forall3481);
+ column=lhs_column();
+ _fsp--;
+ if (failed) return d;
+ if ( backtracking==0 ) {
+
+ // adding additional columns
+ d.addDescr( column );
+
+ }
+
+ }
+ break;
+
+ default :
+ if ( cnt49 >= 1 ) break loop49;
+ if (backtracking>0) {failed=true; return d;}
+ EarlyExitException eee =
+ new EarlyExitException(49, input);
+ throw eee;
+ }
+ cnt49++;
+ } while (true);
+
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_lhs_forall3494); if (failed) return d;
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return d;
+ }
+ // $ANTLR end lhs_forall
+
+
// $ANTLR start dotted_name
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1333:1: dotted_name returns [String name] : id= ID ( ( '.' ID )=> '.' id= ID )* ( ( '[' ']' )=> '[' ']' )* ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1353:1: dotted_name returns [String name] : id= ID ( ( '.' ID )=> '.' id= ID )* ( ( '[' ']' )=> '[' ']' )* ;
public String dotted_name() throws RecognitionException {
String name = null;
Token id=null;
-
- name = null;
+
+ name = null;
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1338:3: (id= ID ( ( '.' ID )=> '.' id= ID )* ( ( '[' ']' )=> '[' ']' )* )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1338:3: id= ID ( ( '.' ID )=> '.' id= ID )* ( ( '[' ']' )=> '[' ']' )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1358:3: (id= ID ( ( '.' ID )=> '.' id= ID )* ( ( '[' ']' )=> '[' ']' )* )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1358:3: id= ID ( ( '.' ID )=> '.' id= ID )* ( ( '[' ']' )=> '[' ']' )*
{
id=(Token)input.LT(1);
- match(input,ID,FOLLOW_ID_in_dotted_name3448); if (failed) return name;
+ match(input,ID,FOLLOW_ID_in_dotted_name3520); if (failed) return name;
if ( backtracking==0 ) {
name=id.getText();
}
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1338:32: ( ( '.' ID )=> '.' id= ID )*
- loop48:
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1358:32: ( ( '.' ID )=> '.' id= ID )*
+ loop50:
do {
- int alt48=2;
- int LA48_0 = input.LA(1);
- if ( (LA48_0==33) ) {
- alt48=1;
+ int alt50=2;
+ int LA50_0 = input.LA(1);
+ if ( (LA50_0==33) ) {
+ alt50=1;
}
- switch (alt48) {
+ switch (alt50) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1338:34: ( '.' ID )=> '.' id= ID
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1358:34: ( '.' ID )=> '.' id= ID
{
- match(input,33,FOLLOW_33_in_dotted_name3454); if (failed) return name;
+ match(input,33,FOLLOW_33_in_dotted_name3526); if (failed) return name;
id=(Token)input.LT(1);
- match(input,ID,FOLLOW_ID_in_dotted_name3458); if (failed) return name;
+ match(input,ID,FOLLOW_ID_in_dotted_name3530); if (failed) return name;
if ( backtracking==0 ) {
name = name + "." + id.getText();
}
@@ -4784,26 +4901,26 @@
break;
default :
- break loop48;
+ break loop50;
}
} while (true);
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1338:85: ( ( '[' ']' )=> '[' ']' )*
- loop49:
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1358:85: ( ( '[' ']' )=> '[' ']' )*
+ loop51:
do {
- int alt49=2;
- int LA49_0 = input.LA(1);
- if ( (LA49_0==LEFT_SQUARE) ) {
- alt49=1;
+ int alt51=2;
+ int LA51_0 = input.LA(1);
+ if ( (LA51_0==LEFT_SQUARE) ) {
+ alt51=1;
}
- switch (alt49) {
+ switch (alt51) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1338:87: ( '[' ']' )=> '[' ']'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1358:87: ( '[' ']' )=> '[' ']'
{
- match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_dotted_name3467); if (failed) return name;
- match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_dotted_name3469); if (failed) return name;
+ match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_dotted_name3539); if (failed) return name;
+ match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_dotted_name3541); if (failed) return name;
if ( backtracking==0 ) {
name = name + "[]";
}
@@ -4812,7 +4929,7 @@
break;
default :
- break loop49;
+ break loop51;
}
} while (true);
@@ -4832,40 +4949,40 @@
// $ANTLR start argument
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1341:1: argument returns [String name] : id= ID ( ( '[' ']' )=> '[' ']' )* ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1361:1: argument returns [String name] : id= ID ( ( '[' ']' )=> '[' ']' )* ;
public String argument() throws RecognitionException {
String name = null;
Token id=null;
-
- name = null;
+
+ name = null;
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1346:3: (id= ID ( ( '[' ']' )=> '[' ']' )* )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1346:3: id= ID ( ( '[' ']' )=> '[' ']' )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1366:3: (id= ID ( ( '[' ']' )=> '[' ']' )* )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1366:3: id= ID ( ( '[' ']' )=> '[' ']' )*
{
id=(Token)input.LT(1);
- match(input,ID,FOLLOW_ID_in_argument3499); if (failed) return name;
+ match(input,ID,FOLLOW_ID_in_argument3571); if (failed) return name;
if ( backtracking==0 ) {
name=id.getText();
}
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1346:32: ( ( '[' ']' )=> '[' ']' )*
- loop50:
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1366:32: ( ( '[' ']' )=> '[' ']' )*
+ loop52:
do {
- int alt50=2;
- int LA50_0 = input.LA(1);
- if ( (LA50_0==LEFT_SQUARE) ) {
- alt50=1;
+ int alt52=2;
+ int LA52_0 = input.LA(1);
+ if ( (LA52_0==LEFT_SQUARE) ) {
+ alt52=1;
}
- switch (alt50) {
+ switch (alt52) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1346:34: ( '[' ']' )=> '[' ']'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1366:34: ( '[' ']' )=> '[' ']'
{
- match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_argument3505); if (failed) return name;
- match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_argument3507); if (failed) return name;
+ match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_argument3577); if (failed) return name;
+ match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_argument3579); if (failed) return name;
if ( backtracking==0 ) {
name = name + "[]";
}
@@ -4874,7 +4991,7 @@
break;
default :
- break loop50;
+ break loop52;
}
} while (true);
@@ -4894,42 +5011,42 @@
// $ANTLR start rhs_chunk
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1349:1: rhs_chunk[RuleDescr rule] : start= 'then' ( (~ END )=>~ END )* END ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1369:1: rhs_chunk[RuleDescr rule] : start= 'then' ( (~ END )=>~ END )* END ;
public void rhs_chunk(RuleDescr rule) throws RecognitionException {
Token start=null;
-
- StringBuffer buf = null;
- Integer channel = null;
+
+ StringBuffer buf = null;
+ Integer channel = null;
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1355:10: (start= 'then' ( (~ END )=>~ END )* END )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1355:10: start= 'then' ( (~ END )=>~ END )* END
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1375:10: (start= 'then' ( (~ END )=>~ END )* END )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1375:10: start= 'then' ( (~ END )=>~ END )* END
{
if ( backtracking==0 ) {
-
- channel = ((SwitchingCommonTokenStream)input).getTokenTypeChannel( WS );
- ((SwitchingCommonTokenStream)input).setTokenTypeChannel( WS, Token.DEFAULT_CHANNEL );
- buf = new StringBuffer();
+
+ channel = ((SwitchingCommonTokenStream)input).getTokenTypeChannel( WS );
+ ((SwitchingCommonTokenStream)input).setTokenTypeChannel( WS, Token.DEFAULT_CHANNEL );
+ buf = new StringBuffer();
}
start=(Token)input.LT(1);
- match(input,THEN,FOLLOW_THEN_in_rhs_chunk3551); if (failed) return ;
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1361:3: ( (~ END )=>~ END )*
- loop51:
+ match(input,THEN,FOLLOW_THEN_in_rhs_chunk3623); if (failed) return ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1381:3: ( (~ END )=>~ END )*
+ loop53:
do {
- int alt51=2;
- int LA51_0 = input.LA(1);
- if ( ((LA51_0>=ID && LA51_0<=RIGHT_SQUARE)||(LA51_0>=THEN && LA51_0<=76)) ) {
- alt51=1;
+ int alt53=2;
+ int LA53_0 = input.LA(1);
+ if ( ((LA53_0>=ID && LA53_0<=RIGHT_SQUARE)||(LA53_0>=THEN && LA53_0<=77)) ) {
+ alt53=1;
}
- switch (alt51) {
+ switch (alt53) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1362:6: (~ END )=>~ END
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1382:6: (~ END )=>~ END
{
- if ( (input.LA(1)>=ID && input.LA(1)<=RIGHT_SQUARE)||(input.LA(1)>=THEN && input.LA(1)<=76) ) {
+ if ( (input.LA(1)>=ID && input.LA(1)<=RIGHT_SQUARE)||(input.LA(1)>=THEN && input.LA(1)<=77) ) {
input.consume();
errorRecovery=false;failed=false;
}
@@ -4937,12 +5054,12 @@
if (backtracking>0) {failed=true; return ;}
MismatchedSetException mse =
new MismatchedSetException(null,input);
- recoverFromMismatchedSet(input,mse,FOLLOW_set_in_rhs_chunk3563); throw mse;
+ recoverFromMismatchedSet(input,mse,FOLLOW_set_in_rhs_chunk3635); throw mse;
}
if ( backtracking==0 ) {
-
- buf.append( input.LT(-1).getText() );
+
+ buf.append( input.LT(-1).getText() );
}
@@ -4950,34 +5067,34 @@
break;
default :
- break loop51;
+ break loop53;
}
} while (true);
if ( backtracking==0 ) {
-
- if( channel != null ) {
- ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, channel.intValue());
- } else {
- ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, Token.HIDDEN_CHANNEL);
- }
+
+ if( channel != null ) {
+ ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, channel.intValue());
+ } else {
+ ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, Token.HIDDEN_CHANNEL);
+ }
}
- match(input,END,FOLLOW_END_in_rhs_chunk3598); if (failed) return ;
+ match(input,END,FOLLOW_END_in_rhs_chunk3670); if (failed) return ;
if ( backtracking==0 ) {
-
- // ignoring first line in the consequence
- int index = 0;
- while( (index < buf.length() ) && Character.isWhitespace( buf.charAt( index ) ) &&
- (buf.charAt( index ) != 10 ) && (buf.charAt( index ) != 13 ))
- index++;
- if( (index < buf.length() ) && ( buf.charAt( index ) == '\r' ) )
- index++;
- if( (index < buf.length() ) && ( buf.charAt( index ) == '\n' ) )
- index++;
-
- rule.setConsequence( buf.substring( index ) );
- rule.setConsequenceLocation(offset(start.getLine()), start.getCharPositionInLine());
+
+ // ignoring first line in the consequence
+ int index = 0;
+ while( (index < buf.length() ) && Character.isWhitespace( buf.charAt( index ) ) &&
+ (buf.charAt( index ) != 10 ) && (buf.charAt( index ) != 13 ))
+ index++;
+ if( (index < buf.length() ) && ( buf.charAt( index ) == '\r' ) )
+ index++;
+ if( (index < buf.length() ) && ( buf.charAt( index ) == '\n' ) )
+ index++;
+
+ rule.setConsequence( buf.substring( index ) );
+ rule.setConsequenceLocation(offset(start.getLine()), start.getCharPositionInLine());
}
@@ -4996,67 +5113,67 @@
// $ANTLR start word
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1392:1: word returns [String word] : ( ( ID )=>id= ID | ( 'import' )=> 'import' | ( 'use' )=> 'use' | ( RULE )=> RULE | ( 'query' )=> 'query' | ( 'salience' )=> 'salience' | ( 'no-loop' )=> 'no-loop' | ( WHEN )=> WHEN | ( THEN )=> THEN | ( END )=> END | str= STRING );
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1412:1: word returns [String word] : ( ( ID )=>id= ID | ( 'import' )=> 'import' | ( 'use' )=> 'use' | ( RULE )=> RULE | ( 'query' )=> 'query' | ( 'salience' )=> 'salience' | ( 'no-loop' )=> 'no-loop' | ( WHEN )=> WHEN | ( THEN )=> THEN | ( END )=> END | str= STRING );
public String word() throws RecognitionException {
String word = null;
Token id=null;
Token str=null;
-
- word = null;
+
+ word = null;
try {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1396:4: ( ( ID )=>id= ID | ( 'import' )=> 'import' | ( 'use' )=> 'use' | ( RULE )=> RULE | ( 'query' )=> 'query' | ( 'salience' )=> 'salience' | ( 'no-loop' )=> 'no-loop' | ( WHEN )=> WHEN | ( THEN )=> THEN | ( END )=> END | str= STRING )
- int alt52=11;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1416:4: ( ( ID )=>id= ID | ( 'import' )=> 'import' | ( 'use' )=> 'use' | ( RULE )=> RULE | ( 'query' )=> 'query' | ( 'salience' )=> 'salience' | ( 'no-loop' )=> 'no-loop' | ( WHEN )=> WHEN | ( THEN )=> THEN | ( END )=> END | str= STRING )
+ int alt54=11;
switch ( input.LA(1) ) {
case ID:
- alt52=1;
+ alt54=1;
break;
case 31:
- alt52=2;
+ alt54=2;
break;
- case 76:
- alt52=3;
+ case 77:
+ alt54=3;
break;
case RULE:
- alt52=4;
+ alt54=4;
break;
case 37:
- alt52=5;
+ alt54=5;
break;
case 44:
- alt52=6;
+ alt54=6;
break;
case 45:
- alt52=7;
+ alt54=7;
break;
case WHEN:
- alt52=8;
+ alt54=8;
break;
case THEN:
- alt52=9;
+ alt54=9;
break;
case END:
- alt52=10;
+ alt54=10;
break;
case STRING:
- alt52=11;
+ alt54=11;
break;
default:
if (backtracking>0) {failed=true; return word;}
NoViableAltException nvae =
- new NoViableAltException("1392:1: word returns [String word] : ( ( ID )=>id= ID | ( 'import' )=> 'import' | ( 'use' )=> 'use' | ( RULE )=> RULE | ( 'query' )=> 'query' | ( 'salience' )=> 'salience' | ( 'no-loop' )=> 'no-loop' | ( WHEN )=> WHEN | ( THEN )=> THEN | ( END )=> END | str= STRING );", 52, 0, input);
+ new NoViableAltException("1412:1: word returns [String word] : ( ( ID )=>id= ID | ( 'import' )=> 'import' | ( 'use' )=> 'use' | ( RULE )=> RULE | ( 'query' )=> 'query' | ( 'salience' )=> 'salience' | ( 'no-loop' )=> 'no-loop' | ( WHEN )=> WHEN | ( THEN )=> THEN | ( END )=> END | str= STRING );", 54, 0, input);
throw nvae;
}
- switch (alt52) {
+ switch (alt54) {
case 1 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1396:4: ( ID )=>id= ID
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1416:4: ( ID )=>id= ID
{
id=(Token)input.LT(1);
- match(input,ID,FOLLOW_ID_in_word3640); if (failed) return word;
+ match(input,ID,FOLLOW_ID_in_word3712); if (failed) return word;
if ( backtracking==0 ) {
word=id.getText();
}
@@ -5064,9 +5181,9 @@
}
break;
case 2 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1397:4: ( 'import' )=> 'import'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1417:4: ( 'import' )=> 'import'
{
- match(input,31,FOLLOW_31_in_word3652); if (failed) return word;
+ match(input,31,FOLLOW_31_in_word3724); if (failed) return word;
if ( backtracking==0 ) {
word="import";
}
@@ -5074,9 +5191,9 @@
}
break;
case 3 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1398:4: ( 'use' )=> 'use'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1418:4: ( 'use' )=> 'use'
{
- match(input,76,FOLLOW_76_in_word3661); if (failed) return word;
+ match(input,77,FOLLOW_77_in_word3733); if (failed) return word;
if ( backtracking==0 ) {
word="use";
}
@@ -5084,9 +5201,9 @@
}
break;
case 4 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1399:4: ( RULE )=> RULE
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1419:4: ( RULE )=> RULE
{
- match(input,RULE,FOLLOW_RULE_in_word3673); if (failed) return word;
+ match(input,RULE,FOLLOW_RULE_in_word3745); if (failed) return word;
if ( backtracking==0 ) {
word="rule";
}
@@ -5094,9 +5211,9 @@
}
break;
case 5 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1400:4: ( 'query' )=> 'query'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1420:4: ( 'query' )=> 'query'
{
- match(input,37,FOLLOW_37_in_word3686); if (failed) return word;
+ match(input,37,FOLLOW_37_in_word3758); if (failed) return word;
if ( backtracking==0 ) {
word="query";
}
@@ -5104,9 +5221,9 @@
}
break;
case 6 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1401:4: ( 'salience' )=> 'salience'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1421:4: ( 'salience' )=> 'salience'
{
- match(input,44,FOLLOW_44_in_word3696); if (failed) return word;
+ match(input,44,FOLLOW_44_in_word3768); if (failed) return word;
if ( backtracking==0 ) {
word="salience";
}
@@ -5114,9 +5231,9 @@
}
break;
case 7 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1402:5: ( 'no-loop' )=> 'no-loop'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1422:5: ( 'no-loop' )=> 'no-loop'
{
- match(input,45,FOLLOW_45_in_word3704); if (failed) return word;
+ match(input,45,FOLLOW_45_in_word3776); if (failed) return word;
if ( backtracking==0 ) {
word="no-loop";
}
@@ -5124,9 +5241,9 @@
}
break;
case 8 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1403:4: ( WHEN )=> WHEN
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1423:4: ( WHEN )=> WHEN
{
- match(input,WHEN,FOLLOW_WHEN_in_word3712); if (failed) return word;
+ match(input,WHEN,FOLLOW_WHEN_in_word3784); if (failed) return word;
if ( backtracking==0 ) {
word="when";
}
@@ -5134,9 +5251,9 @@
}
break;
case 9 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1404:4: ( THEN )=> THEN
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1424:4: ( THEN )=> THEN
{
- match(input,THEN,FOLLOW_THEN_in_word3725); if (failed) return word;
+ match(input,THEN,FOLLOW_THEN_in_word3797); if (failed) return word;
if ( backtracking==0 ) {
word="then";
}
@@ -5144,9 +5261,9 @@
}
break;
case 10 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1405:4: ( END )=> END
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1425:4: ( END )=> END
{
- match(input,END,FOLLOW_END_in_word3738); if (failed) return word;
+ match(input,END,FOLLOW_END_in_word3810); if (failed) return word;
if ( backtracking==0 ) {
word="end";
}
@@ -5154,10 +5271,10 @@
}
break;
case 11 :
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:1406:4: str= STRING
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1426:4: str= STRING
{
str=(Token)input.LT(1);
- match(input,STRING,FOLLOW_STRING_in_word3754); if (failed) return word;
+ match(input,STRING,FOLLOW_STRING_in_word3826); if (failed) return word;
if ( backtracking==0 ) {
word=getString(str);
}
@@ -5179,11 +5296,11 @@
// $ANTLR start synpred35
public void synpred35_fragment() throws RecognitionException {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:745:4: ( ( ID paren_chunk ) )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:745:4: ( ID paren_chunk )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:745:4: ( ( ID paren_chunk ) )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:745:4: ( ID paren_chunk )
{
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:745:4: ( ID paren_chunk )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:745:6: ID paren_chunk
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:745:4: ( ID paren_chunk )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:745:6: ID paren_chunk
{
match(input,ID,FOLLOW_ID_in_synpred351530); if (failed) return ;
pushFollow(FOLLOW_paren_chunk_in_synpred351534);
@@ -5200,8 +5317,8 @@
// $ANTLR start synpred38
public void synpred38_fragment() throws RecognitionException {
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:785:6: ( LEFT_PAREN )
- // /home/michael/projects/jboss-rules/drools-compiler/src/main/resources/org/drools/lang/DRL.g:785:8: LEFT_PAREN
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:785:6: ( LEFT_PAREN )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:785:8: LEFT_PAREN
{
match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_synpred381675); if (failed) return ;
@@ -5246,20 +5363,20 @@
public static final String DFA8_eofS =
"\6\uffff";
public static final String DFA8_minS =
- "\2\4\1\uffff\1\20\1\uffff\1\4";
+ "\2\4\1\20\2\uffff\1\4";
public static final String DFA8_maxS =
- "\1\4\1\44\1\uffff\1\20\1\uffff\1\44";
+ "\1\4\1\44\1\20\2\uffff\1\44";
public static final String DFA8_acceptS =
- "\2\uffff\1\1\1\uffff\1\2\1\uffff";
+ "\3\uffff\1\2\1\1\1\uffff";
public static final String DFA8_specialS =
"\6\uffff}>";
public static final String[] DFA8_transition = {
"\1\1",
- "\1\2\7\uffff\1\4\2\uffff\1\3\21\uffff\1\2\2\uffff\1\4",
- "",
+ "\1\4\7\uffff\1\3\2\uffff\1\2\21\uffff\1\4\2\uffff\1\3",
"\1\5",
"",
- "\1\2\7\uffff\1\4\2\uffff\1\3\24\uffff\1\4"
+ "",
+ "\1\4\7\uffff\1\3\2\uffff\1\2\24\uffff\1\3"
};
class DFA8 extends DFA {
@@ -5365,8 +5482,8 @@
public static final BitSet FOLLOW_argument_in_function427 = new BitSet(new long[]{0x0000001000001000L});
public static final BitSet FOLLOW_RIGHT_PAREN_in_function451 = new BitSet(new long[]{0x0000000000002000L});
public static final BitSet FOLLOW_curly_chunk_in_function457 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_37_in_query488 = new BitSet(new long[]{0x00003020800600F0L,0x0000000000001000L});
- public static final BitSet FOLLOW_word_in_query492 = new BitSet(new long[]{0x0000000000020810L,0x0000000000000E00L});
+ public static final BitSet FOLLOW_37_in_query488 = new BitSet(new long[]{0x00003020800600F0L,0x0000000000002000L});
+ public static final BitSet FOLLOW_word_in_query492 = new BitSet(new long[]{0x0000000000020810L,0x0000000000001E00L});
public static final BitSet FOLLOW_normal_lhs_block_in_query506 = new BitSet(new long[]{0x0000000000020000L});
public static final BitSet FOLLOW_END_in_query521 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_38_in_template547 = new BitSet(new long[]{0x0000000000000010L});
@@ -5378,11 +5495,11 @@
public static final BitSet FOLLOW_dotted_name_in_template_slot617 = new BitSet(new long[]{0x0000000000000010L});
public static final BitSet FOLLOW_ID_in_template_slot621 = new BitSet(new long[]{0x0000000020000002L});
public static final BitSet FOLLOW_opt_semicolon_in_template_slot623 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_RULE_in_rule654 = new BitSet(new long[]{0x00003020800600F0L,0x0000000000001000L});
+ public static final BitSet FOLLOW_RULE_in_rule654 = new BitSet(new long[]{0x00003020800600F0L,0x0000000000002000L});
public static final BitSet FOLLOW_word_in_rule658 = new BitSet(new long[]{0x0003FF1000040040L});
public static final BitSet FOLLOW_rule_attributes_in_rule667 = new BitSet(new long[]{0x0000000000040040L});
- public static final BitSet FOLLOW_WHEN_in_rule676 = new BitSet(new long[]{0x0000008000040810L,0x0000000000000E00L});
- public static final BitSet FOLLOW_39_in_rule678 = new BitSet(new long[]{0x0000000000040810L,0x0000000000000E00L});
+ public static final BitSet FOLLOW_WHEN_in_rule676 = new BitSet(new long[]{0x0000008000040810L,0x0000000000001E00L});
+ public static final BitSet FOLLOW_39_in_rule678 = new BitSet(new long[]{0x0000000000040810L,0x0000000000001E00L});
public static final BitSet FOLLOW_normal_lhs_block_in_rule696 = new BitSet(new long[]{0x0000000000040000L});
public static final BitSet FOLLOW_rhs_chunk_in_rule717 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_40_in_rule_attributes738 = new BitSet(new long[]{0x0000008000000000L});
@@ -5426,7 +5543,7 @@
public static final BitSet FOLLOW_opt_semicolon_in_agenda_group1321 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_49_in_duration1353 = new BitSet(new long[]{0x0000000000000200L});
public static final BitSet FOLLOW_INT_in_duration1357 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_lhs_in_normal_lhs_block1383 = new BitSet(new long[]{0x0000000000000812L,0x0000000000000E00L});
+ public static final BitSet FOLLOW_lhs_in_normal_lhs_block1383 = new BitSet(new long[]{0x0000000000000812L,0x0000000000001E00L});
public static final BitSet FOLLOW_lhs_or_in_lhs1421 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_fact_binding_in_lhs_column1449 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_fact_in_lhs_column1458 = new BitSet(new long[]{0x0000000000000002L});
@@ -5506,24 +5623,24 @@
public static final BitSet FOLLOW_ID_in_predicate2593 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000040L});
public static final BitSet FOLLOW_70_in_predicate2595 = new BitSet(new long[]{0x0000000000000800L});
public static final BitSet FOLLOW_paren_chunk_in_predicate2599 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_LEFT_PAREN_in_paren_chunk2646 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0x0000000000001FFFL});
- public static final BitSet FOLLOW_set_in_paren_chunk2662 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0x0000000000001FFFL});
- public static final BitSet FOLLOW_paren_chunk_in_paren_chunk2686 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0x0000000000001FFFL});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_paren_chunk2646 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0x0000000000003FFFL});
+ public static final BitSet FOLLOW_set_in_paren_chunk2662 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0x0000000000003FFFL});
+ public static final BitSet FOLLOW_paren_chunk_in_paren_chunk2686 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0x0000000000003FFFL});
public static final BitSet FOLLOW_RIGHT_PAREN_in_paren_chunk2722 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_LEFT_CURLY_in_curly_chunk2772 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0x0000000000001FFFL});
- public static final BitSet FOLLOW_set_in_curly_chunk2788 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0x0000000000001FFFL});
- public static final BitSet FOLLOW_curly_chunk_in_curly_chunk2812 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0x0000000000001FFFL});
+ public static final BitSet FOLLOW_LEFT_CURLY_in_curly_chunk2772 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0x0000000000003FFFL});
+ public static final BitSet FOLLOW_set_in_curly_chunk2788 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0x0000000000003FFFL});
+ public static final BitSet FOLLOW_curly_chunk_in_curly_chunk2812 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0x0000000000003FFFL});
public static final BitSet FOLLOW_RIGHT_CURLY_in_curly_chunk2848 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_LEFT_SQUARE_in_square_chunk2909 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0x0000000000001FFFL});
- public static final BitSet FOLLOW_set_in_square_chunk2925 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0x0000000000001FFFL});
- public static final BitSet FOLLOW_square_chunk_in_square_chunk2949 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0x0000000000001FFFL});
+ public static final BitSet FOLLOW_LEFT_SQUARE_in_square_chunk2909 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0x0000000000003FFFL});
+ public static final BitSet FOLLOW_set_in_square_chunk2925 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0x0000000000003FFFL});
+ public static final BitSet FOLLOW_square_chunk_in_square_chunk2949 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0x0000000000003FFFL});
public static final BitSet FOLLOW_RIGHT_SQUARE_in_square_chunk2985 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_paren_chunk_in_retval_constraint3030 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_lhs_and_in_lhs_or3063 = new BitSet(new long[]{0x0300000000000002L});
- public static final BitSet FOLLOW_set_in_lhs_or3072 = new BitSet(new long[]{0x0000000000000810L,0x0000000000000E00L});
+ public static final BitSet FOLLOW_set_in_lhs_or3072 = new BitSet(new long[]{0x0000000000000810L,0x0000000000001E00L});
public static final BitSet FOLLOW_lhs_and_in_lhs_or3082 = new BitSet(new long[]{0x0300000000000002L});
public static final BitSet FOLLOW_lhs_unary_in_lhs_and3118 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000180L});
- public static final BitSet FOLLOW_set_in_lhs_and3127 = new BitSet(new long[]{0x0000000000000810L,0x0000000000000E00L});
+ public static final BitSet FOLLOW_set_in_lhs_and3127 = new BitSet(new long[]{0x0000000000000810L,0x0000000000001E00L});
public static final BitSet FOLLOW_lhs_unary_in_lhs_and3137 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000180L});
public static final BitSet FOLLOW_lhs_exist_in_lhs_unary3174 = new BitSet(new long[]{0x0000000020000002L});
public static final BitSet FOLLOW_lhs_not_in_lhs_unary3182 = new BitSet(new long[]{0x0000000020000002L});
@@ -5532,44 +5649,51 @@
public static final BitSet FOLLOW_from_statement_in_lhs_unary3218 = new BitSet(new long[]{0x0000000020000002L});
public static final BitSet FOLLOW_accumulate_statement_in_lhs_unary3240 = new BitSet(new long[]{0x0000000020000002L});
public static final BitSet FOLLOW_collect_statement_in_lhs_unary3261 = new BitSet(new long[]{0x0000000020000002L});
- public static final BitSet FOLLOW_LEFT_PAREN_in_lhs_unary3284 = new BitSet(new long[]{0x0000000000000810L,0x0000000000000E00L});
- public static final BitSet FOLLOW_lhs_in_lhs_unary3288 = new BitSet(new long[]{0x0000000000001000L});
- public static final BitSet FOLLOW_RIGHT_PAREN_in_lhs_unary3290 = new BitSet(new long[]{0x0000000020000002L});
- public static final BitSet FOLLOW_opt_semicolon_in_lhs_unary3300 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_73_in_lhs_exist3324 = new BitSet(new long[]{0x0000000000000810L});
- public static final BitSet FOLLOW_LEFT_PAREN_in_lhs_exist3327 = new BitSet(new long[]{0x0000000000000810L,0x0000000000000E00L});
- public static final BitSet FOLLOW_lhs_or_in_lhs_exist3331 = new BitSet(new long[]{0x0000000000001000L});
- public static final BitSet FOLLOW_RIGHT_PAREN_in_lhs_exist3333 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_lhs_column_in_lhs_exist3339 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_74_in_lhs_not3369 = new BitSet(new long[]{0x0000000000000810L});
- public static final BitSet FOLLOW_LEFT_PAREN_in_lhs_not3372 = new BitSet(new long[]{0x0000000000000810L,0x0000000000000E00L});
- public static final BitSet FOLLOW_lhs_or_in_lhs_not3376 = new BitSet(new long[]{0x0000000000001000L});
- public static final BitSet FOLLOW_RIGHT_PAREN_in_lhs_not3379 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_lhs_column_in_lhs_not3385 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_75_in_lhs_eval3413 = new BitSet(new long[]{0x0000000000000800L});
- public static final BitSet FOLLOW_paren_chunk_in_lhs_eval3417 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_ID_in_dotted_name3448 = new BitSet(new long[]{0x0000000200008002L});
- public static final BitSet FOLLOW_33_in_dotted_name3454 = new BitSet(new long[]{0x0000000000000010L});
- public static final BitSet FOLLOW_ID_in_dotted_name3458 = new BitSet(new long[]{0x0000000200008002L});
- public static final BitSet FOLLOW_LEFT_SQUARE_in_dotted_name3467 = new BitSet(new long[]{0x0000000000010000L});
- public static final BitSet FOLLOW_RIGHT_SQUARE_in_dotted_name3469 = new BitSet(new long[]{0x0000000000008002L});
- public static final BitSet FOLLOW_ID_in_argument3499 = new BitSet(new long[]{0x0000000000008002L});
- public static final BitSet FOLLOW_LEFT_SQUARE_in_argument3505 = new BitSet(new long[]{0x0000000000010000L});
- public static final BitSet FOLLOW_RIGHT_SQUARE_in_argument3507 = new BitSet(new long[]{0x0000000000008002L});
- public static final BitSet FOLLOW_THEN_in_rhs_chunk3551 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0x0000000000001FFFL});
- public static final BitSet FOLLOW_set_in_rhs_chunk3563 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0x0000000000001FFFL});
- public static final BitSet FOLLOW_END_in_rhs_chunk3598 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_ID_in_word3640 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_31_in_word3652 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_76_in_word3661 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_RULE_in_word3673 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_37_in_word3686 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_44_in_word3696 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_45_in_word3704 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_WHEN_in_word3712 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_THEN_in_word3725 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_END_in_word3738 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_STRING_in_word3754 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_lhs_forall_in_lhs_unary3286 = new BitSet(new long[]{0x0000000020000002L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_lhs_unary3294 = new BitSet(new long[]{0x0000000000000810L,0x0000000000001E00L});
+ public static final BitSet FOLLOW_lhs_in_lhs_unary3298 = new BitSet(new long[]{0x0000000000001000L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_lhs_unary3300 = new BitSet(new long[]{0x0000000020000002L});
+ public static final BitSet FOLLOW_opt_semicolon_in_lhs_unary3310 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_73_in_lhs_exist3334 = new BitSet(new long[]{0x0000000000000810L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_lhs_exist3337 = new BitSet(new long[]{0x0000000000000810L,0x0000000000001E00L});
+ public static final BitSet FOLLOW_lhs_or_in_lhs_exist3341 = new BitSet(new long[]{0x0000000000001000L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_lhs_exist3343 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_lhs_column_in_lhs_exist3349 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_74_in_lhs_not3379 = new BitSet(new long[]{0x0000000000000810L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_lhs_not3382 = new BitSet(new long[]{0x0000000000000810L,0x0000000000001E00L});
+ public static final BitSet FOLLOW_lhs_or_in_lhs_not3386 = new BitSet(new long[]{0x0000000000001000L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_lhs_not3389 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_lhs_column_in_lhs_not3395 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_75_in_lhs_eval3423 = new BitSet(new long[]{0x0000000000000800L});
+ public static final BitSet FOLLOW_paren_chunk_in_lhs_eval3427 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_76_in_lhs_forall3455 = new BitSet(new long[]{0x0000000000000800L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_lhs_forall3457 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_lhs_column_in_lhs_forall3461 = new BitSet(new long[]{0x0000001000000010L});
+ public static final BitSet FOLLOW_36_in_lhs_forall3475 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_lhs_column_in_lhs_forall3481 = new BitSet(new long[]{0x0000001000001010L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_lhs_forall3494 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ID_in_dotted_name3520 = new BitSet(new long[]{0x0000000200008002L});
+ public static final BitSet FOLLOW_33_in_dotted_name3526 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_ID_in_dotted_name3530 = new BitSet(new long[]{0x0000000200008002L});
+ public static final BitSet FOLLOW_LEFT_SQUARE_in_dotted_name3539 = new BitSet(new long[]{0x0000000000010000L});
+ public static final BitSet FOLLOW_RIGHT_SQUARE_in_dotted_name3541 = new BitSet(new long[]{0x0000000000008002L});
+ public static final BitSet FOLLOW_ID_in_argument3571 = new BitSet(new long[]{0x0000000000008002L});
+ public static final BitSet FOLLOW_LEFT_SQUARE_in_argument3577 = new BitSet(new long[]{0x0000000000010000L});
+ public static final BitSet FOLLOW_RIGHT_SQUARE_in_argument3579 = new BitSet(new long[]{0x0000000000008002L});
+ public static final BitSet FOLLOW_THEN_in_rhs_chunk3623 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0x0000000000003FFFL});
+ public static final BitSet FOLLOW_set_in_rhs_chunk3635 = new BitSet(new long[]{0xFFFFFFFFFFFFFFF0L,0x0000000000003FFFL});
+ public static final BitSet FOLLOW_END_in_rhs_chunk3670 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ID_in_word3712 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_31_in_word3724 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_77_in_word3733 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_RULE_in_word3745 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_37_in_word3758 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_44_in_word3768 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_45_in_word3776 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_WHEN_in_word3784 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_THEN_in_word3797 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_END_in_word3810 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_STRING_in_word3826 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_ID_in_synpred351530 = new BitSet(new long[]{0x0000000000000800L});
public static final BitSet FOLLOW_paren_chunk_in_synpred351534 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_LEFT_PAREN_in_synpred381675 = new BitSet(new long[]{0x0000000000000002L});
Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/descr/DescrFactory.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/descr/DescrFactory.java 2007-01-16 17:19:41 UTC (rev 8873)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/descr/DescrFactory.java 2007-01-16 20:15:09 UTC (rev 8874)
@@ -21,4 +21,8 @@
public CollectDescr createCollect() {
return new CollectDescr();
}
+
+ public ForallDescr createForall() {
+ return new ForallDescr();
+ }
}
Added: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/descr/ForallDescr.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/descr/ForallDescr.java 2007-01-16 17:19:41 UTC (rev 8873)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/descr/ForallDescr.java 2007-01-16 20:15:09 UTC (rev 8874)
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2006 JBoss Inc
+ *
+ * Licensed 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.lang.descr;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * @author etirelli
+ *
+ */
+public class ForallDescr extends BaseDescr
+ implements
+ ConditionalElementDescr {
+
+ private static final long serialVersionUID = 1742161904829304893L;
+
+ private List columns;
+
+ public ForallDescr() {
+ this.columns = new ArrayList( 2 );
+ }
+
+ /* (non-Javadoc)
+ * @see org.drools.lang.descr.ConditionalElementDescr#addDescr(org.drools.lang.descr.BaseDescr)
+ */
+ public void addDescr(BaseDescr baseDescr) {
+ // cast to make sure we are adding a column descriptor
+ this.columns.add( (ColumnDescr) baseDescr );
+ }
+
+ /* (non-Javadoc)
+ * @see org.drools.lang.descr.ConditionalElementDescr#getDescrs()
+ */
+ public List getDescrs() {
+ return this.columns;
+ }
+
+ /**
+ * Returns the base column from the forall CE
+ * @return
+ */
+ public ColumnDescr getBaseColumn() {
+ return (this.columns.size() > 0) ? (ColumnDescr) this.columns.get( 0 ) : null;
+ }
+
+ /**
+ * Returns the remaining columns from the forall CE
+ * @return
+ */
+ public List getRemainingColumns() {
+ return (this.columns.size() > 1) ? this.columns.subList( 1,
+ this.columns.size() ) : Collections.EMPTY_LIST;
+ }
+
+}
Property changes on: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/descr/ForallDescr.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ id author date revision
Name: svn:eol-style
+ native
Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/semantics/java/RuleBuilder.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/semantics/java/RuleBuilder.java 2007-01-16 17:19:41 UTC (rev 8873)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/semantics/java/RuleBuilder.java 2007-01-16 20:15:09 UTC (rev 8874)
@@ -32,6 +32,7 @@
import org.drools.lang.descr.CollectDescr;
import org.drools.lang.descr.EvalDescr;
import org.drools.lang.descr.ExistsDescr;
+import org.drools.lang.descr.ForallDescr;
import org.drools.lang.descr.FromDescr;
import org.drools.lang.descr.NotDescr;
import org.drools.lang.descr.OrDescr;
@@ -48,6 +49,7 @@
import org.drools.semantics.java.builder.ConditionalElementBuilder;
import org.drools.semantics.java.builder.ConsequenceBuilder;
import org.drools.semantics.java.builder.EvalBuilder;
+import org.drools.semantics.java.builder.ForallBuilder;
import org.drools.semantics.java.builder.FromBuilder;
import org.drools.semantics.java.builder.GroupElementBuilder;
import org.drools.semantics.java.builder.RuleClassBuilder;
@@ -94,6 +96,8 @@
new CollectBuilder() );
builders.put( AccumulateDescr.class,
new AccumulateBuilder() );
+ builders.put( ForallDescr.class,
+ new ForallBuilder() );
GroupElementBuilder gebuilder = new GroupElementBuilder();
builders.put( AndDescr.class,
gebuilder);
Added: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/semantics/java/builder/ForallBuilder.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/semantics/java/builder/ForallBuilder.java 2007-01-16 17:19:41 UTC (rev 8873)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/semantics/java/builder/ForallBuilder.java 2007-01-16 20:15:09 UTC (rev 8874)
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2006 JBoss Inc
+ *
+ * Licensed 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.semantics.java.builder;
+
+import java.util.Iterator;
+
+import org.drools.lang.descr.BaseDescr;
+import org.drools.lang.descr.ColumnDescr;
+import org.drools.lang.descr.ForallDescr;
+import org.drools.rule.Column;
+import org.drools.rule.ConditionalElement;
+import org.drools.rule.Forall;
+
+/**
+ * @author etirelli
+ *
+ */
+public class ForallBuilder
+ implements
+ ConditionalElementBuilder {
+
+ /* (non-Javadoc)
+ * @see org.drools.semantics.java.builder.ConditionalElementBuilder#build(org.drools.semantics.java.builder.BuildContext, org.drools.semantics.java.builder.BuildUtils, org.drools.semantics.java.builder.ColumnBuilder, org.drools.lang.descr.BaseDescr)
+ */
+ public ConditionalElement build(BuildContext context,
+ BuildUtils utils,
+ ColumnBuilder columnBuilder,
+ BaseDescr descr) {
+ ForallDescr forallDescr = (ForallDescr) descr;
+
+ Column baseColumn = columnBuilder.build( context, utils, forallDescr.getBaseColumn() );
+
+ if ( baseColumn == null ) {
+ return null;
+ }
+
+ Forall forall = new Forall( baseColumn );
+
+ // adding the newly created forall CE to the build stack
+ // this is necessary in case of local declaration usage
+ context.getBuildStack().push( forall );
+
+ for( Iterator it = forallDescr.getRemainingColumns().iterator(); it.hasNext(); ) {
+ Column anotherColumn = columnBuilder.build( context, utils, (ColumnDescr) it.next() );
+ forall.addRemainingColumn( anotherColumn );
+ }
+
+ // poping the forall
+ context.getBuildStack().pop();
+
+ return forall;
+ }
+
+}
Property changes on: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/semantics/java/builder/ForallBuilder.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ id author date revision
Name: svn:eol-style
+ native
Modified: labs/jbossrules/trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g 2007-01-16 17:19:41 UTC (rev 8873)
+++ labs/jbossrules/trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g 2007-01-16 20:15:09 UTC (rev 8874)
@@ -1,1523 +1,1543 @@
-grammar DRL;
-options {backtrack=true;}
-
- at parser::header {
- package org.drools.lang;
- import java.util.List;
- import java.util.ArrayList;
- import java.util.Iterator;
- import java.util.Map;
- import java.util.HashMap;
- import java.util.StringTokenizer;
- import org.drools.lang.descr.*;
- import org.drools.compiler.SwitchingCommonTokenStream;
-}
-
- at parser::members {
- private ExpanderResolver expanderResolver;
- private Expander expander;
- private boolean expanderDebug = false;
- private PackageDescr packageDescr;
- private List errors = new ArrayList();
- private String source = "unknown";
- private int lineOffset = 0;
- private DescrFactory factory = new DescrFactory();
- private boolean parserDebug = false;
-
- public void setParserDebug(boolean parserDebug) {
- this.parserDebug = parserDebug;
- }
-
- public void debug(String message) {
- if ( parserDebug )
- System.err.println( "drl parser: " + message );
- }
-
- public void setSource(String source) {
- this.source = source;
- }
- public DescrFactory getFactory() {
- return factory;
- }
-
- /**
- * This may be set to enable debuggin of DSLs/expanders.
- * If set to true, expander stuff will be sent to the Std out.
- */
- public void setExpanderDebug(boolean status) {
- expanderDebug = status;
- }
- public String getSource() {
- return this.source;
- }
-
- public PackageDescr getPackageDescr() {
- return packageDescr;
- }
-
- private int offset(int line) {
- return line + lineOffset;
- }
-
- /**
- * This will set the offset to record when reparsing. Normally is zero of course
- */
- public void setLineOffset(int i) {
- this.lineOffset = i;
- }
-
- public void setExpanderResolver(ExpanderResolver expanderResolver) {
- this.expanderResolver = expanderResolver;
- }
-
- public ExpanderResolver getExpanderResolver() {
- return expanderResolver;
- }
-
- /** Expand the LHS */
- private String runWhenExpander(String text, int line) throws RecognitionException {
- String expanded = text.trim();
- if (expanded.startsWith(">")) {
- expanded = expanded.substring(1); //escape !!
- } else {
- try {
- expanded = expander.expand( "when", text );
- } catch (Exception e) {
- this.errors.add(new ExpanderException("Unable to expand: " + text + ". Due to " + e.getMessage(), line));
- return "";
- }
- }
- if (expanderDebug) {
- System.out.println("Expanding LHS: " + text + " ----> " + expanded + " --> from line: " + line);
- }
- return expanded;
-
- }
-
- /** This will apply a list of constraints to an LHS block */
- private String applyConstraints(List constraints, String block) {
- //apply the constraints as a comma seperated list inside the previous block
- //the block will end in something like "foo()" and the constraint patterns will be put in the ()
- if (constraints == null) {
- return block;
- }
- StringBuffer list = new StringBuffer();
- for (Iterator iter = constraints.iterator(); iter.hasNext();) {
- String con = (String) iter.next();
- list.append("\n\t\t");
- list.append(con);
- if (iter.hasNext()) {
- list.append(",");
- }
- }
- if (block.endsWith("()")) {
- return block.substring(0, block.length() - 2) + "(" + list.toString() + ")";
- } else {
- return block + "(" + list.toString() + ")";
- }
- }
-
- /** Reparse the results of the expansion */
- private void reparseLhs(String text, AndDescr descrs) throws RecognitionException {
- CharStream charStream = new ANTLRStringStream( text );
- DRLLexer lexer = new DRLLexer( charStream );
- TokenStream tokenStream = new CommonTokenStream( lexer );
- DRLParser parser = new DRLParser( tokenStream );
- parser.setLineOffset( descrs.getLine() );
- parser.normal_lhs_block(descrs);
-
- if (parser.hasErrors()) {
- this.errors.addAll(parser.getErrors());
- }
- if (expanderDebug) {
- System.out.println("Reparsing LHS: " + text + " --> successful:" + !parser.hasErrors());
- }
-
- }
-
- /** Expand a line on the RHS */
- private String runThenExpander(String text, int startLine) {
- //System.err.println( "expand THEN [" + text + "]" );
- StringTokenizer lines = new StringTokenizer( text, "\n\r" );
-
- StringBuffer expanded = new StringBuffer();
-
- String eol = System.getProperty( "line.separator" );
-
- while ( lines.hasMoreTokens() ) {
- startLine++;
- String line = lines.nextToken();
- line = line.trim();
- if ( line.length() > 0 ) {
- if ( line.startsWith( ">" ) ) {
- expanded.append( line.substring( 1 ) );
- expanded.append( eol );
- } else {
- try {
- expanded.append( expander.expand( "then", line ) );
- expanded.append( eol );
- } catch (Exception e) {
- this.errors.add(new ExpanderException("Unable to expand: " + line + ". Due to " + e.getMessage(), startLine));
- }
- }
- }
- }
-
- if (expanderDebug) {
- System.out.println("Expanding RHS: " + text + " ----> " + expanded.toString() + " --> from line starting: " + startLine);
- }
-
- return expanded.toString();
- }
-
-
-
- private String getString(Token token) {
- String orig = token.getText();
- return orig.substring( 1, orig.length() -1 );
- }
-
- public void reportError(RecognitionException ex) {
- // if we've already reported an error and have not matched a token
- // yet successfully, don't report any errors.
- if ( errorRecovery ) {
- return;
- }
- errorRecovery = true;
-
- ex.line = offset(ex.line); //add the offset if there is one
- errors.add( ex );
- }
-
- /** return the raw RecognitionException errors */
- public List getErrors() {
- return errors;
- }
-
- /** Return a list of pretty strings summarising the errors */
- public List getErrorMessages() {
- List messages = new ArrayList();
- for ( Iterator errorIter = errors.iterator() ; errorIter.hasNext() ; ) {
- messages.add( createErrorMessage( (RecognitionException) errorIter.next() ) );
- }
- return messages;
- }
-
- /** return true if any parser errors were accumulated */
- public boolean hasErrors() {
- return ! errors.isEmpty();
- }
-
- /** This will take a RecognitionException, and create a sensible error message out of it */
- public String createErrorMessage(RecognitionException e)
- {
- StringBuffer message = new StringBuffer();
- message.append( source + ":"+e.line+":"+e.charPositionInLine+" ");
- if ( e instanceof MismatchedTokenException ) {
- MismatchedTokenException mte = (MismatchedTokenException)e;
- message.append("mismatched token: "+
- e.token+
- "; expecting type "+
- tokenNames[mte.expecting]);
- }
- else if ( e instanceof MismatchedTreeNodeException ) {
- MismatchedTreeNodeException mtne = (MismatchedTreeNodeException)e;
- message.append("mismatched tree node: "+
- mtne.foundNode+
- "; expecting type "+
- tokenNames[mtne.expecting]);
- }
- else if ( e instanceof NoViableAltException ) {
- NoViableAltException nvae = (NoViableAltException)e;
- message.append( "Unexpected token '" + e.token.getText() + "'" );
- /*
- message.append("decision=<<"+nvae.grammarDecisionDescription+">>"+
- " state "+nvae.stateNumber+
- " (decision="+nvae.decisionNumber+
- ") no viable alt; token="+
- e.token);
- */
- }
- else if ( e instanceof EarlyExitException ) {
- EarlyExitException eee = (EarlyExitException)e;
- message.append("required (...)+ loop (decision="+
- eee.decisionNumber+
- ") did not match anything; token="+
- e.token);
- }
- else if ( e instanceof MismatchedSetException ) {
- MismatchedSetException mse = (MismatchedSetException)e;
- message.append("mismatched token '"+
- e.token+
- "' expecting set "+mse.expecting);
- }
- else if ( e instanceof MismatchedNotSetException ) {
- MismatchedNotSetException mse = (MismatchedNotSetException)e;
- message.append("mismatched token '"+
- e.token+
- "' expecting set "+mse.expecting);
- }
- else if ( e instanceof FailedPredicateException ) {
- FailedPredicateException fpe = (FailedPredicateException)e;
- message.append("rule "+fpe.ruleName+" failed predicate: {"+
- fpe.predicateText+"}?");
- } else if (e instanceof GeneralParseException) {
- message.append(" " + e.getMessage());
- }
- return message.toString();
- }
-
- void checkTrailingSemicolon(String text, int line) {
- if (text.trim().endsWith( ";" ) ) {
- this.errors.add( new GeneralParseException( "Trailing semi-colon not allowed", offset(line) ) );
- }
- }
-
-}
-
- at lexer::header {
- package org.drools.lang;
-}
-
-opt_semicolon
- : ';'?
- ;
-
-compilation_unit
- : prolog
- ( statement )+
- ;
-
-prolog
- @init {
- String packageName = "";
- }
- : ( name=package_statement { packageName = name; } )?
- {
- this.packageDescr = new PackageDescr( name );
- }
- ;
-
-statement
- :
- ( import_statement
- | function_import_statement
- | global
- | function
- | t=template {this.packageDescr.addFactTemplate( t ); }
- | r=rule {this.packageDescr.addRule( r ); }
- | q=query {this.packageDescr.addRule( q ); }
- )
- ;
-
-package_statement returns [String packageName]
- @init{
- packageName = null;
- }
- :
- 'package' name=dotted_name opt_semicolon
- {
- packageName = name;
- }
- ;
-
-
-import_statement
- : 'import' name=import_name opt_semicolon
- {
- if (packageDescr != null)
- packageDescr.addImport( name );
- }
- ;
-
-function_import_statement
- : 'import' 'function' name=import_name opt_semicolon
- {
- if (packageDescr != null)
- packageDescr.addFunctionImport( name );
- }
- ;
-
-
-import_name returns [String name]
- @init {
- name = null;
- }
- :
- id=ID { name=id.getText(); } ( '.' id=ID { name = name + "." + id.getText(); } )* (star='.*' { name = name + star.getText(); })?
- ;
-
-
-global
- @init {
- }
- :
- 'global' type=dotted_name id=ID opt_semicolon
- {
- packageDescr.addGlobal( id.getText(), type );
- }
- ;
-
-
-function
- @init {
- FunctionDescr f = null;
- }
- :
- loc='function' (retType=dotted_name)? name=ID
- {
- //System.err.println( "function :: " + name.getText() );
- f = new FunctionDescr( name.getText(), retType );
- f.setLocation(offset(loc.getLine()), loc.getCharPositionInLine());
- }
- '('
- ( (paramType=dotted_name)? paramName=argument
- {
- f.addParameter( paramType, paramName );
- }
- ( ',' (paramType=dotted_name)? paramName=argument
- {
- f.addParameter( paramType, paramName );
- }
- )*
- )?
- ')'
- body=curly_chunk
- {
- //strip out '{','}'
- f.setText( body.substring( 1, body.length()-1 ) );
-
- packageDescr.addFunction( f );
- }
- ;
-
-
-
-query returns [QueryDescr query]
- @init {
- query = null;
- AndDescr lhs = null;
- }
- :
- loc='query' queryName=word
- {
- query = new QueryDescr( queryName, null );
- query.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
- lhs = new AndDescr(); query.setLhs( lhs );
- lhs.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
- }
- (
-// { expander != null }? expander_lhs_block[lhs] |
- normal_lhs_block[lhs]
- )
-
- 'end'
- ;
-
-
-template returns [FactTemplateDescr template]
- @init {
- template = null;
- }
- :
- loc='template' templateName=ID opt_semicolon
- {
- template = new FactTemplateDescr(templateName.getText());
- template.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
- }
- (
- slot=template_slot
- {
- template.addFieldTemplate(slot);
- }
- )+
- 'end' opt_semicolon
- ;
-
-template_slot returns [FieldTemplateDescr field]
- @init {
- field = null;
- }
- :
- //name=ID ':' fieldType=dotted_name ( EOL | ';' )
- fieldType=dotted_name name=ID opt_semicolon
- {
-
-
- field = new FieldTemplateDescr(name.getText(), fieldType);
- field.setLocation( offset(name.getLine()), name.getCharPositionInLine() );
- }
- ;
-
-rule returns [RuleDescr rule]
- @init {
- rule = null;
- String consequence = "";
- AndDescr lhs = null;
- }
- :
- loc=RULE ruleName=word
- {
- debug( "start rule: " + ruleName );
- rule = new RuleDescr( ruleName, null );
- rule.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
- }
- rule_attributes[rule]
- ( loc=WHEN ':'?
- {
- lhs = new AndDescr(); rule.setLhs( lhs );
- lhs.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
- }
- (
-// { expander != null }? expander_lhs_block[lhs] |
- normal_lhs_block[lhs]
- )
-
- )?
- rhs_chunk[rule]
- ;
-
-
-
-rule_attributes[RuleDescr rule]
- :
- ('attributes' ':')?
- ( ','? a=rule_attribute
- {
- rule.addAttribute( a );
- }
- )*
- ;
-
-
-
-rule_attribute returns [AttributeDescr d]
- @init {
- d = null;
- }
- :
- a=salience { d = a; }
- | a=no_loop { d = a; }
- | a=agenda_group { d = a; }
- | a=duration { d = a; }
- | a=activation_group { d = a; }
- | a=auto_focus { d = a; }
- | a=date_effective {d = a; }
- | a=date_expires {d = a; }
- | a=enabled {d=a;}
-
- ;
-
-date_effective returns [AttributeDescr d]
- @init {
- d = null;
- }
- :
- loc='date-effective' val=STRING
- {
- d = new AttributeDescr( "date-effective", getString( val ) );
- d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
- }
-
- ;
-
-date_expires returns [AttributeDescr d]
- @init {
- d = null;
- }
- :
- loc='date-expires' val=STRING
- {
- d = new AttributeDescr( "date-expires", getString( val ) );
- d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
- }
-
- ;
-
-
-enabled returns [AttributeDescr d]
- @init {
- d = null;
- }
- :
- loc='enabled' t=BOOL opt_semicolon
- {
- d = new AttributeDescr( "enabled", t.getText() );
- d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
- }
-
-
- ;
-
-
-
-salience returns [AttributeDescr d ]
- @init {
- d = null;
- }
- :
- loc='salience' i=INT opt_semicolon
- {
- d = new AttributeDescr( "salience", i.getText() );
- d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
- }
- ;
-
-no_loop returns [AttributeDescr d]
- @init {
- d = null;
- }
- :
- (
- loc='no-loop' opt_semicolon
- {
- d = new AttributeDescr( "no-loop", "true" );
- d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
- }
- )
- |
- (
- loc='no-loop' t=BOOL opt_semicolon
- {
- d = new AttributeDescr( "no-loop", t.getText() );
- d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
- }
-
- )
-
- ;
-
-auto_focus returns [AttributeDescr d]
- @init {
- d = null;
- }
- :
- (
- loc='auto-focus' opt_semicolon
- {
- d = new AttributeDescr( "auto-focus", "true" );
- d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
- }
- )
- |
- (
- loc='auto-focus' t=BOOL opt_semicolon
- {
- d = new AttributeDescr( "auto-focus", t.getText() );
- d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
- }
-
- )
-
- ;
-
-activation_group returns [AttributeDescr d]
- @init {
- d = null;
- }
- :
- loc='activation-group' name=STRING opt_semicolon
- {
- d = new AttributeDescr( "activation-group", getString( name ) );
- d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
- }
- ;
-
-agenda_group returns [AttributeDescr d]
- @init {
- d = null;
- }
- :
- loc='agenda-group' name=STRING opt_semicolon
- {
- d = new AttributeDescr( "agenda-group", getString( name ) );
- d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
- }
- ;
-
-
-duration returns [AttributeDescr d]
- @init {
- d = null;
- }
- :
- loc='duration' i=INT
- {
- d = new AttributeDescr( "duration", i.getText() );
- d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
- }
- ;
-
-
-normal_lhs_block[AndDescr descrs]
- :
- ( d=lhs
- { descrs.addDescr( d ); }
- )*
- ;
-
-/*
-expander_lhs_block[AndDescr descrs]
- @init {
- String lhsBlock = null;
- String eol = System.getProperty( "line.separator" );
- List constraints = null;
- }
- :
- (options{greedy=false;} :
- text=paren_chunk (options{greedy=true;} : loc=EOL)
- {
- //only expand non null
- if (text != null) {
- if (text.trim().startsWith("-")) {
- if (constraints == null) {
- constraints = new ArrayList();
- }
- constraints.add(runWhenExpander( text, offset(loc.getLine())));
- } else {
- if (constraints != null) {
- lhsBlock = applyConstraints(constraints, lhsBlock);
- constraints = null;
- }
-
-
- if (lhsBlock == null) {
- lhsBlock = runWhenExpander( text, offset(loc.getLine()));
- } else {
- lhsBlock = lhsBlock + eol + runWhenExpander( text, offset(loc.getLine()));
- }
- }
- text = null;
- }
- }
-
-
- )*
-
- {
- //flush out any constraints left handing before the RHS
- lhsBlock = applyConstraints(constraints, lhsBlock);
- if (lhsBlock != null) {
- reparseLhs(lhsBlock, descrs);
- }
- }
-
- ;
-*/
-
-lhs returns [BaseDescr d]
- @init {
- d=null;
- }
- : l=lhs_or { d = l; }
- ;
-
-
-lhs_column returns [BaseDescr d]
- @init {
- d=null;
- }
- : f=fact_binding { d = f; }
- | f=fact { d = f; }
- ;
-
-from_statement returns [FromDescr d]
- @init {
- d=factory.createFrom();
- }
- :
- 'from' ds=from_source
- {
- d.setDataSource(ds);
-
- }
-
-
-
- ;
-
-from_source returns [DeclarativeInvokerDescr ds]
- @init {
- ds = null;
- AccessorDescr ad = null;
- }
- :
- (( functionName=ID args=paren_chunk
- {
- ad = new AccessorDescr();
- ad.setLocation( offset(functionName.getLine()), functionName.getCharPositionInLine() );
- ds = ad;
- FunctionCallDescr fc = new FunctionCallDescr(functionName.getText());
- fc.setLocation( offset(functionName.getLine()), functionName.getCharPositionInLine() );
- fc.setArguments(args);
- ad.addInvoker(fc);
- }
- )
- |
- ( var=ID
- {
- ad = new AccessorDescr(var.getText());
- ad.setLocation( offset(var.getLine()), var.getCharPositionInLine() );
- ds = ad;
- }
- ))
-
- expression_chain[ad]?
- ;
-
-expression_chain[AccessorDescr as]
- @init {
- FieldAccessDescr fa = null;
- MethodAccessDescr ma = null;
- }
- :
- ( '.' field=ID
- {
- fa = new FieldAccessDescr(field.getText());
- fa.setLocation( offset(field.getLine()), field.getCharPositionInLine() );
- }
- (
- ( LEFT_SQUARE ) => sqarg=square_chunk
- {
- fa.setArgument( sqarg );
- }
- |
- ( LEFT_PAREN ) => paarg=paren_chunk
- {
- ma = new MethodAccessDescr( field.getText(), paarg );
- ma.setLocation( offset(field.getLine()), field.getCharPositionInLine() );
- }
- )?
- {
- if( ma != null ) {
- as.addInvoker( ma );
- } else {
- as.addInvoker( fa );
- }
- }
- expression_chain[as]?
- )
- ;
-
-accumulate_statement returns [AccumulateDescr d]
- @init {
- d = factory.createAccumulate();
- }
- :
- loc='from' 'accumulate'
- {
- d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
- }
- '(' column=lhs_column ','
- {
- d.setSourceColumn( (ColumnDescr)column );
- }
- 'init' text=paren_chunk ','
- {
- d.setInitCode( text.substring(1, text.length()-1) );
- }
- 'action' text=paren_chunk ','
- {
- d.setActionCode( text.substring(1, text.length()-1) );
- }
- 'result' text=paren_chunk ')'
- {
- d.setResultCode( text.substring(1, text.length()-1) );
- }
- ;
-
-collect_statement returns [CollectDescr d]
- @init {
- d = factory.createCollect();
- }
- :
- loc='from' 'collect'
- {
- d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
- }
- '(' column=lhs_column ')'
- {
- d.setSourceColumn( (ColumnDescr)column );
- }
- ;
-/*
-argument_list returns [ArrayList args]
- @init {
- args = new ArrayList();
- }
- :
- (param=argument_value {
- if (param != null) {
- args.add(param);
- }
- }
-
- (
- ',' param=argument_value {
- if (param != null) {
- args.add(param);
- }
- }
- )*
- )?
- ;
-
-argument_value returns [ArgumentValueDescr value]
- @init {
- value = null;
- String text = null;
- }
- : ( t=STRING { text = getString( t ); value=new ArgumentValueDescr(ArgumentValueDescr.STRING, text);}
- | t=INT { text = t.getText(); value=new ArgumentValueDescr(ArgumentValueDescr.INTEGRAL, text);}
- | t=FLOAT { text = t.getText(); value=new ArgumentValueDescr(ArgumentValueDescr.DECIMAL, text); }
- | t=BOOL { text = t.getText(); value=new ArgumentValueDescr(ArgumentValueDescr.BOOLEAN, text); }
- | t=ID { text = t.getText(); value=new ArgumentValueDescr(ArgumentValueDescr.VARIABLE, text);}
- | t='null' { text = "null"; value=new ArgumentValueDescr(ArgumentValueDescr.NULL, text);}
- | m=inline_map { value=new ArgumentValueDescr(ArgumentValueDescr.MAP, m.getKeyValuePairs() ); }
- | a=inline_array { value = new ArgumentValueDescr(ArgumentValueDescr.LIST, a ); }
- )
- ;
-
-inline_map returns [ArgumentValueDescr.MapDescr mapDescr]
- @init {
- mapDescr = new ArgumentValueDescr.MapDescr();
- }
- : '{'
- ( key=argument_value '=>' value=argument_value {
- if ( key != null ) {
- mapDescr.add( new ArgumentValueDescr.KeyValuePairDescr( key, value ) );
- }
- }
- )
-
- ( (EOL)? ',' (EOL)? key=argument_value '=>' value=argument_value {
- if ( key != null ) {
- mapDescr.add( new ArgumentValueDescr.KeyValuePairDescr( key, value ) );
- }
- }
- )*
- '}'
- ;
-
-inline_array returns [List list]
- @init {
- list = new ArrayList();
- }
- :
- '[' arg=argument_value { list.add(arg); }
-
- ( EOL? ',' EOL? arg=argument_value { list.add(arg); } )*
- ']'
-
-
- ;
-*/
-fact_binding returns [BaseDescr d]
- @init {
- d=null;
- boolean multi=false;
- }
- :
- id=ID
-
- ':' fe=fact_expression[id.getText()]
- {
- d=fe;
- }
- ;
-
- fact_expression[String id] returns [BaseDescr pd]
- @init {
- pd = null;
- boolean multi = false;
- }
- : '(' fe=fact_expression_in_paren[id] ')' { pd=fe; }
- | f=fact
- {
- ((ColumnDescr)f).setIdentifier( id );
- pd = f;
- }
- ;
-
-// in parenthesis alternative is allowed
- fact_expression_in_paren[String id] returns [BaseDescr pd]
- @init {
- pd = null;
- boolean multi = false;
- }
- : '(' fe=fact_expression_in_paren[id]')' { pd=fe; }
- | f=fact
- {
- ((ColumnDescr)f).setIdentifier( id );
- pd = f;
- }
- ( ('or'|'||')
- { if ( ! multi ) {
- BaseDescr first = pd;
- pd = new OrDescr();
- ((OrDescr)pd).addDescr( first );
- multi=true;
- }
- }
- f=fact
- {
- ((ColumnDescr)f).setIdentifier( id );
- ((OrDescr)pd).addDescr( f );
- }
- )*
- ;
-
-fact returns [BaseDescr d]
- @init {
- d=null;
- }
- : id=dotted_name
- {
- d = new ColumnDescr( id );
- }
- loc='(' {
- d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
- }
- ( c=constraints
- {
- for ( Iterator cIter = c.iterator() ; cIter.hasNext() ; ) {
- ((ColumnDescr)d).addDescr( (BaseDescr) cIter.next() );
- }
- }
- )?
- endLoc=')'
- {
- d.setEndLocation( offset(endLoc.getLine()), endLoc.getCharPositionInLine() );
- }
- ;
-
-
-constraints returns [List constraints]
- @init {
- constraints = new ArrayList();
- }
- : (constraint[constraints]|predicate[constraints])
- ( ',' (constraint[constraints]|predicate[constraints]))*
- ;
-
-constraint[List constraints]
- @init {
- BaseDescr d = null;
- FieldConstraintDescr fc = null;
- }
- :
- ( fb=ID ':' )?
- f=ID
- {
- if ( fb != null ) {
- d = new FieldBindingDescr( f.getText(), fb.getText() );
- d.setLocation( offset(f.getLine()), f.getCharPositionInLine() );
- constraints.add( d );
- }
- fc = new FieldConstraintDescr(f.getText());
- fc.setLocation( offset(f.getLine()), f.getCharPositionInLine() );
- }
- (
- rd=constraint_expression
- {
- fc.addRestriction(rd);
- constraints.add(fc);
- }
- (
- con=('&'|'|')
- {
- if (con.getText().equals("&") ) {
- fc.addRestriction(new RestrictionConnectiveDescr(RestrictionConnectiveDescr.AND));
- } else {
- fc.addRestriction(new RestrictionConnectiveDescr(RestrictionConnectiveDescr.OR));
- }
- }
- rd=constraint_expression
- {
- fc.addRestriction(rd);
- }
- )*
- )?
- ;
-
-constraint_expression returns [RestrictionDescr rd]
- :
- op=( '=='
- | '>'
- | '>='
- | '<'
- | '<='
- | '!='
- | 'contains'
- | 'matches'
- | 'excludes'
- )
- ( bvc=ID
- {
- rd = new VariableRestrictionDescr(op.getText(), bvc.getText());
- }
- |
- lc=enum_constraint
- {
- rd = new LiteralRestrictionDescr(op.getText(), lc, true);
- }
- |
- lc=literal_constraint
- {
- rd = new LiteralRestrictionDescr(op.getText(), lc);
- }
- | rvc=retval_constraint
- {
- rd = new ReturnValueRestrictionDescr(op.getText(), rvc);
- }
- )
- ;
-
-literal_constraint returns [String text]
- @init {
- text = null;
- }
- : ( t=STRING { text = getString( t ); } //t.getText(); text=text.substring( 1, text.length() - 1 ); }
- | t=INT { text = t.getText(); }
- | t=FLOAT { text = t.getText(); }
- | t=BOOL { text = t.getText(); }
- | t='null' { text = null; }
- )
- ;
-
-enum_constraint returns [String text]
- @init {
- text = null;
- }
- : (cls=ID '.' en=ID) { text = cls.getText() + "." + en.getText(); }
- ;
-
-
-predicate[List constraints]
- :
- decl=ID ':' field=ID '->' text=paren_chunk
- {
- String body = text.substring(1, text.length()-1);
- PredicateDescr d = new PredicateDescr(field.getText(), decl.getText(), body );
- constraints.add( d );
- }
- ;
-
-paren_chunk returns [String text]
- @init {
- StringBuffer buf = null;
- Integer channel = null;
- }
- :
- {
- channel = ((SwitchingCommonTokenStream)input).getTokenTypeChannel( WS );
- ((SwitchingCommonTokenStream)input).setTokenTypeChannel( WS, Token.DEFAULT_CHANNEL );
- buf = new StringBuffer();
- }
- loc=LEFT_PAREN
- {
- buf.append( loc.getText());
-
- }
- (
- ~(LEFT_PAREN|RIGHT_PAREN)
- {
- buf.append( input.LT(-1).getText() );
- }
- |
- chunk=paren_chunk
- {
- buf.append( chunk );
- }
- )*
- {
- if( channel != null ) {
- ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, channel.intValue());
- } else {
- ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, Token.HIDDEN_CHANNEL);
- }
- }
- loc=RIGHT_PAREN
- {
- buf.append( loc.getText() );
- text = buf.toString();
- }
- ;
-
-curly_chunk returns [String text]
- @init {
- StringBuffer buf = null;
- Integer channel = null;
- }
- :
- loc=LEFT_CURLY
- {
- channel = ((SwitchingCommonTokenStream)input).getTokenTypeChannel( WS );
- ((SwitchingCommonTokenStream)input).setTokenTypeChannel( WS, Token.DEFAULT_CHANNEL );
- buf = new StringBuffer();
-
- buf.append( loc.getText() );
- }
- (
- ~(LEFT_CURLY|RIGHT_CURLY)
- {
- buf.append( input.LT(-1).getText() );
- }
- |
- chunk=curly_chunk
- {
- buf.append( chunk );
- }
- )*
- {
- if( channel != null ) {
- ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, channel.intValue());
- } else {
- ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, Token.HIDDEN_CHANNEL);
- }
- }
- loc=RIGHT_CURLY
- {
- buf.append( loc.getText() );
- text = buf.toString();
- }
- ;
-
-square_chunk returns [String text]
- @init {
- StringBuffer buf = null;
- Integer channel = null;
- }
- :
- {
- channel = ((SwitchingCommonTokenStream)input).getTokenTypeChannel( WS );
- ((SwitchingCommonTokenStream)input).setTokenTypeChannel( WS, Token.DEFAULT_CHANNEL );
- buf = new StringBuffer();
- }
- loc=LEFT_SQUARE
- {
- buf.append( loc.getText());
-
- }
- (
- ~(LEFT_SQUARE|RIGHT_SQUARE)
- {
- buf.append( input.LT(-1).getText() );
- }
- |
- chunk=square_chunk
- {
- buf.append( chunk );
- }
- )*
- {
- if( channel != null ) {
- ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, channel.intValue());
- } else {
- ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, Token.HIDDEN_CHANNEL);
- }
- }
- loc=RIGHT_SQUARE
- {
- buf.append( loc.getText() );
- text = buf.toString();
- }
- ;
-
-retval_constraint returns [String text]
- @init {
- text = null;
- }
- :
- c=paren_chunk { text = c.substring(1, c.length()-1); }
- ;
-
-
-
-
-
-
-lhs_or returns [BaseDescr d]
- @init{
- d = null;
- OrDescr or = null;
- }
- :
- left=lhs_and {d = left; }
- ( ('or'|'||')
- right=lhs_and
- {
- if ( or == null ) {
- or = new OrDescr();
- or.addDescr( left );
- d = or;
- }
-
- or.addDescr( right );
- }
- )*
- ;
-
-lhs_and returns [BaseDescr d]
- @init{
- d = null;
- AndDescr and = null;
- }
- :
- left=lhs_unary { d = left; }
- ( ('and'|'&&')
- right=lhs_unary
- {
- if ( and == null ) {
- and = new AndDescr();
- and.addDescr( left );
- d = and;
- }
-
- and.addDescr( right );
- }
- )*
- ;
-
-lhs_unary returns [BaseDescr d]
- @init {
- d = null;
- }
- : ( u=lhs_exist
- | u=lhs_not
- | u=lhs_eval
- | u=lhs_column (
- (fm=from_statement {fm.setColumn((ColumnDescr) u); u=fm;})
- |(ac=accumulate_statement {ac.setResultColumn((ColumnDescr) u); u=ac;})
- |(cs=collect_statement {cs.setResultColumn((ColumnDescr) u); u=cs;})
- )?
- | '(' u=lhs ')'
- ) { d = u; }
- opt_semicolon
- ;
-
-lhs_exist returns [BaseDescr d]
- @init {
- d = null;
- }
- : loc='exists' ('(' column=lhs_or ')' | column=lhs_column)
- {
- d = new ExistsDescr( (ColumnDescr) column );
- d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
- }
- ;
-
-lhs_not returns [NotDescr d]
- @init {
- d = null;
- }
- : loc='not' ('(' column=lhs_or ')' | column=lhs_column)
- {
- d = new NotDescr( column );
- d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
- }
- ;
-
-lhs_eval returns [BaseDescr d]
- @init {
- d = null;
- }
- : loc='eval' c=paren_chunk
- {
- String body = c.substring(1, c.length()-1);
- checkTrailingSemicolon( body, offset(loc.getLine()) );
- d = new EvalDescr( body );
- }
- ;
-
-dotted_name returns [String name]
- @init {
- name = null;
- }
- :
- id=ID { name=id.getText(); } ( '.' id=ID { name = name + "." + id.getText(); } )* ( '[' ']' { name = name + "[]";})*
- ;
-
-argument returns [String name]
- @init {
- name = null;
- }
- :
- id=ID { name=id.getText(); } ( '[' ']' { name = name + "[]";})*
- ;
-
-rhs_chunk[RuleDescr rule]
- @init {
- StringBuffer buf = null;
- Integer channel = null;
- }
- :
- {
- channel = ((SwitchingCommonTokenStream)input).getTokenTypeChannel( WS );
- ((SwitchingCommonTokenStream)input).setTokenTypeChannel( WS, Token.DEFAULT_CHANNEL );
- buf = new StringBuffer();
- }
- start='then'
- (
- ~END
- {
- buf.append( input.LT(-1).getText() );
- }
- )*
- {
- if( channel != null ) {
- ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, channel.intValue());
- } else {
- ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, Token.HIDDEN_CHANNEL);
- }
- }
- END
- {
- // ignoring first line in the consequence
- int index = 0;
- while( (index < buf.length() ) && Character.isWhitespace( buf.charAt( index ) ) &&
- (buf.charAt( index ) != 10 ) && (buf.charAt( index ) != 13 ))
- index++;
- if( (index < buf.length() ) && ( buf.charAt( index ) == '\r' ) )
- index++;
- if( (index < buf.length() ) && ( buf.charAt( index ) == '\n' ) )
- index++;
-
- rule.setConsequence( buf.substring( index ) );
- rule.setConsequenceLocation(offset(start.getLine()), start.getCharPositionInLine());
- }
- ;
-
-
-word returns [String word]
- @init{
- word = null;
- }
- : id=ID { word=id.getText(); }
- | 'import' { word="import"; }
- | 'use' { word="use"; }
- | RULE { word="rule"; }
- | 'query' { word="query"; }
- | 'salience' { word="salience"; }
- | 'no-loop' { word="no-loop"; }
- | WHEN { word="when"; }
- | THEN { word="then"; }
- | END { word="end"; }
- | str=STRING { word=getString(str);} //str.getText(); word=word.substring( 1, word.length()-1 ); }
- ;
-
-//RHS :'then' (options{greedy=false;} : .)* ('\n'|'\r') (' '|'\t'|'\f')* 'end'
-// ;
-
-WS : ( ' '
- | '\t'
- | '\f'
- | EOL
- )
- { $channel=HIDDEN; }
- ;
-
-fragment
-EOL :
- ( ( '\r\n' )=> '\r\n' // Evil DOS
- | '\r' // Macintosh
- | '\n' // Unix (the right way)
- )
- ;
-
-INT
- : ('-')?('0'..'9')+
- ;
-
-FLOAT
- : ('-')?('0'..'9')+ '.' ('0'..'9')+
- ;
-
-STRING
- : ('"' ( EscapeSequence | ~('\\'|'"') )* '"')
- | ('\'' ( EscapeSequence | ~('\\'|'\'') )* '\'')
- ;
-
-fragment
-HexDigit : ('0'..'9'|'a'..'f'|'A'..'F') ;
-
-fragment
-EscapeSequence
- : '\\' ('b'|'t'|'n'|'f'|'r'|'\"'|'\''|'\\')
- | UnicodeEscape
- | OctalEscape
- ;
-
-fragment
-OctalEscape
- : '\\' ('0'..'3') ('0'..'7') ('0'..'7')
- | '\\' ('0'..'7') ('0'..'7')
- | '\\' ('0'..'7')
- ;
-
-fragment
-UnicodeEscape
- : '\\' 'u' HexDigit HexDigit HexDigit HexDigit
- ;
-
-BOOL
- : ('true'|'false')
- ;
-
-RULE : 'rule';
-
-WHEN : 'when';
-
-THEN : 'then';
-
-END : 'end';
-
-ID
- : ('a'..'z'|'A'..'Z'|'_'|'$'|'\u00c0'..'\u00ff')('a'..'z'|'A'..'Z'|'_'|'0'..'9'|'\u00c0'..'\u00ff')*
- ;
-
-
-SH_STYLE_SINGLE_LINE_COMMENT
- : '#' ( options{greedy=false;} : .)* EOL /* ('\r')? '\n' */
- { $channel=HIDDEN; }
- ;
-
-
-C_STYLE_SINGLE_LINE_COMMENT
- : '//' ( options{greedy=false;} : .)* EOL // ('\r')? '\n'
- { $channel=HIDDEN; }
- ;
-
-
-LEFT_PAREN
- : '('
- ;
-
-RIGHT_PAREN
- : ')'
- ;
-
-LEFT_SQUARE
- : '['
- ;
-
-RIGHT_SQUARE
- : ']'
- ;
-
-LEFT_CURLY
- : '{'
- ;
-
-RIGHT_CURLY
- : '}'
- ;
-
-MULTI_LINE_COMMENT
- : '/*' (options{greedy=false;} : .)* '*/'
- { $channel=HIDDEN; }
- ;
-
-MISC :
- '!' | '@' | '$' | '%' | '^' | '&' | '*' | '_' | '-' | '+' | '?' | '|' | ',' | '=' | '/' | '\'' | '\\'
- ;
+grammar DRL;
+options {backtrack=true;}
+
+ at parser::header {
+ package org.drools.lang;
+ import java.util.List;
+ import java.util.ArrayList;
+ import java.util.Iterator;
+ import java.util.Map;
+ import java.util.HashMap;
+ import java.util.StringTokenizer;
+ import org.drools.lang.descr.*;
+ import org.drools.compiler.SwitchingCommonTokenStream;
+}
+
+ at parser::members {
+ private ExpanderResolver expanderResolver;
+ private Expander expander;
+ private boolean expanderDebug = false;
+ private PackageDescr packageDescr;
+ private List errors = new ArrayList();
+ private String source = "unknown";
+ private int lineOffset = 0;
+ private DescrFactory factory = new DescrFactory();
+ private boolean parserDebug = false;
+
+ public void setParserDebug(boolean parserDebug) {
+ this.parserDebug = parserDebug;
+ }
+
+ public void debug(String message) {
+ if ( parserDebug )
+ System.err.println( "drl parser: " + message );
+ }
+
+ public void setSource(String source) {
+ this.source = source;
+ }
+ public DescrFactory getFactory() {
+ return factory;
+ }
+
+ /**
+ * This may be set to enable debuggin of DSLs/expanders.
+ * If set to true, expander stuff will be sent to the Std out.
+ */
+ public void setExpanderDebug(boolean status) {
+ expanderDebug = status;
+ }
+ public String getSource() {
+ return this.source;
+ }
+
+ public PackageDescr getPackageDescr() {
+ return packageDescr;
+ }
+
+ private int offset(int line) {
+ return line + lineOffset;
+ }
+
+ /**
+ * This will set the offset to record when reparsing. Normally is zero of course
+ */
+ public void setLineOffset(int i) {
+ this.lineOffset = i;
+ }
+
+ public void setExpanderResolver(ExpanderResolver expanderResolver) {
+ this.expanderResolver = expanderResolver;
+ }
+
+ public ExpanderResolver getExpanderResolver() {
+ return expanderResolver;
+ }
+
+ /** Expand the LHS */
+ private String runWhenExpander(String text, int line) throws RecognitionException {
+ String expanded = text.trim();
+ if (expanded.startsWith(">")) {
+ expanded = expanded.substring(1); //escape !!
+ } else {
+ try {
+ expanded = expander.expand( "when", text );
+ } catch (Exception e) {
+ this.errors.add(new ExpanderException("Unable to expand: " + text + ". Due to " + e.getMessage(), line));
+ return "";
+ }
+ }
+ if (expanderDebug) {
+ System.out.println("Expanding LHS: " + text + " ----> " + expanded + " --> from line: " + line);
+ }
+ return expanded;
+
+ }
+
+ /** This will apply a list of constraints to an LHS block */
+ private String applyConstraints(List constraints, String block) {
+ //apply the constraints as a comma seperated list inside the previous block
+ //the block will end in something like "foo()" and the constraint patterns will be put in the ()
+ if (constraints == null) {
+ return block;
+ }
+ StringBuffer list = new StringBuffer();
+ for (Iterator iter = constraints.iterator(); iter.hasNext();) {
+ String con = (String) iter.next();
+ list.append("\n\t\t");
+ list.append(con);
+ if (iter.hasNext()) {
+ list.append(",");
+ }
+ }
+ if (block.endsWith("()")) {
+ return block.substring(0, block.length() - 2) + "(" + list.toString() + ")";
+ } else {
+ return block + "(" + list.toString() + ")";
+ }
+ }
+
+ /** Reparse the results of the expansion */
+ private void reparseLhs(String text, AndDescr descrs) throws RecognitionException {
+ CharStream charStream = new ANTLRStringStream( text );
+ DRLLexer lexer = new DRLLexer( charStream );
+ TokenStream tokenStream = new CommonTokenStream( lexer );
+ DRLParser parser = new DRLParser( tokenStream );
+ parser.setLineOffset( descrs.getLine() );
+ parser.normal_lhs_block(descrs);
+
+ if (parser.hasErrors()) {
+ this.errors.addAll(parser.getErrors());
+ }
+ if (expanderDebug) {
+ System.out.println("Reparsing LHS: " + text + " --> successful:" + !parser.hasErrors());
+ }
+
+ }
+
+ /** Expand a line on the RHS */
+ private String runThenExpander(String text, int startLine) {
+ //System.err.println( "expand THEN [" + text + "]" );
+ StringTokenizer lines = new StringTokenizer( text, "\n\r" );
+
+ StringBuffer expanded = new StringBuffer();
+
+ String eol = System.getProperty( "line.separator" );
+
+ while ( lines.hasMoreTokens() ) {
+ startLine++;
+ String line = lines.nextToken();
+ line = line.trim();
+ if ( line.length() > 0 ) {
+ if ( line.startsWith( ">" ) ) {
+ expanded.append( line.substring( 1 ) );
+ expanded.append( eol );
+ } else {
+ try {
+ expanded.append( expander.expand( "then", line ) );
+ expanded.append( eol );
+ } catch (Exception e) {
+ this.errors.add(new ExpanderException("Unable to expand: " + line + ". Due to " + e.getMessage(), startLine));
+ }
+ }
+ }
+ }
+
+ if (expanderDebug) {
+ System.out.println("Expanding RHS: " + text + " ----> " + expanded.toString() + " --> from line starting: " + startLine);
+ }
+
+ return expanded.toString();
+ }
+
+
+
+ private String getString(Token token) {
+ String orig = token.getText();
+ return orig.substring( 1, orig.length() -1 );
+ }
+
+ public void reportError(RecognitionException ex) {
+ // if we've already reported an error and have not matched a token
+ // yet successfully, don't report any errors.
+ if ( errorRecovery ) {
+ return;
+ }
+ errorRecovery = true;
+
+ ex.line = offset(ex.line); //add the offset if there is one
+ errors.add( ex );
+ }
+
+ /** return the raw RecognitionException errors */
+ public List getErrors() {
+ return errors;
+ }
+
+ /** Return a list of pretty strings summarising the errors */
+ public List getErrorMessages() {
+ List messages = new ArrayList();
+ for ( Iterator errorIter = errors.iterator() ; errorIter.hasNext() ; ) {
+ messages.add( createErrorMessage( (RecognitionException) errorIter.next() ) );
+ }
+ return messages;
+ }
+
+ /** return true if any parser errors were accumulated */
+ public boolean hasErrors() {
+ return ! errors.isEmpty();
+ }
+
+ /** This will take a RecognitionException, and create a sensible error message out of it */
+ public String createErrorMessage(RecognitionException e)
+ {
+ StringBuffer message = new StringBuffer();
+ message.append( source + ":"+e.line+":"+e.charPositionInLine+" ");
+ if ( e instanceof MismatchedTokenException ) {
+ MismatchedTokenException mte = (MismatchedTokenException)e;
+ message.append("mismatched token: "+
+ e.token+
+ "; expecting type "+
+ tokenNames[mte.expecting]);
+ }
+ else if ( e instanceof MismatchedTreeNodeException ) {
+ MismatchedTreeNodeException mtne = (MismatchedTreeNodeException)e;
+ message.append("mismatched tree node: "+
+ mtne.foundNode+
+ "; expecting type "+
+ tokenNames[mtne.expecting]);
+ }
+ else if ( e instanceof NoViableAltException ) {
+ NoViableAltException nvae = (NoViableAltException)e;
+ message.append( "Unexpected token '" + e.token.getText() + "'" );
+ /*
+ message.append("decision=<<"+nvae.grammarDecisionDescription+">>"+
+ " state "+nvae.stateNumber+
+ " (decision="+nvae.decisionNumber+
+ ") no viable alt; token="+
+ e.token);
+ */
+ }
+ else if ( e instanceof EarlyExitException ) {
+ EarlyExitException eee = (EarlyExitException)e;
+ message.append("required (...)+ loop (decision="+
+ eee.decisionNumber+
+ ") did not match anything; token="+
+ e.token);
+ }
+ else if ( e instanceof MismatchedSetException ) {
+ MismatchedSetException mse = (MismatchedSetException)e;
+ message.append("mismatched token '"+
+ e.token+
+ "' expecting set "+mse.expecting);
+ }
+ else if ( e instanceof MismatchedNotSetException ) {
+ MismatchedNotSetException mse = (MismatchedNotSetException)e;
+ message.append("mismatched token '"+
+ e.token+
+ "' expecting set "+mse.expecting);
+ }
+ else if ( e instanceof FailedPredicateException ) {
+ FailedPredicateException fpe = (FailedPredicateException)e;
+ message.append("rule "+fpe.ruleName+" failed predicate: {"+
+ fpe.predicateText+"}?");
+ } else if (e instanceof GeneralParseException) {
+ message.append(" " + e.getMessage());
+ }
+ return message.toString();
+ }
+
+ void checkTrailingSemicolon(String text, int line) {
+ if (text.trim().endsWith( ";" ) ) {
+ this.errors.add( new GeneralParseException( "Trailing semi-colon not allowed", offset(line) ) );
+ }
+ }
+
+}
+
+ at lexer::header {
+ package org.drools.lang;
+}
+
+opt_semicolon
+ : ';'?
+ ;
+
+compilation_unit
+ : prolog
+ ( statement )+
+ ;
+
+prolog
+ @init {
+ String packageName = "";
+ }
+ : ( name=package_statement { packageName = name; } )?
+ {
+ this.packageDescr = new PackageDescr( name );
+ }
+ ;
+
+statement
+ :
+ ( import_statement
+ | function_import_statement
+ | global
+ | function
+ | t=template {this.packageDescr.addFactTemplate( t ); }
+ | r=rule {this.packageDescr.addRule( r ); }
+ | q=query {this.packageDescr.addRule( q ); }
+ )
+ ;
+
+package_statement returns [String packageName]
+ @init{
+ packageName = null;
+ }
+ :
+ 'package' name=dotted_name opt_semicolon
+ {
+ packageName = name;
+ }
+ ;
+
+
+import_statement
+ : 'import' name=import_name opt_semicolon
+ {
+ if (packageDescr != null)
+ packageDescr.addImport( name );
+ }
+ ;
+
+function_import_statement
+ : 'import' 'function' name=import_name opt_semicolon
+ {
+ if (packageDescr != null)
+ packageDescr.addFunctionImport( name );
+ }
+ ;
+
+
+import_name returns [String name]
+ @init {
+ name = null;
+ }
+ :
+ id=ID { name=id.getText(); } ( '.' id=ID { name = name + "." + id.getText(); } )* (star='.*' { name = name + star.getText(); })?
+ ;
+
+
+global
+ @init {
+ }
+ :
+ 'global' type=dotted_name id=ID opt_semicolon
+ {
+ packageDescr.addGlobal( id.getText(), type );
+ }
+ ;
+
+
+function
+ @init {
+ FunctionDescr f = null;
+ }
+ :
+ loc='function' (retType=dotted_name)? name=ID
+ {
+ //System.err.println( "function :: " + name.getText() );
+ f = new FunctionDescr( name.getText(), retType );
+ f.setLocation(offset(loc.getLine()), loc.getCharPositionInLine());
+ }
+ '('
+ ( (paramType=dotted_name)? paramName=argument
+ {
+ f.addParameter( paramType, paramName );
+ }
+ ( ',' (paramType=dotted_name)? paramName=argument
+ {
+ f.addParameter( paramType, paramName );
+ }
+ )*
+ )?
+ ')'
+ body=curly_chunk
+ {
+ //strip out '{','}'
+ f.setText( body.substring( 1, body.length()-1 ) );
+
+ packageDescr.addFunction( f );
+ }
+ ;
+
+
+
+query returns [QueryDescr query]
+ @init {
+ query = null;
+ AndDescr lhs = null;
+ }
+ :
+ loc='query' queryName=word
+ {
+ query = new QueryDescr( queryName, null );
+ query.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+ lhs = new AndDescr(); query.setLhs( lhs );
+ lhs.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+ }
+ (
+// { expander != null }? expander_lhs_block[lhs] |
+ normal_lhs_block[lhs]
+ )
+
+ 'end'
+ ;
+
+
+template returns [FactTemplateDescr template]
+ @init {
+ template = null;
+ }
+ :
+ loc='template' templateName=ID opt_semicolon
+ {
+ template = new FactTemplateDescr(templateName.getText());
+ template.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+ }
+ (
+ slot=template_slot
+ {
+ template.addFieldTemplate(slot);
+ }
+ )+
+ 'end' opt_semicolon
+ ;
+
+template_slot returns [FieldTemplateDescr field]
+ @init {
+ field = null;
+ }
+ :
+ //name=ID ':' fieldType=dotted_name ( EOL | ';' )
+ fieldType=dotted_name name=ID opt_semicolon
+ {
+
+
+ field = new FieldTemplateDescr(name.getText(), fieldType);
+ field.setLocation( offset(name.getLine()), name.getCharPositionInLine() );
+ }
+ ;
+
+rule returns [RuleDescr rule]
+ @init {
+ rule = null;
+ String consequence = "";
+ AndDescr lhs = null;
+ }
+ :
+ loc=RULE ruleName=word
+ {
+ debug( "start rule: " + ruleName );
+ rule = new RuleDescr( ruleName, null );
+ rule.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+ }
+ rule_attributes[rule]
+ ( loc=WHEN ':'?
+ {
+ lhs = new AndDescr(); rule.setLhs( lhs );
+ lhs.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+ }
+ (
+// { expander != null }? expander_lhs_block[lhs] |
+ normal_lhs_block[lhs]
+ )
+
+ )?
+ rhs_chunk[rule]
+ ;
+
+
+
+rule_attributes[RuleDescr rule]
+ :
+ ('attributes' ':')?
+ ( ','? a=rule_attribute
+ {
+ rule.addAttribute( a );
+ }
+ )*
+ ;
+
+
+
+rule_attribute returns [AttributeDescr d]
+ @init {
+ d = null;
+ }
+ :
+ a=salience { d = a; }
+ | a=no_loop { d = a; }
+ | a=agenda_group { d = a; }
+ | a=duration { d = a; }
+ | a=activation_group { d = a; }
+ | a=auto_focus { d = a; }
+ | a=date_effective {d = a; }
+ | a=date_expires {d = a; }
+ | a=enabled {d=a;}
+
+ ;
+
+date_effective returns [AttributeDescr d]
+ @init {
+ d = null;
+ }
+ :
+ loc='date-effective' val=STRING
+ {
+ d = new AttributeDescr( "date-effective", getString( val ) );
+ d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+ }
+
+ ;
+
+date_expires returns [AttributeDescr d]
+ @init {
+ d = null;
+ }
+ :
+ loc='date-expires' val=STRING
+ {
+ d = new AttributeDescr( "date-expires", getString( val ) );
+ d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+ }
+
+ ;
+
+
+enabled returns [AttributeDescr d]
+ @init {
+ d = null;
+ }
+ :
+ loc='enabled' t=BOOL opt_semicolon
+ {
+ d = new AttributeDescr( "enabled", t.getText() );
+ d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+ }
+
+
+ ;
+
+
+
+salience returns [AttributeDescr d ]
+ @init {
+ d = null;
+ }
+ :
+ loc='salience' i=INT opt_semicolon
+ {
+ d = new AttributeDescr( "salience", i.getText() );
+ d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+ }
+ ;
+
+no_loop returns [AttributeDescr d]
+ @init {
+ d = null;
+ }
+ :
+ (
+ loc='no-loop' opt_semicolon
+ {
+ d = new AttributeDescr( "no-loop", "true" );
+ d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+ }
+ )
+ |
+ (
+ loc='no-loop' t=BOOL opt_semicolon
+ {
+ d = new AttributeDescr( "no-loop", t.getText() );
+ d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+ }
+
+ )
+
+ ;
+
+auto_focus returns [AttributeDescr d]
+ @init {
+ d = null;
+ }
+ :
+ (
+ loc='auto-focus' opt_semicolon
+ {
+ d = new AttributeDescr( "auto-focus", "true" );
+ d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+ }
+ )
+ |
+ (
+ loc='auto-focus' t=BOOL opt_semicolon
+ {
+ d = new AttributeDescr( "auto-focus", t.getText() );
+ d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+ }
+
+ )
+
+ ;
+
+activation_group returns [AttributeDescr d]
+ @init {
+ d = null;
+ }
+ :
+ loc='activation-group' name=STRING opt_semicolon
+ {
+ d = new AttributeDescr( "activation-group", getString( name ) );
+ d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+ }
+ ;
+
+agenda_group returns [AttributeDescr d]
+ @init {
+ d = null;
+ }
+ :
+ loc='agenda-group' name=STRING opt_semicolon
+ {
+ d = new AttributeDescr( "agenda-group", getString( name ) );
+ d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+ }
+ ;
+
+
+duration returns [AttributeDescr d]
+ @init {
+ d = null;
+ }
+ :
+ loc='duration' i=INT
+ {
+ d = new AttributeDescr( "duration", i.getText() );
+ d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+ }
+ ;
+
+
+normal_lhs_block[AndDescr descrs]
+ :
+ ( d=lhs
+ { descrs.addDescr( d ); }
+ )*
+ ;
+
+/*
+expander_lhs_block[AndDescr descrs]
+ @init {
+ String lhsBlock = null;
+ String eol = System.getProperty( "line.separator" );
+ List constraints = null;
+ }
+ :
+ (options{greedy=false;} :
+ text=paren_chunk (options{greedy=true;} : loc=EOL)
+ {
+ //only expand non null
+ if (text != null) {
+ if (text.trim().startsWith("-")) {
+ if (constraints == null) {
+ constraints = new ArrayList();
+ }
+ constraints.add(runWhenExpander( text, offset(loc.getLine())));
+ } else {
+ if (constraints != null) {
+ lhsBlock = applyConstraints(constraints, lhsBlock);
+ constraints = null;
+ }
+
+
+ if (lhsBlock == null) {
+ lhsBlock = runWhenExpander( text, offset(loc.getLine()));
+ } else {
+ lhsBlock = lhsBlock + eol + runWhenExpander( text, offset(loc.getLine()));
+ }
+ }
+ text = null;
+ }
+ }
+
+
+ )*
+
+ {
+ //flush out any constraints left handing before the RHS
+ lhsBlock = applyConstraints(constraints, lhsBlock);
+ if (lhsBlock != null) {
+ reparseLhs(lhsBlock, descrs);
+ }
+ }
+
+ ;
+*/
+
+lhs returns [BaseDescr d]
+ @init {
+ d=null;
+ }
+ : l=lhs_or { d = l; }
+ ;
+
+
+lhs_column returns [BaseDescr d]
+ @init {
+ d=null;
+ }
+ : f=fact_binding { d = f; }
+ | f=fact { d = f; }
+ ;
+
+from_statement returns [FromDescr d]
+ @init {
+ d=factory.createFrom();
+ }
+ :
+ 'from' ds=from_source
+ {
+ d.setDataSource(ds);
+
+ }
+
+
+
+ ;
+
+from_source returns [DeclarativeInvokerDescr ds]
+ @init {
+ ds = null;
+ AccessorDescr ad = null;
+ }
+ :
+ (( functionName=ID args=paren_chunk
+ {
+ ad = new AccessorDescr();
+ ad.setLocation( offset(functionName.getLine()), functionName.getCharPositionInLine() );
+ ds = ad;
+ FunctionCallDescr fc = new FunctionCallDescr(functionName.getText());
+ fc.setLocation( offset(functionName.getLine()), functionName.getCharPositionInLine() );
+ fc.setArguments(args);
+ ad.addInvoker(fc);
+ }
+ )
+ |
+ ( var=ID
+ {
+ ad = new AccessorDescr(var.getText());
+ ad.setLocation( offset(var.getLine()), var.getCharPositionInLine() );
+ ds = ad;
+ }
+ ))
+
+ expression_chain[ad]?
+ ;
+
+expression_chain[AccessorDescr as]
+ @init {
+ FieldAccessDescr fa = null;
+ MethodAccessDescr ma = null;
+ }
+ :
+ ( '.' field=ID
+ {
+ fa = new FieldAccessDescr(field.getText());
+ fa.setLocation( offset(field.getLine()), field.getCharPositionInLine() );
+ }
+ (
+ ( LEFT_SQUARE ) => sqarg=square_chunk
+ {
+ fa.setArgument( sqarg );
+ }
+ |
+ ( LEFT_PAREN ) => paarg=paren_chunk
+ {
+ ma = new MethodAccessDescr( field.getText(), paarg );
+ ma.setLocation( offset(field.getLine()), field.getCharPositionInLine() );
+ }
+ )?
+ {
+ if( ma != null ) {
+ as.addInvoker( ma );
+ } else {
+ as.addInvoker( fa );
+ }
+ }
+ expression_chain[as]?
+ )
+ ;
+
+accumulate_statement returns [AccumulateDescr d]
+ @init {
+ d = factory.createAccumulate();
+ }
+ :
+ loc='from' 'accumulate'
+ {
+ d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+ }
+ '(' column=lhs_column ','
+ {
+ d.setSourceColumn( (ColumnDescr)column );
+ }
+ 'init' text=paren_chunk ','
+ {
+ d.setInitCode( text.substring(1, text.length()-1) );
+ }
+ 'action' text=paren_chunk ','
+ {
+ d.setActionCode( text.substring(1, text.length()-1) );
+ }
+ 'result' text=paren_chunk ')'
+ {
+ d.setResultCode( text.substring(1, text.length()-1) );
+ }
+ ;
+
+collect_statement returns [CollectDescr d]
+ @init {
+ d = factory.createCollect();
+ }
+ :
+ loc='from' 'collect'
+ {
+ d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+ }
+ '(' column=lhs_column ')'
+ {
+ d.setSourceColumn( (ColumnDescr)column );
+ }
+ ;
+/*
+argument_list returns [ArrayList args]
+ @init {
+ args = new ArrayList();
+ }
+ :
+ (param=argument_value {
+ if (param != null) {
+ args.add(param);
+ }
+ }
+
+ (
+ ',' param=argument_value {
+ if (param != null) {
+ args.add(param);
+ }
+ }
+ )*
+ )?
+ ;
+
+argument_value returns [ArgumentValueDescr value]
+ @init {
+ value = null;
+ String text = null;
+ }
+ : ( t=STRING { text = getString( t ); value=new ArgumentValueDescr(ArgumentValueDescr.STRING, text);}
+ | t=INT { text = t.getText(); value=new ArgumentValueDescr(ArgumentValueDescr.INTEGRAL, text);}
+ | t=FLOAT { text = t.getText(); value=new ArgumentValueDescr(ArgumentValueDescr.DECIMAL, text); }
+ | t=BOOL { text = t.getText(); value=new ArgumentValueDescr(ArgumentValueDescr.BOOLEAN, text); }
+ | t=ID { text = t.getText(); value=new ArgumentValueDescr(ArgumentValueDescr.VARIABLE, text);}
+ | t='null' { text = "null"; value=new ArgumentValueDescr(ArgumentValueDescr.NULL, text);}
+ | m=inline_map { value=new ArgumentValueDescr(ArgumentValueDescr.MAP, m.getKeyValuePairs() ); }
+ | a=inline_array { value = new ArgumentValueDescr(ArgumentValueDescr.LIST, a ); }
+ )
+ ;
+
+inline_map returns [ArgumentValueDescr.MapDescr mapDescr]
+ @init {
+ mapDescr = new ArgumentValueDescr.MapDescr();
+ }
+ : '{'
+ ( key=argument_value '=>' value=argument_value {
+ if ( key != null ) {
+ mapDescr.add( new ArgumentValueDescr.KeyValuePairDescr( key, value ) );
+ }
+ }
+ )
+
+ ( (EOL)? ',' (EOL)? key=argument_value '=>' value=argument_value {
+ if ( key != null ) {
+ mapDescr.add( new ArgumentValueDescr.KeyValuePairDescr( key, value ) );
+ }
+ }
+ )*
+ '}'
+ ;
+
+inline_array returns [List list]
+ @init {
+ list = new ArrayList();
+ }
+ :
+ '[' arg=argument_value { list.add(arg); }
+
+ ( EOL? ',' EOL? arg=argument_value { list.add(arg); } )*
+ ']'
+
+
+ ;
+*/
+fact_binding returns [BaseDescr d]
+ @init {
+ d=null;
+ boolean multi=false;
+ }
+ :
+ id=ID
+
+ ':' fe=fact_expression[id.getText()]
+ {
+ d=fe;
+ }
+ ;
+
+ fact_expression[String id] returns [BaseDescr pd]
+ @init {
+ pd = null;
+ boolean multi = false;
+ }
+ : '(' fe=fact_expression_in_paren[id] ')' { pd=fe; }
+ | f=fact
+ {
+ ((ColumnDescr)f).setIdentifier( id );
+ pd = f;
+ }
+ ;
+
+// in parenthesis alternative is allowed
+ fact_expression_in_paren[String id] returns [BaseDescr pd]
+ @init {
+ pd = null;
+ boolean multi = false;
+ }
+ : '(' fe=fact_expression_in_paren[id]')' { pd=fe; }
+ | f=fact
+ {
+ ((ColumnDescr)f).setIdentifier( id );
+ pd = f;
+ }
+ ( ('or'|'||')
+ { if ( ! multi ) {
+ BaseDescr first = pd;
+ pd = new OrDescr();
+ ((OrDescr)pd).addDescr( first );
+ multi=true;
+ }
+ }
+ f=fact
+ {
+ ((ColumnDescr)f).setIdentifier( id );
+ ((OrDescr)pd).addDescr( f );
+ }
+ )*
+ ;
+
+fact returns [BaseDescr d]
+ @init {
+ d=null;
+ }
+ : id=dotted_name
+ {
+ d = new ColumnDescr( id );
+ }
+ loc='(' {
+ d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+ }
+ ( c=constraints
+ {
+ for ( Iterator cIter = c.iterator() ; cIter.hasNext() ; ) {
+ ((ColumnDescr)d).addDescr( (BaseDescr) cIter.next() );
+ }
+ }
+ )?
+ endLoc=')'
+ {
+ d.setEndLocation( offset(endLoc.getLine()), endLoc.getCharPositionInLine() );
+ }
+ ;
+
+
+constraints returns [List constraints]
+ @init {
+ constraints = new ArrayList();
+ }
+ : (constraint[constraints]|predicate[constraints])
+ ( ',' (constraint[constraints]|predicate[constraints]))*
+ ;
+
+constraint[List constraints]
+ @init {
+ BaseDescr d = null;
+ FieldConstraintDescr fc = null;
+ }
+ :
+ ( fb=ID ':' )?
+ f=ID
+ {
+ if ( fb != null ) {
+ d = new FieldBindingDescr( f.getText(), fb.getText() );
+ d.setLocation( offset(f.getLine()), f.getCharPositionInLine() );
+ constraints.add( d );
+ }
+ fc = new FieldConstraintDescr(f.getText());
+ fc.setLocation( offset(f.getLine()), f.getCharPositionInLine() );
+ }
+ (
+ rd=constraint_expression
+ {
+ fc.addRestriction(rd);
+ constraints.add(fc);
+ }
+ (
+ con=('&'|'|')
+ {
+ if (con.getText().equals("&") ) {
+ fc.addRestriction(new RestrictionConnectiveDescr(RestrictionConnectiveDescr.AND));
+ } else {
+ fc.addRestriction(new RestrictionConnectiveDescr(RestrictionConnectiveDescr.OR));
+ }
+ }
+ rd=constraint_expression
+ {
+ fc.addRestriction(rd);
+ }
+ )*
+ )?
+ ;
+
+constraint_expression returns [RestrictionDescr rd]
+ :
+ op=( '=='
+ | '>'
+ | '>='
+ | '<'
+ | '<='
+ | '!='
+ | 'contains'
+ | 'matches'
+ | 'excludes'
+ )
+ ( bvc=ID
+ {
+ rd = new VariableRestrictionDescr(op.getText(), bvc.getText());
+ }
+ |
+ lc=enum_constraint
+ {
+ rd = new LiteralRestrictionDescr(op.getText(), lc, true);
+ }
+ |
+ lc=literal_constraint
+ {
+ rd = new LiteralRestrictionDescr(op.getText(), lc);
+ }
+ | rvc=retval_constraint
+ {
+ rd = new ReturnValueRestrictionDescr(op.getText(), rvc);
+ }
+ )
+ ;
+
+literal_constraint returns [String text]
+ @init {
+ text = null;
+ }
+ : ( t=STRING { text = getString( t ); } //t.getText(); text=text.substring( 1, text.length() - 1 ); }
+ | t=INT { text = t.getText(); }
+ | t=FLOAT { text = t.getText(); }
+ | t=BOOL { text = t.getText(); }
+ | t='null' { text = null; }
+ )
+ ;
+
+enum_constraint returns [String text]
+ @init {
+ text = null;
+ }
+ : (cls=ID '.' en=ID) { text = cls.getText() + "." + en.getText(); }
+ ;
+
+
+predicate[List constraints]
+ :
+ decl=ID ':' field=ID '->' text=paren_chunk
+ {
+ String body = text.substring(1, text.length()-1);
+ PredicateDescr d = new PredicateDescr(field.getText(), decl.getText(), body );
+ constraints.add( d );
+ }
+ ;
+
+paren_chunk returns [String text]
+ @init {
+ StringBuffer buf = null;
+ Integer channel = null;
+ }
+ :
+ {
+ channel = ((SwitchingCommonTokenStream)input).getTokenTypeChannel( WS );
+ ((SwitchingCommonTokenStream)input).setTokenTypeChannel( WS, Token.DEFAULT_CHANNEL );
+ buf = new StringBuffer();
+ }
+ loc=LEFT_PAREN
+ {
+ buf.append( loc.getText());
+
+ }
+ (
+ ~(LEFT_PAREN|RIGHT_PAREN)
+ {
+ buf.append( input.LT(-1).getText() );
+ }
+ |
+ chunk=paren_chunk
+ {
+ buf.append( chunk );
+ }
+ )*
+ {
+ if( channel != null ) {
+ ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, channel.intValue());
+ } else {
+ ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, Token.HIDDEN_CHANNEL);
+ }
+ }
+ loc=RIGHT_PAREN
+ {
+ buf.append( loc.getText() );
+ text = buf.toString();
+ }
+ ;
+
+curly_chunk returns [String text]
+ @init {
+ StringBuffer buf = null;
+ Integer channel = null;
+ }
+ :
+ loc=LEFT_CURLY
+ {
+ channel = ((SwitchingCommonTokenStream)input).getTokenTypeChannel( WS );
+ ((SwitchingCommonTokenStream)input).setTokenTypeChannel( WS, Token.DEFAULT_CHANNEL );
+ buf = new StringBuffer();
+
+ buf.append( loc.getText() );
+ }
+ (
+ ~(LEFT_CURLY|RIGHT_CURLY)
+ {
+ buf.append( input.LT(-1).getText() );
+ }
+ |
+ chunk=curly_chunk
+ {
+ buf.append( chunk );
+ }
+ )*
+ {
+ if( channel != null ) {
+ ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, channel.intValue());
+ } else {
+ ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, Token.HIDDEN_CHANNEL);
+ }
+ }
+ loc=RIGHT_CURLY
+ {
+ buf.append( loc.getText() );
+ text = buf.toString();
+ }
+ ;
+
+square_chunk returns [String text]
+ @init {
+ StringBuffer buf = null;
+ Integer channel = null;
+ }
+ :
+ {
+ channel = ((SwitchingCommonTokenStream)input).getTokenTypeChannel( WS );
+ ((SwitchingCommonTokenStream)input).setTokenTypeChannel( WS, Token.DEFAULT_CHANNEL );
+ buf = new StringBuffer();
+ }
+ loc=LEFT_SQUARE
+ {
+ buf.append( loc.getText());
+
+ }
+ (
+ ~(LEFT_SQUARE|RIGHT_SQUARE)
+ {
+ buf.append( input.LT(-1).getText() );
+ }
+ |
+ chunk=square_chunk
+ {
+ buf.append( chunk );
+ }
+ )*
+ {
+ if( channel != null ) {
+ ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, channel.intValue());
+ } else {
+ ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, Token.HIDDEN_CHANNEL);
+ }
+ }
+ loc=RIGHT_SQUARE
+ {
+ buf.append( loc.getText() );
+ text = buf.toString();
+ }
+ ;
+
+retval_constraint returns [String text]
+ @init {
+ text = null;
+ }
+ :
+ c=paren_chunk { text = c.substring(1, c.length()-1); }
+ ;
+
+
+
+
+
+
+lhs_or returns [BaseDescr d]
+ @init{
+ d = null;
+ OrDescr or = null;
+ }
+ :
+ left=lhs_and {d = left; }
+ ( ('or'|'||')
+ right=lhs_and
+ {
+ if ( or == null ) {
+ or = new OrDescr();
+ or.addDescr( left );
+ d = or;
+ }
+
+ or.addDescr( right );
+ }
+ )*
+ ;
+
+lhs_and returns [BaseDescr d]
+ @init{
+ d = null;
+ AndDescr and = null;
+ }
+ :
+ left=lhs_unary { d = left; }
+ ( ('and'|'&&')
+ right=lhs_unary
+ {
+ if ( and == null ) {
+ and = new AndDescr();
+ and.addDescr( left );
+ d = and;
+ }
+
+ and.addDescr( right );
+ }
+ )*
+ ;
+
+lhs_unary returns [BaseDescr d]
+ @init {
+ d = null;
+ }
+ : ( u=lhs_exist
+ | u=lhs_not
+ | u=lhs_eval
+ | u=lhs_column (
+ (fm=from_statement {fm.setColumn((ColumnDescr) u); u=fm;})
+ |(ac=accumulate_statement {ac.setResultColumn((ColumnDescr) u); u=ac;})
+ |(cs=collect_statement {cs.setResultColumn((ColumnDescr) u); u=cs;})
+ )?
+ | u=lhs_forall
+ | '(' u=lhs ')'
+ ) { d = u; }
+ opt_semicolon
+ ;
+
+lhs_exist returns [BaseDescr d]
+ @init {
+ d = null;
+ }
+ : loc='exists' ('(' column=lhs_or ')' | column=lhs_column)
+ {
+ d = new ExistsDescr( (ColumnDescr) column );
+ d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+ }
+ ;
+
+lhs_not returns [NotDescr d]
+ @init {
+ d = null;
+ }
+ : loc='not' ('(' column=lhs_or ')' | column=lhs_column)
+ {
+ d = new NotDescr( column );
+ d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+ }
+ ;
+
+lhs_eval returns [BaseDescr d]
+ @init {
+ d = null;
+ }
+ : loc='eval' c=paren_chunk
+ {
+ String body = c.substring(1, c.length()-1);
+ checkTrailingSemicolon( body, offset(loc.getLine()) );
+ d = new EvalDescr( body );
+ }
+ ;
+
+lhs_forall returns [ForallDescr d]
+ @init {
+ d = factory.createForall();
+ }
+ : loc='forall' '(' base=lhs_column
+ {
+ // adding the base column
+ d.addDescr( base );
+ d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+ }
+ ( (',')? column=lhs_column
+ {
+ // adding additional columns
+ d.addDescr( column );
+ }
+ )+
+ ')'
+ ;
+
+dotted_name returns [String name]
+ @init {
+ name = null;
+ }
+ :
+ id=ID { name=id.getText(); } ( '.' id=ID { name = name + "." + id.getText(); } )* ( '[' ']' { name = name + "[]";})*
+ ;
+
+argument returns [String name]
+ @init {
+ name = null;
+ }
+ :
+ id=ID { name=id.getText(); } ( '[' ']' { name = name + "[]";})*
+ ;
+
+rhs_chunk[RuleDescr rule]
+ @init {
+ StringBuffer buf = null;
+ Integer channel = null;
+ }
+ :
+ {
+ channel = ((SwitchingCommonTokenStream)input).getTokenTypeChannel( WS );
+ ((SwitchingCommonTokenStream)input).setTokenTypeChannel( WS, Token.DEFAULT_CHANNEL );
+ buf = new StringBuffer();
+ }
+ start='then'
+ (
+ ~END
+ {
+ buf.append( input.LT(-1).getText() );
+ }
+ )*
+ {
+ if( channel != null ) {
+ ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, channel.intValue());
+ } else {
+ ((SwitchingCommonTokenStream)input).setTokenTypeChannel(WS, Token.HIDDEN_CHANNEL);
+ }
+ }
+ END
+ {
+ // ignoring first line in the consequence
+ int index = 0;
+ while( (index < buf.length() ) && Character.isWhitespace( buf.charAt( index ) ) &&
+ (buf.charAt( index ) != 10 ) && (buf.charAt( index ) != 13 ))
+ index++;
+ if( (index < buf.length() ) && ( buf.charAt( index ) == '\r' ) )
+ index++;
+ if( (index < buf.length() ) && ( buf.charAt( index ) == '\n' ) )
+ index++;
+
+ rule.setConsequence( buf.substring( index ) );
+ rule.setConsequenceLocation(offset(start.getLine()), start.getCharPositionInLine());
+ }
+ ;
+
+
+word returns [String word]
+ @init{
+ word = null;
+ }
+ : id=ID { word=id.getText(); }
+ | 'import' { word="import"; }
+ | 'use' { word="use"; }
+ | RULE { word="rule"; }
+ | 'query' { word="query"; }
+ | 'salience' { word="salience"; }
+ | 'no-loop' { word="no-loop"; }
+ | WHEN { word="when"; }
+ | THEN { word="then"; }
+ | END { word="end"; }
+ | str=STRING { word=getString(str);} //str.getText(); word=word.substring( 1, word.length()-1 ); }
+ ;
+
+//RHS :'then' (options{greedy=false;} : .)* ('\n'|'\r') (' '|'\t'|'\f')* 'end'
+// ;
+
+WS : ( ' '
+ | '\t'
+ | '\f'
+ | EOL
+ )
+ { $channel=HIDDEN; }
+ ;
+
+fragment
+EOL :
+ ( ( '\r\n' )=> '\r\n' // Evil DOS
+ | '\r' // Macintosh
+ | '\n' // Unix (the right way)
+ )
+ ;
+
+INT
+ : ('-')?('0'..'9')+
+ ;
+
+FLOAT
+ : ('-')?('0'..'9')+ '.' ('0'..'9')+
+ ;
+
+STRING
+ : ('"' ( EscapeSequence | ~('\\'|'"') )* '"')
+ | ('\'' ( EscapeSequence | ~('\\'|'\'') )* '\'')
+ ;
+
+fragment
+HexDigit : ('0'..'9'|'a'..'f'|'A'..'F') ;
+
+fragment
+EscapeSequence
+ : '\\' ('b'|'t'|'n'|'f'|'r'|'\"'|'\''|'\\')
+ | UnicodeEscape
+ | OctalEscape
+ ;
+
+fragment
+OctalEscape
+ : '\\' ('0'..'3') ('0'..'7') ('0'..'7')
+ | '\\' ('0'..'7') ('0'..'7')
+ | '\\' ('0'..'7')
+ ;
+
+fragment
+UnicodeEscape
+ : '\\' 'u' HexDigit HexDigit HexDigit HexDigit
+ ;
+
+BOOL
+ : ('true'|'false')
+ ;
+
+RULE : 'rule';
+
+WHEN : 'when';
+
+THEN : 'then';
+
+END : 'end';
+
+ID
+ : ('a'..'z'|'A'..'Z'|'_'|'$'|'\u00c0'..'\u00ff')('a'..'z'|'A'..'Z'|'_'|'0'..'9'|'\u00c0'..'\u00ff')*
+ ;
+
+
+SH_STYLE_SINGLE_LINE_COMMENT
+ : '#' ( options{greedy=false;} : .)* EOL /* ('\r')? '\n' */
+ { $channel=HIDDEN; }
+ ;
+
+
+C_STYLE_SINGLE_LINE_COMMENT
+ : '//' ( options{greedy=false;} : .)* EOL // ('\r')? '\n'
+ { $channel=HIDDEN; }
+ ;
+
+
+LEFT_PAREN
+ : '('
+ ;
+
+RIGHT_PAREN
+ : ')'
+ ;
+
+LEFT_SQUARE
+ : '['
+ ;
+
+RIGHT_SQUARE
+ : ']'
+ ;
+
+LEFT_CURLY
+ : '{'
+ ;
+
+RIGHT_CURLY
+ : '}'
+ ;
+
+MULTI_LINE_COMMENT
+ : '/*' (options{greedy=false;} : .)* '*/'
+ { $channel=HIDDEN; }
+ ;
+
+MISC :
+ '!' | '@' | '$' | '%' | '^' | '&' | '*' | '_' | '-' | '+' | '?' | '|' | ',' | '=' | '/' | '\'' | '\\'
+ ;
Modified: labs/jbossrules/trunk/drools-compiler/src/main/resources/org/drools/semantics/java/javaInvokers.stg
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/resources/org/drools/semantics/java/javaInvokers.stg 2007-01-16 17:19:41 UTC (rev 8873)
+++ labs/jbossrules/trunk/drools-compiler/src/main/resources/org/drools/semantics/java/javaInvokers.stg 2007-01-16 20:15:09 UTC (rev 8874)
@@ -199,7 +199,7 @@
org.drools.rule.Rule rule = knowledgeHelper.getRule();
org.drools.rule.Declaration[] declarations = rule.getDeclarations();
- <declarations, indexes:{ declr, index| org.drools.common.InternalFactHandle <declr.identifier>__Handle__ = ( org.drools.common.InternalFactHandle ) tuple.get( declarations[<index>] );<\n>}>
+ <declarations, indexes:{ declr, index| org.drools.common.InternalFactHandle <declr.identifier>__Handle__ = ( org.drools.common.InternalFactHandle ) tuple.get( knowledgeHelper.getDeclaration( declarations[<index>].getIdentifier() ) );<\n>}>
<declarationTypes, declarations, indexes :{ type, declr, index| <type> <declr.identifier> = ( <type> ) declarations[<index>].<declr.extractor.nativeReadMethod.name>( <declr.identifier>__Handle__.getObject() );<\n>}>
Modified: labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/compiler/PackageBuilderTest.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/compiler/PackageBuilderTest.java 2007-01-16 17:19:41 UTC (rev 8873)
+++ labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/compiler/PackageBuilderTest.java 2007-01-16 20:15:09 UTC (rev 8874)
@@ -160,6 +160,7 @@
final Tuple tuple = new MockTuple( new HashMap() );
final Activation activation = new MockActivation( rule,
+ rule.getLhs(),
tuple );
KnowledgeHelper knowledgeHelper = new org.drools.base.DefaultKnowledgeHelper( activation,
@@ -237,6 +238,7 @@
final Tuple tuple = new MockTuple( new HashMap() );
final Activation activation = new MockActivation( newRule,
+ newRule.getLhs(),
tuple );
final KnowledgeHelper knowledgeHelper = new org.drools.base.DefaultKnowledgeHelper( activation,
@@ -1095,9 +1097,11 @@
implements
Activation {
private Rule rule;
+ private GroupElement subrule;
private Tuple tuple;
public MockActivation(final Rule rule,
+ final GroupElement subrule,
final Tuple tuple) {
this.rule = rule;
this.tuple = tuple;
@@ -1145,6 +1149,10 @@
// TODO Auto-generated method stub
}
+
+ public GroupElement getSubRule() {
+ return this.subrule;
+ }
}
class MockTuple
@@ -1180,5 +1188,10 @@
return 0;
}
+ public int size() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
}
}
\ No newline at end of file
Modified: labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/IntegrationCases.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/IntegrationCases.java 2007-01-16 17:19:41 UTC (rev 8873)
+++ labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/IntegrationCases.java 2007-01-16 20:15:09 UTC (rev 8874)
@@ -188,8 +188,8 @@
Exception {
final DrlParser parser = new DrlParser();
final PackageDescr packageDescr = parser.parse( reader );
- if (parser.hasErrors()) {
- Assert.fail("Error messages in parser, need to sort this our (or else collect error messages)");
+ if ( parser.hasErrors() ) {
+ Assert.fail( "Error messages in parser, need to sort this our (or else collect error messages)" );
}
// pre build the package
final PackageBuilder builder = new PackageBuilder();
@@ -250,7 +250,7 @@
list.get( 0 ) );
}
-
+
public void testDateEffective() throws Exception {
// read in the source
final Reader reader = new InputStreamReader( getClass().getResourceAsStream( "test_EffectiveDate.drl" ) );
@@ -3123,22 +3123,23 @@
assertEquals( 1,
list.size() );
}
-
+
public void testInsurancePricingExample() throws Exception {
final Reader reader = new InputStreamReader( getClass().getResourceAsStream( "insurance_pricing_example.drl" ) );
final RuleBase ruleBase = loadRuleBase( reader );
final WorkingMemory wm = ruleBase.newWorkingMemory();
-
+
//now create some test data
Driver driver = new Driver();
Policy policy = new Policy();
-
- wm.assertObject(driver);
- wm.assertObject(policy);
-
+
+ wm.assertObject( driver );
+ wm.assertObject( policy );
+
wm.fireAllRules();
-
- assertEquals(120, policy.getBasePrice());
+
+ assertEquals( 120,
+ policy.getBasePrice() );
}
public void testLLR() throws Exception {
@@ -3653,7 +3654,7 @@
}
}
-
+
public void testMissingImports() {
try {
final PackageBuilder builder = new PackageBuilder();
@@ -3662,16 +3663,16 @@
final RuleBase ruleBase = getRuleBase();
ruleBase.addPackage( pkg );
-
- Assert.fail("Should have thrown an InvalidRulePackage");
+
+ Assert.fail( "Should have thrown an InvalidRulePackage" );
} catch ( InvalidRulePackage e ) {
// everything fine
} catch ( Exception e ) {
e.printStackTrace();
- Assert.fail("Should have thrown an InvalidRulePackage Exception instead of "+e.getMessage());
+ Assert.fail( "Should have thrown an InvalidRulePackage Exception instead of " + e.getMessage() );
}
}
-
+
public void testNestedConditionalElements() throws Exception {
final PackageBuilder builder = new PackageBuilder();
@@ -3686,9 +3687,9 @@
workingMemory.setGlobal( "results",
list );
- State state = new State("SP");
+ State state = new State( "SP" );
workingMemory.assertObject( state );
-
+
Person bob = new Person( "Bob" );
bob.setStatus( state.getState() );
bob.setLikes( "stilton" );
@@ -3699,11 +3700,103 @@
assertEquals( 0,
list.size() );
- workingMemory.assertObject( new Cheese( bob.getLikes(), 10 ) );
+ workingMemory.assertObject( new Cheese( bob.getLikes(),
+ 10 ) );
workingMemory.fireAllRules();
assertEquals( 1,
list.size() );
}
+ public void testForall() throws Exception {
+
+ final PackageBuilder builder = new PackageBuilder();
+ builder.addPackageFromDrl( new InputStreamReader( getClass().getResourceAsStream( "test_Forall.drl" ) ) );
+ final Package pkg = builder.getPackage();
+
+ final RuleBase ruleBase = getRuleBase();
+ ruleBase.addPackage( pkg );
+ final WorkingMemory workingMemory = ruleBase.newWorkingMemory();
+
+ final List list = new ArrayList();
+ workingMemory.setGlobal( "results",
+ list );
+
+ State state = new State( "SP" );
+ workingMemory.assertObject( state );
+
+ Person bob = new Person( "Bob" );
+ bob.setStatus( state.getState() );
+ bob.setLikes( "stilton" );
+ workingMemory.assertObject( bob );
+
+ workingMemory.fireAllRules();
+
+ assertEquals( 0,
+ list.size() );
+
+ workingMemory.assertObject( new Cheese( bob.getLikes(),
+ 10 ) );
+ workingMemory.fireAllRules();
+
+ assertEquals( 1,
+ list.size() );
+ }
+
+ public void testDeclarationUsage() throws Exception {
+
+ try {
+ final PackageBuilder builder = new PackageBuilder();
+ builder.addPackageFromDrl( new InputStreamReader( getClass().getResourceAsStream( "test_DeclarationUsage.drl" ) ) );
+ final Package pkg = builder.getPackage();
+
+ final RuleBase ruleBase = getRuleBase();
+ ruleBase.addPackage( pkg );
+
+ fail( "Should have trown an exception" );
+ } catch ( InvalidRulePackage e ) {
+ // success ... correct exception thrown
+ } catch ( Exception e ) {
+ e.printStackTrace();
+ fail( "Wrong exception raised: " + e.getMessage() );
+ }
+ }
+
+ public void testUnbalancedTrees() throws Exception {
+
+ try {
+ final PackageBuilder builder = new PackageBuilder();
+ builder.addPackageFromDrl( new InputStreamReader( getClass().getResourceAsStream( "test_UnbalancedTrees.drl" ) ) );
+ final Package pkg = builder.getPackage();
+
+ final RuleBase ruleBase = getRuleBase();
+ ruleBase.addPackage( pkg );
+
+ WorkingMemory wm = ruleBase.newWorkingMemory();
+
+ wm.assertObject( new Cheese( "a",
+ 10 ) );
+ wm.assertObject( new Cheese( "b",
+ 10 ) );
+ wm.assertObject( new Cheese( "c",
+ 10 ) );
+ wm.assertObject( new Cheese( "d",
+ 10 ) );
+ Cheese e = new Cheese( "e",
+ 10 );
+ wm.assertObject( e );
+
+ wm.fireAllRules();
+
+ Assert.assertEquals( "Rule should have fired twice, seting the price to 30",
+ 30,
+ e.getPrice() );
+ // success
+
+ } catch ( RuntimeException e ) {
+ e.printStackTrace();
+ fail( "Should not throw any exception" );
+ }
+ }
+
}
Modified: labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/RuleParserTest.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/RuleParserTest.java 2007-01-16 17:19:41 UTC (rev 8873)
+++ labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/RuleParserTest.java 2007-01-16 20:15:09 UTC (rev 8874)
@@ -46,6 +46,7 @@
import org.drools.lang.descr.FieldBindingDescr;
import org.drools.lang.descr.FieldConstraintDescr;
import org.drools.lang.descr.FieldTemplateDescr;
+import org.drools.lang.descr.ForallDescr;
import org.drools.lang.descr.FromDescr;
import org.drools.lang.descr.FunctionDescr;
import org.drools.lang.descr.LiteralRestrictionDescr;
@@ -2440,6 +2441,32 @@
assertEquals( cheese3.getObjectType(), "Cheese" );
}
+ public void testForall() throws Exception {
+ final DRLParser parser = parseResource( "forall.drl" );
+ parser.compilation_unit();
+
+ assertFalse( parser.getErrorMessages().toString(), parser.hasErrors() );
+
+ final PackageDescr pack = parser.getPackageDescr();
+ assertEquals( 1,
+ pack.getRules().size() );
+ final RuleDescr rule = (RuleDescr) pack.getRules().get( 0 );
+ assertEquals( 1,
+ rule.getLhs().getDescrs().size() );
+
+ final ForallDescr forall = (ForallDescr) rule.getLhs().getDescrs().get( 0 );
+
+ assertEquals(2, forall.getDescrs().size());
+ final ColumnDescr col = forall.getBaseColumn();
+ assertEquals( "Person",
+ col.getObjectType() );
+ final List remaining = forall.getRemainingColumns();
+ assertEquals(1, remaining.size());
+ ColumnDescr cheese = (ColumnDescr) remaining.get( 0 );
+ assertEquals( "Cheese",
+ cheese.getObjectType());
+ }
+
private DRLParser parse(final String text) throws Exception {
this.parser = newParser( newTokenStream( newLexer( newCharStream( text ) ) ) );
return this.parser;
Added: labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_DeclarationUsage.drl
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_DeclarationUsage.drl 2007-01-16 17:19:41 UTC (rev 8873)
+++ labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_DeclarationUsage.drl 2007-01-16 20:15:09 UTC (rev 8874)
@@ -0,0 +1,8 @@
+package org.drools;
+
+rule "test declaration"
+when
+ Cheese( type == $likes )
+ Person( $likes : likes );
+then
+end
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_DeclarationUsage.drl
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:eol-style
+ native
Added: labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_Forall.drl
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_Forall.drl 2007-01-16 17:19:41 UTC (rev 8873)
+++ labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_Forall.drl 2007-01-16 20:15:09 UTC (rev 8874)
@@ -0,0 +1,12 @@
+package org.drools;
+
+global java.util.List results
+
+rule "test nested CEs"
+ when
+ forall( State( $state : state ),
+ Person( status == $state, $likes : likes ),
+ Cheese( type == $likes ) )
+ then
+ results.add("OK");
+end
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_Forall.drl
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:eol-style
+ native
Added: labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_UnbalancedTrees.drl
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_UnbalancedTrees.drl 2007-01-16 17:19:41 UTC (rev 8873)
+++ labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_UnbalancedTrees.drl 2007-01-16 20:15:09 UTC (rev 8874)
@@ -0,0 +1,13 @@
+package org.drools;
+
+rule "test unbalanced tree"
+when
+ a: Cheese( type == "a" )
+ ( Cheese( type == "b" ) or
+ ( Cheese( type == "c" ) and Cheese( type == "d" ) )
+ )
+ e : Cheese( type == "e" )
+then
+ // this shall not throw any exception
+ e.setPrice( e.getPrice() + 10 );
+end
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/integrationtests/test_UnbalancedTrees.drl
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:eol-style
+ native
Added: labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/lang/forall.drl
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/lang/forall.drl 2007-01-16 17:19:41 UTC (rev 8873)
+++ labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/lang/forall.drl 2007-01-16 20:15:09 UTC (rev 8874)
@@ -0,0 +1,6 @@
+rule "ForallParserTest"
+when
+ forall( Person( age > 21, $likes : likes ),
+ Cheese( type == $likes ) );
+then
+end
\ No newline at end of file
Property changes on: labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/lang/forall.drl
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:eol-style
+ native
Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/base/DefaultKnowledgeHelper.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/base/DefaultKnowledgeHelper.java 2007-01-16 17:19:41 UTC (rev 8873)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/base/DefaultKnowledgeHelper.java 2007-01-16 20:15:09 UTC (rev 8874)
@@ -24,6 +24,7 @@
import org.drools.WorkingMemory;
import org.drools.common.InternalWorkingMemoryActions;
import org.drools.rule.Declaration;
+import org.drools.rule.GroupElement;
import org.drools.rule.Rule;
import org.drools.spi.Activation;
import org.drools.spi.AgendaGroup;
@@ -37,6 +38,7 @@
private static final long serialVersionUID = 3692991484157215686L;
private Rule rule;
+ private GroupElement subrule;
private Activation activation;
private Tuple tuple;
private final InternalWorkingMemoryActions workingMemory;
@@ -55,6 +57,7 @@
public void setActivation(final Activation agendaItem) {
this.rule = agendaItem.getRule();
+ this.subrule = agendaItem.getSubRule();
this.activation = agendaItem;
this.tuple = agendaItem.getTuple();
}
@@ -154,4 +157,8 @@
public void setFocus(final AgendaGroup focus) {
this.workingMemory.setFocus( focus );
}
+
+ public Declaration getDeclaration( String identifier ) {
+ return (Declaration) this.subrule.getOuterDeclarations().get( identifier );
+ }
}
Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/common/AgendaItem.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/common/AgendaItem.java 2007-01-16 17:19:41 UTC (rev 8873)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/common/AgendaItem.java 2007-01-16 20:15:09 UTC (rev 8874)
@@ -18,6 +18,7 @@
import java.io.Serializable;
+import org.drools.rule.GroupElement;
import org.drools.rule.Rule;
import org.drools.spi.Activation;
import org.drools.spi.PropagationContext;
@@ -51,6 +52,9 @@
/** The rule. */
private final Rule rule;
+
+ /** The subrule */
+ private final GroupElement subrule;
/** The propagation context */
private final PropagationContext context;
@@ -84,10 +88,12 @@
public AgendaItem(final long activationNumber,
final Tuple tuple,
final PropagationContext context,
- final Rule rule) {
+ final Rule rule,
+ final GroupElement subrule ) {
this.tuple = tuple;
this.context = context;
this.rule = rule;
+ this.subrule = subrule;
this.activationNumber = activationNumber;
}
@@ -199,4 +205,8 @@
public void setActivationGroupNode(final ActivationGroupNode activationNode) {
this.activationGroupNode = activationNode;
}
+
+ public GroupElement getSubRule() {
+ return this.subrule;
+ }
}
Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/common/ScheduledAgendaItem.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/common/ScheduledAgendaItem.java 2007-01-16 17:19:41 UTC (rev 8873)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/common/ScheduledAgendaItem.java 2007-01-16 20:15:09 UTC (rev 8874)
@@ -19,6 +19,7 @@
import java.io.Serializable;
import java.util.TimerTask;
+import org.drools.rule.GroupElement;
import org.drools.rule.Rule;
import org.drools.spi.Activation;
import org.drools.spi.PropagationContext;
@@ -55,6 +56,9 @@
/** The rule. */
private final Rule rule;
+ /** The subrule */
+ private final GroupElement subrule;
+
private final InternalAgenda agenda;
private final PropagationContext context;
@@ -83,10 +87,12 @@
final Tuple tuple,
final InternalAgenda agenda,
final PropagationContext context,
- final Rule rule) {
+ final Rule rule,
+ final GroupElement subrule ) {
this.tuple = tuple;
this.context = context;
this.rule = rule;
+ this.subrule = subrule;
this.agenda = agenda;
this.activationNumber = activationNumber;
}
@@ -207,4 +213,8 @@
public int hashCode() {
return this.tuple.hashCode();
}
+
+ public GroupElement getSubRule() {
+ return this.subrule;
+ }
}
Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/QueryTerminalNode.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/QueryTerminalNode.java 2007-01-16 17:19:41 UTC (rev 8873)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/QueryTerminalNode.java 2007-01-16 20:15:09 UTC (rev 8874)
@@ -23,6 +23,7 @@
import org.drools.common.InternalWorkingMemory;
import org.drools.common.NodeMemory;
import org.drools.common.PropagationContextImpl;
+import org.drools.rule.GroupElement;
import org.drools.rule.Rule;
import org.drools.spi.PropagationContext;
@@ -46,10 +47,11 @@
/**
*
*/
- private static final long serialVersionUID = 1010704050163661495L;
+ private static final long serialVersionUID = 1010704050163661495L;
/** The rule to invoke upon match. */
- private final Rule rule;
- private final TupleSource tupleSource;
+ private final Rule rule;
+ private final GroupElement subrule;
+ private final TupleSource tupleSource;
// ------------------------------------------------------------
// Constructors
@@ -65,9 +67,11 @@
*/
public QueryTerminalNode(final int id,
final TupleSource source,
- final Rule rule) {
+ final Rule rule,
+ final GroupElement subrule) {
super( id );
this.rule = rule;
+ this.subrule = subrule;
this.tupleSource = source;
}
@@ -160,4 +164,11 @@
return new LinkedList();
}
+ /**
+ * @return the subrule
+ */
+ public GroupElement getSubrule() {
+ return subrule;
+ }
+
}
Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/ReteooBuilder.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/ReteooBuilder.java 2007-01-16 17:19:41 UTC (rev 8873)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/ReteooBuilder.java 2007-01-16 20:15:09 UTC (rev 8874)
@@ -17,47 +17,15 @@
*/
import java.io.Serializable;
-import java.util.ArrayList;
import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
-import org.drools.InitialFact;
import org.drools.RuleIntegrationException;
-import org.drools.RuntimeDroolsException;
-import org.drools.base.ClassFieldExtractor;
-import org.drools.base.ClassObjectType;
-import org.drools.base.DroolsQuery;
-import org.drools.base.FieldFactory;
-import org.drools.base.ValueType;
-import org.drools.base.evaluators.Operator;
import org.drools.common.BaseNode;
-import org.drools.common.BetaConstraints;
-import org.drools.common.DefaultBetaConstraints;
-import org.drools.common.DoubleBetaConstraints;
-import org.drools.common.EmptyBetaConstraints;
-import org.drools.common.InstanceNotEqualsConstraint;
-import org.drools.common.QuadroupleBetaConstraints;
-import org.drools.common.SingleBetaConstraints;
-import org.drools.common.TripleBetaConstraints;
import org.drools.reteoo.builder.ReteooRuleBuilder;
-import org.drools.rule.Accumulate;
-import org.drools.rule.Collect;
-import org.drools.rule.Column;
-import org.drools.rule.Declaration;
-import org.drools.rule.EvalCondition;
-import org.drools.rule.From;
-import org.drools.rule.GroupElement;
import org.drools.rule.InvalidPatternException;
-import org.drools.rule.LiteralConstraint;
-import org.drools.rule.Query;
import org.drools.rule.Rule;
-import org.drools.spi.AlphaNodeFieldConstraint;
-import org.drools.spi.BetaNodeFieldConstraint;
-import org.drools.spi.Constraint;
-import org.drools.spi.FieldValue;
/**
* Builds the Rete-OO network for a <code>Package</code>.
@@ -83,9 +51,6 @@
/** The RuleBase */
private transient ReteooRuleBase ruleBase;
- /** Rete network to build against. */
- private transient Rete rete;
-
private transient ReteooWorkingMemory[] workingMemories;
/** Nodes that have been attached. */
@@ -93,8 +58,6 @@
private Map rules;
- private final boolean removeIdentities;
-
private transient ReteooRuleBuilder ruleBuilder;
private IdGenerator idGenerator;
@@ -109,13 +72,11 @@
*/
ReteooBuilder(final ReteooRuleBase ruleBase) {
this.ruleBase = ruleBase;
- this.rete = this.ruleBase.getRete();
this.attachedNodes = new HashMap();
this.rules = new HashMap();
//Set to 1 as Rete node is set to 0
this.idGenerator = new IdGenerator(1);
- this.removeIdentities = this.ruleBase.getConfiguration().isRemoveIdentities();
this.ruleBuilder = new ReteooRuleBuilder();
}
Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/RuleTerminalNode.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/RuleTerminalNode.java 2007-01-16 17:19:41 UTC (rev 8873)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/RuleTerminalNode.java 2007-01-16 20:15:09 UTC (rev 8874)
@@ -27,6 +27,7 @@
import org.drools.common.NodeMemory;
import org.drools.common.PropagationContextImpl;
import org.drools.common.ScheduledAgendaItem;
+import org.drools.rule.GroupElement;
import org.drools.rule.Rule;
import org.drools.spi.Activation;
import org.drools.spi.ActivationGroup;
@@ -59,6 +60,11 @@
private static final long serialVersionUID = 320;
/** The rule to invoke upon match. */
private final Rule rule;
+ /**
+ * the subrule reference is needed to resolve declarations
+ * because declarations may have different offsets in each subrule
+ */
+ private final GroupElement subrule;
private final TupleSource tupleSource;
private TupleSinkNode previousTupleSinkNode;
@@ -78,10 +84,12 @@
*/
public RuleTerminalNode(final int id,
final TupleSource source,
- final Rule rule) {
+ final Rule rule,
+ final GroupElement subrule) {
super( id );
this.rule = rule;
this.tupleSource = source;
+ this.subrule = subrule;
}
// ------------------------------------------------------------
@@ -149,7 +157,8 @@
cloned,
agenda,
context,
- this.rule );
+ this.rule,
+ this.subrule );
final TerminalNodeMemory memory = (TerminalNodeMemory) workingMemory.getNodeMemory( this );
if ( this.rule.getActivationGroup() != null ) {
// Lazy cache activationGroup
@@ -202,7 +211,8 @@
final AgendaItem item = new AgendaItem( context.getPropagationNumber(),
cloned,
context,
- this.rule );
+ this.rule,
+ this.subrule );
if ( this.rule.getActivationGroup() != null ) {
// Lazy cache activationGroup
Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/builder/BuildUtils.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/builder/BuildUtils.java 2007-01-16 17:19:41 UTC (rev 8873)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/builder/BuildUtils.java 2007-01-16 20:15:09 UTC (rev 8874)
@@ -54,16 +54,17 @@
*/
public void addBuilder(Class target,
ReteooComponentBuilder builder) {
- this.componentBuilders.put( target, builder );
+ this.componentBuilders.put( target,
+ builder );
}
-
+
/**
* Returns a builder for the given target from the builders map
*
* @param target
* @return returns null if not found
*/
- public ReteooComponentBuilder getBuilderFor( RuleConditionElement target ) {
+ public ReteooComponentBuilder getBuilderFor(RuleConditionElement target) {
return (ReteooComponentBuilder) this.componentBuilders.get( target.getClass() );
}
@@ -132,7 +133,7 @@
}
return false;
}
-
+
/**
* Creates and returns a BetaConstraints object for the given list of constraints
*
@@ -149,23 +150,28 @@
constraints = EmptyBetaConstraints.getInstance();
break;
case 1 :
- constraints = new SingleBetaConstraints( (BetaNodeFieldConstraint) list.get( 0 ), context.getRuleBase().getConfiguration() );
+ constraints = new SingleBetaConstraints( (BetaNodeFieldConstraint) list.get( 0 ),
+ context.getRuleBase().getConfiguration() );
break;
case 2 :
- constraints = new DoubleBetaConstraints( (BetaNodeFieldConstraint[]) list.toArray( new BetaNodeFieldConstraint[list.size()] ), context.getRuleBase().getConfiguration() );
+ constraints = new DoubleBetaConstraints( (BetaNodeFieldConstraint[]) list.toArray( new BetaNodeFieldConstraint[list.size()] ),
+ context.getRuleBase().getConfiguration() );
break;
case 3 :
- constraints = new TripleBetaConstraints( (BetaNodeFieldConstraint[]) list.toArray( new BetaNodeFieldConstraint[list.size()] ), context.getRuleBase().getConfiguration() );
+ constraints = new TripleBetaConstraints( (BetaNodeFieldConstraint[]) list.toArray( new BetaNodeFieldConstraint[list.size()] ),
+ context.getRuleBase().getConfiguration() );
break;
case 4 :
- constraints = new QuadroupleBetaConstraints( (BetaNodeFieldConstraint[]) list.toArray( new BetaNodeFieldConstraint[list.size()] ), context.getRuleBase().getConfiguration() );
- break;
+ constraints = new QuadroupleBetaConstraints( (BetaNodeFieldConstraint[]) list.toArray( new BetaNodeFieldConstraint[list.size()] ),
+ context.getRuleBase().getConfiguration() );
+ break;
default :
- constraints = new DefaultBetaConstraints( (BetaNodeFieldConstraint[]) list.toArray( new BetaNodeFieldConstraint[list.size()] ), context.getRuleBase().getConfiguration() );
+ constraints = new DefaultBetaConstraints( (BetaNodeFieldConstraint[]) list.toArray( new BetaNodeFieldConstraint[list.size()] ),
+ context.getRuleBase().getConfiguration() );
}
return constraints;
}
-
+
/**
* Make sure the required declarations are previously bound
*
@@ -176,9 +182,10 @@
final Declaration[] declarations) throws InvalidPatternException {
final List list = new ArrayList();
for ( int i = 0, length = declarations.length; i < length; i++ ) {
- for( ListIterator it = context.stackIterator(); it.hasPrevious(); ) {
+ for ( ListIterator it = context.stackIterator(); it.hasPrevious(); ) {
RuleConditionElement rce = (RuleConditionElement) it.previous();
- if( rce.resolveDeclaration( declarations[i].getIdentifier() ) == null ) {
+ Declaration decl = rce.resolveDeclaration( declarations[i].getIdentifier() );
+ if ( decl == null || decl.getColumn().getOffset() > declarations[i].getColumn().getOffset()) {
list.add( declarations[i].getIdentifier() );
}
}
Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/builder/ColumnBuilder.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/builder/ColumnBuilder.java 2007-01-16 17:19:41 UTC (rev 8873)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/builder/ColumnBuilder.java 2007-01-16 20:15:09 UTC (rev 8874)
@@ -62,7 +62,7 @@
final BuildUtils utils,
final Column column) throws InvalidPatternException {
- // Adjusting offset in case a previous Initial-Fact was added to the network
+ // Set column offset to the appropriate value
column.setOffset( context.getCurrentColumnOffset() );
context.incrementCurrentColumnOffset();
Added: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/builder/ForallBuilder.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/builder/ForallBuilder.java 2007-01-16 17:19:41 UTC (rev 8873)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/builder/ForallBuilder.java 2007-01-16 20:15:09 UTC (rev 8874)
@@ -0,0 +1,85 @@
+/*
+ * Copyright 2006 JBoss Inc
+ *
+ * Licensed 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.reteoo.builder;
+
+import java.util.Iterator;
+
+import org.drools.rule.Column;
+import org.drools.rule.Forall;
+import org.drools.rule.GroupElement;
+import org.drools.rule.GroupElementFactory;
+import org.drools.rule.RuleConditionElement;
+
+/**
+ * The Reteoo component builder for forall CE
+ *
+ * @author etirelli
+ */
+public class ForallBuilder
+ implements
+ ReteooComponentBuilder {
+
+ /**
+ * @inheritDoc
+ */
+ public void build(BuildContext context,
+ BuildUtils utils,
+ RuleConditionElement rce) {
+ Forall forall = (Forall) rce;
+
+ // forall can be translated into
+ // not( baseColumn and not( <remaining_columns>+ ) )
+ // so we just do that:
+
+ GroupElement and = GroupElementFactory.newAndInstance();
+ and.addChild( forall.getBaseColumn() );
+
+ GroupElement not2 = GroupElementFactory.newNotInstance();
+ if( forall.getRemainingColumns().size() == 1 ) {
+ not2.addChild( (Column) forall.getRemainingColumns().get( 0 ) );
+ and.addChild( not2 );
+ } else if( forall.getRemainingColumns().size() > 1 ) {
+ GroupElement and2 = GroupElementFactory.newAndInstance();
+ for( Iterator it = forall.getRemainingColumns().iterator(); it.hasNext(); ) {
+ and2.addChild( (Column) it.next() );
+ }
+ not2.addChild( and2 );
+ and.addChild( not2 );
+ }
+
+ GroupElement not = GroupElementFactory.newNotInstance();
+ not.addChild( and );
+
+ // get builder for the CEs
+ ReteooComponentBuilder builder = utils.getBuilderFor( not );
+
+ // builds the CEs
+ builder.build( context,
+ utils,
+ not );
+ }
+
+
+ /**
+ * @inheritDoc
+ */
+ public boolean requiresLeftActivation(BuildUtils utils,
+ RuleConditionElement rce) {
+ return true;
+ }
+
+}
Property changes on: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/builder/ForallBuilder.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ id author date revision
Name: svn:eol-style
+ native
Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/builder/ReteooRuleBuilder.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/builder/ReteooRuleBuilder.java 2007-01-16 17:19:41 UTC (rev 8873)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/builder/ReteooRuleBuilder.java 2007-01-16 20:15:09 UTC (rev 8874)
@@ -38,6 +38,7 @@
import org.drools.rule.Collect;
import org.drools.rule.Column;
import org.drools.rule.EvalCondition;
+import org.drools.rule.Forall;
import org.drools.rule.From;
import org.drools.rule.GroupElement;
import org.drools.rule.InvalidPatternException;
@@ -69,6 +70,8 @@
new CollectBuilder() );
utils.addBuilder( Accumulate.class,
new AccumulateBuilder() );
+ utils.addBuilder( Forall.class,
+ new ForallBuilder() );
}
/**
@@ -152,7 +155,8 @@
}
terminal = new RuleTerminalNode( context.getNextId(),
context.getTupleSource(),
- rule );
+ rule,
+ subrule );
} else {
// Check there is no consequence
if ( rule.getConsequence() != null ) {
@@ -160,7 +164,8 @@
}
terminal = new QueryTerminalNode( context.getNextId(),
context.getTupleSource(),
- rule );
+ rule,
+ subrule );
}
if ( context.getWorkingMemories().length == 0 ) {
((BaseNode) terminal).attach();
Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/rule/Column.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/rule/Column.java 2007-01-16 17:19:41 UTC (rev 8873)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/rule/Column.java 2007-01-16 20:15:09 UTC (rev 8874)
@@ -19,6 +19,7 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
+import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -78,6 +79,20 @@
this.declaration = null;
}
}
+
+ public Object clone() {
+ Column clone = new Column( this.index, this.objectType, this.declaration.getIdentifier() );
+ for( Iterator it = this.constraints.iterator(); it.hasNext(); ) {
+ Object constr = it.next();
+ if( constr instanceof Declaration ) {
+ Declaration decl = (Declaration) constr;
+ clone.addDeclaration( decl.getIdentifier(), decl.getExtractor() );
+ } else {
+ clone.addConstraint( (Constraint) constr );
+ }
+ }
+ return clone;
+ }
public ObjectType getObjectType() {
return this.objectType;
@@ -137,14 +152,6 @@
this.offset = offset;
}
- /**
- * A simple method to adjust offset of all declarations using the specified value
- * @param adjust
- */
- public void adjustOffset(final int adjust) {
- this.offset += adjust;
- }
-
public Map getInnerDeclarations() {
return ( this.declarations != null ) ? this.declarations : Collections.EMPTY_MAP;
}
Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/rule/ConditionalElement.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/rule/ConditionalElement.java 2007-01-16 17:19:41 UTC (rev 8873)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/rule/ConditionalElement.java 2007-01-16 20:15:09 UTC (rev 8874)
@@ -19,9 +19,8 @@
public abstract class ConditionalElement
implements
- RuleConditionElement,
- Cloneable {
-
+ RuleConditionElement {
+
public abstract Object clone();
}
\ No newline at end of file
Added: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/rule/Forall.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/rule/Forall.java 2007-01-16 17:19:41 UTC (rev 8873)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/rule/Forall.java 2007-01-16 20:15:09 UTC (rev 8874)
@@ -0,0 +1,122 @@
+/*
+ * Copyright 2006 JBoss Inc
+ *
+ * Licensed 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.rule;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * The forall conditional element.
+ *
+ * @author etirelli
+ */
+public class Forall extends ConditionalElement {
+
+ private static final long serialVersionUID = -5993305516857875971L;
+
+ // forall base column
+ private Column baseColumn;
+ // foral remaining columns
+ private List remainingColumns;
+
+ public Forall() {
+ this(null, new ArrayList(1));
+ }
+
+ public Forall(Column baseColumn) {
+ this( baseColumn, new ArrayList(1) );
+ }
+
+ public Forall(Column baseColumn, List remainingColumns) {
+ this.baseColumn = baseColumn;
+ this.remainingColumns = remainingColumns;
+ }
+
+ /* (non-Javadoc)
+ * @see org.drools.rule.ConditionalElement#clone()
+ */
+ public Object clone() {
+ return new Forall(this.baseColumn, new ArrayList(this.remainingColumns));
+ }
+
+ /**
+ * Forall inner declarations are only provided by the base columns
+ * since it negates the remaining columns
+ */
+ public Map getInnerDeclarations() {
+ Map inner = new HashMap(this.baseColumn.getOuterDeclarations());
+ for( Iterator it = this.remainingColumns.iterator(); it.hasNext(); ) {
+ inner.putAll( ((Column)it.next()).getOuterDeclarations() );
+ }
+ return inner;
+ }
+
+ /**
+ * Forall does not export any declarations
+ */
+ public Map getOuterDeclarations() {
+ return Collections.EMPTY_MAP;
+ }
+
+ /**
+ * Forall can only resolve declarations from its base column
+ */
+ public Declaration resolveDeclaration(String identifier) {
+ return (Declaration) this.getInnerDeclarations().get( identifier );
+ }
+
+ /**
+ * @return the baseColumn
+ */
+ public Column getBaseColumn() {
+ return baseColumn;
+ }
+
+ /**
+ * @param baseColumn the baseColumn to set
+ */
+ public void setBaseColumn(Column baseColumn) {
+ this.baseColumn = baseColumn;
+ }
+
+ /**
+ * @return the remainingColumns
+ */
+ public List getRemainingColumns() {
+ return remainingColumns;
+ }
+
+ /**
+ * @param remainingColumns the remainingColumns to set
+ */
+ public void setRemainingColumns(List remainingColumns) {
+ this.remainingColumns = remainingColumns;
+ }
+
+ /**
+ * Adds one more column to the list of remaining columns
+ * @param column
+ */
+ public void addRemainingColumn( Column column ) {
+ this.remainingColumns.add( column );
+ }
+
+}
Property changes on: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/rule/Forall.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ id author date revision
Name: svn:eol-style
+ native
Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/rule/LogicTransformer.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/rule/LogicTransformer.java 2007-01-16 17:19:41 UTC (rev 8873)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/rule/LogicTransformer.java 2007-01-16 20:15:09 UTC (rev 8874)
@@ -231,7 +231,8 @@
// in their original position
for( int j = 0; j < others.length; j++ ) {
if( others[j] != null ) {
- and.getChildren().add( j, others[j] );
+ // always add clone of them to avoid offset conflicts in declarations
+ and.getChildren().add( j, ((RuleConditionElement) others[j]).clone() );
}
}
parent.addChild( and );
Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/rule/Rule.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/rule/Rule.java 2007-01-16 17:19:41 UTC (rev 8873)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/rule/Rule.java 2007-01-16 20:15:09 UTC (rev 8874)
@@ -343,6 +343,7 @@
}
public void setLhs( GroupElement lhsRoot ) {
+ this.dirty = true;
this.lhsRoot = lhsRoot;
}
Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/rule/RuleConditionElement.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/rule/RuleConditionElement.java 2007-01-16 17:19:41 UTC (rev 8873)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/rule/RuleConditionElement.java 2007-01-16 20:15:09 UTC (rev 8874)
@@ -26,7 +26,7 @@
*/
public interface RuleConditionElement
extends
- RuleComponent {
+ RuleComponent, Cloneable {
/**
* Returns a Map of declarations that are
@@ -53,5 +53,12 @@
* @return
*/
public Declaration resolveDeclaration( String identifier );
+
+ /**
+ * Returns a clone from itself
+ * @return
+ */
+ public Object clone();
+
}
Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/spi/Activation.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/spi/Activation.java 2007-01-16 17:19:41 UTC (rev 8873)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/spi/Activation.java 2007-01-16 20:15:09 UTC (rev 8874)
@@ -20,6 +20,7 @@
import org.drools.common.ActivationGroupNode;
import org.drools.common.LogicalDependency;
+import org.drools.rule.GroupElement;
import org.drools.rule.Rule;
import org.drools.util.LinkedList;
@@ -39,6 +40,13 @@
* @return The rule.
*/
Rule getRule();
+
+ /**
+ * Retrieve the subrule that was activated.
+ *
+ * @return
+ */
+ GroupElement getSubRule();
/**
* Retrieve the <code>Tuple</code> that was activated.
Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/spi/KnowledgeHelper.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/spi/KnowledgeHelper.java 2007-01-16 17:19:41 UTC (rev 8873)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/spi/KnowledgeHelper.java 2007-01-16 20:15:09 UTC (rev 8874)
@@ -117,5 +117,7 @@
void setFocus(String focus);
void setFocus(AgendaGroup focus);
+
+ public Declaration getDeclaration(String identifier);
}
\ No newline at end of file
Modified: labs/jbossrules/trunk/drools-core/src/test/java/org/drools/reteoo/AgendaTest.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/test/java/org/drools/reteoo/AgendaTest.java 2007-01-16 17:19:41 UTC (rev 8873)
+++ labs/jbossrules/trunk/drools-core/src/test/java/org/drools/reteoo/AgendaTest.java 2007-01-16 20:15:09 UTC (rev 8874)
@@ -56,7 +56,8 @@
final RuleTerminalNode node1 = new RuleTerminalNode( 3,
new MockTupleSource( 2 ),
- rule1 );
+ rule1,
+ rule1.getLhs());
final ReteTuple tuple = new ReteTuple( new DefaultFactHandle( 1,
"cheese" ) );
@@ -107,7 +108,8 @@
final Rule rule = new Rule( "test-rule" );
final RuleTerminalNode node = new RuleTerminalNode( 3,
new MockTupleSource( 2 ),
- rule );
+ rule,
+ rule.getLhs() );
final Map results = new HashMap();
// add consequence
@@ -229,7 +231,8 @@
final Rule rule0 = new Rule( "test-rule0" );
final RuleTerminalNode node0 = new RuleTerminalNode( 3,
new MockTupleSource( 2 ),
- rule0 );
+ rule0,
+ rule0.getLhs() );
rule0.setConsequence( consequence );
final PropagationContext context0 = new PropagationContextImpl( 0,
PropagationContext.ASSERTION,
@@ -240,7 +243,8 @@
"agendaGroup1" );
final RuleTerminalNode node1 = new RuleTerminalNode( 5,
new MockTupleSource( 4 ),
- rule1 );
+ rule1,
+ rule1.getLhs() );
rule1.setConsequence( consequence );
final PropagationContext context1 = new PropagationContextImpl( 0,
PropagationContext.ASSERTION,
@@ -251,7 +255,8 @@
"agendaGroup2" );
final RuleTerminalNode node2 = new RuleTerminalNode( 7,
new MockTupleSource( 6 ),
- rule2 );
+ rule2,
+ rule2.getLhs() );
rule2.setConsequence( consequence );
final PropagationContext context2 = new PropagationContextImpl( 0,
PropagationContext.ASSERTION,
@@ -262,7 +267,8 @@
"agendaGroup3" );
final RuleTerminalNode node3 = new RuleTerminalNode( 9,
new MockTupleSource( 8 ),
- rule3 );
+ rule3,
+ rule3.getLhs() );
rule3.setConsequence( consequence );
final PropagationContext context3 = new PropagationContextImpl( 0,
PropagationContext.ASSERTION,
@@ -442,7 +448,8 @@
"agendaGroup" );
final RuleTerminalNode node = new RuleTerminalNode( 2,
new MockTupleSource( 2 ),
- rule );
+ rule,
+ rule.getLhs() );
rule.setConsequence( consequence );
final PropagationContext context = new PropagationContextImpl( 0,
PropagationContext.ASSERTION,
@@ -518,7 +525,8 @@
rule0.setXorGroup( "activation-group-0" );
final RuleTerminalNode node0 = new RuleTerminalNode( 3,
new MockTupleSource( 2 ),
- rule0 );
+ rule0,
+ rule0.getLhs() );
rule0.setConsequence( consequence );
final PropagationContext context0 = new PropagationContextImpl( 0,
PropagationContext.ASSERTION,
@@ -529,7 +537,8 @@
rule1.setXorGroup( "activation-group-0" );
final RuleTerminalNode node1 = new RuleTerminalNode( 5,
new MockTupleSource( 4 ),
- rule1 );
+ rule1,
+ rule1.getLhs() );
rule1.setConsequence( consequence );
final PropagationContext context1 = new PropagationContextImpl( 0,
PropagationContext.ASSERTION,
@@ -539,7 +548,8 @@
final Rule rule2 = new Rule( "test-rule2" );
final RuleTerminalNode node2 = new RuleTerminalNode( 7,
new MockTupleSource( 6 ),
- rule2 );
+ rule2,
+ rule2.getLhs() );
rule2.setConsequence( consequence );
final PropagationContext context2 = new PropagationContextImpl( 0,
PropagationContext.ASSERTION,
@@ -551,7 +561,8 @@
rule3.setXorGroup( "activation-group-3" );
final RuleTerminalNode node3 = new RuleTerminalNode( 9,
new MockTupleSource( 8 ),
- rule3 );
+ rule3,
+ rule3.getLhs() );
rule3.setConsequence( consequence );
final PropagationContext context3 = new PropagationContextImpl( 0,
PropagationContext.ASSERTION,
Modified: labs/jbossrules/trunk/drools-core/src/test/java/org/drools/reteoo/LogicalAssertionTest.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/test/java/org/drools/reteoo/LogicalAssertionTest.java 2007-01-16 17:19:41 UTC (rev 8873)
+++ labs/jbossrules/trunk/drools-core/src/test/java/org/drools/reteoo/LogicalAssertionTest.java 2007-01-16 20:15:09 UTC (rev 8874)
@@ -52,7 +52,8 @@
final Rule rule1 = new Rule( "test-rule1" );
final RuleTerminalNode node = new RuleTerminalNode( 2,
new MockTupleSource( 2 ),
- rule1 );
+ rule1,
+ rule1.getLhs());
final ReteooWorkingMemory workingMemory = (ReteooWorkingMemory) ruleBase.newWorkingMemory();
final InternalAgenda agenda = (InternalAgenda) workingMemory.getAgenda();
@@ -150,7 +151,8 @@
final RuleTerminalNode node = new RuleTerminalNode( 2,
new MockTupleSource( 2 ),
- rule1 );
+ rule1,
+ rule1.getLhs() );
final RuleBase ruleBase = RuleBaseFactory.newRuleBase();
final ReteooWorkingMemory workingMemory = (ReteooWorkingMemory) ruleBase.newWorkingMemory();
@@ -237,7 +239,8 @@
objectTypeNode.addObjectSink( sink );
final RuleTerminalNode node = new RuleTerminalNode( 2,
new MockTupleSource( 2 ),
- rule1 );
+ rule1,
+ rule1.getLhs() );
final RuleBase ruleBase = RuleBaseFactory.newRuleBase();
final ReteooWorkingMemory workingMemory = (ReteooWorkingMemory) ruleBase.newWorkingMemory();
@@ -370,7 +373,8 @@
objectTypeNode.addObjectSink( sink );
final RuleTerminalNode node = new RuleTerminalNode( 2,
new MockTupleSource( 2 ),
- rule1 );
+ rule1,
+ rule1.getLhs() );
final RuleBaseConfiguration conf = new RuleBaseConfiguration();
conf.setLogicalOverride( RuleBaseConfiguration.LogicalOverride.PRESERVE );
@@ -459,7 +463,8 @@
objectTypeNode.addObjectSink( sink );
final RuleTerminalNode node = new RuleTerminalNode( 2,
new MockTupleSource( 2 ),
- rule1 );
+ rule1,
+ rule1.getLhs() );
final RuleBase ruleBase = RuleBaseFactory.newRuleBase();
final ReteooWorkingMemory workingMemory = (ReteooWorkingMemory) ruleBase.newWorkingMemory();
@@ -503,7 +508,8 @@
final Rule rule2 = new Rule( "test-rule2" );
final RuleTerminalNode node2 = new RuleTerminalNode( 4,
new MockTupleSource( 3 ),
- rule2 );
+ rule2,
+ rule2.getLhs() );
rule2.setConsequence( consequence );
final DefaultFactHandle handle2 = new DefaultFactHandle( 2,
@@ -555,7 +561,8 @@
objectTypeNode.addObjectSink( sink );
final RuleTerminalNode node = new RuleTerminalNode( 2,
new MockTupleSource( 2 ),
- rule1 );
+ rule1,
+ rule1.getLhs() );
final ReteooWorkingMemory workingMemory = (ReteooWorkingMemory) ruleBase.newWorkingMemory();
final Agenda agenda = workingMemory.getAgenda();
@@ -592,7 +599,8 @@
final Rule rule2 = new Rule( "test-rule2" );
final RuleTerminalNode node2 = new RuleTerminalNode( 4,
new MockTupleSource( 3 ),
- rule2 );
+ rule2,
+ rule2.getLhs() );
rule2.setConsequence( consequence );
final DefaultFactHandle handle2 = new DefaultFactHandle( 2,
@@ -680,7 +688,8 @@
objectTypeNode.addObjectSink( sink );
final RuleTerminalNode node = new RuleTerminalNode( 2,
new MockTupleSource( 2 ),
- rule1 );
+ rule1,
+ rule1.getLhs() );
final RuleBase ruleBase = RuleBaseFactory.newRuleBase();
final ReteooWorkingMemory workingMemory = (ReteooWorkingMemory) ruleBase.newWorkingMemory();
@@ -778,7 +787,8 @@
objectTypeNode.addObjectSink( sink );
final RuleTerminalNode node = new RuleTerminalNode( 2,
new MockTupleSource( 2 ),
- rule1 );
+ rule1,
+ rule1.getLhs() );
final RuleBase ruleBase = RuleBaseFactory.newRuleBase();
final ReteooWorkingMemory workingMemory = (ReteooWorkingMemory) ruleBase.newWorkingMemory();
Modified: labs/jbossrules/trunk/drools-core/src/test/java/org/drools/reteoo/QueryTerminalNodeTest.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/test/java/org/drools/reteoo/QueryTerminalNodeTest.java 2007-01-16 17:19:41 UTC (rev 8873)
+++ labs/jbossrules/trunk/drools-core/src/test/java/org/drools/reteoo/QueryTerminalNodeTest.java 2007-01-16 20:15:09 UTC (rev 8874)
@@ -101,7 +101,8 @@
final QueryTerminalNode queryNode = new QueryTerminalNode( 7,
joinNode,
- query );
+ query,
+ query.getLhs());
queryNode.attach();
Modified: labs/jbossrules/trunk/drools-core/src/test/java/org/drools/reteoo/SchedulerTest.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/test/java/org/drools/reteoo/SchedulerTest.java 2007-01-16 17:19:41 UTC (rev 8873)
+++ labs/jbossrules/trunk/drools-core/src/test/java/org/drools/reteoo/SchedulerTest.java 2007-01-16 20:15:09 UTC (rev 8874)
@@ -45,7 +45,8 @@
final Rule rule = new Rule( "test-rule" );
final RuleTerminalNode node = new RuleTerminalNode( 1,
new MockTupleSource( 2 ),
- rule );
+ rule,
+ rule.getLhs());
final List data = new ArrayList();
// add consequence
@@ -107,7 +108,8 @@
final Rule rule = new Rule( "test-rule" );
final RuleTerminalNode node = new RuleTerminalNode( 1,
new MockTupleSource( 2 ),
- rule );
+ rule,
+ rule.getLhs());
final List data = new ArrayList();
/* 1/10th of a second */
@@ -185,7 +187,8 @@
final RuleTerminalNode node = new RuleTerminalNode( 1,
new MockTupleSource( 2 ),
- rule );
+ rule,
+ rule.getLhs());
/* 1/10th of a second */
final Duration duration = new Duration() {
Modified: labs/jbossrules/trunk/drools-core/src/test/java/org/drools/rule/LogicTransformerTest.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/test/java/org/drools/rule/LogicTransformerTest.java 2007-01-16 17:19:41 UTC (rev 8873)
+++ labs/jbossrules/trunk/drools-core/src/test/java/org/drools/rule/LogicTransformerTest.java 2007-01-16 20:15:09 UTC (rev 8874)
@@ -471,7 +471,7 @@
// Uncomment this when you need to output a new known correct tree
// result
- // writeTree(result, "correct_processTree1.dat");
+ writeTree(result, "correct_processTree1.dat");
final ObjectInputStream ois = new ObjectInputStream( this.getClass().getResourceAsStream( "/correct_processTree1.dat" ) );
final GroupElement[] correctResultRoot = (GroupElement[]) ois.readObject();
@@ -615,7 +615,7 @@
// Uncomment this when you need to output a new known correct tree
// result
- // writeTree(ands, "correct_transform1.dat");
+ writeTree(ands, "correct_transform1.dat");
// Now check the main tree
Modified: labs/jbossrules/trunk/drools-core/src/test/resources/correct_processTree1.dat
===================================================================
(Binary files differ)
Modified: labs/jbossrules/trunk/drools-core/src/test/resources/correct_transform1.dat
===================================================================
(Binary files differ)
More information about the jboss-svn-commits
mailing list