[jboss-svn-commits] JBL Code SVN: r9538 - in labs/jbossrules/trunk/drools-compiler/src: main/java/org/drools/lang and 6 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Thu Feb 15 15:49:28 EST 2007
Author: tirelli
Date: 2007-02-15 15:49:28 -0500 (Thu, 15 Feb 2007)
New Revision: 9538
Added:
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMapping.java
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMappingEntry.java
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMappingFile.java
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMappingParseException.java
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DefaultDSLMappingEntry.java
labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/dsl/DSLMappingFileTest.java
labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/dsl/DefaultDSLMappingEntryTest.java
labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/dsl/DefaultExpanderTest.java
labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/lang/dsl/test_expansion.drl
labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/lang/dsl/test_metainfo.dsl
Removed:
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/LineBasedExpander.java
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/template/
labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/dsl/LineExpanderTest.java
labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/dsl/template/
Modified:
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/compiler/DrlParser.java
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/compiler/ParserError.java
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/Expander.java
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/ExpanderException.java
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DefaultExpander.java
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DefaultExpanderResolver.java
labs/jbossrules/trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g
labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/IntegrationCases.java
labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/MockExpander.java
labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/RuleParserTest.java
Log:
JBRULES-268 JBRULES-274 JBRULES-351 JBRULES-476 JBRULES-586:
* Removed DSL parsing from the DRL parser (JBRULES-351)
* Implemented a DSL preprocessor ( Expander ) based on regexp (JBRULES-351)
* Implemented a new DSL file parser for map readings
* Added ability to expand a DSL and get the result without parsing DRL (JBRULES-268)
* Fixed problems with empty lines (JBRULES-274)
* Made DSL preprocessor space insentive (JBRULES-476)
* Fixed problems with capturing spaces (JBRULES-586)
* Added unit tests and integration tests
Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/compiler/DrlParser.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/compiler/DrlParser.java 2007-02-15 15:52:34 UTC (rev 9537)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/compiler/DrlParser.java 2007-02-15 20:49:28 UTC (rev 9538)
@@ -23,10 +23,10 @@
import java.util.List;
import org.antlr.runtime.ANTLRStringStream;
-import org.antlr.runtime.CommonTokenStream;
import org.antlr.runtime.RecognitionException;
import org.drools.lang.DRLLexer;
import org.drools.lang.DRLParser;
+import org.drools.lang.Expander;
import org.drools.lang.descr.PackageDescr;
import org.drools.lang.dsl.DefaultExpanderResolver;
@@ -106,11 +106,18 @@
*/
public PackageDescr parse(final String source,
final Reader dsl) throws DroolsParserException {
- final DefaultExpanderResolver resolver = new DefaultExpanderResolver( dsl );
- final DRLParser parser = getParser( source );
- parser.setExpanderResolver( resolver );
- compile( parser );
- return parser.getPackageDescr();
+ DefaultExpanderResolver resolver;
+ try {
+ resolver = new DefaultExpanderResolver( dsl );
+ } catch ( IOException e ) {
+ throw new DroolsParserException( "Error parsing the DSL.", e);
+ }
+ Expander expander = resolver.get( "*", null );
+ String expanded = expander.expand( source );
+ if( expander.hasErrors() ) {
+ this.results.addAll( expander.getErrors() );
+ }
+ return this.parse( expanded );
}
private StringBuffer getDRLText(final Reader reader) throws IOException {
Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/compiler/ParserError.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/compiler/ParserError.java 2007-02-15 15:52:34 UTC (rev 9537)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/compiler/ParserError.java 2007-02-15 20:49:28 UTC (rev 9538)
@@ -41,5 +41,9 @@
public int getRow() {
return this.row;
}
+
+ public String toString() {
+ return "["+row+","+col+"]: "+message;
+ }
}
\ No newline at end of file
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-02-15 15:52:34 UTC (rev 9537)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/DRLLexer.java 2007-02-15 20:49:28 UTC (rev 9538)
@@ -1,4 +1,4 @@
-// $ANTLR 3.0b5 D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g 2007-02-03 10:35:44
+// $ANTLR 3.0b5 D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g 2007-02-14 21:00:54
package org.drools.lang;
@@ -605,10 +605,10 @@
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:1437:17: ( ( ' ' | '\\t' | '\\f' | EOL ) )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1437:17: ( ' ' | '\\t' | '\\f' | EOL )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1419:17: ( ( ' ' | '\\t' | '\\f' | EOL ) )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1419:17: ( ' ' | '\\t' | '\\f' | EOL )
{
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1437:17: ( ' ' | '\\t' | '\\f' | EOL )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1419:17: ( ' ' | '\\t' | '\\f' | EOL )
int alt1=4;
switch ( input.LA(1) ) {
case ' ':
@@ -627,35 +627,35 @@
default:
if (backtracking>0) {failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("1437:17: ( ' ' | '\\t' | '\\f' | EOL )", 1, 0, input);
+ new NoViableAltException("1419:17: ( ' ' | '\\t' | '\\f' | EOL )", 1, 0, input);
throw nvae;
}
switch (alt1) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1437:19: ' '
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1419:19: ' '
{
match(' '); if (failed) return ;
}
break;
case 2 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1438:19: '\\t'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1420:19: '\\t'
{
match('\t'); if (failed) return ;
}
break;
case 3 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1439:19: '\\f'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1421:19: '\\f'
{
match('\f'); if (failed) return ;
}
break;
case 4 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1440:19: EOL
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1422:19: EOL
{
mEOL(); if (failed) return ;
@@ -689,10 +689,10 @@
public void mEOL() throws RecognitionException {
try {
ruleNestingLevel++;
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1447:6: ( ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' ) )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1447:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1429:6: ( ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' ) )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1429:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
{
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1447:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1429:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
int alt2=3;
int LA2_0 = input.LA(1);
if ( (LA2_0=='\r') ) {
@@ -709,13 +709,13 @@
else {
if (backtracking>0) {failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("1447:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )", 2, 0, input);
+ new NoViableAltException("1429:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )", 2, 0, input);
throw nvae;
}
switch (alt2) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1447:14: ( '\\r\\n' )=> '\\r\\n'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1429:14: ( '\\r\\n' )=> '\\r\\n'
{
match("\r\n"); if (failed) return ;
@@ -723,14 +723,14 @@
}
break;
case 2 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1448:25: '\\r'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1430:25: '\\r'
{
match('\r'); if (failed) return ;
}
break;
case 3 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1449:25: '\\n'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1431:25: '\\n'
{
match('\n'); if (failed) return ;
@@ -758,10 +758,10 @@
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:1454:4: ( ( '-' )? ( '0' .. '9' )+ )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1454:4: ( '-' )? ( '0' .. '9' )+
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1436:4: ( ( '-' )? ( '0' .. '9' )+ )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1436:4: ( '-' )? ( '0' .. '9' )+
{
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1454:4: ( '-' )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1436:4: ( '-' )?
int alt3=2;
int LA3_0 = input.LA(1);
if ( (LA3_0=='-') ) {
@@ -769,7 +769,7 @@
}
switch (alt3) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1454:5: '-'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1436:5: '-'
{
match('-'); if (failed) return ;
@@ -778,7 +778,7 @@
}
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1454:10: ( '0' .. '9' )+
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1436:10: ( '0' .. '9' )+
int cnt4=0;
loop4:
do {
@@ -791,7 +791,7 @@
switch (alt4) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1454:11: '0' .. '9'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1436:11: '0' .. '9'
{
matchRange('0','9'); if (failed) return ;
@@ -835,10 +835,10 @@
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:1458:4: ( ( '-' )? ( '0' .. '9' )+ '.' ( '0' .. '9' )+ )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1458:4: ( '-' )? ( '0' .. '9' )+ '.' ( '0' .. '9' )+
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1440:4: ( ( '-' )? ( '0' .. '9' )+ '.' ( '0' .. '9' )+ )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1440:4: ( '-' )? ( '0' .. '9' )+ '.' ( '0' .. '9' )+
{
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1458:4: ( '-' )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1440:4: ( '-' )?
int alt5=2;
int LA5_0 = input.LA(1);
if ( (LA5_0=='-') ) {
@@ -846,7 +846,7 @@
}
switch (alt5) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1458:5: '-'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1440:5: '-'
{
match('-'); if (failed) return ;
@@ -855,7 +855,7 @@
}
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1458:10: ( '0' .. '9' )+
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1440:10: ( '0' .. '9' )+
int cnt6=0;
loop6:
do {
@@ -868,7 +868,7 @@
switch (alt6) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1458:11: '0' .. '9'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1440:11: '0' .. '9'
{
matchRange('0','9'); if (failed) return ;
@@ -886,7 +886,7 @@
} while (true);
match('.'); if (failed) return ;
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1458:26: ( '0' .. '9' )+
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1440:26: ( '0' .. '9' )+
int cnt7=0;
loop7:
do {
@@ -899,7 +899,7 @@
switch (alt7) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1458:27: '0' .. '9'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1440:27: '0' .. '9'
{
matchRange('0','9'); if (failed) return ;
@@ -943,7 +943,7 @@
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:1462:8: ( ( '\"' ( EscapeSequence | ~ ('\\\\'|'\"'))* '\"' ) | ( '\\'' ( EscapeSequence | ~ ('\\\\'|'\\''))* '\\'' ) )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1444:8: ( ( '\"' ( EscapeSequence | ~ ('\\\\'|'\"'))* '\"' ) | ( '\\'' ( EscapeSequence | ~ ('\\\\'|'\\''))* '\\'' ) )
int alt10=2;
int LA10_0 = input.LA(1);
if ( (LA10_0=='\"') ) {
@@ -955,19 +955,19 @@
else {
if (backtracking>0) {failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("1461:1: STRING : ( ( '\"' ( EscapeSequence | ~ ('\\\\'|'\"'))* '\"' ) | ( '\\'' ( EscapeSequence | ~ ('\\\\'|'\\''))* '\\'' ) );", 10, 0, input);
+ new NoViableAltException("1443:1: STRING : ( ( '\"' ( EscapeSequence | ~ ('\\\\'|'\"'))* '\"' ) | ( '\\'' ( EscapeSequence | ~ ('\\\\'|'\\''))* '\\'' ) );", 10, 0, input);
throw nvae;
}
switch (alt10) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1462:8: ( '\"' ( EscapeSequence | ~ ('\\\\'|'\"'))* '\"' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1444:8: ( '\"' ( EscapeSequence | ~ ('\\\\'|'\"'))* '\"' )
{
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1462:8: ( '\"' ( EscapeSequence | ~ ('\\\\'|'\"'))* '\"' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1462:9: '\"' ( EscapeSequence | ~ ('\\\\'|'\"'))* '\"'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1444:8: ( '\"' ( EscapeSequence | ~ ('\\\\'|'\"'))* '\"' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1444:9: '\"' ( EscapeSequence | ~ ('\\\\'|'\"'))* '\"'
{
match('\"'); if (failed) return ;
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1462:13: ( EscapeSequence | ~ ('\\\\'|'\"'))*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1444:13: ( EscapeSequence | ~ ('\\\\'|'\"'))*
loop8:
do {
int alt8=3;
@@ -982,14 +982,14 @@
switch (alt8) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1462:15: EscapeSequence
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1444:15: EscapeSequence
{
mEscapeSequence(); if (failed) return ;
}
break;
case 2 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1462:32: ~ ('\\\\'|'\"')
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1444:32: ~ ('\\\\'|'\"')
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFE') ) {
input.consume();
@@ -1019,13 +1019,13 @@
}
break;
case 2 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1463:8: ( '\\'' ( EscapeSequence | ~ ('\\\\'|'\\''))* '\\'' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1445:8: ( '\\'' ( EscapeSequence | ~ ('\\\\'|'\\''))* '\\'' )
{
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1463:8: ( '\\'' ( EscapeSequence | ~ ('\\\\'|'\\''))* '\\'' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1463:9: '\\'' ( EscapeSequence | ~ ('\\\\'|'\\''))* '\\''
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1445:8: ( '\\'' ( EscapeSequence | ~ ('\\\\'|'\\''))* '\\'' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1445:9: '\\'' ( EscapeSequence | ~ ('\\\\'|'\\''))* '\\''
{
match('\''); if (failed) return ;
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1463:14: ( EscapeSequence | ~ ('\\\\'|'\\''))*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1445:14: ( EscapeSequence | ~ ('\\\\'|'\\''))*
loop9:
do {
int alt9=3;
@@ -1040,14 +1040,14 @@
switch (alt9) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1463:16: EscapeSequence
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1445:16: EscapeSequence
{
mEscapeSequence(); if (failed) return ;
}
break;
case 2 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1463:33: ~ ('\\\\'|'\\'')
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1445:33: ~ ('\\\\'|'\\'')
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFE') ) {
input.consume();
@@ -1097,8 +1097,8 @@
public void mHexDigit() throws RecognitionException {
try {
ruleNestingLevel++;
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1467:12: ( ('0'..'9'|'a'..'f'|'A'..'F'))
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1467:12: ('0'..'9'|'a'..'f'|'A'..'F')
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1449:12: ( ('0'..'9'|'a'..'f'|'A'..'F'))
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1449: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();
@@ -1125,7 +1125,7 @@
public void mEscapeSequence() throws RecognitionException {
try {
ruleNestingLevel++;
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1471:9: ( '\\\\' ('b'|'t'|'n'|'f'|'r'|'\\\"'|'\\''|'\\\\') | UnicodeEscape | OctalEscape )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1453:9: ( '\\\\' ('b'|'t'|'n'|'f'|'r'|'\\\"'|'\\''|'\\\\') | UnicodeEscape | OctalEscape )
int alt11=3;
int LA11_0 = input.LA(1);
if ( (LA11_0=='\\') ) {
@@ -1156,7 +1156,7 @@
default:
if (backtracking>0) {failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("1469:1: fragment EscapeSequence : ( '\\\\' ('b'|'t'|'n'|'f'|'r'|'\\\"'|'\\''|'\\\\') | UnicodeEscape | OctalEscape );", 11, 1, input);
+ new NoViableAltException("1451:1: fragment EscapeSequence : ( '\\\\' ('b'|'t'|'n'|'f'|'r'|'\\\"'|'\\''|'\\\\') | UnicodeEscape | OctalEscape );", 11, 1, input);
throw nvae;
}
@@ -1165,13 +1165,13 @@
else {
if (backtracking>0) {failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("1469:1: fragment EscapeSequence : ( '\\\\' ('b'|'t'|'n'|'f'|'r'|'\\\"'|'\\''|'\\\\') | UnicodeEscape | OctalEscape );", 11, 0, input);
+ new NoViableAltException("1451:1: fragment EscapeSequence : ( '\\\\' ('b'|'t'|'n'|'f'|'r'|'\\\"'|'\\''|'\\\\') | UnicodeEscape | OctalEscape );", 11, 0, input);
throw nvae;
}
switch (alt11) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1471:9: '\\\\' ('b'|'t'|'n'|'f'|'r'|'\\\"'|'\\''|'\\\\')
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1453: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' ) {
@@ -1189,14 +1189,14 @@
}
break;
case 2 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1472:9: UnicodeEscape
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1454:9: UnicodeEscape
{
mUnicodeEscape(); if (failed) return ;
}
break;
case 3 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1473:9: OctalEscape
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1455:9: OctalEscape
{
mOctalEscape(); if (failed) return ;
@@ -1215,7 +1215,7 @@
public void mOctalEscape() throws RecognitionException {
try {
ruleNestingLevel++;
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1478: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:1460: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=='\\') ) {
@@ -1244,7 +1244,7 @@
else {
if (backtracking>0) {failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("1476:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 12, 1, input);
+ new NoViableAltException("1458:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 12, 1, input);
throw nvae;
}
@@ -1252,31 +1252,31 @@
else {
if (backtracking>0) {failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("1476:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 12, 0, input);
+ new NoViableAltException("1458:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 12, 0, input);
throw nvae;
}
switch (alt12) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1478:9: '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1460:9: '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' )
{
match('\\'); if (failed) return ;
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1478:14: ( '0' .. '3' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1478:15: '0' .. '3'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1460:14: ( '0' .. '3' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1460:15: '0' .. '3'
{
matchRange('0','3'); if (failed) return ;
}
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1478:25: ( '0' .. '7' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1478:26: '0' .. '7'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1460:25: ( '0' .. '7' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1460:26: '0' .. '7'
{
matchRange('0','7'); if (failed) return ;
}
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1478:36: ( '0' .. '7' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1478:37: '0' .. '7'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1460:36: ( '0' .. '7' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1460:37: '0' .. '7'
{
matchRange('0','7'); if (failed) return ;
@@ -1286,18 +1286,18 @@
}
break;
case 2 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1479:9: '\\\\' ( '0' .. '7' ) ( '0' .. '7' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1461:9: '\\\\' ( '0' .. '7' ) ( '0' .. '7' )
{
match('\\'); if (failed) return ;
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1479:14: ( '0' .. '7' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1479:15: '0' .. '7'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1461:14: ( '0' .. '7' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1461:15: '0' .. '7'
{
matchRange('0','7'); if (failed) return ;
}
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1479:25: ( '0' .. '7' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1479:26: '0' .. '7'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1461:25: ( '0' .. '7' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1461:26: '0' .. '7'
{
matchRange('0','7'); if (failed) return ;
@@ -1307,11 +1307,11 @@
}
break;
case 3 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1480:9: '\\\\' ( '0' .. '7' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1462:9: '\\\\' ( '0' .. '7' )
{
match('\\'); if (failed) return ;
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1480:14: ( '0' .. '7' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1480:15: '0' .. '7'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1462:14: ( '0' .. '7' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1462:15: '0' .. '7'
{
matchRange('0','7'); if (failed) return ;
@@ -1333,8 +1333,8 @@
public void mUnicodeEscape() throws RecognitionException {
try {
ruleNestingLevel++;
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1485:9: ( '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1485:9: '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1467:9: ( '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1467:9: '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit
{
match('\\'); if (failed) return ;
match('u'); if (failed) return ;
@@ -1361,10 +1361,10 @@
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:1489:4: ( ( 'true' | 'false' ) )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1489:4: ( 'true' | 'false' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1471:4: ( ( 'true' | 'false' ) )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1471:4: ( 'true' | 'false' )
{
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1489:4: ( 'true' | 'false' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1471:4: ( 'true' | 'false' )
int alt13=2;
int LA13_0 = input.LA(1);
if ( (LA13_0=='t') ) {
@@ -1376,13 +1376,13 @@
else {
if (backtracking>0) {failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("1489:4: ( 'true' | 'false' )", 13, 0, input);
+ new NoViableAltException("1471:4: ( 'true' | 'false' )", 13, 0, input);
throw nvae;
}
switch (alt13) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1489:5: 'true'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1471:5: 'true'
{
match("true"); if (failed) return ;
@@ -1390,7 +1390,7 @@
}
break;
case 2 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1489:12: 'false'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1471:12: 'false'
{
match("false"); if (failed) return ;
@@ -1427,8 +1427,8 @@
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:1492:11: ( 'package' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1492:11: 'package'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1474:11: ( 'package' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1474:11: 'package'
{
match("package"); if (failed) return ;
@@ -1459,8 +1459,8 @@
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:1494:10: ( 'import' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1494:10: 'import'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1476:10: ( 'import' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1476:10: 'import'
{
match("import"); if (failed) return ;
@@ -1491,8 +1491,8 @@
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:1496:12: ( 'function' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1496:12: 'function'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1478:12: ( 'function' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1478:12: 'function'
{
match("function"); if (failed) return ;
@@ -1523,8 +1523,8 @@
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:1498:10: ( 'global' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1498:10: 'global'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1480:10: ( 'global' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1480:10: 'global'
{
match("global"); if (failed) return ;
@@ -1555,8 +1555,8 @@
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:1500:11: ( 'rule' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1500:11: 'rule'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1482:11: ( 'rule' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1482:11: 'rule'
{
match("rule"); if (failed) return ;
@@ -1587,8 +1587,8 @@
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:1502:9: ( 'query' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1502:9: 'query'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1484:9: ( 'query' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1484:9: 'query'
{
match("query"); if (failed) return ;
@@ -1619,8 +1619,8 @@
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:1504:12: ( 'template' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1504:12: 'template'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1486:12: ( 'template' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1486:12: 'template'
{
match("template"); if (failed) return ;
@@ -1651,8 +1651,8 @@
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:1506:14: ( 'attributes' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1506:14: 'attributes'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1488:14: ( 'attributes' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1488:14: 'attributes'
{
match("attributes"); if (failed) return ;
@@ -1683,8 +1683,8 @@
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:1509:4: ( 'date-effective' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1509:4: 'date-effective'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1491:4: ( 'date-effective' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1491:4: 'date-effective'
{
match("date-effective"); if (failed) return ;
@@ -1715,8 +1715,8 @@
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:1512:4: ( 'date-expires' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1512:4: 'date-expires'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1494:4: ( 'date-expires' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1494:4: 'date-expires'
{
match("date-expires"); if (failed) return ;
@@ -1747,8 +1747,8 @@
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:1514:11: ( 'enabled' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1514:11: 'enabled'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1496:11: ( 'enabled' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1496:11: 'enabled'
{
match("enabled"); if (failed) return ;
@@ -1779,8 +1779,8 @@
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:1517:4: ( 'salience' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1517:4: 'salience'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1499:4: ( 'salience' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1499:4: 'salience'
{
match("salience"); if (failed) return ;
@@ -1811,8 +1811,8 @@
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:1519:11: ( 'no-loop' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1519:11: 'no-loop'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1501:11: ( 'no-loop' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1501:11: 'no-loop'
{
match("no-loop"); if (failed) return ;
@@ -1843,8 +1843,8 @@
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:1522:4: ( 'auto-focus' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1522:4: 'auto-focus'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1504:4: ( 'auto-focus' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1504:4: 'auto-focus'
{
match("auto-focus"); if (failed) return ;
@@ -1875,8 +1875,8 @@
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:1525:4: ( 'activation-group' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1525:4: 'activation-group'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1507:4: ( 'activation-group' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1507:4: 'activation-group'
{
match("activation-group"); if (failed) return ;
@@ -1907,8 +1907,8 @@
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:1528:4: ( 'agenda-group' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1528:4: 'agenda-group'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1510:4: ( 'agenda-group' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1510:4: 'agenda-group'
{
match("agenda-group"); if (failed) return ;
@@ -1939,8 +1939,8 @@
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:1531:4: ( 'duration' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1531:4: 'duration'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1513:4: ( 'duration' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1513:4: 'duration'
{
match("duration"); if (failed) return ;
@@ -1971,8 +1971,8 @@
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:1533:8: ( 'from' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1533:8: 'from'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1515:8: ( 'from' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1515:8: 'from'
{
match("from"); if (failed) return ;
@@ -2003,8 +2003,8 @@
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:1536:4: ( 'accumulate' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1536:4: 'accumulate'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1518:4: ( 'accumulate' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1518:4: 'accumulate'
{
match("accumulate"); if (failed) return ;
@@ -2035,8 +2035,8 @@
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:1538:8: ( 'init' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1538:8: 'init'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1520:8: ( 'init' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1520:8: 'init'
{
match("init"); if (failed) return ;
@@ -2067,8 +2067,8 @@
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:1540:10: ( 'action' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1540:10: 'action'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1522:10: ( 'action' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1522:10: 'action'
{
match("action"); if (failed) return ;
@@ -2099,8 +2099,8 @@
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:1542:10: ( 'result' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1542:10: 'result'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1524:10: ( 'result' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1524:10: 'result'
{
match("result"); if (failed) return ;
@@ -2131,8 +2131,8 @@
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:1544:11: ( 'collect' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1544:11: 'collect'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1526:11: ( 'collect' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1526:11: 'collect'
{
match("collect"); if (failed) return ;
@@ -2163,8 +2163,8 @@
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:1546:6: ( 'or' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1546:6: 'or'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1528:6: ( 'or' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1528:6: 'or'
{
match("or"); if (failed) return ;
@@ -2195,8 +2195,8 @@
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:1548:7: ( 'and' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1548:7: 'and'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1530:7: ( 'and' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1530:7: 'and'
{
match("and"); if (failed) return ;
@@ -2227,8 +2227,8 @@
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:1551:4: ( 'contains' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1551:4: 'contains'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1533:4: ( 'contains' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1533:4: 'contains'
{
match("contains"); if (failed) return ;
@@ -2259,8 +2259,8 @@
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:1554:4: ( 'excludes' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1554:4: 'excludes'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1536:4: ( 'excludes' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1536:4: 'excludes'
{
match("excludes"); if (failed) return ;
@@ -2291,8 +2291,8 @@
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:1556:11: ( 'matches' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1556:11: 'matches'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1538:11: ( 'matches' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1538:11: 'matches'
{
match("matches"); if (failed) return ;
@@ -2323,8 +2323,8 @@
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:1558:8: ( 'null' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1558:8: 'null'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1540:8: ( 'null' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1540:8: 'null'
{
match("null"); if (failed) return ;
@@ -2355,8 +2355,8 @@
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:1560:10: ( 'exists' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1560:10: 'exists'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1542:10: ( 'exists' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1542:10: 'exists'
{
match("exists"); if (failed) return ;
@@ -2387,8 +2387,8 @@
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:1562:7: ( 'not' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1562:7: 'not'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1544:7: ( 'not' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1544:7: 'not'
{
match("not"); if (failed) return ;
@@ -2419,8 +2419,8 @@
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:1564:8: ( 'eval' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1564:8: 'eval'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1546:8: ( 'eval' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1546:8: 'eval'
{
match("eval"); if (failed) return ;
@@ -2451,8 +2451,8 @@
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:1566:10: ( 'forall' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1566:10: 'forall'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1548:10: ( 'forall' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1548:10: 'forall'
{
match("forall"); if (failed) return ;
@@ -2483,8 +2483,8 @@
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:1568:11: ( 'when' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1568:11: 'when'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1550:11: ( 'when' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1550:11: 'when'
{
match("when"); if (failed) return ;
@@ -2515,8 +2515,8 @@
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:1570:12: ( 'then' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1570:12: 'then'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1552:12: ( 'then' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1552:12: 'then'
{
match("then"); if (failed) return ;
@@ -2547,8 +2547,8 @@
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:1572:11: ( 'end' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1572:11: 'end'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1554:11: ( 'end' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1554:11: 'end'
{
match("end"); if (failed) return ;
@@ -2579,8 +2579,8 @@
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:1575: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:1575: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:1557: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:1557: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 +2593,7 @@
recover(mse); throw mse;
}
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1575:50: ( ('a'..'z'|'A'..'Z'|'_'|'0'..'9'|'\\u00c0'..'\\u00ff'))*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1557:50: ( ('a'..'z'|'A'..'Z'|'_'|'0'..'9'|'\\u00c0'..'\\u00ff'))*
loop14:
do {
int alt14=2;
@@ -2605,7 +2605,7 @@
switch (alt14) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1575:51: ('a'..'z'|'A'..'Z'|'_'|'0'..'9'|'\\u00c0'..'\\u00ff')
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1557: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 +2654,11 @@
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:1580:4: ( '#' ( options {greedy=false; } : . )* EOL )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1580:4: '#' ( options {greedy=false; } : . )* EOL
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1562:4: ( '#' ( options {greedy=false; } : . )* EOL )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1562:4: '#' ( options {greedy=false; } : . )* EOL
{
match('#'); if (failed) return ;
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1580:8: ( options {greedy=false; } : . )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1562:8: ( options {greedy=false; } : . )*
loop15:
do {
int alt15=2;
@@ -2676,7 +2676,7 @@
switch (alt15) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1580:35: .
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1562:35: .
{
matchAny(); if (failed) return ;
@@ -2719,12 +2719,12 @@
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:1586:4: ( '//' ( options {greedy=false; } : . )* EOL )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1586:4: '//' ( options {greedy=false; } : . )* EOL
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1568:4: ( '//' ( options {greedy=false; } : . )* EOL )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1568:4: '//' ( options {greedy=false; } : . )* EOL
{
match("//"); if (failed) return ;
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1586:9: ( options {greedy=false; } : . )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1568:9: ( options {greedy=false; } : . )*
loop16:
do {
int alt16=2;
@@ -2742,7 +2742,7 @@
switch (alt16) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1586:36: .
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1568:36: .
{
matchAny(); if (failed) return ;
@@ -2785,8 +2785,8 @@
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:1592:11: ( '(' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1592:11: '('
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1574:11: ( '(' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1574:11: '('
{
match('('); if (failed) return ;
@@ -2816,8 +2816,8 @@
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:1596:11: ( ')' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1596:11: ')'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1578:11: ( ')' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1578:11: ')'
{
match(')'); if (failed) return ;
@@ -2847,8 +2847,8 @@
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:1600:11: ( '[' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1600:11: '['
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1582:11: ( '[' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1582:11: '['
{
match('['); if (failed) return ;
@@ -2878,8 +2878,8 @@
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:1604:11: ( ']' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1604:11: ']'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1586:11: ( ']' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1586:11: ']'
{
match(']'); if (failed) return ;
@@ -2909,8 +2909,8 @@
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:1608:11: ( '{' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1608:11: '{'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1590:11: ( '{' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1590:11: '{'
{
match('{'); if (failed) return ;
@@ -2940,8 +2940,8 @@
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:1612:11: ( '}' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1612:11: '}'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1594:11: ( '}' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1594:11: '}'
{
match('}'); if (failed) return ;
@@ -2971,12 +2971,12 @@
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:1616:4: ( '/*' ( options {greedy=false; } : . )* '*/' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1616:4: '/*' ( options {greedy=false; } : . )* '*/'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1598:4: ( '/*' ( options {greedy=false; } : . )* '*/' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1598:4: '/*' ( options {greedy=false; } : . )* '*/'
{
match("/*"); if (failed) return ;
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1616:9: ( options {greedy=false; } : . )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1598:9: ( options {greedy=false; } : . )*
loop17:
do {
int alt17=2;
@@ -2999,7 +2999,7 @@
switch (alt17) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1616:35: .
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1598:35: .
{
matchAny(); if (failed) return ;
@@ -3043,8 +3043,8 @@
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:1620:7: ( ('!'|'@'|'$'|'%'|'^'|'&'|'*'|'_'|'-'|'+'|'?'|'|'|','|'='|'/'|'\\''|'\\\\'))
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1621:3: ('!'|'@'|'$'|'%'|'^'|'&'|'*'|'_'|'-'|'+'|'?'|'|'|','|'='|'/'|'\\''|'\\\\')
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1602:7: ( ('!'|'@'|'$'|'%'|'^'|'&'|'*'|'_'|'-'|'+'|'?'|'|'|','|'='|'/'|'\\''|'\\\\'))
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1603: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();
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-02-15 15:52:34 UTC (rev 9537)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/DRLParser.java 2007-02-15 20:49:28 UTC (rev 9538)
@@ -1,4 +1,4 @@
-// $ANTLR 3.0b5 D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g 2007-02-03 10:35:43
+// $ANTLR 3.0b5 D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g 2007-02-14 21:00:52
package org.drools.lang;
import java.util.List;
@@ -89,9 +89,6 @@
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";
@@ -118,13 +115,6 @@
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;
}
@@ -144,14 +134,6 @@
this.lineOffset = i;
}
- public void setExpanderResolver(ExpanderResolver expanderResolver) {
- this.expanderResolver = expanderResolver;
- }
-
- public ExpanderResolver getExpanderResolver() {
- return expanderResolver;
- }
-
private String getString(Token token) {
String orig = token.getText();
return orig.substring( 1, orig.length() -1 );
@@ -257,13 +239,13 @@
// $ANTLR start opt_semicolon
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:186:1: opt_semicolon : ( ( ';' )=> ';' )? ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:168:1: opt_semicolon : ( ( ';' )=> ';' )? ;
public void opt_semicolon() throws RecognitionException {
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:187:4: ( ( ( ';' )=> ';' )? )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:187:4: ( ( ';' )=> ';' )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:169:4: ( ( ( ';' )=> ';' )? )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:169:4: ( ( ';' )=> ';' )?
{
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:187:4: ( ( ';' )=> ';' )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:169:4: ( ( ';' )=> ';' )?
int alt1=2;
int LA1_0 = input.LA(1);
if ( (LA1_0==61) ) {
@@ -296,17 +278,17 @@
// $ANTLR start compilation_unit
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:190:1: compilation_unit : prolog ( ( statement )=> statement )+ ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:172:1: compilation_unit : prolog ( ( statement )=> statement )+ ;
public void compilation_unit() throws RecognitionException {
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:191:4: ( prolog ( ( statement )=> statement )+ )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:191:4: prolog ( ( statement )=> statement )+
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:173:4: ( prolog ( ( statement )=> statement )+ )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:173:4: prolog ( ( statement )=> statement )+
{
pushFollow(FOLLOW_prolog_in_compilation_unit58);
prolog();
_fsp--;
if (failed) return ;
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:192:3: ( ( statement )=> statement )+
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:174:3: ( ( statement )=> statement )+
int cnt2=0;
loop2:
do {
@@ -319,7 +301,7 @@
switch (alt2) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:192:5: ( statement )=> statement
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:174:5: ( statement )=> statement
{
pushFollow(FOLLOW_statement_in_compilation_unit65);
statement();
@@ -355,7 +337,7 @@
// $ANTLR start prolog
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:195:1: prolog : ( ( package_statement )=>n= package_statement )? ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:177:1: prolog : ( ( package_statement )=>n= package_statement )? ;
public void prolog() throws RecognitionException {
String n = null;
@@ -364,10 +346,10 @@
String packageName = "";
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:199:4: ( ( ( package_statement )=>n= package_statement )? )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:199:4: ( ( package_statement )=>n= package_statement )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:181:4: ( ( ( package_statement )=>n= package_statement )? )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:181:4: ( ( package_statement )=>n= package_statement )?
{
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:199:4: ( ( package_statement )=>n= package_statement )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:181:4: ( ( package_statement )=>n= package_statement )?
int alt3=2;
int LA3_0 = input.LA(1);
if ( (LA3_0==PACKAGE) ) {
@@ -375,7 +357,7 @@
}
switch (alt3) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:199:6: ( package_statement )=>n= package_statement
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:181:6: ( package_statement )=>n= package_statement
{
pushFollow(FOLLOW_package_statement_in_prolog90);
n=package_statement();
@@ -411,7 +393,7 @@
// $ANTLR start statement
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:205: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:187: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;
@@ -421,15 +403,15 @@
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:207: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:207: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:189: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:189: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:207: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:189: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;
alt4 = dfa4.predict(input);
switch (alt4) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:207:4: ( import_statement )=> import_statement
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:189:4: ( import_statement )=> import_statement
{
pushFollow(FOLLOW_import_statement_in_statement114);
import_statement();
@@ -439,7 +421,7 @@
}
break;
case 2 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:208:10: ( function_import_statement )=> function_import_statement
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:190:10: ( function_import_statement )=> function_import_statement
{
pushFollow(FOLLOW_function_import_statement_in_statement126);
function_import_statement();
@@ -449,7 +431,7 @@
}
break;
case 3 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:209:4: ( global )=> global
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:191:4: ( global )=> global
{
pushFollow(FOLLOW_global_in_statement132);
global();
@@ -459,7 +441,7 @@
}
break;
case 4 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:210:4: ( function )=> function
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:192:4: ( function )=> function
{
pushFollow(FOLLOW_function_in_statement138);
function();
@@ -469,7 +451,7 @@
}
break;
case 5 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:211:10: ( template )=>t= template
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:193:10: ( template )=>t= template
{
pushFollow(FOLLOW_template_in_statement152);
t=template();
@@ -482,7 +464,7 @@
}
break;
case 6 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:212:4: ( rule )=>r= rule
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:194:4: ( rule )=>r= rule
{
pushFollow(FOLLOW_rule_in_statement161);
r=rule();
@@ -495,7 +477,7 @@
}
break;
case 7 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:213:4: q= query
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:195:4: q= query
{
pushFollow(FOLLOW_query_in_statement173);
q=query();
@@ -526,7 +508,7 @@
// $ANTLR start package_statement
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:217:1: package_statement returns [String packageName] : PACKAGE n= dotted_name[null] opt_semicolon ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:199:1: package_statement returns [String packageName] : PACKAGE n= dotted_name[null] opt_semicolon ;
public String package_statement() throws RecognitionException {
String packageName = null;
@@ -537,8 +519,8 @@
packageName = null;
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:222:3: ( PACKAGE n= dotted_name[null] opt_semicolon )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:222:3: PACKAGE n= dotted_name[null] opt_semicolon
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:204:3: ( PACKAGE n= dotted_name[null] opt_semicolon )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:204:3: PACKAGE n= dotted_name[null] opt_semicolon
{
match(input,PACKAGE,FOLLOW_PACKAGE_in_package_statement202); if (failed) return packageName;
pushFollow(FOLLOW_dotted_name_in_package_statement206);
@@ -570,7 +552,7 @@
// $ANTLR start import_statement
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:229:1: import_statement : imp= IMPORT import_name[importDecl] opt_semicolon ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:211:1: import_statement : imp= IMPORT import_name[importDecl] opt_semicolon ;
public void import_statement() throws RecognitionException {
Token imp=null;
@@ -578,8 +560,8 @@
ImportDescr importDecl = null;
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:233:4: (imp= IMPORT import_name[importDecl] opt_semicolon )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:233:4: imp= IMPORT import_name[importDecl] opt_semicolon
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:215:4: (imp= IMPORT import_name[importDecl] opt_semicolon )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:215:4: imp= IMPORT import_name[importDecl] opt_semicolon
{
imp=(Token)input.LT(1);
match(input,IMPORT,FOLLOW_IMPORT_in_import_statement241); if (failed) return ;
@@ -616,7 +598,7 @@
// $ANTLR start function_import_statement
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:244:1: function_import_statement : imp= IMPORT FUNCTION import_name[importDecl] opt_semicolon ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:226:1: function_import_statement : imp= IMPORT FUNCTION import_name[importDecl] opt_semicolon ;
public void function_import_statement() throws RecognitionException {
Token imp=null;
@@ -624,8 +606,8 @@
FunctionImportDescr importDecl = null;
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:248:4: (imp= IMPORT FUNCTION import_name[importDecl] opt_semicolon )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:248:4: imp= IMPORT FUNCTION import_name[importDecl] opt_semicolon
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:230:4: (imp= IMPORT FUNCTION import_name[importDecl] opt_semicolon )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:230:4: imp= IMPORT FUNCTION import_name[importDecl] opt_semicolon
{
imp=(Token)input.LT(1);
match(input,IMPORT,FOLLOW_IMPORT_in_function_import_statement293); if (failed) return ;
@@ -663,7 +645,7 @@
// $ANTLR start import_name
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:260:1: import_name[ImportDescr importDecl] returns [String name] : id= identifier ( ( '.' identifier )=> '.' id= identifier )* ( ( '.*' )=>star= '.*' )? ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:242:1: import_name[ImportDescr importDecl] returns [String name] : id= identifier ( ( '.' identifier )=> '.' id= identifier )* ( ( '.*' )=>star= '.*' )? ;
public String import_name(ImportDescr importDecl) throws RecognitionException {
String name = null;
@@ -675,8 +657,8 @@
name = null;
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:265:3: (id= identifier ( ( '.' identifier )=> '.' id= identifier )* ( ( '.*' )=>star= '.*' )? )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:265:3: id= identifier ( ( '.' identifier )=> '.' id= identifier )* ( ( '.*' )=>star= '.*' )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:247:3: (id= identifier ( ( '.' identifier )=> '.' id= identifier )* ( ( '.*' )=>star= '.*' )? )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:247:3: id= identifier ( ( '.' identifier )=> '.' id= identifier )* ( ( '.*' )=>star= '.*' )?
{
pushFollow(FOLLOW_identifier_in_import_name349);
id=identifier();
@@ -689,7 +671,7 @@
importDecl.setEndCharacter( ((CommonToken)id).getStopIndex() );
}
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:271:3: ( ( '.' identifier )=> '.' id= identifier )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:253:3: ( ( '.' identifier )=> '.' id= identifier )*
loop5:
do {
int alt5=2;
@@ -701,7 +683,7 @@
switch (alt5) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:271:5: ( '.' identifier )=> '.' id= identifier
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:253:5: ( '.' identifier )=> '.' id= identifier
{
match(input,62,FOLLOW_62_in_import_name361); if (failed) return name;
pushFollow(FOLLOW_identifier_in_import_name365);
@@ -724,7 +706,7 @@
}
} while (true);
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:278:3: ( ( '.*' )=>star= '.*' )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:260:3: ( ( '.*' )=>star= '.*' )?
int alt6=2;
int LA6_0 = input.LA(1);
if ( (LA6_0==63) ) {
@@ -732,7 +714,7 @@
}
switch (alt6) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:278:5: ( '.*' )=>star= '.*'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:260:5: ( '.*' )=>star= '.*'
{
star=(Token)input.LT(1);
match(input,63,FOLLOW_63_in_import_name389); if (failed) return name;
@@ -765,7 +747,7 @@
// $ANTLR start global
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:288:1: global : loc= GLOBAL type= dotted_name[null] id= identifier opt_semicolon ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:270:1: global : loc= GLOBAL type= dotted_name[null] id= identifier opt_semicolon ;
public void global() throws RecognitionException {
Token loc=null;
String type = null;
@@ -777,8 +759,8 @@
GlobalDescr global = null;
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:293:3: (loc= GLOBAL type= dotted_name[null] id= identifier opt_semicolon )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:293:3: loc= GLOBAL type= dotted_name[null] id= identifier opt_semicolon
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:275:3: (loc= GLOBAL type= dotted_name[null] id= identifier opt_semicolon )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:275:3: loc= GLOBAL type= dotted_name[null] id= identifier opt_semicolon
{
loc=(Token)input.LT(1);
match(input,GLOBAL,FOLLOW_GLOBAL_in_global425); if (failed) return ;
@@ -828,7 +810,7 @@
// $ANTLR start function
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:311:1: function : loc= FUNCTION ( ( dotted_name[null] )=>retType= dotted_name[null] )? n= identifier '(' ( ( ( ( dotted_name[null] )=> dotted_name[null] )? argument ( ( ',' ( ( dotted_name[null] )=> dotted_name[null] )? argument )=> ',' ( ( dotted_name[null] )=> dotted_name[null] )? argument )* )=> ( ( dotted_name[null] )=>paramType= dotted_name[null] )? paramName= argument ( ( ',' ( ( dotted_name[null] )=> dotted_name[null] )? argument )=> ',' ( ( dotted_name[null] )=>paramType= dotted_name[null] )? paramName= argument )* )? ')' body= curly_chunk[f] ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:293:1: function : loc= FUNCTION ( ( dotted_name[null] )=>retType= dotted_name[null] )? n= identifier '(' ( ( ( ( dotted_name[null] )=> dotted_name[null] )? argument ( ( ',' ( ( dotted_name[null] )=> dotted_name[null] )? argument )=> ',' ( ( dotted_name[null] )=> dotted_name[null] )? argument )* )=> ( ( dotted_name[null] )=>paramType= dotted_name[null] )? paramName= argument ( ( ',' ( ( dotted_name[null] )=> dotted_name[null] )? argument )=> ',' ( ( dotted_name[null] )=>paramType= dotted_name[null] )? paramName= argument )* )? ')' body= curly_chunk[f] ;
public void function() throws RecognitionException {
Token loc=null;
String retType = null;
@@ -846,12 +828,12 @@
FunctionDescr f = null;
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:316:3: (loc= FUNCTION ( ( dotted_name[null] )=>retType= dotted_name[null] )? n= identifier '(' ( ( ( ( dotted_name[null] )=> dotted_name[null] )? argument ( ( ',' ( ( dotted_name[null] )=> dotted_name[null] )? argument )=> ',' ( ( dotted_name[null] )=> dotted_name[null] )? argument )* )=> ( ( dotted_name[null] )=>paramType= dotted_name[null] )? paramName= argument ( ( ',' ( ( dotted_name[null] )=> dotted_name[null] )? argument )=> ',' ( ( dotted_name[null] )=>paramType= dotted_name[null] )? paramName= argument )* )? ')' body= curly_chunk[f] )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:316:3: loc= FUNCTION ( ( dotted_name[null] )=>retType= dotted_name[null] )? n= identifier '(' ( ( ( ( dotted_name[null] )=> dotted_name[null] )? argument ( ( ',' ( ( dotted_name[null] )=> dotted_name[null] )? argument )=> ',' ( ( dotted_name[null] )=> dotted_name[null] )? argument )* )=> ( ( dotted_name[null] )=>paramType= dotted_name[null] )? paramName= argument ( ( ',' ( ( dotted_name[null] )=> dotted_name[null] )? argument )=> ',' ( ( dotted_name[null] )=>paramType= dotted_name[null] )? paramName= argument )* )? ')' body= curly_chunk[f]
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:298:3: (loc= FUNCTION ( ( dotted_name[null] )=>retType= dotted_name[null] )? n= identifier '(' ( ( ( ( dotted_name[null] )=> dotted_name[null] )? argument ( ( ',' ( ( dotted_name[null] )=> dotted_name[null] )? argument )=> ',' ( ( dotted_name[null] )=> dotted_name[null] )? argument )* )=> ( ( dotted_name[null] )=>paramType= dotted_name[null] )? paramName= argument ( ( ',' ( ( dotted_name[null] )=> dotted_name[null] )? argument )=> ',' ( ( dotted_name[null] )=>paramType= dotted_name[null] )? paramName= argument )* )? ')' body= curly_chunk[f] )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:298:3: loc= FUNCTION ( ( dotted_name[null] )=>retType= dotted_name[null] )? n= identifier '(' ( ( ( ( dotted_name[null] )=> dotted_name[null] )? argument ( ( ',' ( ( dotted_name[null] )=> dotted_name[null] )? argument )=> ',' ( ( dotted_name[null] )=> dotted_name[null] )? argument )* )=> ( ( dotted_name[null] )=>paramType= dotted_name[null] )? paramName= argument ( ( ',' ( ( dotted_name[null] )=> dotted_name[null] )? argument )=> ',' ( ( dotted_name[null] )=>paramType= dotted_name[null] )? paramName= argument )* )? ')' body= curly_chunk[f]
{
loc=(Token)input.LT(1);
match(input,FUNCTION,FOLLOW_FUNCTION_in_function477); if (failed) return ;
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:316:16: ( ( dotted_name[null] )=>retType= dotted_name[null] )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:298:16: ( ( dotted_name[null] )=>retType= dotted_name[null] )?
int alt7=2;
int LA7_0 = input.LA(1);
if ( (LA7_0==ID) ) {
@@ -862,7 +844,7 @@
}
switch (alt7) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:316:17: ( dotted_name[null] )=>retType= dotted_name[null]
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:298:17: ( dotted_name[null] )=>retType= dotted_name[null]
{
pushFollow(FOLLOW_dotted_name_in_function482);
retType=dotted_name(null);
@@ -888,7 +870,7 @@
}
match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_function498); if (failed) return ;
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:325:4: ( ( ( ( dotted_name[null] )=> dotted_name[null] )? argument ( ( ',' ( ( dotted_name[null] )=> dotted_name[null] )? argument )=> ',' ( ( dotted_name[null] )=> dotted_name[null] )? argument )* )=> ( ( dotted_name[null] )=>paramType= dotted_name[null] )? paramName= argument ( ( ',' ( ( dotted_name[null] )=> dotted_name[null] )? argument )=> ',' ( ( dotted_name[null] )=>paramType= dotted_name[null] )? paramName= argument )* )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:307:4: ( ( ( ( dotted_name[null] )=> dotted_name[null] )? argument ( ( ',' ( ( dotted_name[null] )=> dotted_name[null] )? argument )=> ',' ( ( dotted_name[null] )=> dotted_name[null] )? argument )* )=> ( ( dotted_name[null] )=>paramType= dotted_name[null] )? paramName= argument ( ( ',' ( ( dotted_name[null] )=> dotted_name[null] )? argument )=> ',' ( ( dotted_name[null] )=>paramType= dotted_name[null] )? paramName= argument )* )?
int alt11=2;
int LA11_0 = input.LA(1);
if ( ((LA11_0>=PACKAGE && LA11_0<=ATTRIBUTES)||LA11_0==ENABLED||LA11_0==SALIENCE||(LA11_0>=DURATION && LA11_0<=OR)||(LA11_0>=CONTAINS && LA11_0<=EXCLUDES)||LA11_0==NULL||(LA11_0>=AND && LA11_0<=THEN)) ) {
@@ -896,14 +878,14 @@
}
switch (alt11) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:325:6: ( ( ( dotted_name[null] )=> dotted_name[null] )? argument ( ( ',' ( ( dotted_name[null] )=> dotted_name[null] )? argument )=> ',' ( ( dotted_name[null] )=> dotted_name[null] )? argument )* )=> ( ( dotted_name[null] )=>paramType= dotted_name[null] )? paramName= argument ( ( ',' ( ( dotted_name[null] )=> dotted_name[null] )? argument )=> ',' ( ( dotted_name[null] )=>paramType= dotted_name[null] )? paramName= argument )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:307:6: ( ( ( dotted_name[null] )=> dotted_name[null] )? argument ( ( ',' ( ( dotted_name[null] )=> dotted_name[null] )? argument )=> ',' ( ( dotted_name[null] )=> dotted_name[null] )? argument )* )=> ( ( dotted_name[null] )=>paramType= dotted_name[null] )? paramName= argument ( ( ',' ( ( dotted_name[null] )=> dotted_name[null] )? argument )=> ',' ( ( dotted_name[null] )=>paramType= dotted_name[null] )? paramName= argument )*
{
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:325:6: ( ( dotted_name[null] )=>paramType= dotted_name[null] )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:307:6: ( ( dotted_name[null] )=>paramType= dotted_name[null] )?
int alt8=2;
alt8 = dfa8.predict(input);
switch (alt8) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:325:7: ( dotted_name[null] )=>paramType= dotted_name[null]
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:307:7: ( dotted_name[null] )=>paramType= dotted_name[null]
{
pushFollow(FOLLOW_dotted_name_in_function508);
paramType=dotted_name(null);
@@ -924,7 +906,7 @@
f.addParameter( paramType, paramName );
}
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:329:5: ( ( ',' ( ( dotted_name[null] )=> dotted_name[null] )? argument )=> ',' ( ( dotted_name[null] )=>paramType= dotted_name[null] )? paramName= argument )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:311:5: ( ( ',' ( ( dotted_name[null] )=> dotted_name[null] )? argument )=> ',' ( ( dotted_name[null] )=>paramType= dotted_name[null] )? paramName= argument )*
loop10:
do {
int alt10=2;
@@ -936,15 +918,15 @@
switch (alt10) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:329:7: ( ',' ( ( dotted_name[null] )=> dotted_name[null] )? argument )=> ',' ( ( dotted_name[null] )=>paramType= dotted_name[null] )? paramName= argument
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:311:7: ( ',' ( ( dotted_name[null] )=> dotted_name[null] )? argument )=> ',' ( ( dotted_name[null] )=>paramType= dotted_name[null] )? paramName= argument
{
match(input,64,FOLLOW_64_in_function529); if (failed) return ;
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:329:11: ( ( dotted_name[null] )=>paramType= dotted_name[null] )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:311:11: ( ( dotted_name[null] )=>paramType= dotted_name[null] )?
int alt9=2;
alt9 = dfa9.predict(input);
switch (alt9) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:329:12: ( dotted_name[null] )=>paramType= dotted_name[null]
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:311:12: ( dotted_name[null] )=>paramType= dotted_name[null]
{
pushFollow(FOLLOW_dotted_name_in_function534);
paramType=dotted_name(null);
@@ -1007,7 +989,7 @@
// $ANTLR start query
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:345:1: query returns [QueryDescr query] : loc= QUERY queryName= name ( normal_lhs_block[lhs] ) loc= END ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:327:1: query returns [QueryDescr query] : loc= QUERY queryName= name ( normal_lhs_block[lhs] ) loc= END ;
public QueryDescr query() throws RecognitionException {
QueryDescr query = null;
@@ -1020,8 +1002,8 @@
AndDescr lhs = null;
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:351:3: (loc= QUERY queryName= name ( normal_lhs_block[lhs] ) loc= END )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:351:3: loc= QUERY queryName= name ( normal_lhs_block[lhs] ) loc= END
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:333:3: (loc= QUERY queryName= name ( normal_lhs_block[lhs] ) loc= END )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:333:3: loc= QUERY queryName= name ( normal_lhs_block[lhs] ) loc= END
{
loc=(Token)input.LT(1);
match(input,QUERY,FOLLOW_QUERY_in_query603); if (failed) return query;
@@ -1038,8 +1020,8 @@
lhs.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
}
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:359:3: ( normal_lhs_block[lhs] )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:360:4: normal_lhs_block[lhs]
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:341:3: ( normal_lhs_block[lhs] )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:342:4: normal_lhs_block[lhs]
{
pushFollow(FOLLOW_normal_lhs_block_in_query620);
normal_lhs_block(lhs);
@@ -1071,7 +1053,7 @@
// $ANTLR start template
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:370:1: template returns [FactTemplateDescr template] : loc= TEMPLATE templateName= identifier opt_semicolon ( ( template_slot )=>slot= template_slot )+ loc= END opt_semicolon ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:352:1: template returns [FactTemplateDescr template] : loc= TEMPLATE templateName= identifier opt_semicolon ( ( template_slot )=>slot= template_slot )+ loc= END opt_semicolon ;
public FactTemplateDescr template() throws RecognitionException {
FactTemplateDescr template = null;
@@ -1085,8 +1067,8 @@
template = null;
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:375:3: (loc= TEMPLATE templateName= identifier opt_semicolon ( ( template_slot )=>slot= template_slot )+ loc= END opt_semicolon )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:375:3: loc= TEMPLATE templateName= identifier opt_semicolon ( ( template_slot )=>slot= template_slot )+ loc= END opt_semicolon
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:357:3: (loc= TEMPLATE templateName= identifier opt_semicolon ( ( template_slot )=>slot= template_slot )+ loc= END opt_semicolon )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:357:3: loc= TEMPLATE templateName= identifier opt_semicolon ( ( template_slot )=>slot= template_slot )+ loc= END opt_semicolon
{
loc=(Token)input.LT(1);
match(input,TEMPLATE,FOLLOW_TEMPLATE_in_template667); if (failed) return template;
@@ -1105,7 +1087,7 @@
template.setStartCharacter( ((CommonToken)loc).getStartIndex() );
}
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:381:3: ( ( template_slot )=>slot= template_slot )+
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:363:3: ( ( template_slot )=>slot= template_slot )+
int cnt12=0;
loop12:
do {
@@ -1118,7 +1100,7 @@
switch (alt12) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:382:4: ( template_slot )=>slot= template_slot
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:364:4: ( template_slot )=>slot= template_slot
{
pushFollow(FOLLOW_template_slot_in_template688);
slot=template_slot();
@@ -1170,7 +1152,7 @@
// $ANTLR start template_slot
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:393:1: template_slot returns [FieldTemplateDescr field] : fieldType= dotted_name[field] n= identifier opt_semicolon ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:375:1: template_slot returns [FieldTemplateDescr field] : fieldType= dotted_name[field] n= identifier opt_semicolon ;
public FieldTemplateDescr template_slot() throws RecognitionException {
FieldTemplateDescr field = null;
@@ -1183,8 +1165,8 @@
field = null;
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:398:11: (fieldType= dotted_name[field] n= identifier opt_semicolon )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:398:11: fieldType= dotted_name[field] n= identifier opt_semicolon
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:380:11: (fieldType= dotted_name[field] n= identifier opt_semicolon )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:380:11: fieldType= dotted_name[field] n= identifier opt_semicolon
{
if ( backtracking==0 ) {
@@ -1231,7 +1213,7 @@
// $ANTLR start rule
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:414:1: rule returns [RuleDescr rule] : loc= RULE ruleName= name 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:396:1: rule returns [RuleDescr rule] : loc= RULE ruleName= name 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;
@@ -1245,8 +1227,8 @@
AndDescr lhs = null;
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:421:3: (loc= RULE ruleName= name 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:421:3: loc= RULE ruleName= name 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:403:3: (loc= RULE ruleName= name 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:403:3: loc= RULE ruleName= name 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_rule806); if (failed) return rule;
@@ -1266,7 +1248,7 @@
rule_attributes(rule);
_fsp--;
if (failed) return rule;
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:429: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:411: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) ) {
@@ -1274,11 +1256,11 @@
}
switch (alt14) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:429: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:411:5: ( WHEN ( ( ':' )=> ':' )? ( normal_lhs_block[lhs] ) )=>loc= WHEN ( ( ':' )=> ':' )? ( normal_lhs_block[lhs] )
{
loc=(Token)input.LT(1);
match(input,WHEN,FOLLOW_WHEN_in_rule828); if (failed) return rule;
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:429:14: ( ( ':' )=> ':' )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:411:14: ( ( ':' )=> ':' )?
int alt13=2;
int LA13_0 = input.LA(1);
if ( (LA13_0==65) ) {
@@ -1302,8 +1284,8 @@
lhs.setStartCharacter( ((CommonToken)loc).getStartIndex() );
}
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:435:4: ( normal_lhs_block[lhs] )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:437:5: normal_lhs_block[lhs]
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:417:4: ( normal_lhs_block[lhs] )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:419:5: normal_lhs_block[lhs]
{
pushFollow(FOLLOW_normal_lhs_block_in_rule848);
normal_lhs_block(lhs);
@@ -1338,16 +1320,16 @@
// $ANTLR start rule_attributes
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:446: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:428:1: rule_attributes[RuleDescr rule] : ( ( ATTRIBUTES ':' )=> ATTRIBUTES ':' )? ( ( ( ( ',' )=> ',' )? rule_attribute )=> ( ( ',' )=> ',' )? a= rule_attribute )* ;
public void rule_attributes(RuleDescr rule) throws RecognitionException {
AttributeDescr a = null;
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:448:4: ( ( ( ATTRIBUTES ':' )=> ATTRIBUTES ':' )? ( ( ( ( ',' )=> ',' )? rule_attribute )=> ( ( ',' )=> ',' )? a= rule_attribute )* )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:448:4: ( ( ATTRIBUTES ':' )=> ATTRIBUTES ':' )? ( ( ( ( ',' )=> ',' )? rule_attribute )=> ( ( ',' )=> ',' )? a= rule_attribute )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:430:4: ( ( ( ATTRIBUTES ':' )=> ATTRIBUTES ':' )? ( ( ( ( ',' )=> ',' )? rule_attribute )=> ( ( ',' )=> ',' )? a= rule_attribute )* )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:430:4: ( ( ATTRIBUTES ':' )=> ATTRIBUTES ':' )? ( ( ( ( ',' )=> ',' )? rule_attribute )=> ( ( ',' )=> ',' )? a= rule_attribute )*
{
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:448:4: ( ( ATTRIBUTES ':' )=> ATTRIBUTES ':' )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:430:4: ( ( ATTRIBUTES ':' )=> ATTRIBUTES ':' )?
int alt15=2;
int LA15_0 = input.LA(1);
if ( (LA15_0==ATTRIBUTES) ) {
@@ -1355,7 +1337,7 @@
}
switch (alt15) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:448:5: ( ATTRIBUTES ':' )=> ATTRIBUTES ':'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:430:5: ( ATTRIBUTES ':' )=> ATTRIBUTES ':'
{
match(input,ATTRIBUTES,FOLLOW_ATTRIBUTES_in_rule_attributes890); if (failed) return ;
match(input,65,FOLLOW_65_in_rule_attributes892); if (failed) return ;
@@ -1365,7 +1347,7 @@
}
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:449:4: ( ( ( ( ',' )=> ',' )? rule_attribute )=> ( ( ',' )=> ',' )? a= rule_attribute )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:431:4: ( ( ( ( ',' )=> ',' )? rule_attribute )=> ( ( ',' )=> ',' )? a= rule_attribute )*
loop17:
do {
int alt17=2;
@@ -1377,9 +1359,9 @@
switch (alt17) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:449:6: ( ( ( ',' )=> ',' )? rule_attribute )=> ( ( ',' )=> ',' )? a= rule_attribute
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:431:6: ( ( ( ',' )=> ',' )? rule_attribute )=> ( ( ',' )=> ',' )? a= rule_attribute
{
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:449:6: ( ( ',' )=> ',' )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:431:6: ( ( ',' )=> ',' )?
int alt16=2;
int LA16_0 = input.LA(1);
if ( (LA16_0==64) ) {
@@ -1430,7 +1412,7 @@
// $ANTLR start rule_attribute
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:458: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:440: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;
@@ -1441,7 +1423,7 @@
d = null;
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:463: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:445: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 SALIENCE:
@@ -1474,14 +1456,14 @@
default:
if (backtracking>0) {failed=true; return d;}
NoViableAltException nvae =
- new NoViableAltException("458: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 );", 18, 0, input);
+ new NoViableAltException("440: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 );", 18, 0, input);
throw nvae;
}
switch (alt18) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:463:4: ( salience )=>a= salience
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:445:4: ( salience )=>a= salience
{
pushFollow(FOLLOW_salience_in_rule_attribute947);
a=salience();
@@ -1494,7 +1476,7 @@
}
break;
case 2 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:464:5: ( no_loop )=>a= no_loop
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:446:5: ( no_loop )=>a= no_loop
{
pushFollow(FOLLOW_no_loop_in_rule_attribute957);
a=no_loop();
@@ -1507,7 +1489,7 @@
}
break;
case 3 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:465:5: ( agenda_group )=>a= agenda_group
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:447:5: ( agenda_group )=>a= agenda_group
{
pushFollow(FOLLOW_agenda_group_in_rule_attribute968);
a=agenda_group();
@@ -1520,7 +1502,7 @@
}
break;
case 4 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:466:5: ( duration )=>a= duration
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:448:5: ( duration )=>a= duration
{
pushFollow(FOLLOW_duration_in_rule_attribute981);
a=duration();
@@ -1533,7 +1515,7 @@
}
break;
case 5 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:467:5: ( activation_group )=>a= activation_group
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:449:5: ( activation_group )=>a= activation_group
{
pushFollow(FOLLOW_activation_group_in_rule_attribute995);
a=activation_group();
@@ -1546,7 +1528,7 @@
}
break;
case 6 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:468:5: ( auto_focus )=>a= auto_focus
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:450:5: ( auto_focus )=>a= auto_focus
{
pushFollow(FOLLOW_auto_focus_in_rule_attribute1006);
a=auto_focus();
@@ -1559,7 +1541,7 @@
}
break;
case 7 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:469:11: ( date_effective )=>a= date_effective
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:451:11: ( date_effective )=>a= date_effective
{
pushFollow(FOLLOW_date_effective_in_rule_attribute1023);
a=date_effective();
@@ -1572,7 +1554,7 @@
}
break;
case 8 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:470:5: ( date_expires )=>a= date_expires
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:452:5: ( date_expires )=>a= date_expires
{
pushFollow(FOLLOW_date_expires_in_rule_attribute1033);
a=date_expires();
@@ -1585,7 +1567,7 @@
}
break;
case 9 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:471:11: a= enabled
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:453:11: a= enabled
{
pushFollow(FOLLOW_enabled_in_rule_attribute1049);
a=enabled();
@@ -1612,7 +1594,7 @@
// $ANTLR start date_effective
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:475: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:457:1: date_effective returns [AttributeDescr d] : loc= DATE_EFFECTIVE val= STRING ;
public AttributeDescr date_effective() throws RecognitionException {
AttributeDescr d = null;
@@ -1623,8 +1605,8 @@
d = null;
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:480:3: (loc= DATE_EFFECTIVE val= STRING )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:480:3: loc= DATE_EFFECTIVE val= STRING
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:462:3: (loc= DATE_EFFECTIVE val= STRING )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:462:3: loc= DATE_EFFECTIVE val= STRING
{
loc=(Token)input.LT(1);
match(input,DATE_EFFECTIVE,FOLLOW_DATE_EFFECTIVE_in_date_effective1081); if (failed) return d;
@@ -1654,7 +1636,7 @@
// $ANTLR start date_expires
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:490: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:472:1: date_expires returns [AttributeDescr d] : loc= DATE_EXPIRES val= STRING ;
public AttributeDescr date_expires() throws RecognitionException {
AttributeDescr d = null;
@@ -1665,8 +1647,8 @@
d = null;
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:495:3: (loc= DATE_EXPIRES val= STRING )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:495:3: loc= DATE_EXPIRES val= STRING
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:477:3: (loc= DATE_EXPIRES val= STRING )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:477:3: loc= DATE_EXPIRES val= STRING
{
loc=(Token)input.LT(1);
match(input,DATE_EXPIRES,FOLLOW_DATE_EXPIRES_in_date_expires1118); if (failed) return d;
@@ -1696,7 +1678,7 @@
// $ANTLR start enabled
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:506:1: enabled returns [AttributeDescr d] : loc= ENABLED t= BOOL ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:488:1: enabled returns [AttributeDescr d] : loc= ENABLED t= BOOL ;
public AttributeDescr enabled() throws RecognitionException {
AttributeDescr d = null;
@@ -1707,8 +1689,8 @@
d = null;
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:511:4: (loc= ENABLED t= BOOL )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:511:4: loc= ENABLED t= BOOL
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:493:4: (loc= ENABLED t= BOOL )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:493:4: loc= ENABLED t= BOOL
{
loc=(Token)input.LT(1);
match(input,ENABLED,FOLLOW_ENABLED_in_enabled1157); if (failed) return d;
@@ -1738,7 +1720,7 @@
// $ANTLR start salience
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:524:1: salience returns [AttributeDescr d ] : loc= SALIENCE i= INT ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:506:1: salience returns [AttributeDescr d ] : loc= SALIENCE i= INT ;
public AttributeDescr salience() throws RecognitionException {
AttributeDescr d = null;
@@ -1749,8 +1731,8 @@
d = null;
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:529:3: (loc= SALIENCE i= INT )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:529:3: loc= SALIENCE i= INT
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:511:3: (loc= SALIENCE i= INT )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:511:3: loc= SALIENCE i= INT
{
loc=(Token)input.LT(1);
match(input,SALIENCE,FOLLOW_SALIENCE_in_salience1206); if (failed) return d;
@@ -1780,7 +1762,7 @@
// $ANTLR start no_loop
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:538:1: no_loop returns [AttributeDescr d] : ( ( ( NO_LOOP ) )=> (loc= NO_LOOP ) | (loc= NO_LOOP t= BOOL ) );
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:520:1: no_loop returns [AttributeDescr d] : ( ( ( NO_LOOP ) )=> (loc= NO_LOOP ) | (loc= NO_LOOP t= BOOL ) );
public AttributeDescr no_loop() throws RecognitionException {
AttributeDescr d = null;
@@ -1791,7 +1773,7 @@
d = null;
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:543:3: ( ( ( NO_LOOP ) )=> (loc= NO_LOOP ) | (loc= NO_LOOP t= BOOL ) )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:525:3: ( ( ( NO_LOOP ) )=> (loc= NO_LOOP ) | (loc= NO_LOOP t= BOOL ) )
int alt19=2;
int LA19_0 = input.LA(1);
if ( (LA19_0==NO_LOOP) ) {
@@ -1805,7 +1787,7 @@
else {
if (backtracking>0) {failed=true; return d;}
NoViableAltException nvae =
- new NoViableAltException("538:1: no_loop returns [AttributeDescr d] : ( ( ( NO_LOOP ) )=> (loc= NO_LOOP ) | (loc= NO_LOOP t= BOOL ) );", 19, 1, input);
+ new NoViableAltException("520:1: no_loop returns [AttributeDescr d] : ( ( ( NO_LOOP ) )=> (loc= NO_LOOP ) | (loc= NO_LOOP t= BOOL ) );", 19, 1, input);
throw nvae;
}
@@ -1813,16 +1795,16 @@
else {
if (backtracking>0) {failed=true; return d;}
NoViableAltException nvae =
- new NoViableAltException("538:1: no_loop returns [AttributeDescr d] : ( ( ( NO_LOOP ) )=> (loc= NO_LOOP ) | (loc= NO_LOOP t= BOOL ) );", 19, 0, input);
+ new NoViableAltException("520:1: no_loop returns [AttributeDescr d] : ( ( ( NO_LOOP ) )=> (loc= NO_LOOP ) | (loc= NO_LOOP t= BOOL ) );", 19, 0, input);
throw nvae;
}
switch (alt19) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:543:3: ( ( NO_LOOP ) )=> (loc= NO_LOOP )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:525:3: ( ( NO_LOOP ) )=> (loc= NO_LOOP )
{
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:543:3: (loc= NO_LOOP )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:544:4: loc= NO_LOOP
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:525:3: (loc= NO_LOOP )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:526:4: loc= NO_LOOP
{
loc=(Token)input.LT(1);
match(input,NO_LOOP,FOLLOW_NO_LOOP_in_no_loop1248); if (failed) return d;
@@ -1841,10 +1823,10 @@
}
break;
case 2 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:553:3: (loc= NO_LOOP t= BOOL )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:535:3: (loc= NO_LOOP t= BOOL )
{
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:553:3: (loc= NO_LOOP t= BOOL )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:554:4: loc= NO_LOOP t= BOOL
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:535:3: (loc= NO_LOOP t= BOOL )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:536:4: loc= NO_LOOP t= BOOL
{
loc=(Token)input.LT(1);
match(input,NO_LOOP,FOLLOW_NO_LOOP_in_no_loop1276); if (failed) return d;
@@ -1879,7 +1861,7 @@
// $ANTLR start auto_focus
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:566:1: auto_focus returns [AttributeDescr d] : ( ( ( AUTO_FOCUS ) )=> (loc= AUTO_FOCUS ) | (loc= AUTO_FOCUS t= BOOL ) );
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:548:1: auto_focus returns [AttributeDescr d] : ( ( ( AUTO_FOCUS ) )=> (loc= AUTO_FOCUS ) | (loc= AUTO_FOCUS t= BOOL ) );
public AttributeDescr auto_focus() throws RecognitionException {
AttributeDescr d = null;
@@ -1890,7 +1872,7 @@
d = null;
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:571:3: ( ( ( AUTO_FOCUS ) )=> (loc= AUTO_FOCUS ) | (loc= AUTO_FOCUS t= BOOL ) )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:553:3: ( ( ( AUTO_FOCUS ) )=> (loc= AUTO_FOCUS ) | (loc= AUTO_FOCUS t= BOOL ) )
int alt20=2;
int LA20_0 = input.LA(1);
if ( (LA20_0==AUTO_FOCUS) ) {
@@ -1904,7 +1886,7 @@
else {
if (backtracking>0) {failed=true; return d;}
NoViableAltException nvae =
- new NoViableAltException("566:1: auto_focus returns [AttributeDescr d] : ( ( ( AUTO_FOCUS ) )=> (loc= AUTO_FOCUS ) | (loc= AUTO_FOCUS t= BOOL ) );", 20, 1, input);
+ new NoViableAltException("548:1: auto_focus returns [AttributeDescr d] : ( ( ( AUTO_FOCUS ) )=> (loc= AUTO_FOCUS ) | (loc= AUTO_FOCUS t= BOOL ) );", 20, 1, input);
throw nvae;
}
@@ -1912,16 +1894,16 @@
else {
if (backtracking>0) {failed=true; return d;}
NoViableAltException nvae =
- new NoViableAltException("566:1: auto_focus returns [AttributeDescr d] : ( ( ( AUTO_FOCUS ) )=> (loc= AUTO_FOCUS ) | (loc= AUTO_FOCUS t= BOOL ) );", 20, 0, input);
+ new NoViableAltException("548:1: auto_focus returns [AttributeDescr d] : ( ( ( AUTO_FOCUS ) )=> (loc= AUTO_FOCUS ) | (loc= AUTO_FOCUS t= BOOL ) );", 20, 0, input);
throw nvae;
}
switch (alt20) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:571:3: ( ( AUTO_FOCUS ) )=> (loc= AUTO_FOCUS )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:553:3: ( ( AUTO_FOCUS ) )=> (loc= AUTO_FOCUS )
{
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:571:3: (loc= AUTO_FOCUS )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:572:4: loc= AUTO_FOCUS
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:553:3: (loc= AUTO_FOCUS )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:554:4: loc= AUTO_FOCUS
{
loc=(Token)input.LT(1);
match(input,AUTO_FOCUS,FOLLOW_AUTO_FOCUS_in_auto_focus1329); if (failed) return d;
@@ -1940,10 +1922,10 @@
}
break;
case 2 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:581:3: (loc= AUTO_FOCUS t= BOOL )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:563:3: (loc= AUTO_FOCUS t= BOOL )
{
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:581:3: (loc= AUTO_FOCUS t= BOOL )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:582:4: loc= AUTO_FOCUS t= BOOL
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:563:3: (loc= AUTO_FOCUS t= BOOL )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:564:4: loc= AUTO_FOCUS t= BOOL
{
loc=(Token)input.LT(1);
match(input,AUTO_FOCUS,FOLLOW_AUTO_FOCUS_in_auto_focus1357); if (failed) return d;
@@ -1978,7 +1960,7 @@
// $ANTLR start activation_group
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:594:1: activation_group returns [AttributeDescr d] : loc= ACTIVATION_GROUP n= STRING ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:576:1: activation_group returns [AttributeDescr d] : loc= ACTIVATION_GROUP n= STRING ;
public AttributeDescr activation_group() throws RecognitionException {
AttributeDescr d = null;
@@ -1989,8 +1971,8 @@
d = null;
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:599:3: (loc= ACTIVATION_GROUP n= STRING )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:599:3: loc= ACTIVATION_GROUP n= STRING
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:581:3: (loc= ACTIVATION_GROUP n= STRING )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:581:3: loc= ACTIVATION_GROUP n= STRING
{
loc=(Token)input.LT(1);
match(input,ACTIVATION_GROUP,FOLLOW_ACTIVATION_GROUP_in_activation_group1406); if (failed) return d;
@@ -2020,7 +2002,7 @@
// $ANTLR start agenda_group
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:608:1: agenda_group returns [AttributeDescr d] : loc= AGENDA_GROUP n= STRING ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:590:1: agenda_group returns [AttributeDescr d] : loc= AGENDA_GROUP n= STRING ;
public AttributeDescr agenda_group() throws RecognitionException {
AttributeDescr d = null;
@@ -2031,8 +2013,8 @@
d = null;
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:613:3: (loc= AGENDA_GROUP n= STRING )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:613:3: loc= AGENDA_GROUP n= STRING
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:595:3: (loc= AGENDA_GROUP n= STRING )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:595:3: loc= AGENDA_GROUP n= STRING
{
loc=(Token)input.LT(1);
match(input,AGENDA_GROUP,FOLLOW_AGENDA_GROUP_in_agenda_group1442); if (failed) return d;
@@ -2062,7 +2044,7 @@
// $ANTLR start duration
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:623:1: duration returns [AttributeDescr d] : loc= DURATION i= INT ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:605:1: duration returns [AttributeDescr d] : loc= DURATION i= INT ;
public AttributeDescr duration() throws RecognitionException {
AttributeDescr d = null;
@@ -2073,8 +2055,8 @@
d = null;
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:628:3: (loc= DURATION i= INT )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:628:3: loc= DURATION i= INT
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:610:3: (loc= DURATION i= INT )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:610:3: loc= DURATION i= INT
{
loc=(Token)input.LT(1);
match(input,DURATION,FOLLOW_DURATION_in_duration1481); if (failed) return d;
@@ -2104,16 +2086,16 @@
// $ANTLR start normal_lhs_block
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:638:1: normal_lhs_block[AndDescr descr] : ( ( lhs[descr] )=>d= lhs[descr] )* ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:620:1: normal_lhs_block[AndDescr descr] : ( ( lhs[descr] )=>d= lhs[descr] )* ;
public void normal_lhs_block(AndDescr descr) throws RecognitionException {
BaseDescr d = null;
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:640:3: ( ( ( lhs[descr] )=>d= lhs[descr] )* )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:640:3: ( ( lhs[descr] )=>d= lhs[descr] )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:622:3: ( ( ( lhs[descr] )=>d= lhs[descr] )* )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:622:3: ( ( lhs[descr] )=>d= lhs[descr] )*
{
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:640:3: ( ( lhs[descr] )=>d= lhs[descr] )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:622:3: ( ( lhs[descr] )=>d= lhs[descr] )*
loop21:
do {
int alt21=2;
@@ -2125,7 +2107,7 @@
switch (alt21) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:640:5: ( lhs[descr] )=>d= lhs[descr]
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:622:5: ( lhs[descr] )=>d= lhs[descr]
{
pushFollow(FOLLOW_lhs_in_normal_lhs_block1512);
d=lhs(descr);
@@ -2159,7 +2141,7 @@
// $ANTLR start lhs
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:646:1: lhs[ConditionalElementDescr ce] returns [BaseDescr d] : l= lhs_or ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:628:1: lhs[ConditionalElementDescr ce] returns [BaseDescr d] : l= lhs_or ;
public BaseDescr lhs(ConditionalElementDescr ce) throws RecognitionException {
BaseDescr d = null;
@@ -2170,8 +2152,8 @@
d=null;
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:650:4: (l= lhs_or )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:650:4: l= lhs_or
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:632:4: (l= lhs_or )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:632:4: l= lhs_or
{
pushFollow(FOLLOW_lhs_or_in_lhs1549);
l=lhs_or();
@@ -2196,7 +2178,7 @@
// $ANTLR start lhs_column
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:654: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:636:1: lhs_column returns [BaseDescr d] : ( ( fact_binding )=>f= fact_binding | f= fact );
public BaseDescr lhs_column() throws RecognitionException {
BaseDescr d = null;
@@ -2207,7 +2189,7 @@
d=null;
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:658:4: ( ( fact_binding )=>f= fact_binding | f= fact )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:640:4: ( ( fact_binding )=>f= fact_binding | f= fact )
int alt22=2;
int LA22_0 = input.LA(1);
if ( (LA22_0==ID) ) {
@@ -2221,7 +2203,7 @@
else {
if (backtracking>0) {failed=true; return d;}
NoViableAltException nvae =
- new NoViableAltException("654:1: lhs_column returns [BaseDescr d] : ( ( fact_binding )=>f= fact_binding | f= fact );", 22, 1, input);
+ new NoViableAltException("636:1: lhs_column returns [BaseDescr d] : ( ( fact_binding )=>f= fact_binding | f= fact );", 22, 1, input);
throw nvae;
}
@@ -2229,13 +2211,13 @@
else {
if (backtracking>0) {failed=true; return d;}
NoViableAltException nvae =
- new NoViableAltException("654:1: lhs_column returns [BaseDescr d] : ( ( fact_binding )=>f= fact_binding | f= fact );", 22, 0, input);
+ new NoViableAltException("636:1: lhs_column returns [BaseDescr d] : ( ( fact_binding )=>f= fact_binding | f= fact );", 22, 0, input);
throw nvae;
}
switch (alt22) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:658:4: ( fact_binding )=>f= fact_binding
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:640:4: ( fact_binding )=>f= fact_binding
{
pushFollow(FOLLOW_fact_binding_in_lhs_column1577);
f=fact_binding();
@@ -2248,7 +2230,7 @@
}
break;
case 2 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:659:4: f= fact
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:641:4: f= fact
{
pushFollow(FOLLOW_fact_in_lhs_column1586);
f=fact();
@@ -2275,7 +2257,7 @@
// $ANTLR start from_statement
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:662:1: from_statement returns [FromDescr d] : ds= from_source[d] ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:644:1: from_statement returns [FromDescr d] : ds= from_source[d] ;
public FromDescr from_statement() throws RecognitionException {
FromDescr d = null;
@@ -2286,8 +2268,8 @@
d=factory.createFrom();
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:667:2: (ds= from_source[d] )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:667:2: ds= from_source[d]
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:649:2: (ds= from_source[d] )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:649:2: ds= from_source[d]
{
pushFollow(FOLLOW_from_source_in_from_statement1613);
ds=from_source(d);
@@ -2315,7 +2297,7 @@
// $ANTLR start from_source
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:677:1: from_source[FromDescr from] returns [DeclarativeInvokerDescr ds] : ident= identifier ( ( paren_chunk[from] )=>args= paren_chunk[from] )? ( ( expression_chain[from, ad] )=> expression_chain[from, ad] )? ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:659:1: from_source[FromDescr from] returns [DeclarativeInvokerDescr ds] : ident= identifier ( ( paren_chunk[from] )=>args= paren_chunk[from] )? ( ( expression_chain[from, ad] )=> expression_chain[from, ad] )? ;
public DeclarativeInvokerDescr from_source(FromDescr from) throws RecognitionException {
DeclarativeInvokerDescr ds = null;
@@ -2329,8 +2311,8 @@
AccessorDescr ad = null;
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:683:3: (ident= identifier ( ( paren_chunk[from] )=>args= paren_chunk[from] )? ( ( expression_chain[from, ad] )=> expression_chain[from, ad] )? )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:683:3: ident= identifier ( ( paren_chunk[from] )=>args= paren_chunk[from] )? ( ( expression_chain[from, ad] )=> expression_chain[from, ad] )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:665:3: (ident= identifier ( ( paren_chunk[from] )=>args= paren_chunk[from] )? ( ( expression_chain[from, ad] )=> expression_chain[from, ad] )? )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:665:3: ident= identifier ( ( paren_chunk[from] )=>args= paren_chunk[from] )? ( ( expression_chain[from, ad] )=> expression_chain[from, ad] )?
{
pushFollow(FOLLOW_identifier_in_from_source1655);
ident=identifier();
@@ -2345,7 +2327,7 @@
ds = ad;
}
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:691:3: ( ( paren_chunk[from] )=>args= paren_chunk[from] )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:673:3: ( ( paren_chunk[from] )=>args= paren_chunk[from] )?
int alt23=2;
int LA23_0 = input.LA(1);
if ( (LA23_0==LEFT_PAREN) ) {
@@ -2355,7 +2337,7 @@
}
switch (alt23) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:691:4: ( paren_chunk[from] )=>args= paren_chunk[from]
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:673:4: ( paren_chunk[from] )=>args= paren_chunk[from]
{
pushFollow(FOLLOW_paren_chunk_in_from_source1666);
args=paren_chunk(from);
@@ -2380,7 +2362,7 @@
}
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:704:3: ( ( expression_chain[from, ad] )=> expression_chain[from, ad] )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:686:3: ( ( expression_chain[from, ad] )=> expression_chain[from, ad] )?
int alt24=2;
int LA24_0 = input.LA(1);
if ( (LA24_0==62) ) {
@@ -2416,7 +2398,7 @@
// $ANTLR start expression_chain
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:707:1: expression_chain[FromDescr from, AccessorDescr as] : ( '.' field= identifier ( ( LEFT_SQUARE )=>sqarg= square_chunk[from] | ( LEFT_PAREN )=>paarg= paren_chunk[from] )? ( ( expression_chain[from, as] )=> expression_chain[from, as] )? ) ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:689:1: expression_chain[FromDescr from, AccessorDescr as] : ( '.' field= identifier ( ( LEFT_SQUARE )=>sqarg= square_chunk[from] | ( LEFT_PAREN )=>paarg= paren_chunk[from] )? ( ( expression_chain[from, as] )=> expression_chain[from, as] )? ) ;
public void expression_chain(FromDescr from, AccessorDescr as) throws RecognitionException {
Token field = null;
@@ -2430,11 +2412,11 @@
MethodAccessDescr ma = null;
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:713:2: ( ( '.' field= identifier ( ( LEFT_SQUARE )=>sqarg= square_chunk[from] | ( LEFT_PAREN )=>paarg= paren_chunk[from] )? ( ( expression_chain[from, as] )=> expression_chain[from, as] )? ) )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:713:2: ( '.' field= identifier ( ( LEFT_SQUARE )=>sqarg= square_chunk[from] | ( LEFT_PAREN )=>paarg= paren_chunk[from] )? ( ( expression_chain[from, as] )=> expression_chain[from, as] )? )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:695:2: ( ( '.' field= identifier ( ( LEFT_SQUARE )=>sqarg= square_chunk[from] | ( LEFT_PAREN )=>paarg= paren_chunk[from] )? ( ( expression_chain[from, as] )=> expression_chain[from, as] )? ) )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:695:2: ( '.' field= identifier ( ( LEFT_SQUARE )=>sqarg= square_chunk[from] | ( LEFT_PAREN )=>paarg= paren_chunk[from] )? ( ( expression_chain[from, as] )=> expression_chain[from, as] )? )
{
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:713:2: ( '.' field= identifier ( ( LEFT_SQUARE )=>sqarg= square_chunk[from] | ( LEFT_PAREN )=>paarg= paren_chunk[from] )? ( ( expression_chain[from, as] )=> expression_chain[from, as] )? )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:713:4: '.' field= identifier ( ( LEFT_SQUARE )=>sqarg= square_chunk[from] | ( LEFT_PAREN )=>paarg= paren_chunk[from] )? ( ( expression_chain[from, as] )=> expression_chain[from, as] )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:695:2: ( '.' field= identifier ( ( LEFT_SQUARE )=>sqarg= square_chunk[from] | ( LEFT_PAREN )=>paarg= paren_chunk[from] )? ( ( expression_chain[from, as] )=> expression_chain[from, as] )? )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:695:4: '.' field= identifier ( ( LEFT_SQUARE )=>sqarg= square_chunk[from] | ( LEFT_PAREN )=>paarg= paren_chunk[from] )? ( ( expression_chain[from, as] )=> expression_chain[from, as] )?
{
match(input,62,FOLLOW_62_in_expression_chain1705); if (failed) return ;
pushFollow(FOLLOW_identifier_in_expression_chain1709);
@@ -2449,7 +2431,7 @@
fa.setEndCharacter( ((CommonToken)field).getStopIndex() );
}
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:720:4: ( ( LEFT_SQUARE )=>sqarg= square_chunk[from] | ( LEFT_PAREN )=>paarg= paren_chunk[from] )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:702:4: ( ( LEFT_SQUARE )=>sqarg= square_chunk[from] | ( LEFT_PAREN )=>paarg= paren_chunk[from] )?
int alt25=3;
int LA25_0 = input.LA(1);
if ( (LA25_0==LEFT_SQUARE) ) {
@@ -2462,7 +2444,7 @@
}
switch (alt25) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:721:6: ( LEFT_SQUARE )=>sqarg= square_chunk[from]
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:703:6: ( LEFT_SQUARE )=>sqarg= square_chunk[from]
{
pushFollow(FOLLOW_square_chunk_in_expression_chain1740);
sqarg=square_chunk(from);
@@ -2477,7 +2459,7 @@
}
break;
case 2 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:726:6: ( LEFT_PAREN )=>paarg= paren_chunk[from]
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:708:6: ( LEFT_PAREN )=>paarg= paren_chunk[from]
{
pushFollow(FOLLOW_paren_chunk_in_expression_chain1774);
paarg=paren_chunk(from);
@@ -2505,7 +2487,7 @@
}
}
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:740:4: ( ( expression_chain[from, as] )=> expression_chain[from, as] )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:722:4: ( ( expression_chain[from, as] )=> expression_chain[from, as] )?
int alt26=2;
int LA26_0 = input.LA(1);
if ( (LA26_0==62) ) {
@@ -2544,7 +2526,7 @@
// $ANTLR start accumulate_statement
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:744:1: accumulate_statement returns [AccumulateDescr d] : loc= ACCUMULATE '(' column= lhs_column ',' INIT text= paren_chunk[null] ',' ACTION text= paren_chunk[null] ',' RESULT text= paren_chunk[null] loc= ')' ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:726:1: accumulate_statement returns [AccumulateDescr d] : loc= ACCUMULATE '(' column= lhs_column ',' INIT text= paren_chunk[null] ',' ACTION text= paren_chunk[null] ',' RESULT text= paren_chunk[null] loc= ')' ;
public AccumulateDescr accumulate_statement() throws RecognitionException {
AccumulateDescr d = null;
@@ -2558,8 +2540,8 @@
d = factory.createAccumulate();
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:749:10: (loc= ACCUMULATE '(' column= lhs_column ',' INIT text= paren_chunk[null] ',' ACTION text= paren_chunk[null] ',' RESULT text= paren_chunk[null] loc= ')' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:749:10: loc= ACCUMULATE '(' column= lhs_column ',' INIT text= paren_chunk[null] ',' ACTION text= paren_chunk[null] ',' RESULT text= paren_chunk[null] loc= ')'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:731:10: (loc= ACCUMULATE '(' column= lhs_column ',' INIT text= paren_chunk[null] ',' ACTION text= paren_chunk[null] ',' RESULT text= paren_chunk[null] loc= ')' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:731:10: loc= ACCUMULATE '(' column= lhs_column ',' INIT text= paren_chunk[null] ',' ACTION text= paren_chunk[null] ',' RESULT text= paren_chunk[null] loc= ')'
{
loc=(Token)input.LT(1);
match(input,ACCUMULATE,FOLLOW_ACCUMULATE_in_accumulate_statement1836); if (failed) return d;
@@ -2631,7 +2613,7 @@
// $ANTLR start collect_statement
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:773:1: collect_statement returns [CollectDescr d] : loc= COLLECT '(' column= lhs_column loc= ')' ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:755:1: collect_statement returns [CollectDescr d] : loc= COLLECT '(' column= lhs_column loc= ')' ;
public CollectDescr collect_statement() throws RecognitionException {
CollectDescr d = null;
@@ -2643,8 +2625,8 @@
d = factory.createCollect();
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:778:10: (loc= COLLECT '(' column= lhs_column loc= ')' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:778:10: loc= COLLECT '(' column= lhs_column loc= ')'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:760:10: (loc= COLLECT '(' column= lhs_column loc= ')' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:760:10: loc= COLLECT '(' column= lhs_column loc= ')'
{
loc=(Token)input.LT(1);
match(input,COLLECT,FOLLOW_COLLECT_in_collect_statement1945); if (failed) return d;
@@ -2683,7 +2665,7 @@
// $ANTLR start fact_binding
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:790: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:772:1: fact_binding returns [BaseDescr d] : id= ID ':' fe= fact_expression[id.getText()] ;
public BaseDescr fact_binding() throws RecognitionException {
BaseDescr d = null;
@@ -2696,8 +2678,8 @@
boolean multi=false;
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:796:4: (id= ID ':' fe= fact_expression[id.getText()] )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:796:4: id= ID ':' fe= fact_expression[id.getText()]
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:778:4: (id= ID ':' fe= fact_expression[id.getText()] )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:778:4: id= ID ':' fe= fact_expression[id.getText()]
{
id=(Token)input.LT(1);
match(input,ID,FOLLOW_ID_in_fact_binding1997); if (failed) return d;
@@ -2737,7 +2719,7 @@
// $ANTLR start fact_expression
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:811:2: fact_expression[String id] returns [BaseDescr pd] : ( ( '(' fact_expression[id] ')' )=> '(' fe= fact_expression[id] ')' | f= fact ( ( (OR|'||') fact )=> (OR|'||')f= fact )* );
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:793:2: fact_expression[String id] returns [BaseDescr pd] : ( ( '(' fact_expression[id] ')' )=> '(' fe= fact_expression[id] ')' | f= fact ( ( (OR|'||') fact )=> (OR|'||')f= fact )* );
public BaseDescr fact_expression(String id) throws RecognitionException {
BaseDescr pd = null;
@@ -2751,7 +2733,7 @@
boolean multi = false;
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:816:5: ( ( '(' fact_expression[id] ')' )=> '(' fe= fact_expression[id] ')' | f= fact ( ( (OR|'||') fact )=> (OR|'||')f= fact )* )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:798:5: ( ( '(' fact_expression[id] ')' )=> '(' fe= fact_expression[id] ')' | f= fact ( ( (OR|'||') fact )=> (OR|'||')f= fact )* )
int alt28=2;
int LA28_0 = input.LA(1);
if ( (LA28_0==LEFT_PAREN) ) {
@@ -2763,13 +2745,13 @@
else {
if (backtracking>0) {failed=true; return pd;}
NoViableAltException nvae =
- new NoViableAltException("811:2: fact_expression[String id] returns [BaseDescr pd] : ( ( '(' fact_expression[id] ')' )=> '(' fe= fact_expression[id] ')' | f= fact ( ( (OR|'||') fact )=> (OR|'||')f= fact )* );", 28, 0, input);
+ new NoViableAltException("793:2: fact_expression[String id] returns [BaseDescr pd] : ( ( '(' fact_expression[id] ')' )=> '(' fe= fact_expression[id] ')' | f= fact ( ( (OR|'||') fact )=> (OR|'||')f= fact )* );", 28, 0, input);
throw nvae;
}
switch (alt28) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:816:5: ( '(' fact_expression[id] ')' )=> '(' fe= fact_expression[id] ')'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:798:5: ( '(' fact_expression[id] ')' )=> '(' fe= fact_expression[id] ')'
{
match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_fact_expression2044); if (failed) return pd;
pushFollow(FOLLOW_fact_expression_in_fact_expression2048);
@@ -2784,7 +2766,7 @@
}
break;
case 2 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:817:6: f= fact ( ( (OR|'||') fact )=> (OR|'||')f= fact )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:799:6: f= fact ( ( (OR|'||') fact )=> (OR|'||')f= fact )*
{
pushFollow(FOLLOW_fact_in_fact_expression2062);
f=fact();
@@ -2796,7 +2778,7 @@
pd = f;
}
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:822:4: ( ( (OR|'||') fact )=> (OR|'||')f= fact )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:804:4: ( ( (OR|'||') fact )=> (OR|'||')f= fact )*
loop27:
do {
int alt27=2;
@@ -2812,7 +2794,7 @@
switch (alt27) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:822:6: ( (OR|'||') fact )=> (OR|'||')f= fact
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:804:6: ( (OR|'||') fact )=> (OR|'||')f= fact
{
if ( input.LA(1)==OR||input.LA(1)==66 ) {
input.consume();
@@ -2871,7 +2853,7 @@
// $ANTLR start fact
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:838:1: fact returns [BaseDescr d] : id= dotted_name[d] loc= LEFT_PAREN ( ( constraints[column] )=> constraints[column] )? endLoc= RIGHT_PAREN ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:820:1: fact returns [BaseDescr d] : id= dotted_name[d] loc= LEFT_PAREN ( ( constraints[column] )=> constraints[column] )? endLoc= RIGHT_PAREN ;
public BaseDescr fact() throws RecognitionException {
BaseDescr d = null;
@@ -2885,8 +2867,8 @@
ColumnDescr column = null;
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:844:11: (id= dotted_name[d] loc= LEFT_PAREN ( ( constraints[column] )=> constraints[column] )? endLoc= RIGHT_PAREN )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:844:11: id= dotted_name[d] loc= LEFT_PAREN ( ( constraints[column] )=> constraints[column] )? endLoc= RIGHT_PAREN
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:826:11: (id= dotted_name[d] loc= LEFT_PAREN ( ( constraints[column] )=> constraints[column] )? endLoc= RIGHT_PAREN )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:826:11: id= dotted_name[d] loc= LEFT_PAREN ( ( constraints[column] )=> constraints[column] )? endLoc= RIGHT_PAREN
{
if ( backtracking==0 ) {
@@ -2912,7 +2894,7 @@
column.setLeftParentCharacter( ((CommonToken)loc).getStartIndex() );
}
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:857:4: ( ( constraints[column] )=> constraints[column] )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:839:4: ( ( constraints[column] )=> constraints[column] )?
int alt29=2;
int LA29_0 = input.LA(1);
if ( ((LA29_0>=PACKAGE && LA29_0<=ATTRIBUTES)||LA29_0==ENABLED||LA29_0==SALIENCE||(LA29_0>=DURATION && LA29_0<=LEFT_PAREN)||(LA29_0>=CONTAINS && LA29_0<=EXCLUDES)||LA29_0==NULL||(LA29_0>=AND && LA29_0<=THEN)) ) {
@@ -2920,7 +2902,7 @@
}
switch (alt29) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:857:6: ( constraints[column] )=> constraints[column]
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:839:6: ( constraints[column] )=> constraints[column]
{
pushFollow(FOLLOW_constraints_in_fact2177);
constraints(column);
@@ -2959,13 +2941,13 @@
// $ANTLR start constraints
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:869:1: constraints[ColumnDescr column] : ( ( constraint[column] )=> constraint[column] | predicate[column] ) ( ( ',' ( ( constraint[column] )=> constraint[column] | predicate[column] ) )=> ',' ( ( constraint[column] )=> constraint[column] | predicate[column] ) )* ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:851:1: constraints[ColumnDescr column] : ( ( constraint[column] )=> constraint[column] | predicate[column] ) ( ( ',' ( ( constraint[column] )=> constraint[column] | predicate[column] ) )=> ',' ( ( constraint[column] )=> constraint[column] | predicate[column] ) )* ;
public void constraints(ColumnDescr column) throws RecognitionException {
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:870:4: ( ( ( constraint[column] )=> constraint[column] | predicate[column] ) ( ( ',' ( ( constraint[column] )=> constraint[column] | predicate[column] ) )=> ',' ( ( constraint[column] )=> constraint[column] | predicate[column] ) )* )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:870:4: ( ( constraint[column] )=> constraint[column] | predicate[column] ) ( ( ',' ( ( constraint[column] )=> constraint[column] | predicate[column] ) )=> ',' ( ( constraint[column] )=> constraint[column] | predicate[column] ) )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:852:4: ( ( ( constraint[column] )=> constraint[column] | predicate[column] ) ( ( ',' ( ( constraint[column] )=> constraint[column] | predicate[column] ) )=> ',' ( ( constraint[column] )=> constraint[column] | predicate[column] ) )* )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:852:4: ( ( constraint[column] )=> constraint[column] | predicate[column] ) ( ( ',' ( ( constraint[column] )=> constraint[column] | predicate[column] ) )=> ',' ( ( constraint[column] )=> constraint[column] | predicate[column] ) )*
{
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:870:4: ( ( constraint[column] )=> constraint[column] | predicate[column] )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:852:4: ( ( constraint[column] )=> constraint[column] | predicate[column] )
int alt30=2;
int LA30_0 = input.LA(1);
if ( ((LA30_0>=PACKAGE && LA30_0<=ATTRIBUTES)||LA30_0==ENABLED||LA30_0==SALIENCE||(LA30_0>=DURATION && LA30_0<=OR)||(LA30_0>=CONTAINS && LA30_0<=EXCLUDES)||LA30_0==NULL||(LA30_0>=AND && LA30_0<=THEN)) ) {
@@ -2977,13 +2959,13 @@
else {
if (backtracking>0) {failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("870:4: ( ( constraint[column] )=> constraint[column] | predicate[column] )", 30, 0, input);
+ new NoViableAltException("852:4: ( ( constraint[column] )=> constraint[column] | predicate[column] )", 30, 0, input);
throw nvae;
}
switch (alt30) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:870:5: ( constraint[column] )=> constraint[column]
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:852:5: ( constraint[column] )=> constraint[column]
{
pushFollow(FOLLOW_constraint_in_constraints2211);
constraint(column);
@@ -2993,7 +2975,7 @@
}
break;
case 2 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:870:24: predicate[column]
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:852:24: predicate[column]
{
pushFollow(FOLLOW_predicate_in_constraints2214);
predicate(column);
@@ -3005,7 +2987,7 @@
}
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:871:3: ( ( ',' ( ( constraint[column] )=> constraint[column] | predicate[column] ) )=> ',' ( ( constraint[column] )=> constraint[column] | predicate[column] ) )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:853:3: ( ( ',' ( ( constraint[column] )=> constraint[column] | predicate[column] ) )=> ',' ( ( constraint[column] )=> constraint[column] | predicate[column] ) )*
loop32:
do {
int alt32=2;
@@ -3017,10 +2999,10 @@
switch (alt32) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:871:5: ( ',' ( ( constraint[column] )=> constraint[column] | predicate[column] ) )=> ',' ( ( constraint[column] )=> constraint[column] | predicate[column] )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:853:5: ( ',' ( ( constraint[column] )=> constraint[column] | predicate[column] ) )=> ',' ( ( constraint[column] )=> constraint[column] | predicate[column] )
{
match(input,64,FOLLOW_64_in_constraints2222); if (failed) return ;
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:871:9: ( ( constraint[column] )=> constraint[column] | predicate[column] )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:853:9: ( ( constraint[column] )=> constraint[column] | predicate[column] )
int alt31=2;
int LA31_0 = input.LA(1);
if ( ((LA31_0>=PACKAGE && LA31_0<=ATTRIBUTES)||LA31_0==ENABLED||LA31_0==SALIENCE||(LA31_0>=DURATION && LA31_0<=OR)||(LA31_0>=CONTAINS && LA31_0<=EXCLUDES)||LA31_0==NULL||(LA31_0>=AND && LA31_0<=THEN)) ) {
@@ -3032,13 +3014,13 @@
else {
if (backtracking>0) {failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("871:9: ( ( constraint[column] )=> constraint[column] | predicate[column] )", 31, 0, input);
+ new NoViableAltException("853:9: ( ( constraint[column] )=> constraint[column] | predicate[column] )", 31, 0, input);
throw nvae;
}
switch (alt31) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:871:10: ( constraint[column] )=> constraint[column]
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:853:10: ( constraint[column] )=> constraint[column]
{
pushFollow(FOLLOW_constraint_in_constraints2225);
constraint(column);
@@ -3048,7 +3030,7 @@
}
break;
case 2 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:871:29: predicate[column]
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:853:29: predicate[column]
{
pushFollow(FOLLOW_predicate_in_constraints2228);
predicate(column);
@@ -3085,7 +3067,7 @@
// $ANTLR start constraint
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:874:1: constraint[ColumnDescr column] : ( ( ID ':' )=>fb= ID ':' )? f= identifier ( ( ( constraint_expression ( ( ('&'|'|') constraint_expression )=> ('&'|'|') constraint_expression )* ) )=> (rd= constraint_expression ( ( ('&'|'|') constraint_expression )=>con= ('&'|'|')rd= constraint_expression )* ) | ( '->' predicate[column] )=> '->' predicate[column] )? ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:856:1: constraint[ColumnDescr column] : ( ( ID ':' )=>fb= ID ':' )? f= identifier ( ( ( constraint_expression ( ( ('&'|'|') constraint_expression )=> ('&'|'|') constraint_expression )* ) )=> (rd= constraint_expression ( ( ('&'|'|') constraint_expression )=>con= ('&'|'|')rd= constraint_expression )* ) | ( '->' predicate[column] )=> '->' predicate[column] )? ;
public void constraint(ColumnDescr column) throws RecognitionException {
Token fb=null;
Token con=null;
@@ -3099,10 +3081,10 @@
FieldConstraintDescr fc = null;
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:880:3: ( ( ( ID ':' )=>fb= ID ':' )? f= identifier ( ( ( constraint_expression ( ( ('&'|'|') constraint_expression )=> ('&'|'|') constraint_expression )* ) )=> (rd= constraint_expression ( ( ('&'|'|') constraint_expression )=>con= ('&'|'|')rd= constraint_expression )* ) | ( '->' predicate[column] )=> '->' predicate[column] )? )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:880:3: ( ( ID ':' )=>fb= ID ':' )? f= identifier ( ( ( constraint_expression ( ( ('&'|'|') constraint_expression )=> ('&'|'|') constraint_expression )* ) )=> (rd= constraint_expression ( ( ('&'|'|') constraint_expression )=>con= ('&'|'|')rd= constraint_expression )* ) | ( '->' predicate[column] )=> '->' predicate[column] )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:862:3: ( ( ( ID ':' )=>fb= ID ':' )? f= identifier ( ( ( constraint_expression ( ( ('&'|'|') constraint_expression )=> ('&'|'|') constraint_expression )* ) )=> (rd= constraint_expression ( ( ('&'|'|') constraint_expression )=>con= ('&'|'|')rd= constraint_expression )* ) | ( '->' predicate[column] )=> '->' predicate[column] )? )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:862:3: ( ( ID ':' )=>fb= ID ':' )? f= identifier ( ( ( constraint_expression ( ( ('&'|'|') constraint_expression )=> ('&'|'|') constraint_expression )* ) )=> (rd= constraint_expression ( ( ('&'|'|') constraint_expression )=>con= ('&'|'|')rd= constraint_expression )* ) | ( '->' predicate[column] )=> '->' predicate[column] )?
{
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:880:3: ( ( ID ':' )=>fb= ID ':' )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:862:3: ( ( ID ':' )=>fb= ID ':' )?
int alt33=2;
int LA33_0 = input.LA(1);
if ( (LA33_0==ID) ) {
@@ -3113,7 +3095,7 @@
}
switch (alt33) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:880:5: ( ID ':' )=>fb= ID ':'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:862:5: ( ID ':' )=>fb= ID ':'
{
fb=(Token)input.LT(1);
match(input,ID,FOLLOW_ID_in_constraint2257); if (failed) return ;
@@ -3157,7 +3139,7 @@
}
}
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:908:3: ( ( ( constraint_expression ( ( ('&'|'|') constraint_expression )=> ('&'|'|') constraint_expression )* ) )=> (rd= constraint_expression ( ( ('&'|'|') constraint_expression )=>con= ('&'|'|')rd= constraint_expression )* ) | ( '->' predicate[column] )=> '->' predicate[column] )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:890:3: ( ( ( constraint_expression ( ( ('&'|'|') constraint_expression )=> ('&'|'|') constraint_expression )* ) )=> (rd= constraint_expression ( ( ('&'|'|') constraint_expression )=>con= ('&'|'|')rd= constraint_expression )* ) | ( '->' predicate[column] )=> '->' predicate[column] )?
int alt35=3;
int LA35_0 = input.LA(1);
if ( ((LA35_0>=CONTAINS && LA35_0<=EXCLUDES)||(LA35_0>=70 && LA35_0<=75)) ) {
@@ -3168,10 +3150,10 @@
}
switch (alt35) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:909: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:891: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:909:4: (rd= constraint_expression ( ( ('&'|'|') constraint_expression )=>con= ('&'|'|')rd= constraint_expression )* )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:909:6: rd= constraint_expression ( ( ('&'|'|') constraint_expression )=>con= ('&'|'|')rd= constraint_expression )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:891:4: (rd= constraint_expression ( ( ('&'|'|') constraint_expression )=>con= ('&'|'|')rd= constraint_expression )* )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:891:6: rd= constraint_expression ( ( ('&'|'|') constraint_expression )=>con= ('&'|'|')rd= constraint_expression )*
{
pushFollow(FOLLOW_constraint_expression_in_constraint2298);
rd=constraint_expression();
@@ -3186,7 +3168,7 @@
}
}
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:917:5: ( ( ('&'|'|') constraint_expression )=>con= ('&'|'|')rd= constraint_expression )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:899:5: ( ( ('&'|'|') constraint_expression )=>con= ('&'|'|')rd= constraint_expression )*
loop34:
do {
int alt34=2;
@@ -3198,7 +3180,7 @@
switch (alt34) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:918:6: ( ('&'|'|') constraint_expression )=>con= ('&'|'|')rd= constraint_expression
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:900:6: ( ('&'|'|') constraint_expression )=>con= ('&'|'|')rd= constraint_expression
{
con=(Token)input.LT(1);
if ( (input.LA(1)>=67 && input.LA(1)<=68) ) {
@@ -3248,7 +3230,7 @@
}
break;
case 2 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:935:4: ( '->' predicate[column] )=> '->' predicate[column]
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:917:4: ( '->' predicate[column] )=> '->' predicate[column]
{
match(input,69,FOLLOW_69_in_constraint2367); if (failed) return ;
pushFollow(FOLLOW_predicate_in_constraint2369);
@@ -3277,7 +3259,7 @@
// $ANTLR start constraint_expression
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:939: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:921: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;
@@ -3289,8 +3271,8 @@
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:941: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:941: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:923: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:923: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)>=CONTAINS && input.LA(1)<=EXCLUDES)||(input.LA(1)>=70 && input.LA(1)<=75) ) {
@@ -3304,7 +3286,7 @@
recoverFromMismatchedSet(input,mse,FOLLOW_set_in_constraint_expression2406); throw mse;
}
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:951: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:933:3: ( ( ID )=>bvc= ID | ( enum_constraint )=>lc= enum_constraint | ( literal_constraint )=>lc= literal_constraint | rvc= retval_constraint )
int alt36=4;
switch ( input.LA(1) ) {
case ID:
@@ -3318,7 +3300,7 @@
else {
if (backtracking>0) {failed=true; return rd;}
NoViableAltException nvae =
- new NoViableAltException("951:3: ( ( ID )=>bvc= ID | ( enum_constraint )=>lc= enum_constraint | ( literal_constraint )=>lc= literal_constraint | rvc= retval_constraint )", 36, 1, input);
+ new NoViableAltException("933:3: ( ( ID )=>bvc= ID | ( enum_constraint )=>lc= enum_constraint | ( literal_constraint )=>lc= literal_constraint | rvc= retval_constraint )", 36, 1, input);
throw nvae;
}
@@ -3336,14 +3318,14 @@
default:
if (backtracking>0) {failed=true; return rd;}
NoViableAltException nvae =
- new NoViableAltException("951:3: ( ( ID )=>bvc= ID | ( enum_constraint )=>lc= enum_constraint | ( literal_constraint )=>lc= literal_constraint | rvc= retval_constraint )", 36, 0, input);
+ new NoViableAltException("933:3: ( ( ID )=>bvc= ID | ( enum_constraint )=>lc= enum_constraint | ( literal_constraint )=>lc= literal_constraint | rvc= retval_constraint )", 36, 0, input);
throw nvae;
}
switch (alt36) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:951:5: ( ID )=>bvc= ID
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:933:5: ( ID )=>bvc= ID
{
bvc=(Token)input.LT(1);
match(input,ID,FOLLOW_ID_in_constraint_expression2473); if (failed) return rd;
@@ -3356,7 +3338,7 @@
}
break;
case 2 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:956:4: ( enum_constraint )=>lc= enum_constraint
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:938:4: ( enum_constraint )=>lc= enum_constraint
{
pushFollow(FOLLOW_enum_constraint_in_constraint_expression2489);
lc=enum_constraint();
@@ -3371,7 +3353,7 @@
}
break;
case 3 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:961:4: ( literal_constraint )=>lc= literal_constraint
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:943:4: ( literal_constraint )=>lc= literal_constraint
{
pushFollow(FOLLOW_literal_constraint_in_constraint_expression2512);
lc=literal_constraint();
@@ -3386,7 +3368,7 @@
}
break;
case 4 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:965:5: rvc= retval_constraint
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:947:5: rvc= retval_constraint
{
pushFollow(FOLLOW_retval_constraint_in_constraint_expression2526);
rvc=retval_constraint();
@@ -3419,7 +3401,7 @@
// $ANTLR start literal_constraint
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:972: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:954: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;
@@ -3429,10 +3411,10 @@
text = null;
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:976: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:976: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:958: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:958: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:976: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:958:4: ( ( STRING )=>t= STRING | ( INT )=>t= INT | ( FLOAT )=>t= FLOAT | ( BOOL )=>t= BOOL | t= NULL )
int alt37=5;
switch ( input.LA(1) ) {
case STRING:
@@ -3453,14 +3435,14 @@
default:
if (backtracking>0) {failed=true; return text;}
NoViableAltException nvae =
- new NoViableAltException("976:4: ( ( STRING )=>t= STRING | ( INT )=>t= INT | ( FLOAT )=>t= FLOAT | ( BOOL )=>t= BOOL | t= NULL )", 37, 0, input);
+ new NoViableAltException("958:4: ( ( STRING )=>t= STRING | ( INT )=>t= INT | ( FLOAT )=>t= FLOAT | ( BOOL )=>t= BOOL | t= NULL )", 37, 0, input);
throw nvae;
}
switch (alt37) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:976:6: ( STRING )=>t= STRING
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:958:6: ( STRING )=>t= STRING
{
t=(Token)input.LT(1);
match(input,STRING,FOLLOW_STRING_in_literal_constraint2565); if (failed) return text;
@@ -3471,7 +3453,7 @@
}
break;
case 2 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:977:5: ( INT )=>t= INT
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:959:5: ( INT )=>t= INT
{
t=(Token)input.LT(1);
match(input,INT,FOLLOW_INT_in_literal_constraint2576); if (failed) return text;
@@ -3482,7 +3464,7 @@
}
break;
case 3 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:978:5: ( FLOAT )=>t= FLOAT
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:960:5: ( FLOAT )=>t= FLOAT
{
t=(Token)input.LT(1);
match(input,FLOAT,FOLLOW_FLOAT_in_literal_constraint2589); if (failed) return text;
@@ -3493,7 +3475,7 @@
}
break;
case 4 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:979:5: ( BOOL )=>t= BOOL
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:961:5: ( BOOL )=>t= BOOL
{
t=(Token)input.LT(1);
match(input,BOOL,FOLLOW_BOOL_in_literal_constraint2600); if (failed) return text;
@@ -3504,7 +3486,7 @@
}
break;
case 5 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:980:5: t= NULL
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:962:5: t= NULL
{
t=(Token)input.LT(1);
match(input,NULL,FOLLOW_NULL_in_literal_constraint2612); if (failed) return text;
@@ -3533,7 +3515,7 @@
// $ANTLR start enum_constraint
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:984:1: enum_constraint returns [String text] : id= ID ( ( '.' identifier )=> '.' ident= identifier )+ ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:966:1: enum_constraint returns [String text] : id= ID ( ( '.' identifier )=> '.' ident= identifier )+ ;
public String enum_constraint() throws RecognitionException {
String text = null;
@@ -3545,15 +3527,15 @@
text = null;
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:989:3: (id= ID ( ( '.' identifier )=> '.' ident= identifier )+ )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:989:3: id= ID ( ( '.' identifier )=> '.' ident= identifier )+
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:971:3: (id= ID ( ( '.' identifier )=> '.' ident= identifier )+ )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:971:3: id= ID ( ( '.' identifier )=> '.' ident= identifier )+
{
id=(Token)input.LT(1);
match(input,ID,FOLLOW_ID_in_enum_constraint2647); if (failed) return text;
if ( backtracking==0 ) {
text=id.getText();
}
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:989:32: ( ( '.' identifier )=> '.' ident= identifier )+
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:971:32: ( ( '.' identifier )=> '.' ident= identifier )+
int cnt38=0;
loop38:
do {
@@ -3566,7 +3548,7 @@
switch (alt38) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:989:34: ( '.' identifier )=> '.' ident= identifier
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:971:34: ( '.' identifier )=> '.' ident= identifier
{
match(input,62,FOLLOW_62_in_enum_constraint2653); if (failed) return text;
pushFollow(FOLLOW_identifier_in_enum_constraint2657);
@@ -3606,7 +3588,7 @@
// $ANTLR start predicate
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:993:1: predicate[ColumnDescr column] : text= paren_chunk[d] ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:975:1: predicate[ColumnDescr column] : text= paren_chunk[d] ;
public void predicate(ColumnDescr column) throws RecognitionException {
String text = null;
@@ -3615,8 +3597,8 @@
PredicateDescr d = null;
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:998:3: (text= paren_chunk[d] )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:998:3: text= paren_chunk[d]
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:980:3: (text= paren_chunk[d] )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:980:3: text= paren_chunk[d]
{
if ( backtracking==0 ) {
@@ -3652,7 +3634,7 @@
// $ANTLR start paren_chunk
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1011:1: paren_chunk[BaseDescr descr] returns [String text] : loc= LEFT_PAREN ( (~ (LEFT_PAREN|RIGHT_PAREN))=>~ (LEFT_PAREN|RIGHT_PAREN) | ( paren_chunk[null] )=>chunk= paren_chunk[null] )* loc= RIGHT_PAREN ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:993:1: paren_chunk[BaseDescr descr] returns [String text] : loc= LEFT_PAREN ( (~ (LEFT_PAREN|RIGHT_PAREN))=>~ (LEFT_PAREN|RIGHT_PAREN) | ( paren_chunk[null] )=>chunk= paren_chunk[null] )* loc= RIGHT_PAREN ;
public String paren_chunk(BaseDescr descr) throws RecognitionException {
String text = null;
@@ -3665,8 +3647,8 @@
Integer channel = null;
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1017:10: (loc= LEFT_PAREN ( (~ (LEFT_PAREN|RIGHT_PAREN))=>~ (LEFT_PAREN|RIGHT_PAREN) | ( paren_chunk[null] )=>chunk= paren_chunk[null] )* loc= RIGHT_PAREN )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1017:10: loc= LEFT_PAREN ( (~ (LEFT_PAREN|RIGHT_PAREN))=>~ (LEFT_PAREN|RIGHT_PAREN) | ( paren_chunk[null] )=>chunk= paren_chunk[null] )* loc= RIGHT_PAREN
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:999:10: (loc= LEFT_PAREN ( (~ (LEFT_PAREN|RIGHT_PAREN))=>~ (LEFT_PAREN|RIGHT_PAREN) | ( paren_chunk[null] )=>chunk= paren_chunk[null] )* loc= RIGHT_PAREN )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:999:10: loc= LEFT_PAREN ( (~ (LEFT_PAREN|RIGHT_PAREN))=>~ (LEFT_PAREN|RIGHT_PAREN) | ( paren_chunk[null] )=>chunk= paren_chunk[null] )* loc= RIGHT_PAREN
{
if ( backtracking==0 ) {
@@ -3683,7 +3665,7 @@
}
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1027:3: ( (~ (LEFT_PAREN|RIGHT_PAREN))=>~ (LEFT_PAREN|RIGHT_PAREN) | ( paren_chunk[null] )=>chunk= paren_chunk[null] )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1009:3: ( (~ (LEFT_PAREN|RIGHT_PAREN))=>~ (LEFT_PAREN|RIGHT_PAREN) | ( paren_chunk[null] )=>chunk= paren_chunk[null] )*
loop39:
do {
int alt39=3;
@@ -3698,7 +3680,7 @@
switch (alt39) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1028:4: (~ (LEFT_PAREN|RIGHT_PAREN))=>~ (LEFT_PAREN|RIGHT_PAREN)
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1010:4: (~ (LEFT_PAREN|RIGHT_PAREN))=>~ (LEFT_PAREN|RIGHT_PAREN)
{
if ( (input.LA(1)>=PACKAGE && input.LA(1)<=OR)||(input.LA(1)>=CONTAINS && input.LA(1)<=76) ) {
input.consume();
@@ -3720,7 +3702,7 @@
}
break;
case 2 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1033:4: ( paren_chunk[null] )=>chunk= paren_chunk[null]
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1015:4: ( paren_chunk[null] )=>chunk= paren_chunk[null]
{
pushFollow(FOLLOW_paren_chunk_in_paren_chunk2788);
chunk=paren_chunk(null);
@@ -3776,7 +3758,7 @@
// $ANTLR start curly_chunk
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1055:1: curly_chunk[BaseDescr descr] returns [String text] : loc= LEFT_CURLY ( (~ (LEFT_CURLY|RIGHT_CURLY))=>~ (LEFT_CURLY|RIGHT_CURLY) | ( curly_chunk[descr] )=>chunk= curly_chunk[descr] )* loc= RIGHT_CURLY ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1037:1: curly_chunk[BaseDescr descr] returns [String text] : loc= LEFT_CURLY ( (~ (LEFT_CURLY|RIGHT_CURLY))=>~ (LEFT_CURLY|RIGHT_CURLY) | ( curly_chunk[descr] )=>chunk= curly_chunk[descr] )* loc= RIGHT_CURLY ;
public String curly_chunk(BaseDescr descr) throws RecognitionException {
String text = null;
@@ -3789,8 +3771,8 @@
Integer channel = null;
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1061:3: (loc= LEFT_CURLY ( (~ (LEFT_CURLY|RIGHT_CURLY))=>~ (LEFT_CURLY|RIGHT_CURLY) | ( curly_chunk[descr] )=>chunk= curly_chunk[descr] )* loc= RIGHT_CURLY )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1061:3: loc= LEFT_CURLY ( (~ (LEFT_CURLY|RIGHT_CURLY))=>~ (LEFT_CURLY|RIGHT_CURLY) | ( curly_chunk[descr] )=>chunk= curly_chunk[descr] )* loc= RIGHT_CURLY
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1043:3: (loc= LEFT_CURLY ( (~ (LEFT_CURLY|RIGHT_CURLY))=>~ (LEFT_CURLY|RIGHT_CURLY) | ( curly_chunk[descr] )=>chunk= curly_chunk[descr] )* loc= RIGHT_CURLY )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1043:3: loc= LEFT_CURLY ( (~ (LEFT_CURLY|RIGHT_CURLY))=>~ (LEFT_CURLY|RIGHT_CURLY) | ( curly_chunk[descr] )=>chunk= curly_chunk[descr] )* loc= RIGHT_CURLY
{
loc=(Token)input.LT(1);
match(input,LEFT_CURLY,FOLLOW_LEFT_CURLY_in_curly_chunk2876); if (failed) return text;
@@ -3803,7 +3785,7 @@
buf.append( loc.getText() );
}
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1069:3: ( (~ (LEFT_CURLY|RIGHT_CURLY))=>~ (LEFT_CURLY|RIGHT_CURLY) | ( curly_chunk[descr] )=>chunk= curly_chunk[descr] )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1051:3: ( (~ (LEFT_CURLY|RIGHT_CURLY))=>~ (LEFT_CURLY|RIGHT_CURLY) | ( curly_chunk[descr] )=>chunk= curly_chunk[descr] )*
loop40:
do {
int alt40=3;
@@ -3818,7 +3800,7 @@
switch (alt40) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1070:4: (~ (LEFT_CURLY|RIGHT_CURLY))=>~ (LEFT_CURLY|RIGHT_CURLY)
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1052:4: (~ (LEFT_CURLY|RIGHT_CURLY))=>~ (LEFT_CURLY|RIGHT_CURLY)
{
if ( (input.LA(1)>=PACKAGE && input.LA(1)<=NULL)||(input.LA(1)>=LEFT_SQUARE && input.LA(1)<=76) ) {
input.consume();
@@ -3840,7 +3822,7 @@
}
break;
case 2 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1075:4: ( curly_chunk[descr] )=>chunk= curly_chunk[descr]
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1057:4: ( curly_chunk[descr] )=>chunk= curly_chunk[descr]
{
pushFollow(FOLLOW_curly_chunk_in_curly_chunk2916);
chunk=curly_chunk(descr);
@@ -3896,7 +3878,7 @@
// $ANTLR start square_chunk
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1097:1: square_chunk[BaseDescr descr] returns [String text] : loc= LEFT_SQUARE ( (~ (LEFT_SQUARE|RIGHT_SQUARE))=>~ (LEFT_SQUARE|RIGHT_SQUARE) | ( square_chunk[null] )=>chunk= square_chunk[null] )* loc= RIGHT_SQUARE ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1079:1: square_chunk[BaseDescr descr] returns [String text] : loc= LEFT_SQUARE ( (~ (LEFT_SQUARE|RIGHT_SQUARE))=>~ (LEFT_SQUARE|RIGHT_SQUARE) | ( square_chunk[null] )=>chunk= square_chunk[null] )* loc= RIGHT_SQUARE ;
public String square_chunk(BaseDescr descr) throws RecognitionException {
String text = null;
@@ -3909,8 +3891,8 @@
Integer channel = null;
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1103:10: (loc= LEFT_SQUARE ( (~ (LEFT_SQUARE|RIGHT_SQUARE))=>~ (LEFT_SQUARE|RIGHT_SQUARE) | ( square_chunk[null] )=>chunk= square_chunk[null] )* loc= RIGHT_SQUARE )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1103:10: loc= LEFT_SQUARE ( (~ (LEFT_SQUARE|RIGHT_SQUARE))=>~ (LEFT_SQUARE|RIGHT_SQUARE) | ( square_chunk[null] )=>chunk= square_chunk[null] )* loc= RIGHT_SQUARE
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1085:10: (loc= LEFT_SQUARE ( (~ (LEFT_SQUARE|RIGHT_SQUARE))=>~ (LEFT_SQUARE|RIGHT_SQUARE) | ( square_chunk[null] )=>chunk= square_chunk[null] )* loc= RIGHT_SQUARE )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1085:10: loc= LEFT_SQUARE ( (~ (LEFT_SQUARE|RIGHT_SQUARE))=>~ (LEFT_SQUARE|RIGHT_SQUARE) | ( square_chunk[null] )=>chunk= square_chunk[null] )* loc= RIGHT_SQUARE
{
if ( backtracking==0 ) {
@@ -3927,7 +3909,7 @@
}
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1113:3: ( (~ (LEFT_SQUARE|RIGHT_SQUARE))=>~ (LEFT_SQUARE|RIGHT_SQUARE) | ( square_chunk[null] )=>chunk= square_chunk[null] )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1095:3: ( (~ (LEFT_SQUARE|RIGHT_SQUARE))=>~ (LEFT_SQUARE|RIGHT_SQUARE) | ( square_chunk[null] )=>chunk= square_chunk[null] )*
loop41:
do {
int alt41=3;
@@ -3942,7 +3924,7 @@
switch (alt41) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1114:4: (~ (LEFT_SQUARE|RIGHT_SQUARE))=>~ (LEFT_SQUARE|RIGHT_SQUARE)
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1096:4: (~ (LEFT_SQUARE|RIGHT_SQUARE))=>~ (LEFT_SQUARE|RIGHT_SQUARE)
{
if ( (input.LA(1)>=PACKAGE && input.LA(1)<=RIGHT_CURLY)||(input.LA(1)>=AND && input.LA(1)<=76) ) {
input.consume();
@@ -3964,7 +3946,7 @@
}
break;
case 2 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1119:4: ( square_chunk[null] )=>chunk= square_chunk[null]
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1101:4: ( square_chunk[null] )=>chunk= square_chunk[null]
{
pushFollow(FOLLOW_square_chunk_in_square_chunk3056);
chunk=square_chunk(null);
@@ -4020,7 +4002,7 @@
// $ANTLR start retval_constraint
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1141:1: retval_constraint returns [String text] : c= paren_chunk[null] ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1123:1: retval_constraint returns [String text] : c= paren_chunk[null] ;
public String retval_constraint() throws RecognitionException {
String text = null;
@@ -4031,8 +4013,8 @@
text = null;
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1146:3: (c= paren_chunk[null] )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1146:3: c= paren_chunk[null]
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1128:3: (c= paren_chunk[null] )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1128:3: c= paren_chunk[null]
{
pushFollow(FOLLOW_paren_chunk_in_retval_constraint3138);
c=paren_chunk(null);
@@ -4057,7 +4039,7 @@
// $ANTLR start lhs_or
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1149: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:1131: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;
@@ -4071,8 +4053,8 @@
OrDescr or = null;
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1155: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:1155: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:1137: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:1137:3: left= lhs_and ( ( (OR|'||') lhs_and )=> (OR|'||')right= lhs_and )*
{
pushFollow(FOLLOW_lhs_and_in_lhs_or3166);
left=lhs_and();
@@ -4081,7 +4063,7 @@
if ( backtracking==0 ) {
d = left;
}
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1156:3: ( ( (OR|'||') lhs_and )=> (OR|'||')right= lhs_and )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1138:3: ( ( (OR|'||') lhs_and )=> (OR|'||')right= lhs_and )*
loop42:
do {
int alt42=2;
@@ -4093,7 +4075,7 @@
switch (alt42) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1156:5: ( (OR|'||') lhs_and )=> (OR|'||')right= lhs_and
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1138:5: ( (OR|'||') lhs_and )=> (OR|'||')right= lhs_and
{
if ( input.LA(1)==OR||input.LA(1)==66 ) {
input.consume();
@@ -4146,7 +4128,7 @@
// $ANTLR start lhs_and
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1170: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:1152: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;
@@ -4160,8 +4142,8 @@
AndDescr and = null;
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1176: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:1176: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:1158: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:1158:3: left= lhs_unary ( ( (AND|'&&') lhs_unary )=> (AND|'&&')right= lhs_unary )*
{
pushFollow(FOLLOW_lhs_unary_in_lhs_and3221);
left=lhs_unary();
@@ -4170,7 +4152,7 @@
if ( backtracking==0 ) {
d = left;
}
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1177:3: ( ( (AND|'&&') lhs_unary )=> (AND|'&&')right= lhs_unary )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1159:3: ( ( (AND|'&&') lhs_unary )=> (AND|'&&')right= lhs_unary )*
loop43:
do {
int alt43=2;
@@ -4182,7 +4164,7 @@
switch (alt43) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1177:5: ( (AND|'&&') lhs_unary )=> (AND|'&&')right= lhs_unary
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1159:5: ( (AND|'&&') lhs_unary )=> (AND|'&&')right= lhs_unary
{
if ( input.LA(1)==AND||input.LA(1)==76 ) {
input.consume();
@@ -4235,7 +4217,7 @@
// $ANTLR start lhs_unary
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1191:1: lhs_unary returns [BaseDescr d] : ( ( lhs_exist )=>u= lhs_exist | ( lhs_not )=>u= lhs_not | ( lhs_eval )=>u= lhs_eval | ( lhs_column ( ( FROM ( ( ACCUMULATE )=> ( accumulate_statement ) | ( COLLECT )=> ( collect_statement ) | (~ (ACCUMULATE|COLLECT))=> ( from_statement ) ) )=> FROM ( ( ACCUMULATE )=> ( accumulate_statement ) | ( COLLECT )=> ( collect_statement ) | (~ (ACCUMULATE|COLLECT))=> ( from_statement ) ) )? )=>u= lhs_column ( ( FROM ( ( ACCUMULATE )=> ( accumulate_statement ) | ( COLLECT )=> ( collect_statement ) | (~ (ACCUMULATE|COLLECT))=> ( from_statement ) ) )=> FROM ( ( ACCUMULATE )=> (ac= accumulate_statement ) | ( COLLECT )=> (cs= collect_statement ) | (~ (ACCUMULATE|COLLECT))=> (fm= from_statement ) ) )? | ( lhs_forall )=>u= lhs_forall | '(' u= lhs_or ')' ) opt_semicolon ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1173:1: lhs_unary returns [BaseDescr d] : ( ( lhs_exist )=>u= lhs_exist | ( lhs_not )=>u= lhs_not | ( lhs_eval )=>u= lhs_eval | ( lhs_column ( ( FROM ( ( ACCUMULATE )=> ( accumulate_statement ) | ( COLLECT )=> ( collect_statement ) | (~ (ACCUMULATE|COLLECT))=> ( from_statement ) ) )=> FROM ( ( ACCUMULATE )=> ( accumulate_statement ) | ( COLLECT )=> ( collect_statement ) | (~ (ACCUMULATE|COLLECT))=> ( from_statement ) ) )? )=>u= lhs_column ( ( FROM ( ( ACCUMULATE )=> ( accumulate_statement ) | ( COLLECT )=> ( collect_statement ) | (~ (ACCUMULATE|COLLECT))=> ( from_statement ) ) )=> FROM ( ( ACCUMULATE )=> (ac= accumulate_statement ) | ( COLLECT )=> (cs= collect_statement ) | (~ (ACCUMULATE|COLLECT))=> (fm= from_statement ) ) )? | ( lhs_forall )=>u= lhs_forall | '(' u= lhs_or ')' ) opt_semicolon ;
public BaseDescr lhs_unary() throws RecognitionException {
BaseDescr d = null;
@@ -4252,10 +4234,10 @@
d = null;
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1195:4: ( ( ( lhs_exist )=>u= lhs_exist | ( lhs_not )=>u= lhs_not | ( lhs_eval )=>u= lhs_eval | ( lhs_column ( ( FROM ( ( ACCUMULATE )=> ( accumulate_statement ) | ( COLLECT )=> ( collect_statement ) | (~ (ACCUMULATE|COLLECT))=> ( from_statement ) ) )=> FROM ( ( ACCUMULATE )=> ( accumulate_statement ) | ( COLLECT )=> ( collect_statement ) | (~ (ACCUMULATE|COLLECT))=> ( from_statement ) ) )? )=>u= lhs_column ( ( FROM ( ( ACCUMULATE )=> ( accumulate_statement ) | ( COLLECT )=> ( collect_statement ) | (~ (ACCUMULATE|COLLECT))=> ( from_statement ) ) )=> FROM ( ( ACCUMULATE )=> (ac= accumulate_statement ) | ( COLLECT )=> (cs= collect_statement ) | (~ (ACCUMULATE|COLLECT))=> (fm= from_statement ) ) )? | ( lhs_forall )=>u= lhs_forall | '(' u= lhs_or ')' ) opt_semicolon )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1195:4: ( ( lhs_exist )=>u= lhs_exist | ( lhs_not )=>u= lhs_not | ( lhs_eval )=>u= lhs_eval | ( lhs_column ( ( FROM ( ( ACCUMULATE )=> ( accumulate_statement ) | ( COLLECT )=> ( collect_statement ) | (~ (ACCUMULATE|COLLECT))=> ( from_statement ) ) )=> FROM ( ( ACCUMULATE )=> ( accumulate_statement ) | ( COLLECT )=> ( collect_statement ) | (~ (ACCUMULATE|COLLECT))=> ( from_statement ) ) )? )=>u= lhs_column ( ( FROM ( ( ACCUMULATE )=> ( accumulate_statement ) | ( COLLECT )=> ( collect_statement ) | (~ (ACCUMULATE|COLLECT))=> ( from_statement ) ) )=> FROM ( ( ACCUMULATE )=> (ac= accumulate_statement ) | ( COLLECT )=> (cs= collect_statement ) | (~ (ACCUMULATE|COLLECT))=> (fm= from_statement ) ) )? | ( lhs_forall )=>u= lhs_forall | '(' u= lhs_or ')' ) opt_semicolon
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1177:4: ( ( ( lhs_exist )=>u= lhs_exist | ( lhs_not )=>u= lhs_not | ( lhs_eval )=>u= lhs_eval | ( lhs_column ( ( FROM ( ( ACCUMULATE )=> ( accumulate_statement ) | ( COLLECT )=> ( collect_statement ) | (~ (ACCUMULATE|COLLECT))=> ( from_statement ) ) )=> FROM ( ( ACCUMULATE )=> ( accumulate_statement ) | ( COLLECT )=> ( collect_statement ) | (~ (ACCUMULATE|COLLECT))=> ( from_statement ) ) )? )=>u= lhs_column ( ( FROM ( ( ACCUMULATE )=> ( accumulate_statement ) | ( COLLECT )=> ( collect_statement ) | (~ (ACCUMULATE|COLLECT))=> ( from_statement ) ) )=> FROM ( ( ACCUMULATE )=> (ac= accumulate_statement ) | ( COLLECT )=> (cs= collect_statement ) | (~ (ACCUMULATE|COLLECT))=> (fm= from_statement ) ) )? | ( lhs_forall )=>u= lhs_forall | '(' u= lhs_or ')' ) opt_semicolon )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1177:4: ( ( lhs_exist )=>u= lhs_exist | ( lhs_not )=>u= lhs_not | ( lhs_eval )=>u= lhs_eval | ( lhs_column ( ( FROM ( ( ACCUMULATE )=> ( accumulate_statement ) | ( COLLECT )=> ( collect_statement ) | (~ (ACCUMULATE|COLLECT))=> ( from_statement ) ) )=> FROM ( ( ACCUMULATE )=> ( accumulate_statement ) | ( COLLECT )=> ( collect_statement ) | (~ (ACCUMULATE|COLLECT))=> ( from_statement ) ) )? )=>u= lhs_column ( ( FROM ( ( ACCUMULATE )=> ( accumulate_statement ) | ( COLLECT )=> ( collect_statement ) | (~ (ACCUMULATE|COLLECT))=> ( from_statement ) ) )=> FROM ( ( ACCUMULATE )=> (ac= accumulate_statement ) | ( COLLECT )=> (cs= collect_statement ) | (~ (ACCUMULATE|COLLECT))=> (fm= from_statement ) ) )? | ( lhs_forall )=>u= lhs_forall | '(' u= lhs_or ')' ) opt_semicolon
{
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1195:4: ( ( lhs_exist )=>u= lhs_exist | ( lhs_not )=>u= lhs_not | ( lhs_eval )=>u= lhs_eval | ( lhs_column ( ( FROM ( ( ACCUMULATE )=> ( accumulate_statement ) | ( COLLECT )=> ( collect_statement ) | (~ (ACCUMULATE|COLLECT))=> ( from_statement ) ) )=> FROM ( ( ACCUMULATE )=> ( accumulate_statement ) | ( COLLECT )=> ( collect_statement ) | (~ (ACCUMULATE|COLLECT))=> ( from_statement ) ) )? )=>u= lhs_column ( ( FROM ( ( ACCUMULATE )=> ( accumulate_statement ) | ( COLLECT )=> ( collect_statement ) | (~ (ACCUMULATE|COLLECT))=> ( from_statement ) ) )=> FROM ( ( ACCUMULATE )=> (ac= accumulate_statement ) | ( COLLECT )=> (cs= collect_statement ) | (~ (ACCUMULATE|COLLECT))=> (fm= from_statement ) ) )? | ( lhs_forall )=>u= lhs_forall | '(' u= lhs_or ')' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1177:4: ( ( lhs_exist )=>u= lhs_exist | ( lhs_not )=>u= lhs_not | ( lhs_eval )=>u= lhs_eval | ( lhs_column ( ( FROM ( ( ACCUMULATE )=> ( accumulate_statement ) | ( COLLECT )=> ( collect_statement ) | (~ (ACCUMULATE|COLLECT))=> ( from_statement ) ) )=> FROM ( ( ACCUMULATE )=> ( accumulate_statement ) | ( COLLECT )=> ( collect_statement ) | (~ (ACCUMULATE|COLLECT))=> ( from_statement ) ) )? )=>u= lhs_column ( ( FROM ( ( ACCUMULATE )=> ( accumulate_statement ) | ( COLLECT )=> ( collect_statement ) | (~ (ACCUMULATE|COLLECT))=> ( from_statement ) ) )=> FROM ( ( ACCUMULATE )=> (ac= accumulate_statement ) | ( COLLECT )=> (cs= collect_statement ) | (~ (ACCUMULATE|COLLECT))=> (fm= from_statement ) ) )? | ( lhs_forall )=>u= lhs_forall | '(' u= lhs_or ')' )
int alt46=6;
switch ( input.LA(1) ) {
case EXISTS:
@@ -4279,14 +4261,14 @@
default:
if (backtracking>0) {failed=true; return d;}
NoViableAltException nvae =
- new NoViableAltException("1195:4: ( ( lhs_exist )=>u= lhs_exist | ( lhs_not )=>u= lhs_not | ( lhs_eval )=>u= lhs_eval | ( lhs_column ( ( FROM ( ( ACCUMULATE )=> ( accumulate_statement ) | ( COLLECT )=> ( collect_statement ) | (~ (ACCUMULATE|COLLECT))=> ( from_statement ) ) )=> FROM ( ( ACCUMULATE )=> ( accumulate_statement ) | ( COLLECT )=> ( collect_statement ) | (~ (ACCUMULATE|COLLECT))=> ( from_statement ) ) )? )=>u= lhs_column ( ( FROM ( ( ACCUMULATE )=> ( accumulate_statement ) | ( COLLECT )=> ( collect_statement ) | (~ (ACCUMULATE|COLLECT))=> ( from_statement ) ) )=> FROM ( ( ACCUMULATE )=> (ac= accumulate_statement ) | ( COLLECT )=> (cs= collect_statement ) | (~ (ACCUMULATE|COLLECT))=> (fm= from_statement ) ) )? | ( lhs_forall )=>u= lhs_forall | '(' u= lhs_or ')' )", 46, 0, input);
+ new NoViableAltException("1177:4: ( ( lhs_exist )=>u= lhs_exist | ( lhs_not )=>u= lhs_not | ( lhs_eval )=>u= lhs_eval | ( lhs_column ( ( FROM ( ( ACCUMULATE )=> ( accumulate_statement ) | ( COLLECT )=> ( collect_statement ) | (~ (ACCUMULATE|COLLECT))=> ( from_statement ) ) )=> FROM ( ( ACCUMULATE )=> ( accumulate_statement ) | ( COLLECT )=> ( collect_statement ) | (~ (ACCUMULATE|COLLECT))=> ( from_statement ) ) )? )=>u= lhs_column ( ( FROM ( ( ACCUMULATE )=> ( accumulate_statement ) | ( COLLECT )=> ( collect_statement ) | (~ (ACCUMULATE|COLLECT))=> ( from_statement ) ) )=> FROM ( ( ACCUMULATE )=> (ac= accumulate_statement ) | ( COLLECT )=> (cs= collect_statement ) | (~ (ACCUMULATE|COLLECT))=> (fm= from_statement ) ) )? | ( lhs_forall )=>u= lhs_forall | '(' u= lhs_or ')' )", 46, 0, input);
throw nvae;
}
switch (alt46) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1195:6: ( lhs_exist )=>u= lhs_exist
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1177:6: ( lhs_exist )=>u= lhs_exist
{
pushFollow(FOLLOW_lhs_exist_in_lhs_unary3277);
u=lhs_exist();
@@ -4296,7 +4278,7 @@
}
break;
case 2 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1196:5: ( lhs_not )=>u= lhs_not
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1178:5: ( lhs_not )=>u= lhs_not
{
pushFollow(FOLLOW_lhs_not_in_lhs_unary3285);
u=lhs_not();
@@ -4306,7 +4288,7 @@
}
break;
case 3 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1197:5: ( lhs_eval )=>u= lhs_eval
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1179:5: ( lhs_eval )=>u= lhs_eval
{
pushFollow(FOLLOW_lhs_eval_in_lhs_unary3293);
u=lhs_eval();
@@ -4316,13 +4298,13 @@
}
break;
case 4 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1198:5: ( lhs_column ( ( FROM ( ( ACCUMULATE )=> ( accumulate_statement ) | ( COLLECT )=> ( collect_statement ) | (~ (ACCUMULATE|COLLECT))=> ( from_statement ) ) )=> FROM ( ( ACCUMULATE )=> ( accumulate_statement ) | ( COLLECT )=> ( collect_statement ) | (~ (ACCUMULATE|COLLECT))=> ( from_statement ) ) )? )=>u= lhs_column ( ( FROM ( ( ACCUMULATE )=> ( accumulate_statement ) | ( COLLECT )=> ( collect_statement ) | (~ (ACCUMULATE|COLLECT))=> ( from_statement ) ) )=> FROM ( ( ACCUMULATE )=> (ac= accumulate_statement ) | ( COLLECT )=> (cs= collect_statement ) | (~ (ACCUMULATE|COLLECT))=> (fm= from_statement ) ) )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1180:5: ( lhs_column ( ( FROM ( ( ACCUMULATE )=> ( accumulate_statement ) | ( COLLECT )=> ( collect_statement ) | (~ (ACCUMULATE|COLLECT))=> ( from_statement ) ) )=> FROM ( ( ACCUMULATE )=> ( accumulate_statement ) | ( COLLECT )=> ( collect_statement ) | (~ (ACCUMULATE|COLLECT))=> ( from_statement ) ) )? )=>u= lhs_column ( ( FROM ( ( ACCUMULATE )=> ( accumulate_statement ) | ( COLLECT )=> ( collect_statement ) | (~ (ACCUMULATE|COLLECT))=> ( from_statement ) ) )=> FROM ( ( ACCUMULATE )=> (ac= accumulate_statement ) | ( COLLECT )=> (cs= collect_statement ) | (~ (ACCUMULATE|COLLECT))=> (fm= from_statement ) ) )?
{
pushFollow(FOLLOW_lhs_column_in_lhs_unary3301);
u=lhs_column();
_fsp--;
if (failed) return d;
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1198:18: ( ( FROM ( ( ACCUMULATE )=> ( accumulate_statement ) | ( COLLECT )=> ( collect_statement ) | (~ (ACCUMULATE|COLLECT))=> ( from_statement ) ) )=> FROM ( ( ACCUMULATE )=> (ac= accumulate_statement ) | ( COLLECT )=> (cs= collect_statement ) | (~ (ACCUMULATE|COLLECT))=> (fm= from_statement ) ) )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1180:18: ( ( FROM ( ( ACCUMULATE )=> ( accumulate_statement ) | ( COLLECT )=> ( collect_statement ) | (~ (ACCUMULATE|COLLECT))=> ( from_statement ) ) )=> FROM ( ( ACCUMULATE )=> (ac= accumulate_statement ) | ( COLLECT )=> (cs= collect_statement ) | (~ (ACCUMULATE|COLLECT))=> (fm= from_statement ) ) )?
int alt45=2;
int LA45_0 = input.LA(1);
if ( (LA45_0==FROM) ) {
@@ -4330,10 +4312,10 @@
}
switch (alt45) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1199:13: ( FROM ( ( ACCUMULATE )=> ( accumulate_statement ) | ( COLLECT )=> ( collect_statement ) | (~ (ACCUMULATE|COLLECT))=> ( from_statement ) ) )=> FROM ( ( ACCUMULATE )=> (ac= accumulate_statement ) | ( COLLECT )=> (cs= collect_statement ) | (~ (ACCUMULATE|COLLECT))=> (fm= from_statement ) )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1181:13: ( FROM ( ( ACCUMULATE )=> ( accumulate_statement ) | ( COLLECT )=> ( collect_statement ) | (~ (ACCUMULATE|COLLECT))=> ( from_statement ) ) )=> FROM ( ( ACCUMULATE )=> (ac= accumulate_statement ) | ( COLLECT )=> (cs= collect_statement ) | (~ (ACCUMULATE|COLLECT))=> (fm= from_statement ) )
{
match(input,FROM,FOLLOW_FROM_in_lhs_unary3317); if (failed) return d;
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1199:18: ( ( ACCUMULATE )=> (ac= accumulate_statement ) | ( COLLECT )=> (cs= collect_statement ) | (~ (ACCUMULATE|COLLECT))=> (fm= from_statement ) )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1181:18: ( ( ACCUMULATE )=> (ac= accumulate_statement ) | ( COLLECT )=> (cs= collect_statement ) | (~ (ACCUMULATE|COLLECT))=> (fm= from_statement ) )
int alt44=3;
switch ( input.LA(1) ) {
case ACCUMULATE:
@@ -4346,7 +4328,7 @@
else {
if (backtracking>0) {failed=true; return d;}
NoViableAltException nvae =
- new NoViableAltException("1199:18: ( ( ACCUMULATE )=> (ac= accumulate_statement ) | ( COLLECT )=> (cs= collect_statement ) | (~ (ACCUMULATE|COLLECT))=> (fm= from_statement ) )", 44, 1, input);
+ new NoViableAltException("1181:18: ( ( ACCUMULATE )=> (ac= accumulate_statement ) | ( COLLECT )=> (cs= collect_statement ) | (~ (ACCUMULATE|COLLECT))=> (fm= from_statement ) )", 44, 1, input);
throw nvae;
}
@@ -4361,7 +4343,7 @@
else {
if (backtracking>0) {failed=true; return d;}
NoViableAltException nvae =
- new NoViableAltException("1199:18: ( ( ACCUMULATE )=> (ac= accumulate_statement ) | ( COLLECT )=> (cs= collect_statement ) | (~ (ACCUMULATE|COLLECT))=> (fm= from_statement ) )", 44, 2, input);
+ new NoViableAltException("1181:18: ( ( ACCUMULATE )=> (ac= accumulate_statement ) | ( COLLECT )=> (cs= collect_statement ) | (~ (ACCUMULATE|COLLECT))=> (fm= from_statement ) )", 44, 2, input);
throw nvae;
}
@@ -4400,17 +4382,17 @@
default:
if (backtracking>0) {failed=true; return d;}
NoViableAltException nvae =
- new NoViableAltException("1199:18: ( ( ACCUMULATE )=> (ac= accumulate_statement ) | ( COLLECT )=> (cs= collect_statement ) | (~ (ACCUMULATE|COLLECT))=> (fm= from_statement ) )", 44, 0, input);
+ new NoViableAltException("1181:18: ( ( ACCUMULATE )=> (ac= accumulate_statement ) | ( COLLECT )=> (cs= collect_statement ) | (~ (ACCUMULATE|COLLECT))=> (fm= from_statement ) )", 44, 0, input);
throw nvae;
}
switch (alt44) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1200:14: ( ACCUMULATE )=> (ac= accumulate_statement )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1182:14: ( ACCUMULATE )=> (ac= accumulate_statement )
{
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1200:32: (ac= accumulate_statement )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1200:33: ac= accumulate_statement
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1182:32: (ac= accumulate_statement )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1182:33: ac= accumulate_statement
{
pushFollow(FOLLOW_accumulate_statement_in_lhs_unary3345);
ac=accumulate_statement();
@@ -4426,10 +4408,10 @@
}
break;
case 2 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1201:14: ( COLLECT )=> (cs= collect_statement )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1183:14: ( COLLECT )=> (cs= collect_statement )
{
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1201:29: (cs= collect_statement )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1201:30: cs= collect_statement
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1183:29: (cs= collect_statement )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1183:30: cs= collect_statement
{
pushFollow(FOLLOW_collect_statement_in_lhs_unary3374);
cs=collect_statement();
@@ -4445,10 +4427,10 @@
}
break;
case 3 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1202:14: (~ (ACCUMULATE|COLLECT))=> (fm= from_statement )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1184:14: (~ (ACCUMULATE|COLLECT))=> (fm= from_statement )
{
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1202:43: (fm= from_statement )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1202:44: fm= from_statement
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1184:43: (fm= from_statement )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1184:44: fm= from_statement
{
pushFollow(FOLLOW_from_statement_in_lhs_unary3409);
fm=from_statement();
@@ -4476,7 +4458,7 @@
}
break;
case 5 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1205:5: ( lhs_forall )=>u= lhs_forall
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1187:5: ( lhs_forall )=>u= lhs_forall
{
pushFollow(FOLLOW_lhs_forall_in_lhs_unary3448);
u=lhs_forall();
@@ -4486,7 +4468,7 @@
}
break;
case 6 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1206:5: '(' u= lhs_or ')'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1188:5: '(' u= lhs_or ')'
{
match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_lhs_unary3456); if (failed) return d;
pushFollow(FOLLOW_lhs_or_in_lhs_unary3460);
@@ -4523,7 +4505,7 @@
// $ANTLR start lhs_exist
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1211:1: lhs_exist returns [BaseDescr d] : loc= EXISTS ( ( ( '(' lhs_or ')' ) )=> ( '(' column= lhs_or end= ')' ) | column= lhs_column ) ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1193:1: lhs_exist returns [BaseDescr d] : loc= EXISTS ( ( ( '(' lhs_or ')' ) )=> ( '(' column= lhs_or end= ')' ) | column= lhs_column ) ;
public BaseDescr lhs_exist() throws RecognitionException {
BaseDescr d = null;
@@ -4536,8 +4518,8 @@
d = null;
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1215:4: (loc= EXISTS ( ( ( '(' lhs_or ')' ) )=> ( '(' column= lhs_or end= ')' ) | column= lhs_column ) )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1215:4: loc= EXISTS ( ( ( '(' lhs_or ')' ) )=> ( '(' column= lhs_or end= ')' ) | column= lhs_column )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1197:4: (loc= EXISTS ( ( ( '(' lhs_or ')' ) )=> ( '(' column= lhs_or end= ')' ) | column= lhs_column ) )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1197:4: loc= EXISTS ( ( ( '(' lhs_or ')' ) )=> ( '(' column= lhs_or end= ')' ) | column= lhs_column )
{
loc=(Token)input.LT(1);
match(input,EXISTS,FOLLOW_EXISTS_in_lhs_exist3496); if (failed) return d;
@@ -4548,7 +4530,7 @@
d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
}
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1221:10: ( ( ( '(' lhs_or ')' ) )=> ( '(' column= lhs_or end= ')' ) | column= lhs_column )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1203:10: ( ( ( '(' lhs_or ')' ) )=> ( '(' column= lhs_or end= ')' ) | column= lhs_column )
int alt47=2;
int LA47_0 = input.LA(1);
if ( (LA47_0==LEFT_PAREN) ) {
@@ -4560,16 +4542,16 @@
else {
if (backtracking>0) {failed=true; return d;}
NoViableAltException nvae =
- new NoViableAltException("1221:10: ( ( ( '(' lhs_or ')' ) )=> ( '(' column= lhs_or end= ')' ) | column= lhs_column )", 47, 0, input);
+ new NoViableAltException("1203:10: ( ( ( '(' lhs_or ')' ) )=> ( '(' column= lhs_or end= ')' ) | column= lhs_column )", 47, 0, input);
throw nvae;
}
switch (alt47) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1221:12: ( ( '(' lhs_or ')' ) )=> ( '(' column= lhs_or end= ')' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1203:12: ( ( '(' lhs_or ')' ) )=> ( '(' column= lhs_or end= ')' )
{
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1221:12: ( '(' column= lhs_or end= ')' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1221:14: '(' column= lhs_or end= ')'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1203:12: ( '(' column= lhs_or end= ')' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1203:14: '(' column= lhs_or end= ')'
{
match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_lhs_exist3516); if (failed) return d;
pushFollow(FOLLOW_lhs_or_in_lhs_exist3520);
@@ -4591,7 +4573,7 @@
}
break;
case 2 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1226:12: column= lhs_column
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1208:12: column= lhs_column
{
pushFollow(FOLLOW_lhs_column_in_lhs_exist3602);
column=lhs_column();
@@ -4627,7 +4609,7 @@
// $ANTLR start lhs_not
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1236:1: lhs_not returns [NotDescr d] : loc= NOT ( ( ( '(' lhs_or ')' ) )=> ( '(' column= lhs_or end= ')' ) | column= lhs_column ) ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1218:1: lhs_not returns [NotDescr d] : loc= NOT ( ( ( '(' lhs_or ')' ) )=> ( '(' column= lhs_or end= ')' ) | column= lhs_column ) ;
public NotDescr lhs_not() throws RecognitionException {
NotDescr d = null;
@@ -4640,8 +4622,8 @@
d = null;
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1240:4: (loc= NOT ( ( ( '(' lhs_or ')' ) )=> ( '(' column= lhs_or end= ')' ) | column= lhs_column ) )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1240:4: loc= NOT ( ( ( '(' lhs_or ')' ) )=> ( '(' column= lhs_or end= ')' ) | column= lhs_column )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1222:4: (loc= NOT ( ( ( '(' lhs_or ')' ) )=> ( '(' column= lhs_or end= ')' ) | column= lhs_column ) )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1222:4: loc= NOT ( ( ( '(' lhs_or ')' ) )=> ( '(' column= lhs_or end= ')' ) | column= lhs_column )
{
loc=(Token)input.LT(1);
match(input,NOT,FOLLOW_NOT_in_lhs_not3656); if (failed) return d;
@@ -4652,7 +4634,7 @@
d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
}
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1246:3: ( ( ( '(' lhs_or ')' ) )=> ( '(' column= lhs_or end= ')' ) | column= lhs_column )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1228:3: ( ( ( '(' lhs_or ')' ) )=> ( '(' column= lhs_or end= ')' ) | column= lhs_column )
int alt48=2;
int LA48_0 = input.LA(1);
if ( (LA48_0==LEFT_PAREN) ) {
@@ -4664,16 +4646,16 @@
else {
if (backtracking>0) {failed=true; return d;}
NoViableAltException nvae =
- new NoViableAltException("1246:3: ( ( ( '(' lhs_or ')' ) )=> ( '(' column= lhs_or end= ')' ) | column= lhs_column )", 48, 0, input);
+ new NoViableAltException("1228:3: ( ( ( '(' lhs_or ')' ) )=> ( '(' column= lhs_or end= ')' ) | column= lhs_column )", 48, 0, input);
throw nvae;
}
switch (alt48) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1246:5: ( ( '(' lhs_or ')' ) )=> ( '(' column= lhs_or end= ')' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1228:5: ( ( '(' lhs_or ')' ) )=> ( '(' column= lhs_or end= ')' )
{
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1246:5: ( '(' column= lhs_or end= ')' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1246:7: '(' column= lhs_or end= ')'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1228:5: ( '(' column= lhs_or end= ')' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1228:7: '(' column= lhs_or end= ')'
{
match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_lhs_not3669); if (failed) return d;
pushFollow(FOLLOW_lhs_or_in_lhs_not3673);
@@ -4695,7 +4677,7 @@
}
break;
case 2 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1252:3: column= lhs_column
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1234:3: column= lhs_column
{
pushFollow(FOLLOW_lhs_column_in_lhs_not3743);
column=lhs_column();
@@ -4731,7 +4713,7 @@
// $ANTLR start lhs_eval
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1262:1: lhs_eval returns [BaseDescr d] : loc= EVAL c= paren_chunk[d] ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1244:1: lhs_eval returns [BaseDescr d] : loc= EVAL c= paren_chunk[d] ;
public BaseDescr lhs_eval() throws RecognitionException {
BaseDescr d = null;
@@ -4743,8 +4725,8 @@
d = new EvalDescr( );
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1267:3: (loc= EVAL c= paren_chunk[d] )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1267:3: loc= EVAL c= paren_chunk[d]
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1249:3: (loc= EVAL c= paren_chunk[d] )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1249:3: loc= EVAL c= paren_chunk[d]
{
loc=(Token)input.LT(1);
match(input,EVAL,FOLLOW_EVAL_in_lhs_eval3791); if (failed) return d;
@@ -4778,7 +4760,7 @@
// $ANTLR start lhs_forall
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1278:1: lhs_forall returns [ForallDescr d] : loc= FORALL '(' base= lhs_column ( ( ( ( ',' )=> ',' )? lhs_column )=> ( ( ',' )=> ',' )? column= lhs_column )+ end= ')' ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1260:1: lhs_forall returns [ForallDescr d] : loc= FORALL '(' base= lhs_column ( ( ( ( ',' )=> ',' )? lhs_column )=> ( ( ',' )=> ',' )? column= lhs_column )+ end= ')' ;
public ForallDescr lhs_forall() throws RecognitionException {
ForallDescr d = null;
@@ -4793,8 +4775,8 @@
d = factory.createForall();
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1282:4: (loc= FORALL '(' base= lhs_column ( ( ( ( ',' )=> ',' )? lhs_column )=> ( ( ',' )=> ',' )? column= lhs_column )+ end= ')' )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1282:4: loc= FORALL '(' base= lhs_column ( ( ( ( ',' )=> ',' )? lhs_column )=> ( ( ',' )=> ',' )? column= lhs_column )+ end= ')'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1264:4: (loc= FORALL '(' base= lhs_column ( ( ( ( ',' )=> ',' )? lhs_column )=> ( ( ',' )=> ',' )? column= lhs_column )+ end= ')' )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1264:4: loc= FORALL '(' base= lhs_column ( ( ( ( ',' )=> ',' )? lhs_column )=> ( ( ',' )=> ',' )? column= lhs_column )+ end= ')'
{
loc=(Token)input.LT(1);
match(input,FORALL,FOLLOW_FORALL_in_lhs_forall3824); if (failed) return d;
@@ -4811,7 +4793,7 @@
d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
}
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1289:3: ( ( ( ( ',' )=> ',' )? lhs_column )=> ( ( ',' )=> ',' )? column= lhs_column )+
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1271:3: ( ( ( ( ',' )=> ',' )? lhs_column )=> ( ( ',' )=> ',' )? column= lhs_column )+
int cnt50=0;
loop50:
do {
@@ -4824,9 +4806,9 @@
switch (alt50) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1289:5: ( ( ( ',' )=> ',' )? lhs_column )=> ( ( ',' )=> ',' )? column= lhs_column
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1271:5: ( ( ( ',' )=> ',' )? lhs_column )=> ( ( ',' )=> ',' )? column= lhs_column
{
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1289:5: ( ( ',' )=> ',' )?
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1271:5: ( ( ',' )=> ',' )?
int alt49=2;
int LA49_0 = input.LA(1);
if ( (LA49_0==64) ) {
@@ -4834,7 +4816,7 @@
}
switch (alt49) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1289:6: ( ',' )=> ','
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1271:6: ( ',' )=> ','
{
match(input,64,FOLLOW_64_in_lhs_forall3844); if (failed) return d;
@@ -4890,7 +4872,7 @@
// $ANTLR start dotted_name
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1301:1: dotted_name[BaseDescr descr] returns [String name] : id= ID ( ( '.' identifier )=> '.' ident= identifier )* ( ( '[' ']' )=> '[' loc= ']' )* ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1283:1: dotted_name[BaseDescr descr] returns [String name] : id= ID ( ( '.' identifier )=> '.' ident= identifier )* ( ( '[' ']' )=> '[' loc= ']' )* ;
public String dotted_name(BaseDescr descr) throws RecognitionException {
String name = null;
@@ -4903,8 +4885,8 @@
name = null;
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1306:3: (id= ID ( ( '.' identifier )=> '.' ident= identifier )* ( ( '[' ']' )=> '[' loc= ']' )* )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1306:3: id= ID ( ( '.' identifier )=> '.' ident= identifier )* ( ( '[' ']' )=> '[' loc= ']' )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1288:3: (id= ID ( ( '.' identifier )=> '.' ident= identifier )* ( ( '[' ']' )=> '[' loc= ']' )* )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1288:3: id= ID ( ( '.' identifier )=> '.' ident= identifier )* ( ( '[' ']' )=> '[' loc= ']' )*
{
id=(Token)input.LT(1);
match(input,ID,FOLLOW_ID_in_dotted_name3896); if (failed) return name;
@@ -4917,7 +4899,7 @@
}
}
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1314:3: ( ( '.' identifier )=> '.' ident= identifier )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1296:3: ( ( '.' identifier )=> '.' ident= identifier )*
loop51:
do {
int alt51=2;
@@ -4929,7 +4911,7 @@
switch (alt51) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1314:5: ( '.' identifier )=> '.' ident= identifier
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1296:5: ( '.' identifier )=> '.' ident= identifier
{
match(input,62,FOLLOW_62_in_dotted_name3908); if (failed) return name;
pushFollow(FOLLOW_identifier_in_dotted_name3912);
@@ -4953,7 +4935,7 @@
}
} while (true);
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1322:3: ( ( '[' ']' )=> '[' loc= ']' )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1304:3: ( ( '[' ']' )=> '[' loc= ']' )*
loop52:
do {
int alt52=2;
@@ -4965,7 +4947,7 @@
switch (alt52) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1322:5: ( '[' ']' )=> '[' loc= ']'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1304:5: ( '[' ']' )=> '[' loc= ']'
{
match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_dotted_name3934); if (failed) return name;
loc=(Token)input.LT(1);
@@ -5003,7 +4985,7 @@
// $ANTLR start argument
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1332:1: argument returns [String name] : id= identifier ( ( '[' ']' )=> '[' ']' )* ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1314:1: argument returns [String name] : id= identifier ( ( '[' ']' )=> '[' ']' )* ;
public String argument() throws RecognitionException {
String name = null;
@@ -5014,8 +4996,8 @@
name = null;
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1337:3: (id= identifier ( ( '[' ']' )=> '[' ']' )* )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1337:3: id= identifier ( ( '[' ']' )=> '[' ']' )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1319:3: (id= identifier ( ( '[' ']' )=> '[' ']' )* )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1319:3: id= identifier ( ( '[' ']' )=> '[' ']' )*
{
pushFollow(FOLLOW_identifier_in_argument3977);
id=identifier();
@@ -5024,7 +5006,7 @@
if ( backtracking==0 ) {
name=id.getText();
}
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1337:40: ( ( '[' ']' )=> '[' ']' )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1319:40: ( ( '[' ']' )=> '[' ']' )*
loop53:
do {
int alt53=2;
@@ -5036,7 +5018,7 @@
switch (alt53) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1337:42: ( '[' ']' )=> '[' ']'
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1319:42: ( '[' ']' )=> '[' ']'
{
match(input,LEFT_SQUARE,FOLLOW_LEFT_SQUARE_in_argument3983); if (failed) return name;
match(input,RIGHT_SQUARE,FOLLOW_RIGHT_SQUARE_in_argument3985); if (failed) return name;
@@ -5068,7 +5050,7 @@
// $ANTLR start rhs_chunk
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1340:1: rhs_chunk[RuleDescr rule] : start= THEN ( (~ END )=>~ END )* loc= END ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1322:1: rhs_chunk[RuleDescr rule] : start= THEN ( (~ END )=>~ END )* loc= END ;
public void rhs_chunk(RuleDescr rule) throws RecognitionException {
Token start=null;
Token loc=null;
@@ -5078,8 +5060,8 @@
Integer channel = null;
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1346:10: (start= THEN ( (~ END )=>~ END )* loc= END )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1346:10: start= THEN ( (~ END )=>~ END )* loc= END
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1328:10: (start= THEN ( (~ END )=>~ END )* loc= END )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1328:10: start= THEN ( (~ END )=>~ END )* loc= END
{
if ( backtracking==0 ) {
@@ -5090,7 +5072,7 @@
}
start=(Token)input.LT(1);
match(input,THEN,FOLLOW_THEN_in_rhs_chunk4029); if (failed) return ;
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1352:3: ( (~ END )=>~ END )*
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1334:3: ( (~ END )=>~ END )*
loop54:
do {
int alt54=2;
@@ -5102,7 +5084,7 @@
switch (alt54) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1353:6: (~ END )=>~ END
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1335:6: (~ END )=>~ END
{
if ( (input.LA(1)>=PACKAGE && input.LA(1)<=QUERY)||(input.LA(1)>=TEMPLATE && input.LA(1)<=76) ) {
input.consume();
@@ -5173,7 +5155,7 @@
// $ANTLR start name
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1383:1: name returns [String s] : ( ( ID )=>tok= ID | str= STRING ) ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1365:1: name returns [String s] : ( ( ID )=>tok= ID | str= STRING ) ;
public String name() throws RecognitionException {
String s = null;
@@ -5181,10 +5163,10 @@
Token str=null;
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1385:2: ( ( ( ID )=>tok= ID | str= STRING ) )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1385:2: ( ( ID )=>tok= ID | str= STRING )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1367:2: ( ( ( ID )=>tok= ID | str= STRING ) )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1367:2: ( ( ID )=>tok= ID | str= STRING )
{
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1385:2: ( ( ID )=>tok= ID | str= STRING )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1367:2: ( ( ID )=>tok= ID | str= STRING )
int alt55=2;
int LA55_0 = input.LA(1);
if ( (LA55_0==ID) ) {
@@ -5196,13 +5178,13 @@
else {
if (backtracking>0) {failed=true; return s;}
NoViableAltException nvae =
- new NoViableAltException("1385:2: ( ( ID )=>tok= ID | str= STRING )", 55, 0, input);
+ new NoViableAltException("1367:2: ( ( ID )=>tok= ID | str= STRING )", 55, 0, input);
throw nvae;
}
switch (alt55) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1386:6: ( ID )=>tok= ID
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1368:6: ( ID )=>tok= ID
{
tok=(Token)input.LT(1);
match(input,ID,FOLLOW_ID_in_name4122); if (failed) return s;
@@ -5215,7 +5197,7 @@
}
break;
case 2 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1391:6: str= STRING
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1373:6: str= STRING
{
str=(Token)input.LT(1);
match(input,STRING,FOLLOW_STRING_in_name4141); if (failed) return s;
@@ -5246,17 +5228,17 @@
// $ANTLR start identifier
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1398:1: identifier returns [Token tok] : ( ( ID )=>t= ID | ( PACKAGE )=>t= PACKAGE | ( FUNCTION )=>t= FUNCTION | ( GLOBAL )=>t= GLOBAL | ( IMPORT )=>t= IMPORT | ( RULE )=>t= RULE | ( QUERY )=>t= QUERY | ( TEMPLATE )=>t= TEMPLATE | ( ATTRIBUTES )=>t= ATTRIBUTES | ( ENABLED )=>t= ENABLED | ( SALIENCE )=>t= SALIENCE | ( DURATION )=>t= DURATION | ( FROM )=>t= FROM | ( ACCUMULATE )=>t= ACCUMULATE | ( INIT )=>t= INIT | ( ACTION )=>t= ACTION | ( RESULT )=>t= RESULT | ( COLLECT )=>t= COLLECT | ( OR )=>t= OR | ( AND )=>t= AND | ( CONTAINS )=>t= CONTAINS | ( EXCLUDES )=>t= EXCLUDES | ( MATCHES )=>t= MATCHES | ( NULL )=>t= NULL | ( EXISTS )=>t= EXISTS | ( NOT )=>t= NOT | ( EVAL )=>t= EVAL | ( FORALL )=>t= FORALL | ( WHEN )=>t= WHEN | ( THEN )=>t= THEN | t= END ) ;
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1380:1: identifier returns [Token tok] : ( ( ID )=>t= ID | ( PACKAGE )=>t= PACKAGE | ( FUNCTION )=>t= FUNCTION | ( GLOBAL )=>t= GLOBAL | ( IMPORT )=>t= IMPORT | ( RULE )=>t= RULE | ( QUERY )=>t= QUERY | ( TEMPLATE )=>t= TEMPLATE | ( ATTRIBUTES )=>t= ATTRIBUTES | ( ENABLED )=>t= ENABLED | ( SALIENCE )=>t= SALIENCE | ( DURATION )=>t= DURATION | ( FROM )=>t= FROM | ( ACCUMULATE )=>t= ACCUMULATE | ( INIT )=>t= INIT | ( ACTION )=>t= ACTION | ( RESULT )=>t= RESULT | ( COLLECT )=>t= COLLECT | ( OR )=>t= OR | ( AND )=>t= AND | ( CONTAINS )=>t= CONTAINS | ( EXCLUDES )=>t= EXCLUDES | ( MATCHES )=>t= MATCHES | ( NULL )=>t= NULL | ( EXISTS )=>t= EXISTS | ( NOT )=>t= NOT | ( EVAL )=>t= EVAL | ( FORALL )=>t= FORALL | ( WHEN )=>t= WHEN | ( THEN )=>t= THEN | t= END ) ;
public Token identifier() throws RecognitionException {
Token tok = null;
Token t=null;
try {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1400:2: ( ( ( ID )=>t= ID | ( PACKAGE )=>t= PACKAGE | ( FUNCTION )=>t= FUNCTION | ( GLOBAL )=>t= GLOBAL | ( IMPORT )=>t= IMPORT | ( RULE )=>t= RULE | ( QUERY )=>t= QUERY | ( TEMPLATE )=>t= TEMPLATE | ( ATTRIBUTES )=>t= ATTRIBUTES | ( ENABLED )=>t= ENABLED | ( SALIENCE )=>t= SALIENCE | ( DURATION )=>t= DURATION | ( FROM )=>t= FROM | ( ACCUMULATE )=>t= ACCUMULATE | ( INIT )=>t= INIT | ( ACTION )=>t= ACTION | ( RESULT )=>t= RESULT | ( COLLECT )=>t= COLLECT | ( OR )=>t= OR | ( AND )=>t= AND | ( CONTAINS )=>t= CONTAINS | ( EXCLUDES )=>t= EXCLUDES | ( MATCHES )=>t= MATCHES | ( NULL )=>t= NULL | ( EXISTS )=>t= EXISTS | ( NOT )=>t= NOT | ( EVAL )=>t= EVAL | ( FORALL )=>t= FORALL | ( WHEN )=>t= WHEN | ( THEN )=>t= THEN | t= END ) )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1400:2: ( ( ID )=>t= ID | ( PACKAGE )=>t= PACKAGE | ( FUNCTION )=>t= FUNCTION | ( GLOBAL )=>t= GLOBAL | ( IMPORT )=>t= IMPORT | ( RULE )=>t= RULE | ( QUERY )=>t= QUERY | ( TEMPLATE )=>t= TEMPLATE | ( ATTRIBUTES )=>t= ATTRIBUTES | ( ENABLED )=>t= ENABLED | ( SALIENCE )=>t= SALIENCE | ( DURATION )=>t= DURATION | ( FROM )=>t= FROM | ( ACCUMULATE )=>t= ACCUMULATE | ( INIT )=>t= INIT | ( ACTION )=>t= ACTION | ( RESULT )=>t= RESULT | ( COLLECT )=>t= COLLECT | ( OR )=>t= OR | ( AND )=>t= AND | ( CONTAINS )=>t= CONTAINS | ( EXCLUDES )=>t= EXCLUDES | ( MATCHES )=>t= MATCHES | ( NULL )=>t= NULL | ( EXISTS )=>t= EXISTS | ( NOT )=>t= NOT | ( EVAL )=>t= EVAL | ( FORALL )=>t= FORALL | ( WHEN )=>t= WHEN | ( THEN )=>t= THEN | t= END )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1382:2: ( ( ( ID )=>t= ID | ( PACKAGE )=>t= PACKAGE | ( FUNCTION )=>t= FUNCTION | ( GLOBAL )=>t= GLOBAL | ( IMPORT )=>t= IMPORT | ( RULE )=>t= RULE | ( QUERY )=>t= QUERY | ( TEMPLATE )=>t= TEMPLATE | ( ATTRIBUTES )=>t= ATTRIBUTES | ( ENABLED )=>t= ENABLED | ( SALIENCE )=>t= SALIENCE | ( DURATION )=>t= DURATION | ( FROM )=>t= FROM | ( ACCUMULATE )=>t= ACCUMULATE | ( INIT )=>t= INIT | ( ACTION )=>t= ACTION | ( RESULT )=>t= RESULT | ( COLLECT )=>t= COLLECT | ( OR )=>t= OR | ( AND )=>t= AND | ( CONTAINS )=>t= CONTAINS | ( EXCLUDES )=>t= EXCLUDES | ( MATCHES )=>t= MATCHES | ( NULL )=>t= NULL | ( EXISTS )=>t= EXISTS | ( NOT )=>t= NOT | ( EVAL )=>t= EVAL | ( FORALL )=>t= FORALL | ( WHEN )=>t= WHEN | ( THEN )=>t= THEN | t= END ) )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1382:2: ( ( ID )=>t= ID | ( PACKAGE )=>t= PACKAGE | ( FUNCTION )=>t= FUNCTION | ( GLOBAL )=>t= GLOBAL | ( IMPORT )=>t= IMPORT | ( RULE )=>t= RULE | ( QUERY )=>t= QUERY | ( TEMPLATE )=>t= TEMPLATE | ( ATTRIBUTES )=>t= ATTRIBUTES | ( ENABLED )=>t= ENABLED | ( SALIENCE )=>t= SALIENCE | ( DURATION )=>t= DURATION | ( FROM )=>t= FROM | ( ACCUMULATE )=>t= ACCUMULATE | ( INIT )=>t= INIT | ( ACTION )=>t= ACTION | ( RESULT )=>t= RESULT | ( COLLECT )=>t= COLLECT | ( OR )=>t= OR | ( AND )=>t= AND | ( CONTAINS )=>t= CONTAINS | ( EXCLUDES )=>t= EXCLUDES | ( MATCHES )=>t= MATCHES | ( NULL )=>t= NULL | ( EXISTS )=>t= EXISTS | ( NOT )=>t= NOT | ( EVAL )=>t= EVAL | ( FORALL )=>t= FORALL | ( WHEN )=>t= WHEN | ( THEN )=>t= THEN | t= END )
{
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1400:2: ( ( ID )=>t= ID | ( PACKAGE )=>t= PACKAGE | ( FUNCTION )=>t= FUNCTION | ( GLOBAL )=>t= GLOBAL | ( IMPORT )=>t= IMPORT | ( RULE )=>t= RULE | ( QUERY )=>t= QUERY | ( TEMPLATE )=>t= TEMPLATE | ( ATTRIBUTES )=>t= ATTRIBUTES | ( ENABLED )=>t= ENABLED | ( SALIENCE )=>t= SALIENCE | ( DURATION )=>t= DURATION | ( FROM )=>t= FROM | ( ACCUMULATE )=>t= ACCUMULATE | ( INIT )=>t= INIT | ( ACTION )=>t= ACTION | ( RESULT )=>t= RESULT | ( COLLECT )=>t= COLLECT | ( OR )=>t= OR | ( AND )=>t= AND | ( CONTAINS )=>t= CONTAINS | ( EXCLUDES )=>t= EXCLUDES | ( MATCHES )=>t= MATCHES | ( NULL )=>t= NULL | ( EXISTS )=>t= EXISTS | ( NOT )=>t= NOT | ( EVAL )=>t= EVAL | ( FORALL )=>t= FORALL | ( WHEN )=>t= WHEN | ( THEN )=>t= THEN | t= END )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1382:2: ( ( ID )=>t= ID | ( PACKAGE )=>t= PACKAGE | ( FUNCTION )=>t= FUNCTION | ( GLOBAL )=>t= GLOBAL | ( IMPORT )=>t= IMPORT | ( RULE )=>t= RULE | ( QUERY )=>t= QUERY | ( TEMPLATE )=>t= TEMPLATE | ( ATTRIBUTES )=>t= ATTRIBUTES | ( ENABLED )=>t= ENABLED | ( SALIENCE )=>t= SALIENCE | ( DURATION )=>t= DURATION | ( FROM )=>t= FROM | ( ACCUMULATE )=>t= ACCUMULATE | ( INIT )=>t= INIT | ( ACTION )=>t= ACTION | ( RESULT )=>t= RESULT | ( COLLECT )=>t= COLLECT | ( OR )=>t= OR | ( AND )=>t= AND | ( CONTAINS )=>t= CONTAINS | ( EXCLUDES )=>t= EXCLUDES | ( MATCHES )=>t= MATCHES | ( NULL )=>t= NULL | ( EXISTS )=>t= EXISTS | ( NOT )=>t= NOT | ( EVAL )=>t= EVAL | ( FORALL )=>t= FORALL | ( WHEN )=>t= WHEN | ( THEN )=>t= THEN | t= END )
int alt56=31;
switch ( input.LA(1) ) {
case ID:
@@ -5355,14 +5337,14 @@
default:
if (backtracking>0) {failed=true; return tok;}
NoViableAltException nvae =
- new NoViableAltException("1400:2: ( ( ID )=>t= ID | ( PACKAGE )=>t= PACKAGE | ( FUNCTION )=>t= FUNCTION | ( GLOBAL )=>t= GLOBAL | ( IMPORT )=>t= IMPORT | ( RULE )=>t= RULE | ( QUERY )=>t= QUERY | ( TEMPLATE )=>t= TEMPLATE | ( ATTRIBUTES )=>t= ATTRIBUTES | ( ENABLED )=>t= ENABLED | ( SALIENCE )=>t= SALIENCE | ( DURATION )=>t= DURATION | ( FROM )=>t= FROM | ( ACCUMULATE )=>t= ACCUMULATE | ( INIT )=>t= INIT | ( ACTION )=>t= ACTION | ( RESULT )=>t= RESULT | ( COLLECT )=>t= COLLECT | ( OR )=>t= OR | ( AND )=>t= AND | ( CONTAINS )=>t= CONTAINS | ( EXCLUDES )=>t= EXCLUDES | ( MATCHES )=>t= MATCHES | ( NULL )=>t= NULL | ( EXISTS )=>t= EXISTS | ( NOT )=>t= NOT | ( EVAL )=>t= EVAL | ( FORALL )=>t= FORALL | ( WHEN )=>t= WHEN | ( THEN )=>t= THEN | t= END )", 56, 0, input);
+ new NoViableAltException("1382:2: ( ( ID )=>t= ID | ( PACKAGE )=>t= PACKAGE | ( FUNCTION )=>t= FUNCTION | ( GLOBAL )=>t= GLOBAL | ( IMPORT )=>t= IMPORT | ( RULE )=>t= RULE | ( QUERY )=>t= QUERY | ( TEMPLATE )=>t= TEMPLATE | ( ATTRIBUTES )=>t= ATTRIBUTES | ( ENABLED )=>t= ENABLED | ( SALIENCE )=>t= SALIENCE | ( DURATION )=>t= DURATION | ( FROM )=>t= FROM | ( ACCUMULATE )=>t= ACCUMULATE | ( INIT )=>t= INIT | ( ACTION )=>t= ACTION | ( RESULT )=>t= RESULT | ( COLLECT )=>t= COLLECT | ( OR )=>t= OR | ( AND )=>t= AND | ( CONTAINS )=>t= CONTAINS | ( EXCLUDES )=>t= EXCLUDES | ( MATCHES )=>t= MATCHES | ( NULL )=>t= NULL | ( EXISTS )=>t= EXISTS | ( NOT )=>t= NOT | ( EVAL )=>t= EVAL | ( FORALL )=>t= FORALL | ( WHEN )=>t= WHEN | ( THEN )=>t= THEN | t= END )", 56, 0, input);
throw nvae;
}
switch (alt56) {
case 1 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1400:10: ( ID )=>t= ID
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1382:10: ( ID )=>t= ID
{
t=(Token)input.LT(1);
match(input,ID,FOLLOW_ID_in_identifier4179); if (failed) return tok;
@@ -5370,7 +5352,7 @@
}
break;
case 2 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1401:4: ( PACKAGE )=>t= PACKAGE
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1383:4: ( PACKAGE )=>t= PACKAGE
{
t=(Token)input.LT(1);
match(input,PACKAGE,FOLLOW_PACKAGE_in_identifier4192); if (failed) return tok;
@@ -5378,7 +5360,7 @@
}
break;
case 3 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1402:4: ( FUNCTION )=>t= FUNCTION
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1384:4: ( FUNCTION )=>t= FUNCTION
{
t=(Token)input.LT(1);
match(input,FUNCTION,FOLLOW_FUNCTION_in_identifier4199); if (failed) return tok;
@@ -5386,7 +5368,7 @@
}
break;
case 4 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1403:4: ( GLOBAL )=>t= GLOBAL
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1385:4: ( GLOBAL )=>t= GLOBAL
{
t=(Token)input.LT(1);
match(input,GLOBAL,FOLLOW_GLOBAL_in_identifier4206); if (failed) return tok;
@@ -5394,7 +5376,7 @@
}
break;
case 5 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1404:4: ( IMPORT )=>t= IMPORT
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1386:4: ( IMPORT )=>t= IMPORT
{
t=(Token)input.LT(1);
match(input,IMPORT,FOLLOW_IMPORT_in_identifier4213); if (failed) return tok;
@@ -5402,7 +5384,7 @@
}
break;
case 6 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1405:4: ( RULE )=>t= RULE
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1387:4: ( RULE )=>t= RULE
{
t=(Token)input.LT(1);
match(input,RULE,FOLLOW_RULE_in_identifier4222); if (failed) return tok;
@@ -5410,7 +5392,7 @@
}
break;
case 7 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1406:4: ( QUERY )=>t= QUERY
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1388:4: ( QUERY )=>t= QUERY
{
t=(Token)input.LT(1);
match(input,QUERY,FOLLOW_QUERY_in_identifier4229); if (failed) return tok;
@@ -5418,7 +5400,7 @@
}
break;
case 8 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1407:17: ( TEMPLATE )=>t= TEMPLATE
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1389:17: ( TEMPLATE )=>t= TEMPLATE
{
t=(Token)input.LT(1);
match(input,TEMPLATE,FOLLOW_TEMPLATE_in_identifier4250); if (failed) return tok;
@@ -5426,7 +5408,7 @@
}
break;
case 9 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1408:17: ( ATTRIBUTES )=>t= ATTRIBUTES
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1390:17: ( ATTRIBUTES )=>t= ATTRIBUTES
{
t=(Token)input.LT(1);
match(input,ATTRIBUTES,FOLLOW_ATTRIBUTES_in_identifier4278); if (failed) return tok;
@@ -5434,7 +5416,7 @@
}
break;
case 10 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1409:17: ( ENABLED )=>t= ENABLED
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1391:17: ( ENABLED )=>t= ENABLED
{
t=(Token)input.LT(1);
match(input,ENABLED,FOLLOW_ENABLED_in_identifier4304); if (failed) return tok;
@@ -5442,7 +5424,7 @@
}
break;
case 11 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1410:17: ( SALIENCE )=>t= SALIENCE
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1392:17: ( SALIENCE )=>t= SALIENCE
{
t=(Token)input.LT(1);
match(input,SALIENCE,FOLLOW_SALIENCE_in_identifier4333); if (failed) return tok;
@@ -5450,7 +5432,7 @@
}
break;
case 12 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1411:17: ( DURATION )=>t= DURATION
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1393:17: ( DURATION )=>t= DURATION
{
t=(Token)input.LT(1);
match(input,DURATION,FOLLOW_DURATION_in_identifier4355); if (failed) return tok;
@@ -5458,7 +5440,7 @@
}
break;
case 13 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1412:17: ( FROM )=>t= FROM
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1394:17: ( FROM )=>t= FROM
{
t=(Token)input.LT(1);
match(input,FROM,FOLLOW_FROM_in_identifier4377); if (failed) return tok;
@@ -5466,7 +5448,7 @@
}
break;
case 14 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1413:17: ( ACCUMULATE )=>t= ACCUMULATE
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1395:17: ( ACCUMULATE )=>t= ACCUMULATE
{
t=(Token)input.LT(1);
match(input,ACCUMULATE,FOLLOW_ACCUMULATE_in_identifier4406); if (failed) return tok;
@@ -5474,7 +5456,7 @@
}
break;
case 15 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1414:17: ( INIT )=>t= INIT
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1396:17: ( INIT )=>t= INIT
{
t=(Token)input.LT(1);
match(input,INIT,FOLLOW_INIT_in_identifier4428); if (failed) return tok;
@@ -5482,7 +5464,7 @@
}
break;
case 16 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1415:17: ( ACTION )=>t= ACTION
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1397:17: ( ACTION )=>t= ACTION
{
t=(Token)input.LT(1);
match(input,ACTION,FOLLOW_ACTION_in_identifier4457); if (failed) return tok;
@@ -5490,7 +5472,7 @@
}
break;
case 17 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1416:17: ( RESULT )=>t= RESULT
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1398:17: ( RESULT )=>t= RESULT
{
t=(Token)input.LT(1);
match(input,RESULT,FOLLOW_RESULT_in_identifier4486); if (failed) return tok;
@@ -5498,7 +5480,7 @@
}
break;
case 18 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1417:17: ( COLLECT )=>t= COLLECT
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1399:17: ( COLLECT )=>t= COLLECT
{
t=(Token)input.LT(1);
match(input,COLLECT,FOLLOW_COLLECT_in_identifier4515); if (failed) return tok;
@@ -5506,7 +5488,7 @@
}
break;
case 19 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1418:17: ( OR )=>t= OR
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1400:17: ( OR )=>t= OR
{
t=(Token)input.LT(1);
match(input,OR,FOLLOW_OR_in_identifier4544); if (failed) return tok;
@@ -5514,7 +5496,7 @@
}
break;
case 20 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1419:17: ( AND )=>t= AND
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1401:17: ( AND )=>t= AND
{
t=(Token)input.LT(1);
match(input,AND,FOLLOW_AND_in_identifier4573); if (failed) return tok;
@@ -5522,7 +5504,7 @@
}
break;
case 21 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1420:17: ( CONTAINS )=>t= CONTAINS
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1402:17: ( CONTAINS )=>t= CONTAINS
{
t=(Token)input.LT(1);
match(input,CONTAINS,FOLLOW_CONTAINS_in_identifier4602); if (failed) return tok;
@@ -5530,7 +5512,7 @@
}
break;
case 22 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1421:17: ( EXCLUDES )=>t= EXCLUDES
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1403:17: ( EXCLUDES )=>t= EXCLUDES
{
t=(Token)input.LT(1);
match(input,EXCLUDES,FOLLOW_EXCLUDES_in_identifier4624); if (failed) return tok;
@@ -5538,7 +5520,7 @@
}
break;
case 23 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1422:17: ( MATCHES )=>t= MATCHES
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1404:17: ( MATCHES )=>t= MATCHES
{
t=(Token)input.LT(1);
match(input,MATCHES,FOLLOW_MATCHES_in_identifier4646); if (failed) return tok;
@@ -5546,7 +5528,7 @@
}
break;
case 24 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1423:17: ( NULL )=>t= NULL
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1405:17: ( NULL )=>t= NULL
{
t=(Token)input.LT(1);
match(input,NULL,FOLLOW_NULL_in_identifier4675); if (failed) return tok;
@@ -5554,7 +5536,7 @@
}
break;
case 25 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1424:17: ( EXISTS )=>t= EXISTS
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1406:17: ( EXISTS )=>t= EXISTS
{
t=(Token)input.LT(1);
match(input,EXISTS,FOLLOW_EXISTS_in_identifier4704); if (failed) return tok;
@@ -5562,7 +5544,7 @@
}
break;
case 26 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1425:17: ( NOT )=>t= NOT
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1407:17: ( NOT )=>t= NOT
{
t=(Token)input.LT(1);
match(input,NOT,FOLLOW_NOT_in_identifier4733); if (failed) return tok;
@@ -5570,7 +5552,7 @@
}
break;
case 27 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1426:17: ( EVAL )=>t= EVAL
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1408:17: ( EVAL )=>t= EVAL
{
t=(Token)input.LT(1);
match(input,EVAL,FOLLOW_EVAL_in_identifier4762); if (failed) return tok;
@@ -5578,7 +5560,7 @@
}
break;
case 28 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1427:17: ( FORALL )=>t= FORALL
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1409:17: ( FORALL )=>t= FORALL
{
t=(Token)input.LT(1);
match(input,FORALL,FOLLOW_FORALL_in_identifier4791); if (failed) return tok;
@@ -5586,7 +5568,7 @@
}
break;
case 29 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1428:17: ( WHEN )=>t= WHEN
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1410:17: ( WHEN )=>t= WHEN
{
t=(Token)input.LT(1);
match(input,WHEN,FOLLOW_WHEN_in_identifier4829); if (failed) return tok;
@@ -5594,7 +5576,7 @@
}
break;
case 30 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1429:17: ( THEN )=>t= THEN
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1411:17: ( THEN )=>t= THEN
{
t=(Token)input.LT(1);
match(input,THEN,FOLLOW_THEN_in_identifier4861); if (failed) return tok;
@@ -5602,7 +5584,7 @@
}
break;
case 31 :
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1430:17: t= END
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1412:17: t= END
{
t=(Token)input.LT(1);
match(input,END,FOLLOW_END_in_identifier4890); if (failed) return tok;
@@ -5633,8 +5615,8 @@
// $ANTLR start synpred4
public void synpred4_fragment() throws RecognitionException {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:207:4: ( import_statement )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:207:4: import_statement
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:189:4: ( import_statement )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:189:4: import_statement
{
pushFollow(FOLLOW_import_statement_in_synpred4114);
import_statement();
@@ -5647,8 +5629,8 @@
// $ANTLR start synpred5
public void synpred5_fragment() throws RecognitionException {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:208:10: ( function_import_statement )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:208:10: function_import_statement
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:190:10: ( function_import_statement )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:190:10: function_import_statement
{
pushFollow(FOLLOW_function_import_statement_in_synpred5126);
function_import_statement();
@@ -5661,8 +5643,8 @@
// $ANTLR start synpred35
public void synpred35_fragment() throws RecognitionException {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:691:4: ( paren_chunk[from] )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:691:4: paren_chunk[from]
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:673:4: ( paren_chunk[from] )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:673:4: paren_chunk[from]
{
pushFollow(FOLLOW_paren_chunk_in_synpred351666);
paren_chunk(from);
@@ -5675,8 +5657,8 @@
// $ANTLR start synpred38
public void synpred38_fragment() throws RecognitionException {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:726:6: ( LEFT_PAREN )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:726:8: LEFT_PAREN
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:708:6: ( LEFT_PAREN )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:708:8: LEFT_PAREN
{
match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_synpred381766); if (failed) return ;
@@ -5686,8 +5668,8 @@
// $ANTLR start synpred41
public void synpred41_fragment() throws RecognitionException {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:822:6: ( (OR|'||') fact )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:822:6: (OR|'||') fact
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:804:6: ( (OR|'||') fact )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:804:6: (OR|'||') fact
{
if ( input.LA(1)==OR||input.LA(1)==66 ) {
input.consume();
@@ -5711,8 +5693,8 @@
// $ANTLR start synpred69
public void synpred69_fragment() throws RecognitionException {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1200:14: ( ACCUMULATE )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1200:16: ACCUMULATE
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1182:14: ( ACCUMULATE )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1182:16: ACCUMULATE
{
match(input,ACCUMULATE,FOLLOW_ACCUMULATE_in_synpred693336); if (failed) return ;
@@ -5722,8 +5704,8 @@
// $ANTLR start synpred70
public void synpred70_fragment() throws RecognitionException {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1201:14: ( COLLECT )
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1201:16: COLLECT
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1183:14: ( COLLECT )
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1183:16: COLLECT
{
match(input,COLLECT,FOLLOW_COLLECT_in_synpred703365); if (failed) return ;
@@ -5733,8 +5715,8 @@
// $ANTLR start synpred71
public void synpred71_fragment() throws RecognitionException {
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1202:14: (~ (ACCUMULATE|COLLECT))
- // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1202:16: ~ (ACCUMULATE|COLLECT)
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1184:14: (~ (ACCUMULATE|COLLECT))
+ // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1184:16: ~ (ACCUMULATE|COLLECT)
{
if ( (input.LA(1)>=PACKAGE && input.LA(1)<=DURATION)||(input.LA(1)>=INIT && input.LA(1)<=RESULT)||(input.LA(1)>=ID && input.LA(1)<=76) ) {
input.consume();
@@ -8344,7 +8326,7 @@
}
}
public String getDescription() {
- return "207:2: ( ( import_statement )=> import_statement | ( function_import_statement )=> function_import_statement | ( global )=> global | ( function )=> function | ( template )=>t= template | ( rule )=>r= rule | q= query )";
+ return "189:2: ( ( import_statement )=> import_statement | ( function_import_statement )=> function_import_statement | ( global )=> global | ( function )=> function | ( template )=>t= template | ( rule )=>r= rule | q= query )";
}
public int specialStateTransition(int s) throws NoViableAltException {
int _s = s;
@@ -8434,7 +8416,7 @@
}
}
public String getDescription() {
- return "325:6: ( ( dotted_name[null] )=>paramType= dotted_name[null] )?";
+ return "307:6: ( ( dotted_name[null] )=>paramType= dotted_name[null] )?";
}
}
public static final String DFA9_eotS =
@@ -8478,7 +8460,7 @@
}
}
public String getDescription() {
- return "329:11: ( ( dotted_name[null] )=>paramType= dotted_name[null] )?";
+ return "311:11: ( ( dotted_name[null] )=>paramType= dotted_name[null] )?";
}
}
Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/Expander.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/Expander.java 2007-02-15 15:52:34 UTC (rev 9537)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/Expander.java 2007-02-15 20:49:28 UTC (rev 9538)
@@ -1,5 +1,11 @@
package org.drools.lang;
+import java.io.IOException;
+import java.io.Reader;
+import java.util.List;
+
+import org.drools.lang.dsl.DSLMapping;
+
/*
* Copyright 2005 JBoss Inc
*
@@ -39,19 +45,43 @@
public interface Expander {
/**
- * The parser should call this on an expression/line that potentially needs expanding
- * BEFORE it parses that line (as the line may change radically as the result of expansion).
+ * Expands (process) the expression Just-In-Time for the parser.
+ * If the source is not meant to be expanded, or if no
+ * appropriate match was found for expansion, it will echo back
+ * the same expression.
*
- * Expands the expression Just-In-Time for the parser.
- * If the expression is not meant to be expanded, or if no
- * appropriate expander is found, it will echo back the same
- * expression.
+ * @param drl the source code to be pre-processed
+ * @return source code after running pre-processors
+ */
+ public String expand( Reader drl ) throws IOException;
+
+ /**
+ * Expands (process) the expression Just-In-Time for the parser.
+ * If the source is not meant to be expanded, or if no
+ * appropriate match was found for expansion, it will echo back
+ * the same expression.
*
- * @param scope The current scope of the expansion (eg "when" for LHS)
- * @param expression The line of text to be expanded.
- * @return A correct expression for the parser to reparse.
+ * @param source the source code to be expanded
+ * @return source code after running pre-processors
*/
- public String expand(String scope,
- String pattern);
+ public String expand( String source );
+ /**
+ * Add the new mapping to this expander.
+ * @param mapping
+ */
+ public void addDSLMapping(DSLMapping mapping);
+
+ /**
+ * Returns the list of errors from the last expansion made
+ * @return
+ */
+ public List getErrors();
+
+ /**
+ * Returns true in case the last expansion had any errors
+ * @return
+ */
+ public boolean hasErrors();
+
}
\ No newline at end of file
Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/ExpanderException.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/ExpanderException.java 2007-02-15 15:52:34 UTC (rev 9537)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/ExpanderException.java 2007-02-15 20:49:28 UTC (rev 9538)
@@ -28,4 +28,5 @@
super( message,
line );
}
+
}
\ No newline at end of file
Added: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMapping.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMapping.java (rev 0)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMapping.java 2007-02-15 20:49:28 UTC (rev 9538)
@@ -0,0 +1,36 @@
+/*
+ * 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.dsl;
+
+import java.util.List;
+
+
+/**
+ * An interface that represents a DSL Mapping source
+ *
+ * Implementations of this interface are capable of parsing
+ * different DSL mapping file layouts.
+ *
+ * @author etirelli
+ */
+public interface DSLMapping {
+
+ public String getIdentifier();
+
+ public List getEntries();
+
+}
Property changes on: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMapping.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ id author date revision
Name: svn:eol-style
+ native
Added: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMappingEntry.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMappingEntry.java (rev 0)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMappingEntry.java 2007-02-15 20:49:28 UTC (rev 9538)
@@ -0,0 +1,268 @@
+/*
+ * 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.dsl;
+
+import java.util.Map;
+import java.util.regex.Pattern;
+
+/**
+ * A single entry in a DSL mapping file
+ *
+ * @author etirelli
+ */
+public interface DSLMappingEntry {
+
+ public static final Section KEYWORD = new KeywordSection();
+ public static final Section CONDITION = new ConditionSection();
+ public static final Section CONSEQUENCE = new ConsequenceSection();
+ public static final Section ANY = new AnySection();
+
+ /**
+ * Returns the section this mapping entry refers to
+ *
+ * @return
+ */
+ public DSLMappingEntry.Section getSection();
+
+ /**
+ * Returns the meta data info about this mapping entry
+ *
+ * @return
+ */
+ public DSLMappingEntry.MetaData getMetaData();
+
+ /**
+ * Returns the key of this mapping, i.e., the source
+ * that needs to be translated
+ *
+ * @return
+ */
+ public String getMappingKey();
+
+ /**
+ * Returns the result of the translation
+ *
+ * @return
+ */
+ public String getMappingValue();
+
+
+ /**
+ * Returns the compiled pattern based on the given MappingKey
+ * @return the keyPattern
+ */
+ public Pattern getKeyPattern();
+
+ /**
+ * Returns the transformed mapping value using place holders for variables
+ * @return the valuePattern
+ */
+ public String getValuePattern();
+
+ /**
+ * Returns the list of variables found in the given pattern key
+ * @return the variables
+ */
+ public Map getVariables();
+
+
+ /**
+ * An inner interface for DSL mapping sections
+ * @author etirelli
+ *
+ */
+ public static interface Section {
+ public String getSymbol();
+ }
+
+ /**
+ * An inner interface to represent any metadata
+ * associated with this entry. It is obviously
+ * implementation dependent.
+ *
+ * @author etirelli
+ *
+ */
+ public static interface MetaData {
+ public String toString();
+
+ public String getMetaData();
+ }
+
+ /**
+ * The keyword section, to allow mapping of keywords
+ *
+ * @author etirelli
+ */
+ public static class KeywordSection
+ implements
+ Section {
+ private static final String symbol = "[keyword]";
+
+ private KeywordSection() {
+ }
+
+ public String getSymbol() {
+ return symbol;
+ }
+
+ public String toString() {
+ return symbol;
+ }
+
+ public int hashCode() {
+ final int PRIME = 31;
+ int result = 1;
+ result = PRIME * result + ((symbol == null) ? 0 : symbol.hashCode());
+ return result;
+ }
+
+ public boolean equals(Object obj) {
+ if ( this == obj ) return true;
+ if ( obj == null ) return false;
+ if ( getClass() != obj.getClass() ) return false;
+ final KeywordSection other = (KeywordSection) obj;
+ if ( symbol == null ) {
+ if ( other.getSymbol() != null ) return false;
+ } else if ( !symbol.equals( other.getSymbol() ) ) return false;
+ return true;
+ }
+ }
+
+ /**
+ * The condition section, to allow mapping of the conditions
+ *
+ * @author etirelli
+ */
+ public static class ConditionSection
+ implements
+ Section {
+ private static String symbol = "[condition]";
+
+ private ConditionSection() {
+ }
+
+ public String getSymbol() {
+ return symbol;
+ }
+
+ public String toString() {
+ return symbol;
+ }
+
+ public int hashCode() {
+ final int PRIME = 31;
+ int result = 1;
+ result = PRIME * result + ((symbol == null) ? 0 : symbol.hashCode());
+ return result;
+ }
+
+ public boolean equals(Object obj) {
+ if ( this == obj ) return true;
+ if ( obj == null ) return false;
+ if ( getClass() != obj.getClass() ) return false;
+ final KeywordSection other = (KeywordSection) obj;
+ if ( symbol == null ) {
+ if ( other.getSymbol() != null ) return false;
+ } else if ( !symbol.equals( other.getSymbol() ) ) return false;
+ return true;
+ }
+ }
+
+ /**
+ * The consequence section to allow the mapping
+ * of consequence elements
+ *
+ * @author etirelli
+ */
+ public static class ConsequenceSection
+ implements
+ Section {
+ private static String symbol = "[consequence]";
+
+ private ConsequenceSection() {
+ }
+
+ public String getSymbol() {
+ return symbol;
+ }
+
+ public String toString() {
+ return symbol;
+ }
+
+ public int hashCode() {
+ final int PRIME = 31;
+ int result = 1;
+ result = PRIME * result + ((symbol == null) ? 0 : symbol.hashCode());
+ return result;
+ }
+
+ public boolean equals(Object obj) {
+ if ( this == obj ) return true;
+ if ( obj == null ) return false;
+ if ( getClass() != obj.getClass() ) return false;
+ final KeywordSection other = (KeywordSection) obj;
+ if ( symbol == null ) {
+ if ( other.getSymbol() != null ) return false;
+ } else if ( !symbol.equals( other.getSymbol() ) ) return false;
+ return true;
+ }
+ }
+
+ /**
+ * An element to indicate the mapping should be applicable
+ * to any section
+ *
+ * @author etirelli
+ */
+ public static class AnySection
+ implements
+ Section {
+ private static String symbol = "*";
+
+ private AnySection() {
+ }
+
+ public String getSymbol() {
+ return symbol;
+ }
+
+ public String toString() {
+ return symbol;
+ }
+
+ public int hashCode() {
+ final int PRIME = 31;
+ int result = 1;
+ result = PRIME * result + ((symbol == null) ? 0 : symbol.hashCode());
+ return result;
+ }
+
+ public boolean equals(Object obj) {
+ if ( this == obj ) return true;
+ if ( obj == null ) return false;
+ if ( getClass() != obj.getClass() ) return false;
+ final KeywordSection other = (KeywordSection) obj;
+ if ( symbol == null ) {
+ if ( other.getSymbol() != null ) return false;
+ } else if ( !symbol.equals( other.getSymbol() ) ) return false;
+ return true;
+ }
+ }
+
+}
Property changes on: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMappingEntry.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ id author date revision
Name: svn:eol-style
+ native
Added: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMappingFile.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMappingFile.java (rev 0)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMappingFile.java 2007-02-15 20:49:28 UTC (rev 9538)
@@ -0,0 +1,201 @@
+/*
+ * 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.dsl;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.Reader;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.drools.lang.dsl.DSLMappingEntry;
+
+/**
+ * A class that represents a DSL Mapping file
+ * @author etirelli
+ *
+ */
+public class DSLMappingFile
+ implements
+ DSLMapping {
+
+ // following pattern will be used to parse dsl mapping entries in the DSL file.
+ // It is capable of parsing entries that follows the pattern:
+ // [<section>][<metadata>]?<key>=<value>
+ private static final Pattern pattern = Pattern.compile( "((\\[[^\\[]*\\])\\s*(\\[([^\\[]*)\\])?)?\\s*([^=]*)=(.*)" );
+ private static final String KEYWORD = "[keyword]";
+ private static final String CONDITION = "[when]";
+ private static final String CONSEQUENCE = "[then]";
+ //private static final String ANY = "[*]";
+
+ private String dslFileName;
+ private BufferedReader dslFileReader;
+ private List entries;
+ private List errors;
+ private boolean closed;
+ private boolean parsed;
+
+ public DSLMappingFile(String dslFileName,
+ Reader dslFileReader) {
+ this.dslFileName = dslFileName;
+ this.dslFileReader = new BufferedReader( dslFileReader );
+ this.closed = false;
+ this.parsed = false;
+ this.entries = new ArrayList();
+ this.errors = new ArrayList();
+ }
+
+ public String getIdentifier() {
+ return this.dslFileName;
+ }
+
+ /**
+ * Returns the name of the DSL Mapping file associated
+ * with this object
+ *
+ * @return
+ */
+ public String getDslFileName() {
+ return this.dslFileName;
+ }
+
+ /**
+ * @inheritDoc
+ */
+ public List getEntries() {
+ if ( parsed && this.errors.isEmpty() ) {
+ return Collections.unmodifiableList( this.entries );
+ }
+ return null;
+ }
+
+ /**
+ * Returns the list of parsing errors
+ * @return
+ */
+ public List getErrors() {
+ return Collections.unmodifiableList( this.errors );
+ }
+
+ /**
+ * Closes the file stream
+ * @throws IOException
+ */
+ public void close() throws IOException {
+ this.closed = true;
+ this.dslFileReader.close();
+ }
+
+ /**
+ * Returns true if this file is already closed. False otherwise.
+ *
+ * @return
+ */
+ public boolean isClosed() {
+ return this.closed;
+ }
+
+ /**
+ * Parses the file. Throws IOException in case there is any problem
+ * reading the file;
+ *
+ * @return true in case no error was found parsing the file. false
+ * otherwise. Use getErrors() to check for the actual errors.
+ */
+ public boolean parseFile() throws IOException {
+ String line = null;
+ int linecounter = 0;
+ this.parsed = true;
+ while ( (line = this.dslFileReader.readLine()) != null ) {
+ linecounter++;
+ Matcher mat = pattern.matcher( line );
+ if ( mat.matches() ) {
+ String sectionStr = mat.group( 2 );
+ String metadataStr = mat.group( 4 );
+ String key = mat.group( 5 );
+ String value = mat.group( 6 );
+
+ DSLMappingEntry.Section section = DSLMappingEntry.ANY;
+ if ( KEYWORD.equals( sectionStr ) ) {
+ section = DSLMappingEntry.KEYWORD;
+ } else if ( CONDITION.equals( sectionStr ) ) {
+ section = DSLMappingEntry.CONDITION;
+ } else if ( CONSEQUENCE.equals( sectionStr ) ) {
+ section = DSLMappingEntry.CONSEQUENCE;
+ }
+
+ DSLMappingEntry.MetaData metadata = new StandardDSLEntryMetaData( metadataStr );
+
+ DSLMappingEntry entry = new DefaultDSLMappingEntry( section,
+ metadata,
+ key,
+ value );
+
+ this.entries.add( entry );
+ } else if ( !line.trim().startsWith( "#" ) ) { // it is not a comment
+ String error = "Error parsing mapping entry: " + line;
+ DSLMappingParseException exception = new DSLMappingParseException( error,
+ linecounter );
+ this.errors.add( exception );
+ }
+ }
+ return this.errors.isEmpty();
+ }
+
+ public String dumpFile() {
+ StringBuffer buf = new StringBuffer();
+ for ( Iterator it = this.entries.iterator(); it.hasNext(); ) {
+ buf.append( it.next() );
+ buf.append( "\n" );
+ }
+ return buf.toString();
+ }
+
+ public String dumpPatternFile() {
+ StringBuffer buf = new StringBuffer();
+ for ( Iterator it = this.entries.iterator(); it.hasNext(); ) {
+ buf.append( ((DefaultDSLMappingEntry)it.next()).toPatternString() );
+ buf.append( "\n" );
+ }
+ return buf.toString();
+ }
+
+ public static class StandardDSLEntryMetaData
+ implements
+ DSLMappingEntry.MetaData {
+
+ private String metadata;
+
+ public StandardDSLEntryMetaData(String metadata) {
+ this.metadata = metadata;
+ }
+
+ public String getMetaData() {
+ return this.metadata;
+ }
+
+ public String toString() {
+ return (this.metadata == null) ? "" : this.metadata;
+ }
+
+ }
+
+}
Property changes on: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMappingFile.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ id author date revision
Name: svn:eol-style
+ native
Added: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMappingParseException.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMappingParseException.java (rev 0)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMappingParseException.java 2007-02-15 20:49:28 UTC (rev 9538)
@@ -0,0 +1,48 @@
+/*
+ * 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.dsl;
+
+
+/**
+ * @author etirelli
+ *
+ */
+public class DSLMappingParseException extends Exception {
+ private static final long serialVersionUID = 3451471362012187687L;
+
+ public String message;
+ public int line;
+
+ public DSLMappingParseException(String message,
+ int line) {
+ this.message = message;
+ this.line = line;
+ }
+
+ public String getMessage() {
+ return this.message;
+ }
+
+ public int getLine() {
+ return this.line;
+ }
+
+ public String toString() {
+ return "[ line "+line+" ]" + this.message;
+ }
+
+}
Property changes on: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DSLMappingParseException.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ id author date revision
Name: svn:eol-style
+ native
Added: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DefaultDSLMappingEntry.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DefaultDSLMappingEntry.java (rev 0)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DefaultDSLMappingEntry.java 2007-02-15 20:49:28 UTC (rev 9538)
@@ -0,0 +1,226 @@
+/*
+ * 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.dsl;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * A default implementation for the DSL Mapping Entry interface
+ *
+ * @author etirelli
+ */
+public class DefaultDSLMappingEntry
+ implements
+ DSLMappingEntry {
+
+ private Section section;
+ private MetaData metadata;
+ private String key;
+ private String value;
+
+ private Map variables = Collections.EMPTY_MAP;
+
+ private Pattern keyPattern;
+ private String valuePattern;
+
+ // following pattern is used to extract all variables names and positions from a mapping.
+ // Example: for the following String:
+ //
+ // {This} is a {pattern} considered pretty \{{easy}\} by most \{people\}. What do you {say}
+ //
+ // it will return variables:
+ // This, pattern, easy, say
+ //
+ private static final Pattern varFinder = Pattern.compile( "(^|[^\\\\])\\{([(\\\\\\{)|[^\\{]]*?)\\}", Pattern.MULTILINE | Pattern.DOTALL );
+
+ public DefaultDSLMappingEntry() {
+ }
+
+ public DefaultDSLMappingEntry(Section section,
+ MetaData metadata,
+ String key,
+ String value) {
+ this.section = section;
+ this.metadata = metadata;
+ this.setMappingKey( key );
+ this.setMappingValue( value );
+ }
+
+ /**
+ * @inheritDoc
+ */
+ public Section getSection() {
+ return this.section;
+ }
+
+ /**
+ * @inheritDoc
+ */
+ public DSLMappingEntry.MetaData getMetaData() {
+ return this.metadata;
+ }
+
+ /**
+ * @inheritDoc
+ */
+ public String getMappingKey() {
+ return this.key;
+ }
+
+ /**
+ * @inheritDoc
+ */
+ public String getMappingValue() {
+ return this.value;
+ }
+
+ /**
+ * @param key the key to set
+ */
+ public void setMappingKey(String key) {
+ this.key = key;
+
+ // retrieving variables list and creating key pattern
+ Matcher m = varFinder.matcher( key.replaceAll("\\$", "\\\\\\$") );
+ StringBuffer buf = new StringBuffer();
+ int counter = 1;
+ while( m.find() ) {
+ if( this.variables == Collections.EMPTY_MAP ) {
+ this.variables = new HashMap(2);
+ }
+ this.variables.put( m.group( 2 ), new Integer( counter++ ) );
+ m.appendReplacement( buf, m.group( 1 )+"(.*?)" );
+ }
+ m.appendTail( buf );
+ if( buf.toString().endsWith( "(.*?)" ) ) {
+ buf.append( "$" );
+ }
+
+ // setting the key pattern and making it space insensitive
+ String pat = buf.toString().replaceAll( "\\s+", "\\\\s*" );
+ if( pat.trim().startsWith( "-" ) && (! pat.trim().startsWith( "-\\s*" ) )) {
+ pat = pat.substring( 0, pat.indexOf( '-' )+1 ) + "\\s*" + pat.substring( pat.indexOf( '-' )+1 );
+ }
+ this.keyPattern = Pattern.compile( pat, Pattern.DOTALL | Pattern.MULTILINE );
+
+ // update value mapping
+ this.setMappingValue( this.value );
+ }
+
+ /**
+ * @param section the section to set
+ */
+ public void setSection(Section section) {
+ this.section = section;
+ }
+
+ /**
+ * @param value the value to set
+ */
+ public void setMappingValue(String value) {
+ this.valuePattern = value;
+ this.value = value;
+ if( value != null ) {
+ this.valuePattern = this.valuePattern.replaceAll( "\\\\n", "\n" ).replaceAll( "\\$", "\\\\\\$" );
+ for( Iterator it = this.variables.entrySet().iterator(); it.hasNext(); ) {
+ Map.Entry entry = (Map.Entry) it.next();
+ String var = (String) entry.getKey();
+ int pos = ((Integer) entry.getValue()).intValue();
+
+ this.valuePattern = valuePattern.replaceAll( "\\{"+var+"\\}", "\\$"+pos );
+ }
+ }
+ }
+
+ /**
+ * @param metadata the metadata to set
+ */
+ public void setMetaData(MetaData metadata) {
+ this.metadata = metadata;
+ }
+
+ /**
+ * @return the keyPattern
+ */
+ public Pattern getKeyPattern() {
+ return keyPattern;
+ }
+
+ /**
+ * @return the valuePattern
+ */
+ public String getValuePattern() {
+ return valuePattern;
+ }
+
+ /**
+ * @return the variables
+ */
+ public Map getVariables() {
+ return variables;
+ }
+
+ public String toPatternString() {
+ return this.section+"["+this.metadata+"]"+this.keyPattern.pattern()+"="+this.valuePattern;
+ }
+
+ public String toString() {
+ return this.section+"["+this.metadata+"]"+this.key+"="+this.value;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#hashCode()
+ */
+ public int hashCode() {
+ final int PRIME = 31;
+ int result = 1;
+ result = PRIME * result + ((key == null) ? 0 : key.hashCode());
+ result = PRIME * result + ((metadata == null) ? 0 : metadata.hashCode());
+ result = PRIME * result + ((section == null) ? 0 : section.hashCode());
+ result = PRIME * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ public boolean equals(Object obj) {
+ if ( this == obj ) return true;
+ if ( obj == null ) return false;
+ if ( getClass() != obj.getClass() ) return false;
+ final DefaultDSLMappingEntry other = (DefaultDSLMappingEntry) obj;
+ if ( key == null ) {
+ if ( other.key != null ) return false;
+ } else if ( !key.equals( other.key ) ) return false;
+ if ( metadata == null ) {
+ if ( other.metadata != null ) return false;
+ } else if ( !metadata.equals( other.metadata ) ) return false;
+ if ( section == null ) {
+ if ( other.section != null ) return false;
+ } else if ( !section.equals( other.section ) ) return false;
+ if ( value == null ) {
+ if ( other.value != null ) return false;
+ } else if ( !value.equals( other.value ) ) return false;
+ return true;
+ }
+
+}
Property changes on: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DefaultDSLMappingEntry.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/lang/dsl/DefaultExpander.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DefaultExpander.java 2007-02-15 15:52:34 UTC (rev 9537)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DefaultExpander.java 2007-02-15 20:49:28 UTC (rev 9538)
@@ -16,11 +16,20 @@
* limitations under the License.
*/
+import java.io.BufferedReader;
+import java.io.IOException;
import java.io.Reader;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
import org.drools.lang.Expander;
-import org.drools.lang.dsl.template.NLExpressionCompiler;
-import org.drools.lang.dsl.template.NLGrammar;
+import org.drools.lang.ExpanderException;
/**
* The default expander uses String templates to provide pseudo natural language,
@@ -32,24 +41,282 @@
implements
Expander {
- private NLExpressionCompiler compiler;
+ // Be EXTREMELLY careful if you decide to change bellow regexp's
+ //
+ // bellow regexp is used to find and parse rule parts: header, LHS, RHS, trailer, etc
+ private static final String rulesExpr = "(^\\s*rule.*?$.*?^\\s*when.*?$)(.*?)(^\\s*then.*?$)(.*?)(^\\s*end)";
+ // bellow regexp is used to find and parse query parts: header, condition, trailer
+ private static final String queryExpr = "(^\\s*query.*?$)(.*?)(^\\s*end)";
+
+ // bellow we combine and compile above expressions into a pattern object
+ private static final Pattern finder = Pattern.compile( "("+rulesExpr+"|"+queryExpr+")" , Pattern.DOTALL | Pattern.MULTILINE );
+ // bellow pattern is used to find a column's constraint list
+ private static final Pattern columnFinder = Pattern.compile( "\\((.*?)\\)" );
+
+ private Map mappings = new HashMap();
+ private List keywords = new LinkedList();
+ private List condition = new LinkedList();
+ private List consequence = new LinkedList();
+ private List cleanup = new LinkedList();
+
+ private List errors = Collections.EMPTY_LIST;
- public String expand(final String scope,
- final String pattern) {
+ /**
+ * Creates a new DefaultExpander
+ */
+ public DefaultExpander() {
+ this.cleanup.add( new DefaultDSLMappingEntry(DSLMappingEntry.KEYWORD,
+ null,
+ "expander {name}",
+ ""));
+ }
- return this.compiler.compile( pattern,
- scope );
+ /**
+ * Add the new mapping to this expander.
+ * @param mapping
+ */
+ public void addDSLMapping(DSLMapping mapping) {
+ this.mappings.put( mapping.getIdentifier(),
+ mapping );
+ for ( Iterator it = mapping.getEntries().iterator(); it.hasNext(); ) {
+ DSLMappingEntry entry = (DSLMappingEntry) it.next();
+ if ( entry.getSection() == DSLMappingEntry.KEYWORD ) {
+ this.keywords.add( entry );
+ } else if ( entry.getSection() == DSLMappingEntry.CONDITION ) {
+ this.condition.add( entry );
+ } else if ( entry.getSection() == DSLMappingEntry.CONSEQUENCE ) {
+ this.consequence.add( entry );
+ } else {
+ // if any, then add to them both condition and consequence
+ this.condition.add( entry );
+ this.consequence.add( entry );
+ }
+ }
}
/**
- * Use {0} style notation to place "holes" where data will be parsed from the natural text input.
+ * @inheritDoc
+ * @throws IOException
+ */
+ public String expand(final Reader drlReader) throws IOException {
+ return this.expand( this.loadDrlFile( drlReader ) );
+ }
+
+ /**
+ * @inheritDoc
+ * @throws IOException
+ */
+ public String expand(String drl) {
+ drl = expandKeywords( drl );
+ drl = cleanupExpressions( drl );
+ StringBuffer buf = expandConstructions( drl );
+ return buf.toString();
+ }
+
+ /**
+ * Expand constructions like rules and queries
*
- * @see org.drools.lang.dsl.template.NLExpressionCompiler for details.
+ * @param drl
+ * @return
*/
- public DefaultExpander(final Reader reader) {
- final NLGrammar grammar = new NLGrammar();
- grammar.load( reader );
- this.compiler = new NLExpressionCompiler( grammar );
+ private StringBuffer expandConstructions(String drl) {
+ // parse and expand specific areas
+ Matcher m = finder.matcher( drl );
+ StringBuffer buf = new StringBuffer();
+ while( m.find() ) {
+ StringBuffer expanded = new StringBuffer();
+ String constr = m.group( 1 ).trim();
+ if( constr.startsWith( "rule" ) ) {
+ // match rule
+ expanded.append( m.group( 2 ) ); // adding rule header and attributes
+ expanded.append( this.expandLHS( m.group( 3 ) ) ); // adding expanded LHS
+ expanded.append( m.group( 4 ) ); // adding "then" header
+ expanded.append( this.expandRHS( m.group( 5 ) ) ); // adding expanded RHS
+ expanded.append( m.group( 6 ) ); // adding rule trailer
+ expanded.append( "\n" );
+ } else if( constr.startsWith( "query" ) ) {
+ // match query
+ expanded.append( m.group( 7 ) ); // adding query header and attributes
+ expanded.append( this.expandLHS( m.group( 8 ) ) ); // adding expanded LHS
+ expanded.append( m.group( 9 ) ); // adding query trailer
+ expanded.append( "\n" );
+ } else {
+ // strange behavior
+ this.addError( new ExpanderException("Unable to expand statement: "+constr, 0) );
+ }
+ m.appendReplacement( buf, expanded.toString().replaceAll( "\\$", "\\\\\\$" ) );
+ }
+ m.appendTail( buf );
+ return buf;
}
+ /**
+ * Clean up constructions that exists only in the unexpanded code
+ *
+ * @param drl
+ * @return
+ */
+ private String cleanupExpressions(String drl) {
+ // execute cleanup
+ for( Iterator it = this.cleanup.iterator(); it.hasNext(); ) {
+ DSLMappingEntry entry = (DSLMappingEntry) it.next();
+ drl = entry.getKeyPattern().matcher( drl ).replaceAll( entry.getValuePattern() );
+ }
+ return drl;
+ }
+
+ /**
+ * Expand all configured keywords
+ *
+ * @param drl
+ * @return
+ */
+ private String expandKeywords(String drl) {
+ // apply all keywords templates
+ for( Iterator it = this.keywords.iterator(); it.hasNext(); ) {
+ DSLMappingEntry entry = (DSLMappingEntry) it.next();
+ drl = entry.getKeyPattern().matcher( drl ).replaceAll( entry.getValuePattern() );
+ }
+ return drl;
+ }
+
+ /**
+ * Expand LHS for a construction
+ * @param lhs
+ * @return
+ */
+ private String expandLHS(String lhs) {
+ StringBuffer buf = new StringBuffer();
+ String[] lines = lhs.split( "\n" ); // since we assembled the string, we know line breaks are \n
+ String[] expanded = new String[lines.length]; // buffer for expanded lines
+ int lastExpanded = -1;
+ int lastColumn = -1;
+ for( int i = 0; i < lines.length; i++ ){
+ String trimmed = lines[i].trim();
+ expanded[++lastExpanded] = lines[i];
+
+ if( trimmed.length() == 0 || trimmed.startsWith( "#" ) || trimmed.startsWith( "//" ) ) { // comments
+ // do nothing
+ } else if( trimmed.startsWith( ">" ) ) { // passthrough code
+ // simply remove the passthrough mark character
+ expanded[lastExpanded] = lines[i].replaceFirst( ">", " " );
+ } else { // regular expansion
+ // expand the expression
+ for( Iterator it = this.condition.iterator(); it.hasNext(); ) {
+ DSLMappingEntry entry = (DSLMappingEntry) it.next();
+ expanded[lastExpanded] = entry.getKeyPattern().matcher( expanded[lastExpanded] ).replaceAll( entry.getValuePattern() );
+ }
+
+ // do we need to report errors for that?
+ if( lines[i].equals( expanded[lastExpanded] ) ) {
+ // report error
+ this.addError( new ExpanderException("Unable to expand: ["+lines[i]+"]", i) );
+ }
+ // but if the original starts with a "-", it means we need to add it
+ // as a constraint to the previous column
+ if( trimmed.startsWith( "-" ) && (! lines[i].equals( expanded[lastExpanded] )) ) {
+ int lastMatchStart = -1;
+ int lastMatchEnd = -1;
+ String constraints = "";
+ if( lastColumn >= 0) {
+ Matcher m2 = columnFinder.matcher( expanded[lastColumn] );
+ while(m2.find()) {
+ lastMatchStart = m2.start();
+ lastMatchEnd = m2.end();
+ constraints = m2.group(1).trim();
+ }
+ }
+ if( lastMatchStart > -1 ) {
+ // rebuilding previous column structure
+ expanded[lastColumn] = expanded[lastColumn].substring( 0, lastMatchStart ) +
+ "( "+constraints+((constraints.length()==0)?"":", ")+expanded[lastExpanded].trim()+" )" +
+ expanded[lastColumn].substring( lastMatchEnd );
+ } else {
+ // error, column not found to add constraint to
+ // TODO: can we report character position?
+ this.addError( new ExpanderException("No column was found to add the constraint to: "+lines[i], i) );
+ }
+ lastExpanded--;
+ } else {
+ lastColumn = lastExpanded;
+ }
+ }
+ }
+ for( int i = 0; i <= lastExpanded; i++ ) {
+ buf.append( expanded[i] );
+ buf.append( "\n" );
+ }
+
+ return buf.toString();
+ }
+
+ /**
+ * Expand RHS for rules
+ *
+ * @param lhs
+ * @return
+ */
+ private String expandRHS(String lhs) {
+ StringBuffer buf = new StringBuffer();
+ String[] lines = lhs.split( "\n" ); // since we assembled the string, we know line breaks are \n
+ for( int i = 0; i < lines.length; i++ ){
+ String trimmed = lines[i].trim();
+
+ if( trimmed.length() == 0 || trimmed.startsWith( "#" ) || trimmed.startsWith( "//" ) ) { // comments
+ buf.append( lines[i] );
+ } else if( trimmed.startsWith( ">" ) ) { // passthrough code
+ buf.append( lines[i].replaceFirst( ">", "" ) );
+ } else { // regular expansions
+ String expanded = lines[i];
+ for( Iterator it = this.consequence.iterator(); it.hasNext(); ) {
+ DSLMappingEntry entry = (DSLMappingEntry) it.next();
+ expanded = entry.getKeyPattern().matcher( expanded ).replaceAll( entry.getValuePattern() );
+ }
+ buf.append( expanded );
+ // do we need to report errors for that?
+ if( lines[i].equals( expanded ) ) {
+ // report error
+ this.addError( new ExpanderException("Unable to expand: "+lines[i], i) );
+ }
+ }
+ buf.append( "\n" );
+ }
+
+ return buf.toString();
+ }
+
+ // Reads the stream into a String
+ private String loadDrlFile( Reader drl ) throws IOException {
+ StringBuffer buf = new StringBuffer();
+ BufferedReader input = new BufferedReader( drl );
+ String line = null;
+ while( (line = input.readLine()) != null ) {
+ buf.append( line );
+ buf.append( "\n" );
+ }
+ return buf.toString();
+ }
+
+ private void addError( Exception error ) {
+ if( this.errors == Collections.EMPTY_LIST ) {
+ this.errors = new LinkedList();
+ }
+ this.errors.add( error );
+ }
+
+ /**
+ * @inheritDoc
+ */
+ public List getErrors() {
+ return this.errors;
+ }
+
+ /**
+ * @inheritDoc
+ */
+ public boolean hasErrors() {
+ return ! this.errors.isEmpty();
+ }
+
+
}
\ No newline at end of file
Modified: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DefaultExpanderResolver.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DefaultExpanderResolver.java 2007-02-15 15:52:34 UTC (rev 9537)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/DefaultExpanderResolver.java 2007-02-15 20:49:28 UTC (rev 9538)
@@ -16,6 +16,7 @@
* limitations under the License.
*/
+import java.io.IOException;
import java.io.Reader;
import java.util.HashMap;
import java.util.Map;
@@ -53,8 +54,12 @@
*
* This is the constructor most people should use.
*/
- public DefaultExpanderResolver(final Reader reader) {
- final DefaultExpander expander = new DefaultExpander( reader );
+ public DefaultExpanderResolver(final Reader reader) throws IOException {
+ DSLMappingFile file = new DSLMappingFile("default", reader);
+ file.parseFile();
+ file.close();
+ final Expander expander = new DefaultExpander();
+ expander.addDSLMapping( file );
this.expanders.put( "*",
expander );
}
Deleted: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/LineBasedExpander.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/LineBasedExpander.java 2007-02-15 15:52:34 UTC (rev 9537)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/lang/dsl/LineBasedExpander.java 2007-02-15 20:49:28 UTC (rev 9538)
@@ -1,178 +0,0 @@
-package org.drools.lang.dsl;
-
-import java.util.StringTokenizer;
-
-import org.drools.lang.Expander;
-
-/**
- * This is a simple line based expander front end for the DRL parser.
- * Kind of a micro parser in itself.
- * This tries to keep the whitespace and lines intact, but it is not
- * guaranteed to preserve the exact spacing or line numbers.
- *
- * TODO: To replace the in-parser implementation in 3.1 +
- *
- * @author Michael Neale
- */
-public class LineBasedExpander {
-
- private String source;
- private StringBuffer output = new StringBuffer();
- private boolean lhs;
- private boolean rhs;
- private int lineNumber = 0;
- private Expander expander;
-
- /** Pass in the unexpanded rule(s), and and the expander to apply */
- public LineBasedExpander(String rawSource,
- Expander exp) {
- source = rawSource;
- this.expander = exp;
- }
-
- /**
- * This will apply the expander. And return the result.
- */
- public String expand() {
- StringTokenizer st = new StringTokenizer( source,
- "\r\n" );
-
- while ( st.hasMoreTokens() ) {
- lineNumber++;
- String raw = st.nextToken();
- String line = raw.trim();
-
- if ( matchesKeyword( "when",
- line ) ) {
- lhs();
- appendLine( raw );
- } else if ( matchesKeyword( "then",
- line ) ) {
- rhs();
- appendLine( raw );
- } else if ( matchesKeyword( "end",
- line ) ) {
- endRule();
- appendLine( raw );
- output.append( "\n" );
- } else if ( matchesKeyword( "query",
- line ) ) {
- query();
- appendLine( raw );
- } else {
- consume( raw );
- }
- }
- return output.toString();
-
- }
-
- private void appendLine(String raw) {
- output.append( raw );
- output.append( "\n" );
- }
-
- /**
- * @return The expanded rule(s).
- */
- public String getExpanded() {
- return output.toString();
- }
-
- private void consume(String raw) {
- if ( lhs ) {
- appendLine( expand( "when",
- raw ) );
- } else if ( rhs ) {
- appendLine( expand( "then",
- raw ) );
- } else {
- appendLine( raw );
-
- }
-
- }
-
- private String expand(String scope,
- String raw) {
- String trimmed = raw.trim();
-
- if ( trimmed.startsWith( ">" ) ) {
- return raw.substring( 1 );
- } else {
- return "\t\t" + //some space to make it look purrty
- expander.expand( scope,
- normaliseSpaces( raw ) );
- }
- }
-
- /**
- * This will match the token, ignoring any single line comments.
- */
- boolean matchesKeyword(String token,
- String line) {
- if ( line.length() < token.length() ) return false;
- if ( !line.startsWith( token ) ) return false;
-
- String rest = line.substring( token.length() ).trim();
-
- if ( rest.length() == 0 ) return true;
- char next = rest.charAt( 0 );
- if ( next == '#' || next == '/' ) {
- return true;
- } else {
- return false;
- }
-
- }
-
- /**
- * This will normalise all spaces (no 2 spaces in a row).
- * Strings (single or double quoted) are left alone.
- */
- String normaliseSpaces(String original) {
-
- boolean singleQ = false;
- boolean doubleQ = false;
- boolean prevSpace = false;
-
- StringBuffer buf = new StringBuffer();
- char[] cs = original.trim().toCharArray();
- for ( int i = 0; i < cs.length; i++ ) {
- char c = cs[i];
- if ( Character.isWhitespace( c ) && !(singleQ || doubleQ) ) {
- if ( !prevSpace ) {
- buf.append( ' ' );
- prevSpace = true;
- }
- } else {
- prevSpace = false;
- if ( c == '\'' ) singleQ = !singleQ;
- if ( c == '\"' ) doubleQ = !doubleQ;
- buf.append( c );
- }
- }
- return buf.toString();
- }
-
- private void query() {
- lhs();
- }
-
- private void endRule() {
- this.lhs = false;
- this.rhs = false;
-
- }
-
- private void rhs() {
- this.rhs = true;
- this.lhs = false;
-
- }
-
- private void lhs() {
- this.lhs = true;
- }
-
-}
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-02-15 15:52:34 UTC (rev 9537)
+++ labs/jbossrules/trunk/drools-compiler/src/main/resources/org/drools/lang/DRL.g 2007-02-15 20:49:28 UTC (rev 9538)
@@ -13,9 +13,6 @@
}
@parser::members {
- private ExpanderResolver expanderResolver;
- private Expander expander;
- private boolean expanderDebug = false;
private PackageDescr packageDescr;
private List errors = new ArrayList();
private String source = "unknown";
@@ -42,13 +39,6 @@
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;
}
@@ -68,14 +58,6 @@
this.lineOffset = i;
}
- public void setExpanderResolver(ExpanderResolver expanderResolver) {
- this.expanderResolver = expanderResolver;
- }
-
- public ExpanderResolver getExpanderResolver() {
- return expanderResolver;
- }
-
private String getString(Token token) {
String orig = token.getText();
return orig.substring( 1, orig.length() -1 );
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-02-15 15:52:34 UTC (rev 9537)
+++ labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/integrationtests/IntegrationCases.java 2007-02-15 20:49:28 UTC (rev 9538)
@@ -1188,7 +1188,7 @@
}
- public void FIXME_testWithExpanderDSL() throws Exception {
+ public void testWithExpanderDSL() throws Exception {
final PackageBuilder builder = new PackageBuilder();
final Reader source = new InputStreamReader( getClass().getResourceAsStream( "rule_with_expander_dsl.drl" ) );
final Reader dsl = new InputStreamReader( getClass().getResourceAsStream( "test_expander.dsl" ) );
@@ -1228,7 +1228,7 @@
}
- public void FIXME_testWithExpanderMore() throws Exception {
+ public void testWithExpanderMore() throws Exception {
final PackageBuilder builder = new PackageBuilder();
final Reader source = new InputStreamReader( getClass().getResourceAsStream( "rule_with_expander_dsl_more.drl" ) );
final Reader dsl = new InputStreamReader( getClass().getResourceAsStream( "test_expander.dsl" ) );
Modified: labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/MockExpander.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/MockExpander.java 2007-02-15 15:52:34 UTC (rev 9537)
+++ labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/MockExpander.java 2007-02-15 20:49:28 UTC (rev 9538)
@@ -16,9 +16,14 @@
* limitations under the License.
*/
+import java.io.IOException;
+import java.io.Reader;
import java.util.HashSet;
+import java.util.List;
import java.util.Set;
+import org.drools.lang.dsl.DSLMapping;
+
public class MockExpander
implements
Expander {
@@ -39,4 +44,29 @@
return this.patterns.contains( pat );
}
+ public void addDSLMapping(DSLMapping mapping) {
+ // TODO Auto-generated method stub
+
+ }
+
+ public String expand(Reader drl) throws IOException {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public String expand(String source) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public List getErrors() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public boolean hasErrors() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
}
\ No newline at end of file
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-02-15 15:52:34 UTC (rev 9537)
+++ labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/RuleParserTest.java 2007-02-15 20:49:28 UTC (rev 9538)
@@ -60,6 +60,7 @@
import org.drools.lang.descr.ReturnValueRestrictionDescr;
import org.drools.lang.descr.RuleDescr;
import org.drools.lang.descr.VariableRestrictionDescr;
+import org.drools.lang.dsl.DefaultExpander;
import org.drools.lang.dsl.DefaultExpanderResolver;
public class RuleParserTest extends TestCase {
@@ -91,28 +92,28 @@
}
public void testCompilationUnit() throws Exception {
- String source = "package foo; import com.foo.Bar; import com.foo.Baz;";
+ String source = "package foo; import com.foo.Bar; import com.foo.Baz;";
parse( source ).compilation_unit();
assertEquals( "foo",
this.parser.getPackageDescr().getName() );
assertEquals( 2,
this.parser.getPackageDescr().getImports().size() );
- ImportDescr impdescr = (ImportDescr) this.parser.getPackageDescr().getImports().get( 0 );
+ ImportDescr impdescr = (ImportDescr) this.parser.getPackageDescr().getImports().get( 0 );
assertEquals( "com.foo.Bar",
impdescr.getTarget() );
- assertEquals( source.indexOf( "import "+impdescr.getTarget() ),
+ assertEquals( source.indexOf( "import " + impdescr.getTarget() ),
impdescr.getStartCharacter() );
- assertEquals( source.indexOf( "import "+impdescr.getTarget() ) + ("import "+impdescr.getTarget()).length()-1,
+ assertEquals( source.indexOf( "import " + impdescr.getTarget() ) + ("import " + impdescr.getTarget()).length() - 1,
impdescr.getEndCharacter() );
-
+
impdescr = (ImportDescr) this.parser.getPackageDescr().getImports().get( 1 );
assertEquals( "com.foo.Baz",
impdescr.getTarget() );
- assertEquals( source.indexOf( "import "+impdescr.getTarget() ),
+ assertEquals( source.indexOf( "import " + impdescr.getTarget() ),
impdescr.getStartCharacter() );
- assertEquals( source.indexOf( "import "+impdescr.getTarget() ) + ("import "+impdescr.getTarget()).length()-1,
+ assertEquals( source.indexOf( "import " + impdescr.getTarget() ) + ("import " + impdescr.getTarget()).length() - 1,
impdescr.getEndCharacter() );
-
+
assertFalse( this.parser.hasErrors() );
}
@@ -136,90 +137,109 @@
parser.compilation_unit();
final PackageDescr pkg = parser.getPackageDescr();
-
-
assertEquals( 1,
pkg.getRules().size() );
- assertFalse( parser.getErrors().toString(), parser.hasErrors() );
-
+ assertFalse( parser.getErrors().toString(),
+ parser.hasErrors() );
+
}
-
+
public void testPartialAST() throws Exception {
parseResource( "column_partial.drl" );
-
+
parser.compilation_unit();
-
- assertTrue(parser.hasErrors());
-
+
+ assertTrue( parser.hasErrors() );
+
PackageDescr pkg = parser.getPackageDescr();
- assertEquals(1, pkg.getRules().size());
+ assertEquals( 1,
+ pkg.getRules().size() );
RuleDescr rule = (RuleDescr) pkg.getRules().get( 0 );
-
- assertEquals(1, rule.getLhs().getDescrs().size());
- ColumnDescr col = (ColumnDescr) rule.getLhs().getDescrs().get(0);
-
- assertNotNull(col);
- assertEquals("Bar", col.getObjectType());
- assertEquals("foo3", col.getIdentifier());
-
+
+ assertEquals( 1,
+ rule.getLhs().getDescrs().size() );
+ ColumnDescr col = (ColumnDescr) rule.getLhs().getDescrs().get( 0 );
+
+ assertNotNull( col );
+ assertEquals( "Bar",
+ col.getObjectType() );
+ assertEquals( "foo3",
+ col.getIdentifier() );
+
}
-
+
public void testTemplates() throws Exception {
-
+
final DRLParser parser = parseResource( "test_Templates.drl" );
parser.compilation_unit();
final PackageDescr pkg = parser.getPackageDescr();
- if (parser.hasErrors()) {
- System.err.println("FACT TEMPLATES FAILED: " + parser.getErrorMessages());
+ if ( parser.hasErrors() ) {
+ System.err.println( "FACT TEMPLATES FAILED: " + parser.getErrorMessages() );
}
assertFalse( parser.hasErrors() );
-
- assertEquals( 1, pkg.getRules().size() );
- assertEquals(2, pkg.getFactTemplates().size());
-
- FactTemplateDescr fact1 = (FactTemplateDescr) pkg.getFactTemplates().get(0);
- assertEquals("Cheese", fact1.getName());
- assertEquals(2, fact1.getFields().size());
-
- assertEquals("name", ((FieldTemplateDescr)fact1.getFields().get(0)).getName());
- assertEquals("String", ((FieldTemplateDescr)fact1.getFields().get(0)).getClassType());
-
- assertEquals("age", ((FieldTemplateDescr)fact1.getFields().get(1)).getName());
- assertEquals("Integer", ((FieldTemplateDescr)fact1.getFields().get(1)).getClassType());
-
+
+ assertEquals( 1,
+ pkg.getRules().size() );
+ assertEquals( 2,
+ pkg.getFactTemplates().size() );
+
+ FactTemplateDescr fact1 = (FactTemplateDescr) pkg.getFactTemplates().get( 0 );
+ assertEquals( "Cheese",
+ fact1.getName() );
+ assertEquals( 2,
+ fact1.getFields().size() );
+
+ assertEquals( "name",
+ ((FieldTemplateDescr) fact1.getFields().get( 0 )).getName() );
+ assertEquals( "String",
+ ((FieldTemplateDescr) fact1.getFields().get( 0 )).getClassType() );
+
+ assertEquals( "age",
+ ((FieldTemplateDescr) fact1.getFields().get( 1 )).getName() );
+ assertEquals( "Integer",
+ ((FieldTemplateDescr) fact1.getFields().get( 1 )).getClassType() );
+
fact1 = null;
-
- FactTemplateDescr fact2 = (FactTemplateDescr) pkg.getFactTemplates().get(1);
- assertEquals("Wine", fact2.getName());
- assertEquals(3, fact2.getFields().size());
-
- assertEquals("name", ((FieldTemplateDescr)fact2.getFields().get(0)).getName());
- assertEquals("String", ((FieldTemplateDescr)fact2.getFields().get(0)).getClassType());
- assertEquals("year", ((FieldTemplateDescr)fact2.getFields().get(1)).getName());
- assertEquals("String", ((FieldTemplateDescr)fact2.getFields().get(1)).getClassType());
-
- assertEquals("accolades", ((FieldTemplateDescr)fact2.getFields().get(2)).getName());
- assertEquals("String[]", ((FieldTemplateDescr)fact2.getFields().get(2)).getClassType());
- }
-
+ FactTemplateDescr fact2 = (FactTemplateDescr) pkg.getFactTemplates().get( 1 );
+ assertEquals( "Wine",
+ fact2.getName() );
+ assertEquals( 3,
+ fact2.getFields().size() );
+
+ assertEquals( "name",
+ ((FieldTemplateDescr) fact2.getFields().get( 0 )).getName() );
+ assertEquals( "String",
+ ((FieldTemplateDescr) fact2.getFields().get( 0 )).getClassType() );
+
+ assertEquals( "year",
+ ((FieldTemplateDescr) fact2.getFields().get( 1 )).getName() );
+ assertEquals( "String",
+ ((FieldTemplateDescr) fact2.getFields().get( 1 )).getClassType() );
+
+ assertEquals( "accolades",
+ ((FieldTemplateDescr) fact2.getFields().get( 2 )).getName() );
+ assertEquals( "String[]",
+ ((FieldTemplateDescr) fact2.getFields().get( 2 )).getClassType() );
+ }
+
public void testTernaryExpression() throws Exception {
final DRLParser parser = parseResource( "ternary_expression.drl" );
parser.compilation_unit();
final PackageDescr pkg = parser.getPackageDescr();
- RuleDescr rule = (RuleDescr) pkg.getRules().get(0);
+ RuleDescr rule = (RuleDescr) pkg.getRules().get( 0 );
assertEquals( 1,
pkg.getRules().size() );
assertFalse( parser.hasErrors() );
- assertEqualsIgnoreWhitespace("if (speed > speedLimit ? true : false;) pullEmOver();", rule.getConsequence());
- }
-
+ assertEqualsIgnoreWhitespace( "if (speed > speedLimit ? true : false;) pullEmOver();",
+ rule.getConsequence() );
+ }
public void FIX_ME_testLatinChars() throws Exception {
final DrlParser parser = new DrlParser();
@@ -227,15 +247,13 @@
final Reader dsl = new InputStreamReader( this.getClass().getResourceAsStream( "latin.dsl" ) );
final PackageDescr pkg = parser.parse( drl,
- dsl );
+ dsl );
-
//MN: will get some errors due to the char encoding on my FC5 install
//others who use the right encoding may not see this, feel free to uncomment
//the following assertion.
assertFalse( parser.hasErrors() );
-
-
+
assertEquals( "br.com.auster.drools.sample",
pkg.getName() );
assertEquals( 1,
@@ -248,9 +266,9 @@
parser.compilation_unit();
PackageDescr pkg = parser.getPackageDescr();
-
- if (parser.hasErrors()) {
- System.err.println(parser.getErrorMessages());
+
+ if ( parser.hasErrors() ) {
+ System.err.println( parser.getErrorMessages() );
}
assertFalse( parser.hasErrors() );
assertEquals( "foo",
@@ -310,7 +328,8 @@
att.getValue() );
assertEquals( "no-loop",
att.getName() );
- assertFalse( this.parser.getErrorMessages().toString(), this.parser.hasErrors() );
+ assertFalse( this.parser.getErrorMessages().toString(),
+ this.parser.hasErrors() );
}
@@ -339,7 +358,7 @@
rule.getName() );
final String expected = "int i = 0; i = 1; i / 1; i == 1; i(i); i = 'i'; i.i.i; i\\i; i<i; i>i; i=\"i\"; ++i;" + "i++; --i; i--; i += i; i -= i; i *= i; i /= i;" + "int i = 5;" + "for(int j; j<i; ++j) {" + "System.out.println(j);}"
- + "Object o = new String(\"Hello\");" + "String s = (String) o;";
+ + "Object o = new String(\"Hello\");" + "String s = (String) o;";
assertEqualsIgnoreWhitespace( expected,
rule.getConsequence() );
@@ -353,22 +372,21 @@
assertFalse( this.parser.hasErrors() );
}
-
-
+
public void testRuleParseLhs() throws Exception {
- String text = "Person(age < 42, location==\"atlanta\") \nor\nPerson(name==\"bob\") \n";
- AndDescr descrs = new AndDescr();
- CharStream charStream = new ANTLRStringStream( text );
- DRLLexer lexer = new DRLLexer( charStream );
- TokenStream tokenStream = new SwitchingCommonTokenStream( lexer );
+ String text = "Person(age < 42, location==\"atlanta\") \nor\nPerson(name==\"bob\") \n";
+ AndDescr descrs = new AndDescr();
+ CharStream charStream = new ANTLRStringStream( text );
+ DRLLexer lexer = new DRLLexer( charStream );
+ TokenStream tokenStream = new SwitchingCommonTokenStream( lexer );
DRLParser parser = new DRLParser( tokenStream );
- parser.setLineOffset( descrs.getLine() );
- parser.normal_lhs_block(descrs);
- if(parser.hasErrors()) {
- System.err.println(parser.getErrorMessages());
+ parser.setLineOffset( descrs.getLine() );
+ parser.normal_lhs_block( descrs );
+ if ( parser.hasErrors() ) {
+ System.err.println( parser.getErrorMessages() );
}
- assertFalse(parser.hasErrors());
-
+ assertFalse( parser.hasErrors() );
+
}
public void testLiteralBoolAndNegativeNumbersRule() throws Exception {
@@ -392,26 +410,24 @@
assertEquals( 1,
col.getDescrs().size() );
FieldConstraintDescr fld = (FieldConstraintDescr) col.getDescrs().get( 0 );
- LiteralRestrictionDescr lit = (LiteralRestrictionDescr) fld.getRestrictions().get(0);
-
+ LiteralRestrictionDescr lit = (LiteralRestrictionDescr) fld.getRestrictions().get( 0 );
+
assertEquals( "==",
lit.getEvaluator() );
assertEquals( "false",
lit.getText() );
assertEquals( "bar",
- fld.getFieldName() );
+ fld.getFieldName() );
assertEquals( false,
lit.isStaticFieldValue() );
col = (ColumnDescr) lhs.getDescrs().get( 1 );
assertEquals( 1,
col.getDescrs().size() );
-
-
+
fld = (FieldConstraintDescr) col.getDescrs().get( 0 );
- lit = (LiteralRestrictionDescr) fld.getRestrictions().get(0);
-
-
+ lit = (LiteralRestrictionDescr) fld.getRestrictions().get( 0 );
+
assertEquals( ">",
lit.getEvaluator() );
assertEquals( "-42",
@@ -422,12 +438,11 @@
col = (ColumnDescr) lhs.getDescrs().get( 2 );
assertEquals( 1,
col.getDescrs().size() );
-
-
+
//lit = (LiteralDescr) col.getDescrs().get( 0 );
-
+
fld = (FieldConstraintDescr) col.getDescrs().get( 0 );
- lit = (LiteralRestrictionDescr) fld.getRestrictions().get(0);
+ lit = (LiteralRestrictionDescr) fld.getRestrictions().get( 0 );
assertEquals( ">",
lit.getEvaluator() );
assertEquals( "-42.42",
@@ -439,7 +454,7 @@
}
public void testChunkWithoutParens() throws Exception {
- final String chunk = parse( "( foo )" ).paren_chunk(null);
+ final String chunk = parse( "( foo )" ).paren_chunk( null );
assertEquals( "( foo )",
chunk );
@@ -448,7 +463,7 @@
}
public void testChunkWithParens() throws Exception {
- final String chunk = parse( "(fnord())" ).paren_chunk(null);
+ final String chunk = parse( "(fnord())" ).paren_chunk( null );
assertEqualsIgnoreWhitespace( "(fnord())",
chunk );
@@ -457,7 +472,7 @@
}
public void testChunkWithParensAndQuotedString() throws Exception {
- final String chunk = parse( "( fnord( \"cheese\" ) )" ).paren_chunk(null);
+ final String chunk = parse( "( fnord( \"cheese\" ) )" ).paren_chunk( null );
assertEqualsIgnoreWhitespace( "( fnord( \"cheese\" ) )",
chunk );
@@ -466,7 +481,7 @@
}
public void testChunkWithRandomCharac5ters() throws Exception {
- final String chunk = parse( "( %*9dkj)" ).paren_chunk(null);
+ final String chunk = parse( "( %*9dkj)" ).paren_chunk( null );
assertEqualsIgnoreWhitespace( "( %*9dkj)",
chunk );
@@ -493,171 +508,177 @@
columnDescr.getObjectType() );
}
-
+
public void testSimpleMethodCallWithFrom() throws Exception {
-
+
final RuleDescr rule = parseResource( "test_SimpleMethodCallWithFrom.drl" ).rule();
FromDescr from = (FromDescr) rule.getLhs().getDescrs().get( 0 );
AccessorDescr method = (AccessorDescr) from.getDataSource();
-
- assertFalse(parser.getErrorMessages().toString(), parser.hasErrors());
-
- assertEquals( "something.doIt( foo,bar,42,\"hello\",{ a => \"b\", \"something\" => 42, \"a\" => foo, x => {x=>y}},\"end\", [a, \"b\", 42] )",
- method.toString());
+
+ assertFalse( parser.getErrorMessages().toString(),
+ parser.hasErrors() );
+
+ assertEquals( "something.doIt( foo,bar,42,\"hello\",{ a => \"b\", \"something\" => 42, \"a\" => foo, x => {x=>y}},\"end\", [a, \"b\", 42] )",
+ method.toString() );
}
-
+
public void testSimpleFunctionCallWithFrom() throws Exception {
-
+
final RuleDescr rule = parseResource( "test_SimpleFunctionCallWithFrom.drl" ).rule();
FromDescr from = (FromDescr) rule.getLhs().getDescrs().get( 0 );
AccessorDescr func = (AccessorDescr) from.getDataSource();
-
- assertFalse(parser.getErrorMessages().toString(), parser.hasErrors());
-
- assertEquals( "doIt( foo,bar,42,\"hello\",{ a => \"b\", \"something\" => 42, \"a\" => foo, x => {x=>y}},\"end\", [a, \"b\", 42] )",
+
+ assertFalse( parser.getErrorMessages().toString(),
+ parser.hasErrors() );
+
+ assertEquals( "doIt( foo,bar,42,\"hello\",{ a => \"b\", \"something\" => 42, \"a\" => foo, x => {x=>y}},\"end\", [a, \"b\", 42] )",
func.toString() );
- }
-
-
+ }
+
public void testSimpleAccessorWithFrom() throws Exception {
-
+
final RuleDescr rule = parseResource( "test_SimpleAccessorWithFrom.drl" ).rule();
FromDescr from = (FromDescr) rule.getLhs().getDescrs().get( 0 );
AccessorDescr accessor = (AccessorDescr) from.getDataSource();
-
- assertFalse(parser.getErrorMessages().toString(), parser.hasErrors());
-
+
+ assertFalse( parser.getErrorMessages().toString(),
+ parser.hasErrors() );
+
assertNull( ((FieldAccessDescr) accessor.getInvokers().get( 0 )).getArgument() );
-
- assertEquals( "something.doIt", accessor.toString() );
- }
-
+
+ assertEquals( "something.doIt",
+ accessor.toString() );
+ }
+
public void testSimpleAccessorAndArgWithFrom() throws Exception {
-
+
final RuleDescr rule = parseResource( "test_SimpleAccessorArgWithFrom.drl" ).rule();
FromDescr from = (FromDescr) rule.getLhs().getDescrs().get( 0 );
AccessorDescr accessor = (AccessorDescr) from.getDataSource();
-
- assertFalse(parser.getErrorMessages().toString(), parser.hasErrors());
-
+
+ assertFalse( parser.getErrorMessages().toString(),
+ parser.hasErrors() );
+
assertNotNull( ((FieldAccessDescr) accessor.getInvokers().get( 0 )).getArgument() );
-
- assertEquals( "something.doIt[\"key\"]", accessor.toString() );
- }
-
+
+ assertEquals( "something.doIt[\"key\"]",
+ accessor.toString() );
+ }
+
public void testComplexChainedAcessor() throws Exception {
final RuleDescr rule = parseResource( "test_ComplexChainedCallWithFrom.drl" ).rule();
FromDescr from = (FromDescr) rule.getLhs().getDescrs().get( 0 );
AccessorDescr accessor = (AccessorDescr) from.getDataSource();
-
- assertFalse(parser.getErrorMessages().toString(), parser.hasErrors());
-
- assertEquals( "doIt1( foo,bar,42,\"hello\",{ a => \"b\"}, [a, \"b\", 42] ).doIt2(bar, [a, \"b\", 42]).field[\"key\"]",
- accessor.toString() );
- }
-
-// public void testFrom() throws Exception {
-// final RuleDescr rule = parseResource( "from.drl" ).rule();
-//
-// if(parser.hasErrors()) {
-// System.err.println(parser.getErrorMessages());
-// }
-// assertFalse(parser.hasErrors());
-//
-// assertNotNull( rule );
-//
-// assertEquals( "using_from",
-// rule.getName() );
-//
-// assertEquals(9, rule.getLhs().getDescrs().size());
-//
-// FromDescr from = (FromDescr) rule.getLhs().getDescrs().get(0);
-//
-// assertEquals(3, from.getLine());
-//
-// assertEquals("Foo", from.getReturnedColumn().getObjectType());
-// assertTrue(from.getDataSource() instanceof FieldAccessDescr);
-// assertEquals("baz", ((FieldAccessDescr) from.getDataSource()).getFieldName());
-// assertEquals("bar", ((FieldAccessDescr) from.getDataSource()).getVariableName());
-//
-//
-// ArgumentValueDescr arg = null;
-//
-// from = (FromDescr) rule.getLhs().getDescrs().get(1);
-// assertEquals("Foo", from.getReturnedColumn().getObjectType());
-// assertEquals(0, from.getReturnedColumn().getDescrs().size());
-// FieldAccessDescr fieldAccess = ( FieldAccessDescr ) from.getDataSource();
-// arg = ( ArgumentValueDescr ) fieldAccess.getArgument();
-// assertEquals(ArgumentValueDescr.STRING, arg.getType() );
-//
-// from = (FromDescr) rule.getLhs().getDescrs().get(2);
-// fieldAccess = ( FieldAccessDescr ) from.getDataSource();
-// arg = ( ArgumentValueDescr ) fieldAccess.getArgument();
-// assertEquals(ArgumentValueDescr.VARIABLE, arg.getType() );
-//
-// from = (FromDescr) rule.getLhs().getDescrs().get(3);
-// fieldAccess = ( FieldAccessDescr ) from.getDataSource();
-// arg = ( ArgumentValueDescr ) fieldAccess.getArgument();
-// assertEquals(ArgumentValueDescr.INTEGRAL, arg.getType() );
-//
-// from = (FromDescr) rule.getLhs().getDescrs().get(4);
-// assertEquals("Whee", from.getReturnedColumn().getObjectType());
-// assertEquals(1, from.getReturnedColumn().getDescrs().size());
-// assertTrue(from.getDataSource() instanceof FunctionCallDescr);
-// assertEquals("whee", ((FunctionCallDescr) from.getDataSource()).getName());
-// assertEquals(1, ((FunctionCallDescr) from.getDataSource()).getArguments().size());
-// arg = ( (ArgumentValueDescr )((FunctionCallDescr) from.getDataSource()).getArguments().get(0));
-// assertEquals("y", arg.getValue());
-// assertEquals(ArgumentValueDescr.STRING, arg.getType());
-//
-// assertEquals(7, from.getLine());
-// assertEquals(7, from.getReturnedColumn().getLine());
-//
-// from = (FromDescr) rule.getLhs().getDescrs().get(5);
-// assertEquals("Foo", from.getReturnedColumn().getObjectType());
-// assertEquals(1, from.getReturnedColumn().getDescrs().size());
-// assertEquals("f", from.getReturnedColumn().getIdentifier());
-// assertTrue(from.getDataSource() instanceof MethodAccessDescr);
-// assertEquals("bar", ((MethodAccessDescr) from.getDataSource()).getVariableName());
-// assertEquals("la", ((MethodAccessDescr) from.getDataSource()).getMethodName());
-// assertEquals(1, ((MethodAccessDescr) from.getDataSource()).getArguments().size());
-// arg = (ArgumentValueDescr) ((MethodAccessDescr) from.getDataSource()).getArguments().get(0);
-//
-//
-// assertEquals("x", arg.getValue());
-// assertEquals(ArgumentValueDescr.VARIABLE, arg.getType());
-//
-// assertEqualsIgnoreWhitespace("whee();", rule.getConsequence());
-//
-// from = (FromDescr) rule.getLhs().getDescrs().get(6);
-// assertEquals("wa", ((FunctionCallDescr)from.getDataSource()).getName());
-//
-// from = (FromDescr) rule.getLhs().getDescrs().get(7);
-// MethodAccessDescr meth = (MethodAccessDescr)from.getDataSource();
-// assertEquals("wa", meth.getMethodName());
-// assertEquals("la", meth.getVariableName());
-//
-// arg = (ArgumentValueDescr) meth.getArguments().get(0);
-// assertEquals("42", arg.getValue());
-// assertEquals(ArgumentValueDescr.INTEGRAL, arg.getType());
-//
-// arg = (ArgumentValueDescr) meth.getArguments().get(1);
-// assertEquals("42.42", arg.getValue());
-// assertEquals(ArgumentValueDescr.DECIMAL, arg.getType());
-//
-// arg = (ArgumentValueDescr) meth.getArguments().get(2);
-// assertEquals("false", arg.getValue());
-// assertEquals(ArgumentValueDescr.BOOLEAN, arg.getType());
-//
-// arg = (ArgumentValueDescr) meth.getArguments().get(3);
-// assertEquals("null", arg.getValue());
-// assertEquals(ArgumentValueDescr.NULL, arg.getType());
-//
-//
-//
-// assertEquals("Bam", ((ColumnDescr)rule.getLhs().getDescrs().get(8)).getObjectType());
-// }
-
+
+ assertFalse( parser.getErrorMessages().toString(),
+ parser.hasErrors() );
+
+ assertEquals( "doIt1( foo,bar,42,\"hello\",{ a => \"b\"}, [a, \"b\", 42] ).doIt2(bar, [a, \"b\", 42]).field[\"key\"]",
+ accessor.toString() );
+ }
+
+ // public void testFrom() throws Exception {
+ // final RuleDescr rule = parseResource( "from.drl" ).rule();
+ //
+ // if(parser.hasErrors()) {
+ // System.err.println(parser.getErrorMessages());
+ // }
+ // assertFalse(parser.hasErrors());
+ //
+ // assertNotNull( rule );
+ //
+ // assertEquals( "using_from",
+ // rule.getName() );
+ //
+ // assertEquals(9, rule.getLhs().getDescrs().size());
+ //
+ // FromDescr from = (FromDescr) rule.getLhs().getDescrs().get(0);
+ //
+ // assertEquals(3, from.getLine());
+ //
+ // assertEquals("Foo", from.getReturnedColumn().getObjectType());
+ // assertTrue(from.getDataSource() instanceof FieldAccessDescr);
+ // assertEquals("baz", ((FieldAccessDescr) from.getDataSource()).getFieldName());
+ // assertEquals("bar", ((FieldAccessDescr) from.getDataSource()).getVariableName());
+ //
+ //
+ // ArgumentValueDescr arg = null;
+ //
+ // from = (FromDescr) rule.getLhs().getDescrs().get(1);
+ // assertEquals("Foo", from.getReturnedColumn().getObjectType());
+ // assertEquals(0, from.getReturnedColumn().getDescrs().size());
+ // FieldAccessDescr fieldAccess = ( FieldAccessDescr ) from.getDataSource();
+ // arg = ( ArgumentValueDescr ) fieldAccess.getArgument();
+ // assertEquals(ArgumentValueDescr.STRING, arg.getType() );
+ //
+ // from = (FromDescr) rule.getLhs().getDescrs().get(2);
+ // fieldAccess = ( FieldAccessDescr ) from.getDataSource();
+ // arg = ( ArgumentValueDescr ) fieldAccess.getArgument();
+ // assertEquals(ArgumentValueDescr.VARIABLE, arg.getType() );
+ //
+ // from = (FromDescr) rule.getLhs().getDescrs().get(3);
+ // fieldAccess = ( FieldAccessDescr ) from.getDataSource();
+ // arg = ( ArgumentValueDescr ) fieldAccess.getArgument();
+ // assertEquals(ArgumentValueDescr.INTEGRAL, arg.getType() );
+ //
+ // from = (FromDescr) rule.getLhs().getDescrs().get(4);
+ // assertEquals("Whee", from.getReturnedColumn().getObjectType());
+ // assertEquals(1, from.getReturnedColumn().getDescrs().size());
+ // assertTrue(from.getDataSource() instanceof FunctionCallDescr);
+ // assertEquals("whee", ((FunctionCallDescr) from.getDataSource()).getName());
+ // assertEquals(1, ((FunctionCallDescr) from.getDataSource()).getArguments().size());
+ // arg = ( (ArgumentValueDescr )((FunctionCallDescr) from.getDataSource()).getArguments().get(0));
+ // assertEquals("y", arg.getValue());
+ // assertEquals(ArgumentValueDescr.STRING, arg.getType());
+ //
+ // assertEquals(7, from.getLine());
+ // assertEquals(7, from.getReturnedColumn().getLine());
+ //
+ // from = (FromDescr) rule.getLhs().getDescrs().get(5);
+ // assertEquals("Foo", from.getReturnedColumn().getObjectType());
+ // assertEquals(1, from.getReturnedColumn().getDescrs().size());
+ // assertEquals("f", from.getReturnedColumn().getIdentifier());
+ // assertTrue(from.getDataSource() instanceof MethodAccessDescr);
+ // assertEquals("bar", ((MethodAccessDescr) from.getDataSource()).getVariableName());
+ // assertEquals("la", ((MethodAccessDescr) from.getDataSource()).getMethodName());
+ // assertEquals(1, ((MethodAccessDescr) from.getDataSource()).getArguments().size());
+ // arg = (ArgumentValueDescr) ((MethodAccessDescr) from.getDataSource()).getArguments().get(0);
+ //
+ //
+ // assertEquals("x", arg.getValue());
+ // assertEquals(ArgumentValueDescr.VARIABLE, arg.getType());
+ //
+ // assertEqualsIgnoreWhitespace("whee();", rule.getConsequence());
+ //
+ // from = (FromDescr) rule.getLhs().getDescrs().get(6);
+ // assertEquals("wa", ((FunctionCallDescr)from.getDataSource()).getName());
+ //
+ // from = (FromDescr) rule.getLhs().getDescrs().get(7);
+ // MethodAccessDescr meth = (MethodAccessDescr)from.getDataSource();
+ // assertEquals("wa", meth.getMethodName());
+ // assertEquals("la", meth.getVariableName());
+ //
+ // arg = (ArgumentValueDescr) meth.getArguments().get(0);
+ // assertEquals("42", arg.getValue());
+ // assertEquals(ArgumentValueDescr.INTEGRAL, arg.getType());
+ //
+ // arg = (ArgumentValueDescr) meth.getArguments().get(1);
+ // assertEquals("42.42", arg.getValue());
+ // assertEquals(ArgumentValueDescr.DECIMAL, arg.getType());
+ //
+ // arg = (ArgumentValueDescr) meth.getArguments().get(2);
+ // assertEquals("false", arg.getValue());
+ // assertEquals(ArgumentValueDescr.BOOLEAN, arg.getType());
+ //
+ // arg = (ArgumentValueDescr) meth.getArguments().get(3);
+ // assertEquals("null", arg.getValue());
+ // assertEquals(ArgumentValueDescr.NULL, arg.getType());
+ //
+ //
+ //
+ // assertEquals("Bam", ((ColumnDescr)rule.getLhs().getDescrs().get(8)).getObjectType());
+ // }
+
public void testSimpleRule() throws Exception {
final RuleDescr rule = parseResource( "simple_rule.drl" ).rule();
@@ -689,13 +710,10 @@
assertEquals( 1,
first.getDescrs().size() );
-
-
+
FieldConstraintDescr fld = (FieldConstraintDescr) first.getDescrs().get( 0 );
- LiteralRestrictionDescr constraint = (LiteralRestrictionDescr) fld.getRestrictions().get(0);
-
-
-
+ LiteralRestrictionDescr constraint = (LiteralRestrictionDescr) fld.getRestrictions().get( 0 );
+
assertNotNull( constraint );
assertEquals( "a",
@@ -723,12 +741,9 @@
assertEquals( "a4",
fieldBindingDescr.getIdentifier() );
-
fld = (FieldConstraintDescr) second.getDescrs().get( 1 );
constraint = (LiteralRestrictionDescr) fld.getRestrictions().get( 0 );
-
-
-
+
assertNotNull( constraint );
assertEquals( "a",
@@ -749,64 +764,87 @@
assertFalse( this.parser.hasErrors() );
}
-
-
+
public void testRestrictionsMultiple() throws Exception {
final RuleDescr rule = parseResource( "restrictions_test.drl" ).rule();
-
- assertFalse(this.parser.getErrors().toString(),this.parser.hasErrors());
+
+ assertFalse( this.parser.getErrors().toString(),
+ this.parser.hasErrors() );
assertNotNull( rule );
- assertEqualsIgnoreWhitespace("consequence();", rule.getConsequence());
- assertEquals( "simple_rule", rule.getName() );
- assertEquals(2, rule.getLhs().getDescrs().size());
-
+ assertEqualsIgnoreWhitespace( "consequence();",
+ rule.getConsequence() );
+ assertEquals( "simple_rule",
+ rule.getName() );
+ assertEquals( 2,
+ rule.getLhs().getDescrs().size() );
+
//The first column, with 2 restrictions on a single field (plus a connective)
- ColumnDescr col = (ColumnDescr) rule.getLhs().getDescrs().get(0);
- assertEquals("Person", col.getObjectType());
- assertEquals(1, col.getDescrs().size());
-
- FieldConstraintDescr fld = (FieldConstraintDescr) col.getDescrs().get(0);
- assertEquals(3, fld.getRestrictions().size());
- assertEquals("age", fld.getFieldName());
-
- LiteralRestrictionDescr lit = (LiteralRestrictionDescr) fld.getRestrictions().get(0);
- assertEquals(">", lit.getEvaluator());
- assertEquals("30", lit.getText());
-
- RestrictionConnectiveDescr con = (RestrictionConnectiveDescr) fld.getRestrictions().get(1);
- assertEquals(RestrictionConnectiveDescr.AND, con.getConnective());
-
- lit = (LiteralRestrictionDescr) fld.getRestrictions().get(2);
- assertEquals("<", lit.getEvaluator());
- assertEquals("40", lit.getText());
-
+ ColumnDescr col = (ColumnDescr) rule.getLhs().getDescrs().get( 0 );
+ assertEquals( "Person",
+ col.getObjectType() );
+ assertEquals( 1,
+ col.getDescrs().size() );
+
+ FieldConstraintDescr fld = (FieldConstraintDescr) col.getDescrs().get( 0 );
+ assertEquals( 3,
+ fld.getRestrictions().size() );
+ assertEquals( "age",
+ fld.getFieldName() );
+
+ LiteralRestrictionDescr lit = (LiteralRestrictionDescr) fld.getRestrictions().get( 0 );
+ assertEquals( ">",
+ lit.getEvaluator() );
+ assertEquals( "30",
+ lit.getText() );
+
+ RestrictionConnectiveDescr con = (RestrictionConnectiveDescr) fld.getRestrictions().get( 1 );
+ assertEquals( RestrictionConnectiveDescr.AND,
+ con.getConnective() );
+
+ lit = (LiteralRestrictionDescr) fld.getRestrictions().get( 2 );
+ assertEquals( "<",
+ lit.getEvaluator() );
+ assertEquals( "40",
+ lit.getText() );
+
//the second col, with 2 fields, the first with 2 restrictions, the second field with one
- col = (ColumnDescr) rule.getLhs().getDescrs().get(1);
- assertEquals("Vehicle", col.getObjectType());
- assertEquals(2, col.getDescrs().size());
-
- fld = (FieldConstraintDescr) col.getDescrs().get(0);
- assertEquals(3, fld.getRestrictions().size());
- lit = (LiteralRestrictionDescr) fld.getRestrictions().get(0);
- assertEquals("type", fld.getFieldName());
- assertEquals("==", lit.getEvaluator());
- assertEquals("sedan", lit.getText());
- con = (RestrictionConnectiveDescr) fld.getRestrictions().get(1);
- assertEquals(RestrictionConnectiveDescr.OR, con.getConnective());
-
- lit = (LiteralRestrictionDescr) fld.getRestrictions().get(2);
- assertEquals("==", lit.getEvaluator());
- assertEquals("wagon", lit.getText());
-
-
- //now the second field
- fld = (FieldConstraintDescr) col.getDescrs().get(1);
- assertEquals(1, fld.getRestrictions().size());
- lit = (LiteralRestrictionDescr) fld.getRestrictions().get(0);
- assertEquals("<", lit.getEvaluator());
- assertEquals("3", lit.getText());
+ col = (ColumnDescr) rule.getLhs().getDescrs().get( 1 );
+ assertEquals( "Vehicle",
+ col.getObjectType() );
+ assertEquals( 2,
+ col.getDescrs().size() );
+ fld = (FieldConstraintDescr) col.getDescrs().get( 0 );
+ assertEquals( 3,
+ fld.getRestrictions().size() );
+ lit = (LiteralRestrictionDescr) fld.getRestrictions().get( 0 );
+ assertEquals( "type",
+ fld.getFieldName() );
+ assertEquals( "==",
+ lit.getEvaluator() );
+ assertEquals( "sedan",
+ lit.getText() );
+ con = (RestrictionConnectiveDescr) fld.getRestrictions().get( 1 );
+ assertEquals( RestrictionConnectiveDescr.OR,
+ con.getConnective() );
+
+ lit = (LiteralRestrictionDescr) fld.getRestrictions().get( 2 );
+ assertEquals( "==",
+ lit.getEvaluator() );
+ assertEquals( "wagon",
+ lit.getText() );
+
+ //now the second field
+ fld = (FieldConstraintDescr) col.getDescrs().get( 1 );
+ assertEquals( 1,
+ fld.getRestrictions().size() );
+ lit = (LiteralRestrictionDescr) fld.getRestrictions().get( 0 );
+ assertEquals( "<",
+ lit.getEvaluator() );
+ assertEquals( "3",
+ lit.getText() );
+
}
public void testLineNumberInAST() throws Exception {
@@ -859,14 +897,15 @@
third.getLine() );
assertFalse( this.parser.hasErrors() );
}
-
+
public void FIXME_testLineNumberIncludingCommentsInRHS() throws Exception {
parseResource( "test_CommentLineNumbersInConsequence.drl" ).compilation_unit();
-
- assertFalse(parser.hasErrors());
+
+ assertFalse( parser.hasErrors() );
String rhs = ((RuleDescr) parser.getPackageDescr().getRules().get( 0 )).getConsequence();
//System.out.println(rhs);
- assertEquals("\n first\n\n\n\n\n\n\n second", rhs);
+ assertEquals( "\n first\n\n\n\n\n\n\n second",
+ rhs );
}
public void testMultiBindings() throws Exception {
@@ -930,9 +969,9 @@
//LiteralDescr constraint = (LiteralDescr) first.getDescrs().get( 0 );
- FieldConstraintDescr fld = (FieldConstraintDescr) first.getDescrs().get(0);
- LiteralRestrictionDescr constraint = (LiteralRestrictionDescr) fld.getRestrictions().get(0);
-
+ FieldConstraintDescr fld = (FieldConstraintDescr) first.getDescrs().get( 0 );
+ LiteralRestrictionDescr constraint = (LiteralRestrictionDescr) fld.getRestrictions().get( 0 );
+
assertNotNull( constraint );
assertEquals( "a",
@@ -960,12 +999,10 @@
assertEquals( "a4",
fieldBindingDescr.getIdentifier() );
-
fld = (FieldConstraintDescr) second.getDescrs().get( 1 );
-
- constraint = (LiteralRestrictionDescr) fld.getRestrictions().get(0);
-
-
+
+ constraint = (LiteralRestrictionDescr) fld.getRestrictions().get( 0 );
+
assertNotNull( constraint );
assertEquals( "a",
@@ -1006,11 +1043,10 @@
col.getObjectType() );
assertEquals( 1,
col.getDescrs().size() );
-
-
+
FieldConstraintDescr fld = (FieldConstraintDescr) col.getDescrs().get( 0 );
- final LiteralRestrictionDescr lit = (LiteralRestrictionDescr) fld.getRestrictions().get(0);
-
+ final LiteralRestrictionDescr lit = (LiteralRestrictionDescr) fld.getRestrictions().get( 0 );
+
assertEquals( "==",
lit.getEvaluator() );
assertEquals( "stilton",
@@ -1020,21 +1056,24 @@
assertFalse( this.parser.hasErrors() );
}
-
+
public void testFunctionImport() throws Exception {
final DRLParser parser = parseResource( "test_FunctionImport.drl" );
parser.compilation_unit();
- assertFalse(parser.hasErrors());
-
+ assertFalse( parser.hasErrors() );
+
PackageDescr pkg = parser.getPackageDescr();
- assertEquals(2, pkg.getFunctionImports().size());
-
- assertEquals("abd.def.x", ((FunctionImportDescr) pkg.getFunctionImports().get( 0 )).getTarget());
- assertFalse( ((FunctionImportDescr) pkg.getFunctionImports().get( 0 )).getStartCharacter() == -1);
- assertFalse( ((FunctionImportDescr) pkg.getFunctionImports().get( 0 )).getEndCharacter() == -1);
- assertEquals("qed.wah.*", ((FunctionImportDescr) pkg.getFunctionImports().get( 1 )).getTarget());
- assertFalse( ((FunctionImportDescr) pkg.getFunctionImports().get( 1 )).getStartCharacter() == -1);
- assertFalse( ((FunctionImportDescr) pkg.getFunctionImports().get( 1 )).getEndCharacter() == -1);
+ assertEquals( 2,
+ pkg.getFunctionImports().size() );
+
+ assertEquals( "abd.def.x",
+ ((FunctionImportDescr) pkg.getFunctionImports().get( 0 )).getTarget() );
+ assertFalse( ((FunctionImportDescr) pkg.getFunctionImports().get( 0 )).getStartCharacter() == -1 );
+ assertFalse( ((FunctionImportDescr) pkg.getFunctionImports().get( 0 )).getEndCharacter() == -1 );
+ assertEquals( "qed.wah.*",
+ ((FunctionImportDescr) pkg.getFunctionImports().get( 1 )).getTarget() );
+ assertFalse( ((FunctionImportDescr) pkg.getFunctionImports().get( 1 )).getStartCharacter() == -1 );
+ assertFalse( ((FunctionImportDescr) pkg.getFunctionImports().get( 1 )).getEndCharacter() == -1 );
}
public void testNotExistWithBrackets() throws Exception {
@@ -1103,7 +1142,7 @@
first.getDescrs().size() );
FieldConstraintDescr fld = (FieldConstraintDescr) first.getDescrs().get( 0 );
- LiteralRestrictionDescr constraint = (LiteralRestrictionDescr) fld.getRestrictions().get(0);
+ LiteralRestrictionDescr constraint = (LiteralRestrictionDescr) fld.getRestrictions().get( 0 );
//LiteralDescr constraint = (LiteralDescr) first.getDescrs().get( 0 );
assertNotNull( constraint );
@@ -1132,9 +1171,9 @@
fieldBindingDescr.getIdentifier() );
fld = (FieldConstraintDescr) second.getDescrs().get( 1 );
-
- constraint = (LiteralRestrictionDescr) fld.getRestrictions().get(0);
+ constraint = (LiteralRestrictionDescr) fld.getRestrictions().get( 0 );
+
assertNotNull( constraint );
assertEquals( "a",
@@ -1220,145 +1259,33 @@
assertFalse( parser.hasErrors() );
}
- public void FIXME_testSimpleExpander() throws Exception {
- final DRLParser parser = parseResource( "simple_expander.drl" );
- final MockExpanderResolver mockExpanderResolver = new MockExpanderResolver();
- parser.setExpanderResolver( mockExpanderResolver );
- parser.compilation_unit();
- final PackageDescr pack = parser.getPackageDescr();
- if(parser.hasErrors()) {
- System.err.println(parser.getErrorMessages());
- }
- assertNotNull( pack );
- assertEquals( 1,
- pack.getRules().size() );
+ public void testExpanderErrorsAfterExpansion() throws Exception {
- assertTrue( mockExpanderResolver.checkCalled( "foo.dsl" ) );
- final RuleDescr rule = (RuleDescr) pack.getRules().get( 0 );
- assertEquals( "simple_rule",
- rule.getName() );
+ String name = "expander_post_errors.drl";
+ Expander expander = new DefaultExpander();
+ String expanded = expander.expand( this.getReader( name ) );
- //now check out the LHS
- assertEquals( 4,
- rule.getLhs().getDescrs().size() );
-
- //The rain in spain ... ----> foo : Bar(a==3) (via MockExpander)
- ColumnDescr col = (ColumnDescr) rule.getLhs().getDescrs().get( 0 );
- assertEquals( "Bar",
- col.getObjectType() );
- assertEquals( "foo1",
- col.getIdentifier() );
- assertEquals( 1,
- col.getDescrs().size() );
- assertEquals( 6,
- col.getLine() );
-
- FieldConstraintDescr fld = (FieldConstraintDescr) col.getDescrs().get( 0 );
- LiteralRestrictionDescr lit = (LiteralRestrictionDescr) fld.getRestrictions().get(0);
-
- assertEquals( "==",
- lit.getEvaluator() );
- assertEquals( "a",
- fld.getFieldName() );
- assertEquals( "1",
- lit.getText() );
-
- //>Baz() --> not expanded, as it has the magical escape character '>' !!
- col = (ColumnDescr) rule.getLhs().getDescrs().get( 1 );
- assertEquals( "Baz",
- col.getObjectType() );
- assertEquals( 7,
- col.getLine() );
-
- //The rain in spain ... ----> foo : Bar(a==3) (via MockExpander), again...
- col = (ColumnDescr) rule.getLhs().getDescrs().get( 2 );
- assertEquals( "Bar",
- col.getObjectType() );
- assertEquals( "foo2",
- col.getIdentifier() );
- assertEquals( 1,
- col.getDescrs().size() );
- assertEquals( 8,
- col.getLine() );
-
- fld = (FieldConstraintDescr) col.getDescrs().get( 0 );
- lit = (LiteralRestrictionDescr) fld.getRestrictions().get(0);
-
- assertEquals( "==",
- lit.getEvaluator() );
- assertEquals( "a",
- fld.getFieldName() );
- assertEquals( "2",
- lit.getText() );
-
- //>Bar() --> not expanded, as it has the magical escape character '>' !!
- col = (ColumnDescr) rule.getLhs().getDescrs().get( 3 );
- assertEquals( "Bar",
- col.getObjectType() );
- assertEquals( 9,
- col.getLine() );
-
- assertEqualsIgnoreWhitespace( "bar foo3 : Bar(a==3) baz foo4 : Bar(a==4)",
- rule.getConsequence() );
- assertTrue( mockExpanderResolver.checkExpanded( "when,The rain in spain falls mainly" ) );
- assertTrue( mockExpanderResolver.checkExpanded( "then,Something else" ) );
- assertTrue( mockExpanderResolver.checkExpanded( "then,Hey dude" ) );
-
- assertFalse( parser.hasErrors() );
- }
-
- public void FIXME_testExpanderErrorsAfterExpansion() throws Exception {
-
- final ExpanderResolver res = new ExpanderResolver() {
- public Expander get(String name,
- String config) {
- return new Expander() {
- public String expand(String scope,
- String pattern) {
- return pattern;
- }
- };
- }
- };
-
- final DRLParser parser = parseResource( "expander_post_errors.drl" );
- parser.setExpanderResolver( res );
+ final DRLParser parser = parse( name,
+ expanded );
parser.compilation_unit();
assertTrue( parser.hasErrors() );
-
+
RecognitionException err = (RecognitionException) parser.getErrors().get( 0 );
- //System.err.println(parser.getErrorMessages());
- assertEquals(2, parser.getErrors().size());
-
+ assertEquals( 1,
+ parser.getErrors().size() );
+
assertEquals( 6,
err.line );
- err = (RecognitionException) parser.getErrors().get(1);
- assertEquals( 9,
- err.line );
-
}
-
- public void FIXME_testExpanderLineSpread() throws Exception {
- final DRLParser parser = parseResource( "expander_spread_lines.drl" );
- final DefaultExpanderResolver res = new DefaultExpanderResolver( new InputStreamReader( this.getClass().getResourceAsStream( "complex.dsl" ) ) );
- parser.setExpanderResolver( res );
- parser.setExpanderDebug( true );
- parser.compilation_unit();
- if(parser.hasErrors()) {
- System.err.println(parser.getErrorMessages());
- }
-
- // List errorMessages = parser.getErrorMessages();
- // for ( Iterator iter = errorMessages.iterator(); iter.hasNext(); ) {
- // String element = (String) iter.next();
- // System.out.println(element);
- //
- // }
+ public void testExpanderLineSpread() throws Exception {
+ final DrlParser parser = new DrlParser();
+ final PackageDescr pkg = parser.parse( this.getReader( "expander_spread_lines.drl" ),
+ this.getReader( "complex.dsl" ) );
- assertFalse( parser.hasErrors() );
+ assertFalse( parser.getErrors().toString(),
+ parser.hasErrors() );
- final PackageDescr pkg = parser.getPackageDescr();
final RuleDescr rule = (RuleDescr) pkg.getRules().get( 0 );
assertEquals( 1,
rule.getLhs().getDescrs().size() );
@@ -1369,118 +1296,114 @@
assertNotNull( rule.getConsequence() );
}
-
- public void FIXME_testExpanderMultipleConstraints() throws Exception {
- final DRLParser parser = parseResource( "expander_multiple_constraints.drl" );
- final DefaultExpanderResolver res = new DefaultExpanderResolver( new InputStreamReader(
- this.getClass().getResourceAsStream( "multiple_constraints.dsl" ) ) );
- parser.setExpanderResolver( res );
- parser.setExpanderDebug( true );
- parser.compilation_unit();
-
- if(parser.hasErrors()) {
- System.err.println(parser.getErrorMessages());
- }
+ public void testExpanderMultipleConstraints() throws Exception {
+ final DrlParser parser = new DrlParser();
+ final PackageDescr pkg = parser.parse( this.getReader( "expander_multiple_constraints.drl" ),
+ this.getReader( "multiple_constraints.dsl" ) );
- assertFalse( parser.hasErrors() );
-
- final PackageDescr pkg = parser.getPackageDescr();
+ assertFalse( parser.getErrors().toString(), parser.hasErrors() );
+
final RuleDescr rule = (RuleDescr) pkg.getRules().get( 0 );
- assertEquals(2, rule.getLhs().getDescrs().size());
+ assertEquals( 2,
+ rule.getLhs().getDescrs().size() );
- ColumnDescr col = (ColumnDescr) rule.getLhs().getDescrs().get(0);
- assertEquals("Person", col.getObjectType());
-
-
- assertEquals(2, col.getDescrs().size());
- assertEquals("age", ((FieldConstraintDescr) col.getDescrs().get(0)).getFieldName());
- assertEquals("location", ((FieldConstraintDescr) col.getDescrs().get(1)).getFieldName());
-
- col = (ColumnDescr) rule.getLhs().getDescrs().get(1);
- assertEquals("Bar", col.getObjectType());
-
- assertNotNull( rule.getConsequence() );
+ ColumnDescr col = (ColumnDescr) rule.getLhs().getDescrs().get( 0 );
+ assertEquals( "Person",
+ col.getObjectType() );
- }
-
- public void FIXME_testExpanderMultipleConstraintsFlush() throws Exception {
- //this is similar to the other test, but it requires a flush to add the constraints
- final DRLParser parser = parseResource( "expander_multiple_constraints_flush.drl" );
- final DefaultExpanderResolver res = new DefaultExpanderResolver( new InputStreamReader(
- this.getClass().getResourceAsStream( "multiple_constraints.dsl" ) ) );
- parser.setExpanderResolver( res );
- parser.setExpanderDebug( true );
- parser.compilation_unit();
-
+ assertEquals( 2,
+ col.getDescrs().size() );
+ assertEquals( "age",
+ ((FieldConstraintDescr) col.getDescrs().get( 0 )).getFieldName() );
+ assertEquals( "location",
+ ((FieldConstraintDescr) col.getDescrs().get( 1 )).getFieldName() );
- assertFalse( parser.hasErrors() );
-
- final PackageDescr pkg = parser.getPackageDescr();
- final RuleDescr rule = (RuleDescr) pkg.getRules().get( 0 );
- assertEquals(1, rule.getLhs().getDescrs().size());
+ col = (ColumnDescr) rule.getLhs().getDescrs().get( 1 );
+ assertEquals( "Bar",
+ col.getObjectType() );
- ColumnDescr col = (ColumnDescr) rule.getLhs().getDescrs().get(0);
- assertEquals("Person", col.getObjectType());
-
- assertEquals(2, col.getDescrs().size());
- assertEquals("age", ((FieldConstraintDescr) col.getDescrs().get(0)).getFieldName());
- assertEquals("location", ((FieldConstraintDescr) col.getDescrs().get(1)).getFieldName());
-
assertNotNull( rule.getConsequence() );
- }
+ }
- public void FIXME_testExpanderUnExpandableErrorLines() throws Exception {
+ public void testExpanderMultipleConstraintsFlush() throws Exception {
+ final DrlParser parser = new DrlParser();
+ //this is similar to the other test, but it requires a flush to add the constraints
+ final PackageDescr pkg = parser.parse( this.getReader( "expander_multiple_constraints_flush.drl" ),
+ this.getReader( "multiple_constraints.dsl" ) );
- //stubb expander
- final ExpanderResolver res = new ExpanderResolver() {
- public Expander get(String name,
- String config) {
- return new Expander() {
- public String expand(String scope,
- String pattern) {
- if ( pattern.startsWith( "Good" ) ) {
- return pattern;
- } else {
- throw new IllegalArgumentException( "whoops" );
- }
+ assertFalse( parser.getErrors().toString(), parser.hasErrors() );
- }
- };
- }
- };
+ final RuleDescr rule = (RuleDescr) pkg.getRules().get( 0 );
+ assertEquals( 1,
+ rule.getLhs().getDescrs().size() );
- final DRLParser parser = parseResource( "expander_line_errors.drl" );
- parser.setExpanderResolver( res );
- parser.compilation_unit();
- assertTrue( parser.hasErrors() );
+ ColumnDescr col = (ColumnDescr) rule.getLhs().getDescrs().get( 0 );
+ assertEquals( "Person",
+ col.getObjectType() );
- final List messages = parser.getErrorMessages();
- assertEquals( messages.size(),
- parser.getErrors().size() );
+ assertEquals( 2,
+ col.getDescrs().size() );
+ assertEquals( "age",
+ ((FieldConstraintDescr) col.getDescrs().get( 0 )).getFieldName() );
+ assertEquals( "location",
+ ((FieldConstraintDescr) col.getDescrs().get( 1 )).getFieldName() );
- assertEquals( 4,
- parser.getErrors().size() );
- assertEquals( ExpanderException.class,
- parser.getErrors().get( 0 ).getClass() );
- assertEquals( 8,
- ((RecognitionException) parser.getErrors().get( 0 )).line );
- assertEquals( 10,
- ((RecognitionException) parser.getErrors().get( 1 )).line );
- assertEquals( 12,
- ((RecognitionException) parser.getErrors().get( 2 )).line );
- assertEquals( 13,
- ((RecognitionException) parser.getErrors().get( 3 )).line );
+ assertNotNull( rule.getConsequence() );
- final PackageDescr pack = parser.getPackageDescr();
- assertNotNull( pack );
-
- final ExpanderException ex = (ExpanderException) parser.getErrors().get( 0 );
- assertTrue( ex.getMessage().indexOf( "whoops" ) > -1 );
-
}
+// public void testExpanderUnExpandableErrorLines() throws Exception {
+//
+// //stubb expander
+// final ExpanderResolver res = new ExpanderResolver() {
+// public Expander get(String name,
+// String config) {
+// return new Expander() {
+// public String expand(String scope,
+// String pattern) {
+// if ( pattern.startsWith( "Good" ) ) {
+// return pattern;
+// } else {
+// throw new IllegalArgumentException( "whoops" );
+// }
+//
+// }
+// };
+// }
+// };
+//
+// final DRLParser parser = parseResource( "expander_line_errors.drl" );
+// parser.setExpanderResolver( res );
+// parser.compilation_unit();
+// assertTrue( parser.hasErrors() );
+//
+// final List messages = parser.getErrorMessages();
+// assertEquals( messages.size(),
+// parser.getErrors().size() );
+//
+// assertEquals( 4,
+// parser.getErrors().size() );
+// assertEquals( ExpanderException.class,
+// parser.getErrors().get( 0 ).getClass() );
+// assertEquals( 8,
+// ((RecognitionException) parser.getErrors().get( 0 )).line );
+// assertEquals( 10,
+// ((RecognitionException) parser.getErrors().get( 1 )).line );
+// assertEquals( 12,
+// ((RecognitionException) parser.getErrors().get( 2 )).line );
+// assertEquals( 13,
+// ((RecognitionException) parser.getErrors().get( 3 )).line );
+//
+// final PackageDescr pack = parser.getPackageDescr();
+// assertNotNull( pack );
+//
+// final ExpanderException ex = (ExpanderException) parser.getErrors().get( 0 );
+// assertTrue( ex.getMessage().indexOf( "whoops" ) > -1 );
+//
+// }
+
public void testBasicBinding() throws Exception {
final DRLParser parser = parseResource( "basic_binding.drl" );
parser.compilation_unit();
@@ -1523,9 +1446,9 @@
FieldBindingDescr fieldBinding = (FieldBindingDescr) cheese.getDescrs().get( 0 );
assertEquals( "type",
fieldBinding.getFieldName() );
-
+
FieldConstraintDescr fld = (FieldConstraintDescr) cheese.getDescrs().get( 1 );
- LiteralRestrictionDescr literalDescr = (LiteralRestrictionDescr) fld.getRestrictions().get(0);
+ LiteralRestrictionDescr literalDescr = (LiteralRestrictionDescr) fld.getRestrictions().get( 0 );
//LiteralDescr literalDescr = (LiteralDescr) cheese.getDescrs().get( 1 );
assertEquals( "type",
fld.getFieldName() );
@@ -1538,10 +1461,10 @@
fieldBinding = (FieldBindingDescr) person.getDescrs().get( 0 );
assertEquals( "name",
fieldBinding.getFieldName() );
-
+
fld = (FieldConstraintDescr) person.getDescrs().get( 1 );
- literalDescr = (LiteralRestrictionDescr) fld.getRestrictions().get(0);
-
+ literalDescr = (LiteralRestrictionDescr) fld.getRestrictions().get( 0 );
+
assertEquals( "name",
fld.getFieldName() );
assertEquals( "==",
@@ -1550,8 +1473,8 @@
literalDescr.getText() );
fld = (FieldConstraintDescr) person.getDescrs().get( 2 );
- final VariableRestrictionDescr variableDescr = (VariableRestrictionDescr) fld.getRestrictions().get(0);
-
+ final VariableRestrictionDescr variableDescr = (VariableRestrictionDescr) fld.getRestrictions().get( 0 );
+
assertEquals( "likes",
fld.getFieldName() );
assertEquals( "==",
@@ -1561,7 +1484,7 @@
assertFalse( parser.hasErrors() );
}
-
+
public void testOrNesting() throws Exception {
final DRLParser parser = parseResource( "or_nesting.drl" );
parser.compilation_unit();
@@ -1574,22 +1497,28 @@
assertEquals( "simple_rule",
rule.getName() );
- assertEquals(1, rule.getLhs().getDescrs().size());
-
+ assertEquals( 1,
+ rule.getLhs().getDescrs().size() );
+
OrDescr or = (OrDescr) rule.getLhs().getDescrs().get( 0 );
- assertEquals(2, or.getDescrs().size());
-
+ assertEquals( 2,
+ or.getDescrs().size() );
+
ColumnDescr first = (ColumnDescr) or.getDescrs().get( 0 );
- assertEquals("Person", first.getObjectType());
-
+ assertEquals( "Person",
+ first.getObjectType() );
+
AndDescr and = (AndDescr) or.getDescrs().get( 1 );
- assertEquals(2, and.getDescrs().size());
-
+ assertEquals( 2,
+ and.getDescrs().size() );
+
ColumnDescr left = (ColumnDescr) and.getDescrs().get( 0 );
- assertEquals("Person", left.getObjectType());
-
+ assertEquals( "Person",
+ left.getObjectType() );
+
ColumnDescr right = (ColumnDescr) and.getDescrs().get( 1 );
- assertEquals("Cheese", right.getObjectType());
+ assertEquals( "Cheese",
+ right.getObjectType() );
}
/** Test that explicit "&&", "||" works as expected */
@@ -1624,10 +1553,10 @@
assertEquals( 1,
left.getDescrs().size() );
-
+
FieldConstraintDescr fld = (FieldConstraintDescr) left.getDescrs().get( 0 );
- LiteralRestrictionDescr literal = (LiteralRestrictionDescr) fld.getRestrictions().get(0);
-
+ LiteralRestrictionDescr literal = (LiteralRestrictionDescr) fld.getRestrictions().get( 0 );
+
assertEquals( "==",
literal.getEvaluator() );
assertEquals( "name",
@@ -1637,10 +1566,10 @@
assertEquals( 1,
right.getDescrs().size() );
-
+
fld = (FieldConstraintDescr) right.getDescrs().get( 0 );
- literal = (LiteralRestrictionDescr) fld.getRestrictions().get(0);
-
+ literal = (LiteralRestrictionDescr) fld.getRestrictions().get( 0 );
+
assertEquals( "==",
literal.getEvaluator() );
assertEquals( "type",
@@ -1660,11 +1589,10 @@
right.getObjectType() );
assertEquals( 1,
left.getDescrs().size() );
-
+
fld = (FieldConstraintDescr) left.getDescrs().get( 0 );
- literal = (LiteralRestrictionDescr) fld.getRestrictions().get(0);
-
-
+ literal = (LiteralRestrictionDescr) fld.getRestrictions().get( 0 );
+
assertEquals( "==",
literal.getEvaluator() );
assertEquals( "name",
@@ -1674,10 +1602,10 @@
assertEquals( 1,
right.getDescrs().size() );
-
+
fld = (FieldConstraintDescr) right.getDescrs().get( 0 );
- literal = (LiteralRestrictionDescr) fld.getRestrictions().get(0);
-
+ literal = (LiteralRestrictionDescr) fld.getRestrictions().get( 0 );
+
assertEquals( "==",
literal.getEvaluator() );
assertEquals( "type",
@@ -1712,18 +1640,19 @@
leftCol.getObjectType() );
assertEquals( "foo",
leftCol.getIdentifier() );
-
+
final ColumnDescr rightCol = (ColumnDescr) or.getDescrs().get( 1 );
assertEquals( "Person",
rightCol.getObjectType() );
assertEquals( "foo",
rightCol.getIdentifier() );
-
+
final ColumnDescr cheeseDescr = (ColumnDescr) rule.getLhs().getDescrs().get( 1 );
- assertEquals("Cheese", cheeseDescr.getObjectType());
- assertEquals(null, cheeseDescr.getIdentifier());
+ assertEquals( "Cheese",
+ cheeseDescr.getObjectType() );
+ assertEquals( null,
+ cheeseDescr.getIdentifier() );
-
assertEqualsIgnoreWhitespace( "System.out.println( \"Mark and Michael\" + bar );",
rule.getConsequence() );
@@ -1760,9 +1689,11 @@
final ColumnDescr secondFact = (ColumnDescr) or.getDescrs().get( 1 );
assertEquals( "Person",
secondFact.getObjectType() );
- assertEquals(1, secondFact.getDescrs().size());
- assertEquals("foo", secondFact.getIdentifier());
-
+ assertEquals( 1,
+ secondFact.getDescrs().size() );
+ assertEquals( "foo",
+ secondFact.getIdentifier() );
+
assertEqualsIgnoreWhitespace( "System.out.println( \"Mark and Michael\" + bar );",
rule.getConsequence() );
@@ -1855,7 +1786,8 @@
final DRLParser parser = parseResource( "eval_multiple.drl" );
parser.compilation_unit();
- assertFalse( parser.getErrorMessages().toString(), parser.hasErrors() );
+ assertFalse( parser.getErrorMessages().toString(),
+ parser.hasErrors() );
final PackageDescr pack = parser.getPackageDescr();
assertEquals( 1,
@@ -1917,9 +1849,8 @@
assertEquals( "Foo",
col.getObjectType() );
FieldConstraintDescr fld = (FieldConstraintDescr) col.getDescrs().get( 0 );
- ReturnValueRestrictionDescr retval = (ReturnValueRestrictionDescr) fld.getRestrictions().get(0);
-
-
+ ReturnValueRestrictionDescr retval = (ReturnValueRestrictionDescr) fld.getRestrictions().get( 0 );
+
assertEquals( "a + b",
retval.getText() );
assertEquals( "name",
@@ -1954,7 +1885,8 @@
assertEqualsIgnoreWhitespace( "$age2 == $age1+2",
pred.getText() );
- assertFalse( parser.getErrorMessages().toString(), parser.hasErrors() );
+ assertFalse( parser.getErrorMessages().toString(),
+ parser.hasErrors() );
}
public void testNotWithConstraint() throws Exception {
@@ -1976,10 +1908,10 @@
final NotDescr not = (NotDescr) rule.getLhs().getDescrs().get( 1 );
column = (ColumnDescr) not.getDescrs().get( 0 );
-
+
FieldConstraintDescr fld = (FieldConstraintDescr) column.getDescrs().get( 0 );
- final VariableRestrictionDescr boundVariable = (VariableRestrictionDescr) fld.getRestrictions().get(0);
-
+ final VariableRestrictionDescr boundVariable = (VariableRestrictionDescr) fld.getRestrictions().get( 0 );
+
assertEquals( "type",
fld.getFieldName() );
assertEquals( "==",
@@ -2043,9 +1975,9 @@
assertEquals( 2,
func.getParameterTypes().size() );
assertEquals( 4,
- func.getLine());
+ func.getLine() );
assertEquals( 0,
- func.getColumn());
+ func.getColumn() );
assertEquals( "String",
func.getParameterTypes().get( 0 ) );
@@ -2079,7 +2011,8 @@
assertEquals( "foo.bar",
pack.getName() );
- assertFalse( parser.getErrorMessages().toString(), parser.hasErrors() );
+ assertFalse( parser.getErrorMessages().toString(),
+ parser.hasErrors() );
}
public void testAttributes() throws Exception {
@@ -2182,8 +2115,8 @@
assertEquals( 1,
col.getDescrs().size() );
FieldConstraintDescr fld = (FieldConstraintDescr) col.getDescrs().get( 0 );
- final LiteralRestrictionDescr lit = (LiteralRestrictionDescr) fld.getRestrictions().get(0);
-
+ final LiteralRestrictionDescr lit = (LiteralRestrictionDescr) fld.getRestrictions().get( 0 );
+
assertEquals( "bar",
fld.getFieldName() );
assertEquals( "==",
@@ -2226,8 +2159,6 @@
public void testStatementOrdering1() throws Exception {
parseResource( "statement_ordering_1.drl" );
- final MockExpanderResolver mockExpanderResolver = new MockExpanderResolver();
- this.parser.setExpanderResolver( mockExpanderResolver );
this.parser.compilation_unit();
final PackageDescr pkg = this.parser.getPackageDescr();
@@ -2265,7 +2196,8 @@
public void testRuleNamesStartingWithNumbers() throws Exception {
parseResource( "rule_names_number_prefix.drl" ).compilation_unit();
- assertFalse( this.parser.getErrors().toString(), this.parser.hasErrors() );
+ assertFalse( this.parser.getErrors().toString(),
+ this.parser.hasErrors() );
final PackageDescr pkg = this.parser.getPackageDescr();
@@ -2281,7 +2213,7 @@
public void testEvalWithNewline() throws Exception {
parseResource( "eval_with_newline.drl" ).compilation_unit();
- if(parser.hasErrors()) {
+ if ( parser.hasErrors() ) {
System.err.println( parser.getErrorMessages() );
}
assertFalse( this.parser.hasErrors() );
@@ -2295,16 +2227,17 @@
this.parser.getErrorMessages().size() );
assertTrue( ((String) this.parser.getErrorMessages().get( 0 )).indexOf( "Trailing semi-colon not allowed" ) >= 0 );
}
-
+
public void testEndPosition() throws Exception {
parseResource( "test_EndPosition.drl" ).compilation_unit();
RuleDescr rule = (RuleDescr) parser.getPackageDescr().getRules().get( 0 );
ColumnDescr col = (ColumnDescr) rule.getLhs().getDescrs().get( 0 );
- assertEquals(6, col.getLine());
+ assertEquals( 6,
+ col.getLine() );
-
- assertEquals(8, col.getEndLine());
-
+ assertEquals( 8,
+ col.getEndLine() );
+
}
public void testQualifiedClassname() throws Exception {
@@ -2325,11 +2258,12 @@
final DRLParser parser = parseResource( "accumulate.drl" );
parser.compilation_unit();
- if(parser.hasErrors()) {
+ if ( parser.hasErrors() ) {
System.err.println( parser.getErrorMessages() );
}
- assertFalse( parser.getErrorMessages().toString(), parser.hasErrors() );
+ assertFalse( parser.getErrorMessages().toString(),
+ parser.hasErrors() );
final PackageDescr pack = parser.getPackageDescr();
assertEquals( 1,
@@ -2355,7 +2289,8 @@
final DRLParser parser = parseResource( "accumulate_with_bindings.drl" );
parser.compilation_unit();
- assertFalse( parser.getErrorMessages().toString(), parser.hasErrors() );
+ assertFalse( parser.getErrorMessages().toString(),
+ parser.hasErrors() );
final PackageDescr pack = parser.getPackageDescr();
assertEquals( 1,
@@ -2366,7 +2301,7 @@
final AccumulateDescr accum = (AccumulateDescr) rule.getLhs().getDescrs().get( 0 );
assertEqualsIgnoreWhitespace( "$counter",
- accum.getResultColumn().getIdentifier());
+ accum.getResultColumn().getIdentifier() );
assertEqualsIgnoreWhitespace( "int x = 0 ;",
accum.getInitCode() );
assertEqualsIgnoreWhitespace( "x++;",
@@ -2383,7 +2318,7 @@
final DRLParser parser = parseResource( "collect.drl" );
parser.compilation_unit();
- if(parser.hasErrors()) {
+ if ( parser.hasErrors() ) {
System.err.println( parser.getErrorMessages() );
}
@@ -2406,32 +2341,40 @@
public void testPredicate() throws Exception {
ColumnDescr column = new ColumnDescr();
parse( "$var : attr -> ( $var.equals(\"xyz\") )" ).constraints( column );
-
- assertFalse( this.parser.getErrorMessages().toString(), this.parser.hasErrors() );
- List constraints = column.getDescrs();
- assertEquals(2, constraints.size());
+ assertFalse( this.parser.getErrorMessages().toString(),
+ this.parser.hasErrors() );
+ List constraints = column.getDescrs();
+ assertEquals( 2,
+ constraints.size() );
+
FieldBindingDescr field = (FieldBindingDescr) constraints.get( 0 );
PredicateDescr predicate = (PredicateDescr) constraints.get( 1 );
- assertEquals("$var", field.getIdentifier());
- assertEquals("attr", field.getFieldName());
- assertEquals(" $var.equals(\"xyz\") ", predicate.getText());
+ assertEquals( "$var",
+ field.getIdentifier() );
+ assertEquals( "attr",
+ field.getFieldName() );
+ assertEquals( " $var.equals(\"xyz\") ",
+ predicate.getText() );
}
-
+
public void testPredicate2() throws Exception {
ColumnDescr column = new ColumnDescr();
parse( "( $var.equals(\"xyz\") )" ).constraints( column );
-
- assertFalse( this.parser.getErrorMessages().toString(), this.parser.hasErrors() );
- List constraints = column.getDescrs();
- assertEquals(1, constraints.size());
+ assertFalse( this.parser.getErrorMessages().toString(),
+ this.parser.hasErrors() );
+ List constraints = column.getDescrs();
+ assertEquals( 1,
+ constraints.size() );
+
PredicateDescr predicate = (PredicateDescr) constraints.get( 0 );
- assertEquals(" $var.equals(\"xyz\") ", predicate.getText());
+ assertEquals( " $var.equals(\"xyz\") ",
+ predicate.getText() );
}
-
+
public void testEscapedStrings() throws Exception {
final RuleDescr rule = parseResource( "escaped-string.drl" ).rule();
@@ -2445,44 +2388,53 @@
assertEqualsIgnoreWhitespace( expected,
rule.getConsequence() );
- assertFalse( this.parser.getErrorMessages().toString(), this.parser.hasErrors() );
+ assertFalse( this.parser.getErrorMessages().toString(),
+ this.parser.hasErrors() );
}
public void testNestedCEs() throws Exception {
final RuleDescr rule = parseResource( "nested_conditional_elements.drl" ).rule();
- assertFalse( this.parser.getErrorMessages().toString(), this.parser.hasErrors() );
+ assertFalse( this.parser.getErrorMessages().toString(),
+ this.parser.hasErrors() );
assertNotNull( rule );
-
+
AndDescr root = rule.getLhs();
NotDescr not1 = (NotDescr) root.getDescrs().get( 0 );
AndDescr and1 = (AndDescr) not1.getDescrs().get( 0 );
-
+
ColumnDescr state = (ColumnDescr) and1.getDescrs().get( 0 );
NotDescr not2 = (NotDescr) and1.getDescrs().get( 1 );
AndDescr and2 = (AndDescr) not2.getDescrs().get( 0 );
ColumnDescr person = (ColumnDescr) and2.getDescrs().get( 0 );
ColumnDescr cheese = (ColumnDescr) and2.getDescrs().get( 1 );
-
+
ColumnDescr person2 = (ColumnDescr) root.getDescrs().get( 1 );
OrDescr or = (OrDescr) root.getDescrs().get( 2 );
ColumnDescr cheese2 = (ColumnDescr) or.getDescrs().get( 0 );
ColumnDescr cheese3 = (ColumnDescr) or.getDescrs().get( 1 );
-
- assertEquals( state.getObjectType(), "State" );
- assertEquals( person.getObjectType(), "Person" );
- assertEquals( cheese.getObjectType(), "Cheese" );
- assertEquals( person2.getObjectType(), "Person" );
- assertEquals( cheese2.getObjectType(), "Cheese" );
- assertEquals( cheese3.getObjectType(), "Cheese" );
+
+ assertEquals( state.getObjectType(),
+ "State" );
+ assertEquals( person.getObjectType(),
+ "Person" );
+ assertEquals( cheese.getObjectType(),
+ "Cheese" );
+ assertEquals( person2.getObjectType(),
+ "Person" );
+ assertEquals( cheese2.getObjectType(),
+ "Cheese" );
+ assertEquals( cheese3.getObjectType(),
+ "Cheese" );
}
public void testForall() throws Exception {
final DRLParser parser = parseResource( "forall.drl" );
parser.compilation_unit();
- assertFalse( parser.getErrorMessages().toString(), parser.hasErrors() );
+ assertFalse( parser.getErrorMessages().toString(),
+ parser.hasErrors() );
final PackageDescr pack = parser.getPackageDescr();
assertEquals( 1,
@@ -2493,15 +2445,17 @@
final ForallDescr forall = (ForallDescr) rule.getLhs().getDescrs().get( 0 );
- assertEquals(2, forall.getDescrs().size());
+ assertEquals( 2,
+ forall.getDescrs().size() );
final ColumnDescr col = forall.getBaseColumn();
assertEquals( "Person",
col.getObjectType() );
final List remaining = forall.getRemainingColumns();
- assertEquals(1, remaining.size());
+ assertEquals( 1,
+ remaining.size() );
ColumnDescr cheese = (ColumnDescr) remaining.get( 0 );
assertEquals( "Cheese",
- cheese.getObjectType());
+ cheese.getObjectType() );
}
private DRLParser parse(final String text) throws Exception {
@@ -2510,19 +2464,23 @@
}
private DRLParser parse(final String source,
- final String text) throws Exception {
+ final String text) throws Exception {
this.parser = newParser( newTokenStream( newLexer( newCharStream( text ) ) ) );
this.parser.setSource( source );
return this.parser;
}
- private DRLParser parseResource(final String name) throws Exception {
-
-// System.err.println( getClass().getResource( name ) );
+ private Reader getReader(final String name) throws Exception {
final InputStream in = getClass().getResourceAsStream( name );
- final InputStreamReader reader = new InputStreamReader( in );
+ return new InputStreamReader( in );
+ }
+ private DRLParser parseResource(final String name) throws Exception {
+
+ // System.err.println( getClass().getResource( name ) );
+ Reader reader = getReader( name );
+
final StringBuffer text = new StringBuffer();
final char[] buf = new char[1024];
@@ -2559,21 +2517,21 @@
private void assertEqualsIgnoreWhitespace(final String expected,
final String actual) {
final String cleanExpected = expected.replaceAll( "\\s+",
- "" );
+ "" );
final String cleanActual = actual.replaceAll( "\\s+",
- "" );
+ "" );
assertEquals( cleanExpected,
cleanActual );
}
-
+
private void prettyPrintErrors() {
- List msgs = this.parser.getErrorMessages();
- for (Iterator iter = msgs.iterator(); iter.hasNext();) {
- String err = (String) iter.next();
- System.out.println(err);
-
- }
+ List msgs = this.parser.getErrorMessages();
+ for ( Iterator iter = msgs.iterator(); iter.hasNext(); ) {
+ String err = (String) iter.next();
+ System.out.println( err );
+
+ }
}
-
+
}
\ No newline at end of file
Added: labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/dsl/DSLMappingFileTest.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/dsl/DSLMappingFileTest.java (rev 0)
+++ labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/dsl/DSLMappingFileTest.java 2007-02-15 20:49:28 UTC (rev 9538)
@@ -0,0 +1,56 @@
+package org.drools.lang.dsl;
+
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.Reader;
+
+import junit.framework.TestCase;
+
+public class DSLMappingFileTest extends TestCase {
+ private DSLMappingFile file = null;
+ private final String filename = "test_metainfo.dsl";
+
+ protected void setUp() throws Exception {
+ Reader reader = new InputStreamReader( this.getClass().getResourceAsStream( filename ) );
+ file = new DSLMappingFile( filename,
+ reader );
+
+ super.setUp();
+ }
+
+ protected void tearDown() throws Exception {
+ file.close();
+ super.tearDown();
+ }
+
+ public void testGetDslFileName() {
+ assertEquals( filename, file.getDslFileName() );
+ }
+
+ public void testClose() {
+ try {
+ assertFalse( file.isClosed() );
+ file.close();
+ assertTrue( file.isClosed() );
+ } catch ( IOException e ) {
+ e.printStackTrace();
+ fail( "Should not raise exception ");
+ }
+ }
+
+ public void testParseFile() {
+ try {
+ boolean parsingResult = file.parseFile();
+
+ assertTrue( file.getErrors().toString(), parsingResult );
+ assertTrue( file.getErrors().isEmpty() );
+
+ assertEquals( 31, file.getEntries().size() );
+ } catch ( IOException e ) {
+ e.printStackTrace();
+ fail( "Should not raise exception ");
+ }
+
+ }
+
+}
Property changes on: labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/dsl/DSLMappingFileTest.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ id author date revision
Name: svn:eol-style
+ native
Added: labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/dsl/DefaultDSLMappingEntryTest.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/dsl/DefaultDSLMappingEntryTest.java (rev 0)
+++ labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/dsl/DefaultDSLMappingEntryTest.java 2007-02-15 20:49:28 UTC (rev 9538)
@@ -0,0 +1,135 @@
+package org.drools.lang.dsl;
+
+import junit.framework.TestCase;
+
+public class DefaultDSLMappingEntryTest extends TestCase {
+
+ private DefaultDSLMappingEntry entry;
+
+ protected void setUp() throws Exception {
+ super.setUp();
+ String inputKey = "String is \"{value}\"";
+ String inputValue = "SomeFact(value==\"{value}\")";
+
+ entry = new DefaultDSLMappingEntry( DSLMappingEntry.CONDITION,
+ null,
+ inputKey,
+ inputValue );
+ }
+
+ protected void tearDown() throws Exception {
+ super.tearDown();
+ }
+
+ public void testPatternCalculation() {
+ String inputKey = "The Customer name is {name} and surname is {surname} and it has US$ 50,00 on his {pocket}";
+ String inputValue = "Customer( name == \"{name}\", surname == \"{surname}\", money > $money )";
+
+ String expectedKeyP = "The\\s*Customer\\s*name\\s*is\\s*(.*?)\\s*and\\s*surname\\s*is\\s*(.*?)\\s*and\\s*it\\s*has\\s*US\\$\\s*50,00\\s*on\\s*his\\s*(.*?)$";
+ String expectedValP = "Customer( name == \"$1\", surname == \"$2\", money > \\$money )";
+
+ DefaultDSLMappingEntry entry = new DefaultDSLMappingEntry( DSLMappingEntry.CONDITION,
+ null,
+ inputKey,
+ inputValue );
+
+ assertEquals( inputKey,
+ entry.getMappingKey() );
+ assertEquals( expectedKeyP,
+ entry.getKeyPattern().pattern() );
+ assertEquals( inputValue,
+ entry.getMappingValue() );
+ assertEquals( expectedValP,
+ entry.getValuePattern() );
+
+ }
+
+ public void testPatternCalculation2() {
+ String inputKey = "-name is {name}";
+ String inputValue = "name == \"{name}\"";
+
+ String expectedKeyP = "-\\s*name\\s*is\\s*(.*?)$";
+ String expectedValP = "name == \"$1\"";
+
+ DefaultDSLMappingEntry entry = new DefaultDSLMappingEntry( DSLMappingEntry.CONDITION,
+ null,
+ inputKey,
+ inputValue );
+
+ assertEquals( inputKey,
+ entry.getMappingKey() );
+ assertEquals( expectedKeyP,
+ entry.getKeyPattern().pattern() );
+ assertEquals( inputValue,
+ entry.getMappingValue() );
+ assertEquals( expectedValP,
+ entry.getValuePattern() );
+
+ }
+
+ public void testPatternCalculation3() {
+ String inputKey = "- name is {name}";
+ String inputValue = "name == \"{name}\"";
+
+ String expectedKeyP = "-\\s*name\\s*is\\s*(.*?)$";
+ String expectedValP = "name == \"$1\"";
+
+ DefaultDSLMappingEntry entry = new DefaultDSLMappingEntry( DSLMappingEntry.CONDITION,
+ null,
+ inputKey,
+ inputValue );
+
+ assertEquals( inputKey,
+ entry.getMappingKey() );
+ assertEquals( expectedKeyP,
+ entry.getKeyPattern().pattern() );
+ assertEquals( inputValue,
+ entry.getMappingValue() );
+ assertEquals( expectedValP,
+ entry.getValuePattern() );
+ }
+
+ public void testExpandNoSpaces() {
+ String result = entry.getKeyPattern().matcher( "String is \"blah\"" ).replaceAll( entry.getValuePattern() );
+
+ assertEquals( "SomeFact(value==\"blah\")",
+ result );
+ }
+
+ public void testExpandWithLeadingSpace() {
+ String result = entry.getKeyPattern().matcher( "String is \" blah\"" ).replaceAll( entry.getValuePattern() );
+
+ assertEquals( "SomeFact(value==\" blah\")",
+ result );
+ }
+
+ public void testExpandWithMultipleLeadingSpaces() {
+ String result = entry.getKeyPattern().matcher( "String is \" blah\"" ).replaceAll( entry.getValuePattern() );
+ assertEquals( "SomeFact(value==\" blah\")",
+ result );
+ }
+
+ public void testExpandWithTrailingSpace() {
+ String result = entry.getKeyPattern().matcher( "String is \"blah \"" ).replaceAll( entry.getValuePattern() );
+ assertEquals( "SomeFact(value==\"blah \")",
+ result );
+ }
+
+ public void testExpandWithMultipleTrailingSpaces() {
+ String result = entry.getKeyPattern().matcher( "String is \"blah \"" ).replaceAll( entry.getValuePattern() );
+ assertEquals( "SomeFact(value==\"blah \")",
+ result );
+ }
+
+ public void testExpandWithInternalSpace() {
+ String result = entry.getKeyPattern().matcher( "String is \"bl ah\"" ).replaceAll( entry.getValuePattern() );
+ assertEquals( "SomeFact(value==\"bl ah\")",
+ result );
+ }
+
+ public void testExpandWithMultipleSpaces() {
+ String result = entry.getKeyPattern().matcher( "String is \" bl ah \"" ).replaceAll( entry.getValuePattern() );
+ assertEquals( "SomeFact(value==\" bl ah \")",
+ result );
+ }
+}
Property changes on: labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/dsl/DefaultDSLMappingEntryTest.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ id author date revision
Name: svn:eol-style
+ native
Added: labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/dsl/DefaultExpanderTest.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/dsl/DefaultExpanderTest.java (rev 0)
+++ labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/dsl/DefaultExpanderTest.java 2007-02-15 20:49:28 UTC (rev 9538)
@@ -0,0 +1,65 @@
+package org.drools.lang.dsl;
+
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.Reader;
+
+import junit.framework.TestCase;
+
+public class DefaultExpanderTest extends TestCase {
+ private DSLMappingFile file = null;
+ private DefaultExpander expander = null;
+
+ protected void setUp() throws Exception {
+ String filename = "test_metainfo.dsl";
+ Reader reader = new InputStreamReader( this.getClass().getResourceAsStream( filename ) );
+ file = new DSLMappingFile( filename,
+ reader );
+ file.parseFile();
+
+ expander = new DefaultExpander();
+
+ super.setUp();
+ }
+
+ protected void tearDown() throws Exception {
+ file.close();
+ super.tearDown();
+ }
+
+ public void xxxtestAddDSLMapping() {
+ expander.addDSLMapping( file );
+ // should not raise any exception
+ }
+
+ public void xxxtestExpand() {
+ expander.addDSLMapping( file );
+ Reader rules = new InputStreamReader( this.getClass().getResourceAsStream( ".drl" ) );
+
+ try {
+ String out = expander.expand( rules );
+ System.out.println( out );
+ } catch ( IOException e ) {
+ e.printStackTrace();
+ fail( "Should not raise exceptions" );
+ }
+ }
+
+ public void testRegexp() throws Exception {
+// String input = "regra \"average \\\"bob\\\"\" salience -10";
+//
+// Pattern pat = Pattern.compile( "((\"[(\\\")|[^\"]]*\"\\s*)|([^\\s]+\\s*))" );
+// Matcher mat = pat.matcher( input );
+//
+// while( mat.find()) {
+// System.out.println("Found: ["+mat.group().trim()+"]");
+// }
+
+ expander.addDSLMapping( file );
+ Reader rules = new InputStreamReader( this.getClass().getResourceAsStream( "test_expansion.drl" ) );
+ String result = expander.expand( rules );
+ System.out.println( result );
+
+
+ }
+}
Property changes on: labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/dsl/DefaultExpanderTest.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ id author date revision
Name: svn:eol-style
+ native
Deleted: labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/dsl/LineExpanderTest.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/dsl/LineExpanderTest.java 2007-02-15 15:52:34 UTC (rev 9537)
+++ labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/dsl/LineExpanderTest.java 2007-02-15 20:49:28 UTC (rev 9538)
@@ -1,103 +0,0 @@
-package org.drools.lang.dsl;
-
-import java.io.BufferedReader;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-
-import org.drools.lang.Expander;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-public class LineExpanderTest extends TestCase {
-
-
- private String readFile(String name) throws Exception {
-
- final InputStream in = getClass().getResourceAsStream( name );
-
- final InputStreamReader reader = new InputStreamReader( in );
-
- final StringBuffer text = new StringBuffer();
-
- final char[] buf = new char[1024];
- int len = 0;
-
- while ( (len = reader.read( buf )) >= 0 ) {
- text.append( buf,
- 0,
- len );
- }
- return text.toString();
- }
-
- public void testFile() throws Exception {
- Expander exp = new Expander() {
-
- public String expand(String scope,
- String pattern) {
- if (scope.equals( "when" )) {
- if (!(
- (pattern.trim().equals( "line 1" ))
- ||
- (pattern.trim().equals( "line 2" ))
- )) {
- Assert.fail( "expected line 1 or line 2 only." );
-
- }
- }
- if (scope.equals("then")) {
- Assert.assertEquals( "line 3", pattern.trim() );
- }
- return "expanded: " + pattern.trim();
-
- }
-
- };
- LineBasedExpander ex = new LineBasedExpander(readFile("rule1.drl"), exp);
- String result = ex.expand();
- assertNotNull(result);
- System.out.println(result);
- assertTrue(result.indexOf( "expanded: line 1" ) > result.indexOf( "when" ));
- assertTrue(result.indexOf( "expanded: line 2" ) > result.indexOf( "expanded: line 1" ));
- assertTrue(result.indexOf( "then" ) > result.indexOf( "expanded: line 2" ));
- assertTrue(result.indexOf( "expanded: line 3" ) > result.indexOf( "then" ));
-
-
- }
-
- public void testMatchingStart() {
- LineBasedExpander exp = new LineBasedExpander("blah", null);
- String when = "when";
- String end = "end";
- assertTrue(exp.matchesKeyword( when, " when".trim() ));
- assertTrue(exp.matchesKeyword( when, "\twhen#foo".trim() ));
- assertFalse(exp.matchesKeyword( when, "\tlwhen#foo".trim() ));
- assertTrue(exp.matchesKeyword( when, "when".trim() ));
- assertTrue(exp.matchesKeyword( end, "end".trim() ));
-
- assertTrue(exp.matchesKeyword( end, "\nend //comment".trim() ));
- assertTrue(exp.matchesKeyword( end, "end//comment".trim() ));
-
- assertFalse(exp.matchesKeyword( end, "\n\"end\" //comment".trim() ));
- assertFalse(exp.matchesKeyword( end, "\nkend//comment".trim() ));
- assertFalse(exp.matchesKeyword( when, "\nend".trim() ));
- assertFalse(exp.matchesKeyword( end, "\nkend//comment".trim() ));
- }
-
- public void testNormaliseSpaces() {
- String test = " this has more spaces, then is \t necessary";
- String res = "this has more spaces, then is necessary";
-
- LineBasedExpander ex = new LineBasedExpander("ignore", null);
- assertEquals(res, ex.normaliseSpaces( test ));
-
- assertEquals(">yeah", ex.normaliseSpaces( ">yeah" ));
- assertEquals("yeah man", ex.normaliseSpaces( "yeah man" ));
-
- assertEquals("'with ' some \"\tquotes\"",
- ex.normaliseSpaces( "'with ' some \"\tquotes\" " ));
-
- }
-
-}
Added: labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/lang/dsl/test_expansion.drl
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/lang/dsl/test_expansion.drl (rev 0)
+++ labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/lang/dsl/test_expansion.drl 2007-02-15 20:49:28 UTC (rev 9538)
@@ -0,0 +1,36 @@
+# Example DRL with expansion
+# (ie "domain specific language")
+
+# declare expanders for domain specific and natural language extensions
+expander test_metainfo.dsl
+
+consulta "a query"
+ # a comment in the middle of the query
+ the Customer
+ - first name is "bob"
+ - last name is not "dylan"
+fim
+
+regra "average \"bob\"" salience -10
+ faça
+ # a comment in the consequence
+ Log "just an average bob"
+ Show last name
+ >System.out.println("and this is code")
+ se
+ # a comment in the middle of a rule
+ the Customer
+ # a comment before an attribute
+ - first name is "bob"
+ - last name is not "dylan"
+fim
+
+regra "a second rule" agenda-group test
+ faça
+> System.out.println("bla")
+ se
+ the Product
+ - store is "Wall Mart"
+ - shop category is "grocery"
+fim
+
Property changes on: labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/lang/dsl/test_expansion.drl
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:eol-style
+ native
Added: labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/lang/dsl/test_metainfo.dsl
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/lang/dsl/test_metainfo.dsl (rev 0)
+++ labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/lang/dsl/test_metainfo.dsl 2007-02-15 20:49:28 UTC (rev 9538)
@@ -0,0 +1,32 @@
+#This is a sample DSL for a ficticous E-Commerce website that is building a recommendation engine
+[keyword][*]regra {atributos} faça {rhs} se {lhs} fim=rule {atributos} \\n when\\n {lhs}\\n then\\n {rhs}\\n end
+[keyword][*]consulta=query
+[keyword]fim=end
+[when][woolfel.ecommerce.model.Customer]the Customer=cust : Customer()
+[when][woolfel.ecommerce.model.Customer]- has an email=emailAddress != null
+[when][woolfel.ecommerce.model.Customer]- first name is "{first}"=first == "{first}"
+[when][woolfel.ecommerce.model.Customer]- last name is "{surname}"=sname: surname == "{surname}"
+[when][woolfel.ecommerce.model.CustomerProfile]a User profile=userprof : CustomerProfile(prfid : profileId)
+[when][woolfel.ecommerce.model.Response]the Response=resp : Response()
+[when][woolfel.ecommerce.model.Response]- is empty=userId == usrid, recommendation == null
+[when][woolfel.ecommerce.model.Response]- is not empty=userId == usrid, recommendation != null
+[when][woolfel.ecommerce.model.Response]- matches the user=userId == userid
+[when][woolfel.ecommerce.model.Aggregate]an aggregate=aggr : Aggregate()
+[when][woolfel.ecommerce.model.Recommendation]the recommendation where=recm : Recommendation()
+[when][woolfel.ecommerce.model.Recommendation]- the profile is found=profileId == prfid
+[when][woolfel.ecommerce.model.Product]the Product=prod : Product()
+[when][woolfel.ecommerce.model.Product]- store is "{store}"=storeCategory == "{store}"
+[when][woolfel.ecommerce.model.Product]- shop category is "{shopcat}"=shopCategory == "{shopcat}"
+[when][woolfel.ecommerce.model.Product]- category is "{prodcat}"=productCategory == "{prodcat}"
+[when][woolfel.ecommerce.model.Product]- subcategory is "{subcat}"=subProductCategory == "{subcat}"
+[when][woolfel.ecommerce.model.Product]- manufacturer is "{manufac}"=manufacturer == "{manufac}"
+[when][woolfel.ecommerce.model.Product]- SKU is equal to "{sku}"=SKU == "{sku}"
+[when][woolfel.ecommerce.model.Order]the Order where=ordr : Order()
+[when][woolfel.ecommerce.model.Order]- shipping method is "{shipmethod}"=shippingMethod == "{shipmethod}"
+[when][woolfel.ecommerce.model.Order]- has more than {items}=cartItems > {items}
+[when][woolfel.ecommerce.model.Order]- has coupons=coupons != null
+[then][woolfel.ecommerce.model.Recommendation]return the recommendation=resp.setRecommendation(recm);
+[then]Log "{msg}"=System.out.println("{msg}");
+[when]but not=not
+[when][woolfel.ecommerce.model.Customer]- last name is not "{surname}"=surname != "{surname}"
+[then][*]Show last name=System.out.println(cust.getSurname());
Property changes on: labs/jbossrules/trunk/drools-compiler/src/test/resources/org/drools/lang/dsl/test_metainfo.dsl
___________________________________________________________________
Name: svn:executable
+ *
More information about the jboss-svn-commits
mailing list