[jboss-svn-commits] JBL Code SVN: r18148 - in labs/jbossrules/trunk/drools-clips/src: main/java/org/drools/clp/functions and 3 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Sat Jan 26 13:06:51 EST 2008
Author: mark.proctor at jboss.com
Date: 2008-01-26 13:06:51 -0500 (Sat, 26 Jan 2008)
New Revision: 18148
Added:
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/LispForm2.java
labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/BoolLispAtom.java
labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/DeffunctionFunction.java
labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/FloatLispAtom.java
labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/IntLispAtom.java
labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/LispAtom.java
labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/LispForm.java
labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/MVELClipsContext.java
labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/NullLispAtom.java
labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/ReturnFunction.java
labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/StringLispAtom.java
labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/SymbolLispAtom.java
labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/VariableLispAtom.java
Removed:
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/LispForm.java
labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/BoolLispAtom2.java
labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/FloatLispAtom2.java
labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/IntLispAtom2.java
labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/LispAtom2.java
labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/LispForm2.java
labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/NullLispAtom2.java
labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/StringLispAtom2.java
labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/SymbolLispAtom2.java
labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/VariableLispAtom2.java
Modified:
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/CLPMVELLexer.java
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/CLPMVELParser.java
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/CLPParser.java
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/Deffunction.java
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/LispData.java
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/functions/BaseFunction.java
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/functions/IfFunction.java
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/functions/SwitchCaseFunction.java
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/functions/SwitchDefaultFunction.java
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/functions/SwitchFunction.java
labs/jbossrules/trunk/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g
labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/LhsClpParserTest.java
labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/BaseInfixFunction.java
labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/CreateListFunction.java
labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/Function.java
labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/FunctionHandlers.java
labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/IfFunction.java
labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/ModifyFunction.java
labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/PrintoutFunction.java
labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/PrognFunction.java
labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/SwitchFunction.java
labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/TestMVEL.java
Log:
JBRULES-720 Clips Parser
-functions are now working.
Modified: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/CLPMVELLexer.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/CLPMVELLexer.java 2008-01-26 12:42:49 UTC (rev 18147)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/CLPMVELLexer.java 2008-01-26 18:06:51 UTC (rev 18148)
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g 2008-01-25 00:37:25
+// $ANTLR 3.0.1 C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g 2008-01-26 17:55:37
package org.drools.clp;
@@ -10,61 +10,60 @@
import java.util.Map;
import java.util.HashMap;
public class CLPMVELLexer extends Lexer {
- public static final int RIGHT_SQUARE=38;
- public static final int RIGHT_CURLY=40;
- public static final int EQUALS=23;
- public static final int FLOAT=24;
- public static final int SH_STYLE_SINGLE_LINE_COMMENT=35;
- public static final int SYMBOL_CHAR=34;
- public static final int NOT=15;
- public static final int AND=13;
- public static final int FIRST_SYMBOL_CHAR=43;
+ public static final int RIGHT_SQUARE=37;
+ public static final int RIGHT_CURLY=39;
+ public static final int EQUALS=22;
+ public static final int FLOAT=23;
+ public static final int NOT=13;
+ public static final int SYMBOL_CHAR=33;
+ public static final int SH_STYLE_SINGLE_LINE_COMMENT=34;
+ public static final int AND=11;
+ public static final int FIRST_SYMBOL_CHAR=42;
public static final int EOF=-1;
- public static final int HexDigit=31;
- public static final int DEFFUNCTION=7;
- public static final int ASSIGN_OP=18;
+ public static final int HexDigit=30;
+ public static final int ASSIGN_OP=17;
public static final int RIGHT_PAREN=6;
public static final int NAME=5;
- public static final int EOL=27;
- public static final int DEFRULE=9;
- public static final int TILDE=21;
- public static final int PIPE=19;
- public static final int VAR=8;
- public static final int EXISTS=16;
- public static final int SYMBOL=42;
- public static final int NULL=26;
- public static final int BOOL=25;
- public static final int SALIENCE=11;
- public static final int AMPERSAND=20;
- public static final int INT=12;
- public static final int Tokens=46;
- public static final int MULTI_LINE_COMMENT=41;
- public static final int T45=45;
+ public static final int EOL=26;
+ public static final int DEFRULE=7;
+ public static final int TILDE=20;
+ public static final int PIPE=18;
+ public static final int VAR=16;
+ public static final int EXISTS=14;
+ public static final int SYMBOL=41;
+ public static final int NULL=25;
+ public static final int BOOL=24;
+ public static final int AMPERSAND=19;
+ public static final int SALIENCE=9;
+ public static final int INT=10;
+ public static final int T43=43;
+ public static final int Tokens=45;
+ public static final int MULTI_LINE_COMMENT=40;
public static final int T44=44;
- public static final int COLON=22;
- public static final int WS=28;
- public static final int UnicodeEscape=32;
- public static final int LEFT_CURLY=39;
- public static final int OR=14;
- public static final int TEST=17;
+ public static final int COLON=21;
+ public static final int WS=27;
+ public static final int UnicodeEscape=31;
+ public static final int LEFT_CURLY=38;
+ public static final int OR=12;
+ public static final int TEST=15;
public static final int LEFT_PAREN=4;
- public static final int DECLARE=29;
- public static final int LEFT_SQUARE=37;
- public static final int EscapeSequence=30;
- public static final int OctalEscape=33;
- public static final int C_STYLE_SINGLE_LINE_COMMENT=36;
- public static final int STRING=10;
+ public static final int DECLARE=28;
+ public static final int LEFT_SQUARE=36;
+ public static final int OctalEscape=32;
+ public static final int EscapeSequence=29;
+ public static final int C_STYLE_SINGLE_LINE_COMMENT=35;
+ public static final int STRING=8;
public CLPMVELLexer() {;}
public CLPMVELLexer(CharStream input) {
super(input);
- ruleMemo = new HashMap[44+1];
+ ruleMemo = new HashMap[43+1];
}
public String getGrammarFileName() { return "C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g"; }
- // $ANTLR start T44
- public final void mT44() throws RecognitionException {
+ // $ANTLR start T43
+ public final void mT43() throws RecognitionException {
try {
- int _type = T44;
+ int _type = T43;
// C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:6:5: ( 'import' )
// C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:6:7: 'import'
{
@@ -78,12 +77,12 @@
finally {
}
}
- // $ANTLR end T44
+ // $ANTLR end T43
- // $ANTLR start T45
- public final void mT45() throws RecognitionException {
+ // $ANTLR start T44
+ public final void mT44() throws RecognitionException {
try {
- int _type = T45;
+ int _type = T44;
// C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:7:5: ( '=>' )
// C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:7:7: '=>'
{
@@ -97,16 +96,16 @@
finally {
}
}
- // $ANTLR end T45
+ // $ANTLR end T44
// $ANTLR start WS
public final void mWS() throws RecognitionException {
try {
int _type = WS;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:732:9: ( ( ' ' | '\\t' | '\\f' | EOL ) )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:732:17: ( ' ' | '\\t' | '\\f' | EOL )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:680:9: ( ( ' ' | '\\t' | '\\f' | EOL ) )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:680:17: ( ' ' | '\\t' | '\\f' | EOL )
{
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:732:17: ( ' ' | '\\t' | '\\f' | EOL )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:680:17: ( ' ' | '\\t' | '\\f' | EOL )
int alt1=4;
switch ( input.LA(1) ) {
case ' ':
@@ -133,35 +132,35 @@
default:
if (backtracking>0) {failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("732:17: ( ' ' | '\\t' | '\\f' | EOL )", 1, 0, input);
+ new NoViableAltException("680:17: ( ' ' | '\\t' | '\\f' | EOL )", 1, 0, input);
throw nvae;
}
switch (alt1) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:732:19: ' '
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:680:19: ' '
{
match(' '); if (failed) return ;
}
break;
case 2 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:733:19: '\\t'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:681:19: '\\t'
{
match('\t'); if (failed) return ;
}
break;
case 3 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:734:19: '\\f'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:682:19: '\\f'
{
match('\f'); if (failed) return ;
}
break;
case 4 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:735:19: EOL
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:683:19: EOL
{
mEOL(); if (failed) return ;
@@ -187,8 +186,8 @@
public final void mDEFRULE() throws RecognitionException {
try {
int _type = DEFRULE;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:740:10: ( 'defrule' )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:740:12: 'defrule'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:688:10: ( 'defrule' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:688:12: 'defrule'
{
match("defrule"); if (failed) return ;
@@ -202,31 +201,12 @@
}
// $ANTLR end DEFRULE
- // $ANTLR start DEFFUNCTION
- public final void mDEFFUNCTION() throws RecognitionException {
- try {
- int _type = DEFFUNCTION;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:741:13: ( 'deffunction' )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:741:15: 'deffunction'
- {
- match("deffunction"); if (failed) return ;
-
-
- }
-
- this.type = _type;
- }
- finally {
- }
- }
- // $ANTLR end DEFFUNCTION
-
// $ANTLR start OR
public final void mOR() throws RecognitionException {
try {
int _type = OR;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:742:7: ( 'or' )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:742:9: 'or'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:690:7: ( 'or' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:690:9: 'or'
{
match("or"); if (failed) return ;
@@ -244,8 +224,8 @@
public final void mAND() throws RecognitionException {
try {
int _type = AND;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:743:7: ( 'and' )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:743:9: 'and'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:691:7: ( 'and' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:691:9: 'and'
{
match("and"); if (failed) return ;
@@ -263,8 +243,8 @@
public final void mNOT() throws RecognitionException {
try {
int _type = NOT;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:744:7: ( 'not' )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:744:9: 'not'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:692:7: ( 'not' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:692:9: 'not'
{
match("not"); if (failed) return ;
@@ -282,8 +262,8 @@
public final void mEXISTS() throws RecognitionException {
try {
int _type = EXISTS;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:745:10: ( 'exists' )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:745:12: 'exists'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:693:10: ( 'exists' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:693:12: 'exists'
{
match("exists"); if (failed) return ;
@@ -301,8 +281,8 @@
public final void mTEST() throws RecognitionException {
try {
int _type = TEST;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:746:8: ( 'test' )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:746:10: 'test'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:694:8: ( 'test' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:694:10: 'test'
{
match("test"); if (failed) return ;
@@ -320,8 +300,8 @@
public final void mNULL() throws RecognitionException {
try {
int _type = NULL;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:748:7: ( 'null' )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:748:9: 'null'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:696:7: ( 'null' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:696:9: 'null'
{
match("null"); if (failed) return ;
@@ -339,8 +319,8 @@
public final void mDECLARE() throws RecognitionException {
try {
int _type = DECLARE;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:750:10: ( 'declare' )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:750:12: 'declare'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:698:10: ( 'declare' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:698:12: 'declare'
{
match("declare"); if (failed) return ;
@@ -358,8 +338,8 @@
public final void mSALIENCE() throws RecognitionException {
try {
int _type = SALIENCE;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:752:10: ( 'salience' )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:752:12: 'salience'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:700:10: ( 'salience' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:700:12: 'salience'
{
match("salience"); if (failed) return ;
@@ -376,10 +356,10 @@
// $ANTLR start EOL
public final void mEOL() throws RecognitionException {
try {
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:757:6: ( ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' ) )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:758:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:705:6: ( ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' ) )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:706:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
{
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:758:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:706:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
int alt2=3;
int LA2_0 = input.LA(1);
@@ -398,13 +378,13 @@
else {
if (backtracking>0) {failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("758:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )", 2, 0, input);
+ new NoViableAltException("706:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )", 2, 0, input);
throw nvae;
}
switch (alt2) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:758:14: ( '\\r\\n' )=> '\\r\\n'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:706:14: ( '\\r\\n' )=> '\\r\\n'
{
match("\r\n"); if (failed) return ;
@@ -412,14 +392,14 @@
}
break;
case 2 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:759:25: '\\r'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:707:25: '\\r'
{
match('\r'); if (failed) return ;
}
break;
case 3 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:760:25: '\\n'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:708:25: '\\n'
{
match('\n'); if (failed) return ;
@@ -441,10 +421,10 @@
public final void mINT() throws RecognitionException {
try {
int _type = INT;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:765:2: ( ( '-' )? ( '0' .. '9' )+ )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:765:4: ( '-' )? ( '0' .. '9' )+
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:713:2: ( ( '-' )? ( '0' .. '9' )+ )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:713:4: ( '-' )? ( '0' .. '9' )+
{
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:765:4: ( '-' )?
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:713:4: ( '-' )?
int alt3=2;
int LA3_0 = input.LA(1);
@@ -453,7 +433,7 @@
}
switch (alt3) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:765:5: '-'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:713:5: '-'
{
match('-'); if (failed) return ;
@@ -462,7 +442,7 @@
}
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:765:10: ( '0' .. '9' )+
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:713:10: ( '0' .. '9' )+
int cnt4=0;
loop4:
do {
@@ -476,7 +456,7 @@
switch (alt4) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:765:11: '0' .. '9'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:713:11: '0' .. '9'
{
matchRange('0','9'); if (failed) return ;
@@ -507,10 +487,10 @@
public final void mFLOAT() throws RecognitionException {
try {
int _type = FLOAT;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:769:2: ( ( '-' )? ( '0' .. '9' )+ '.' ( '0' .. '9' )+ )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:769:4: ( '-' )? ( '0' .. '9' )+ '.' ( '0' .. '9' )+
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:717:2: ( ( '-' )? ( '0' .. '9' )+ '.' ( '0' .. '9' )+ )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:717:4: ( '-' )? ( '0' .. '9' )+ '.' ( '0' .. '9' )+
{
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:769:4: ( '-' )?
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:717:4: ( '-' )?
int alt5=2;
int LA5_0 = input.LA(1);
@@ -519,7 +499,7 @@
}
switch (alt5) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:769:5: '-'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:717:5: '-'
{
match('-'); if (failed) return ;
@@ -528,7 +508,7 @@
}
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:769:10: ( '0' .. '9' )+
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:717:10: ( '0' .. '9' )+
int cnt6=0;
loop6:
do {
@@ -542,7 +522,7 @@
switch (alt6) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:769:11: '0' .. '9'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:717:11: '0' .. '9'
{
matchRange('0','9'); if (failed) return ;
@@ -560,7 +540,7 @@
} while (true);
match('.'); if (failed) return ;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:769:26: ( '0' .. '9' )+
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:717:26: ( '0' .. '9' )+
int cnt7=0;
loop7:
do {
@@ -574,7 +554,7 @@
switch (alt7) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:769:27: '0' .. '9'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:717:27: '0' .. '9'
{
matchRange('0','9'); if (failed) return ;
@@ -605,7 +585,7 @@
public final void mSTRING() throws RecognitionException {
try {
int _type = STRING;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:773:5: ( ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' ) | ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' ) )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:721:5: ( ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' ) | ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' ) )
int alt10=2;
int LA10_0 = input.LA(1);
@@ -618,19 +598,19 @@
else {
if (backtracking>0) {failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("772:1: STRING : ( ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' ) | ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' ) );", 10, 0, input);
+ new NoViableAltException("720:1: STRING : ( ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' ) | ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' ) );", 10, 0, input);
throw nvae;
}
switch (alt10) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:773:8: ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:721:8: ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' )
{
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:773:8: ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:773:9: '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:721:8: ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:721:9: '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"'
{
match('\"'); if (failed) return ;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:773:13: ( EscapeSequence | ~ ( '\\\\' | '\"' ) )*
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:721:13: ( EscapeSequence | ~ ( '\\\\' | '\"' ) )*
loop8:
do {
int alt8=3;
@@ -646,14 +626,14 @@
switch (alt8) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:773:15: EscapeSequence
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:721:15: EscapeSequence
{
mEscapeSequence(); if (failed) return ;
}
break;
case 2 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:773:32: ~ ( '\\\\' | '\"' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:721:32: ~ ( '\\\\' | '\"' )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFE') ) {
input.consume();
@@ -683,13 +663,13 @@
}
break;
case 2 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:774:8: ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:722:8: ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' )
{
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:774:8: ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:774:9: '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\''
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:722:8: ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:722:9: '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\''
{
match('\''); if (failed) return ;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:774:14: ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )*
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:722:14: ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )*
loop9:
do {
int alt9=3;
@@ -705,14 +685,14 @@
switch (alt9) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:774:16: EscapeSequence
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:722:16: EscapeSequence
{
mEscapeSequence(); if (failed) return ;
}
break;
case 2 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:774:33: ~ ( '\\\\' | '\\'' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:722:33: ~ ( '\\\\' | '\\'' )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFE') ) {
input.consume();
@@ -753,8 +733,8 @@
// $ANTLR start HexDigit
public final void mHexDigit() throws RecognitionException {
try {
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:778:10: ( ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' ) )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:778:12: ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:726:10: ( ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' ) )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:726: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();
@@ -779,7 +759,7 @@
// $ANTLR start EscapeSequence
public final void mEscapeSequence() throws RecognitionException {
try {
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:782:5: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | UnicodeEscape | OctalEscape )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:730:5: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | UnicodeEscape | OctalEscape )
int alt11=3;
int LA11_0 = input.LA(1);
@@ -817,7 +797,7 @@
default:
if (backtracking>0) {failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("780:1: fragment EscapeSequence : ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | UnicodeEscape | OctalEscape );", 11, 1, input);
+ new NoViableAltException("728:1: fragment EscapeSequence : ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | UnicodeEscape | OctalEscape );", 11, 1, input);
throw nvae;
}
@@ -826,13 +806,13 @@
else {
if (backtracking>0) {failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("780:1: fragment EscapeSequence : ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | UnicodeEscape | OctalEscape );", 11, 0, input);
+ new NoViableAltException("728:1: fragment EscapeSequence : ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | UnicodeEscape | OctalEscape );", 11, 0, input);
throw nvae;
}
switch (alt11) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:782:9: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:730: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' ) {
@@ -850,14 +830,14 @@
}
break;
case 2 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:783:9: UnicodeEscape
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:731:9: UnicodeEscape
{
mUnicodeEscape(); if (failed) return ;
}
break;
case 3 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:784:9: OctalEscape
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:732:9: OctalEscape
{
mOctalEscape(); if (failed) return ;
@@ -874,7 +854,7 @@
// $ANTLR start OctalEscape
public final void mOctalEscape() throws RecognitionException {
try {
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:789:5: ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:737:5: ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) )
int alt12=3;
int LA12_0 = input.LA(1);
@@ -908,7 +888,7 @@
else {
if (backtracking>0) {failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("787:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 12, 1, input);
+ new NoViableAltException("735:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 12, 1, input);
throw nvae;
}
@@ -916,31 +896,31 @@
else {
if (backtracking>0) {failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("787:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 12, 0, input);
+ new NoViableAltException("735:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 12, 0, input);
throw nvae;
}
switch (alt12) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:789:9: '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:737:9: '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' )
{
match('\\'); if (failed) return ;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:789:14: ( '0' .. '3' )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:789:15: '0' .. '3'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:737:14: ( '0' .. '3' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:737:15: '0' .. '3'
{
matchRange('0','3'); if (failed) return ;
}
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:789:25: ( '0' .. '7' )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:789:26: '0' .. '7'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:737:25: ( '0' .. '7' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:737:26: '0' .. '7'
{
matchRange('0','7'); if (failed) return ;
}
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:789:36: ( '0' .. '7' )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:789:37: '0' .. '7'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:737:36: ( '0' .. '7' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:737:37: '0' .. '7'
{
matchRange('0','7'); if (failed) return ;
@@ -950,18 +930,18 @@
}
break;
case 2 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:790:9: '\\\\' ( '0' .. '7' ) ( '0' .. '7' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:738:9: '\\\\' ( '0' .. '7' ) ( '0' .. '7' )
{
match('\\'); if (failed) return ;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:790:14: ( '0' .. '7' )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:790:15: '0' .. '7'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:738:14: ( '0' .. '7' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:738:15: '0' .. '7'
{
matchRange('0','7'); if (failed) return ;
}
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:790:25: ( '0' .. '7' )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:790:26: '0' .. '7'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:738:25: ( '0' .. '7' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:738:26: '0' .. '7'
{
matchRange('0','7'); if (failed) return ;
@@ -971,11 +951,11 @@
}
break;
case 3 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:791:9: '\\\\' ( '0' .. '7' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:739:9: '\\\\' ( '0' .. '7' )
{
match('\\'); if (failed) return ;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:791:14: ( '0' .. '7' )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:791:15: '0' .. '7'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:739:14: ( '0' .. '7' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:739:15: '0' .. '7'
{
matchRange('0','7'); if (failed) return ;
@@ -995,8 +975,8 @@
// $ANTLR start UnicodeEscape
public final void mUnicodeEscape() throws RecognitionException {
try {
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:796:5: ( '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:796:9: '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:744:5: ( '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:744:9: '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit
{
match('\\'); if (failed) return ;
match('u'); if (failed) return ;
@@ -1017,10 +997,10 @@
public final void mBOOL() throws RecognitionException {
try {
int _type = BOOL;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:800:2: ( ( 'true' | 'false' ) )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:800:4: ( 'true' | 'false' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:748:2: ( ( 'true' | 'false' ) )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:748:4: ( 'true' | 'false' )
{
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:800:4: ( 'true' | 'false' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:748:4: ( 'true' | 'false' )
int alt13=2;
int LA13_0 = input.LA(1);
@@ -1033,13 +1013,13 @@
else {
if (backtracking>0) {failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("800:4: ( 'true' | 'false' )", 13, 0, input);
+ new NoViableAltException("748:4: ( 'true' | 'false' )", 13, 0, input);
throw nvae;
}
switch (alt13) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:800:5: 'true'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:748:5: 'true'
{
match("true"); if (failed) return ;
@@ -1047,7 +1027,7 @@
}
break;
case 2 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:800:12: 'false'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:748:12: 'false'
{
match("false"); if (failed) return ;
@@ -1071,11 +1051,11 @@
public final void mVAR() throws RecognitionException {
try {
int _type = VAR;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:803:6: ( '?' ( SYMBOL_CHAR )+ )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:803:8: '?' ( SYMBOL_CHAR )+
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:751:6: ( '?' ( SYMBOL_CHAR )+ )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:751:8: '?' ( SYMBOL_CHAR )+
{
match('?'); if (failed) return ;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:803:12: ( SYMBOL_CHAR )+
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:751:12: ( SYMBOL_CHAR )+
int cnt14=0;
loop14:
do {
@@ -1089,7 +1069,7 @@
switch (alt14) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:803:12: SYMBOL_CHAR
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:751:12: SYMBOL_CHAR
{
mSYMBOL_CHAR(); if (failed) return ;
@@ -1120,11 +1100,11 @@
public final void mSH_STYLE_SINGLE_LINE_COMMENT() throws RecognitionException {
try {
int _type = SH_STYLE_SINGLE_LINE_COMMENT;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:807:2: ( '#' ( options {greedy=false; } : . )* EOL )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:807:4: '#' ( options {greedy=false; } : . )* EOL
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:755:2: ( '#' ( options {greedy=false; } : . )* EOL )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:755:4: '#' ( options {greedy=false; } : . )* EOL
{
match('#'); if (failed) return ;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:807:8: ( options {greedy=false; } : . )*
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:755:8: ( options {greedy=false; } : . )*
loop15:
do {
int alt15=2;
@@ -1143,7 +1123,7 @@
switch (alt15) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:807:35: .
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:755:35: .
{
matchAny(); if (failed) return ;
@@ -1173,12 +1153,12 @@
public final void mC_STYLE_SINGLE_LINE_COMMENT() throws RecognitionException {
try {
int _type = C_STYLE_SINGLE_LINE_COMMENT;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:813:2: ( '//' ( options {greedy=false; } : . )* EOL )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:813:4: '//' ( options {greedy=false; } : . )* EOL
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:761:2: ( '//' ( options {greedy=false; } : . )* EOL )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:761:4: '//' ( options {greedy=false; } : . )* EOL
{
match("//"); if (failed) return ;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:813:9: ( options {greedy=false; } : . )*
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:761:9: ( options {greedy=false; } : . )*
loop16:
do {
int alt16=2;
@@ -1197,7 +1177,7 @@
switch (alt16) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:813:36: .
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:761:36: .
{
matchAny(); if (failed) return ;
@@ -1227,8 +1207,8 @@
public final void mLEFT_PAREN() throws RecognitionException {
try {
int _type = LEFT_PAREN;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:819:2: ( '(' )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:819:4: '('
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:767:2: ( '(' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:767:4: '('
{
match('('); if (failed) return ;
@@ -1245,8 +1225,8 @@
public final void mRIGHT_PAREN() throws RecognitionException {
try {
int _type = RIGHT_PAREN;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:823:2: ( ')' )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:823:4: ')'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:771:2: ( ')' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:771:4: ')'
{
match(')'); if (failed) return ;
@@ -1263,8 +1243,8 @@
public final void mLEFT_SQUARE() throws RecognitionException {
try {
int _type = LEFT_SQUARE;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:827:2: ( '[' )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:827:4: '['
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:775:2: ( '[' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:775:4: '['
{
match('['); if (failed) return ;
@@ -1281,8 +1261,8 @@
public final void mRIGHT_SQUARE() throws RecognitionException {
try {
int _type = RIGHT_SQUARE;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:831:2: ( ']' )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:831:4: ']'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:779:2: ( ']' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:779:4: ']'
{
match(']'); if (failed) return ;
@@ -1299,8 +1279,8 @@
public final void mLEFT_CURLY() throws RecognitionException {
try {
int _type = LEFT_CURLY;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:835:2: ( '{' )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:835:4: '{'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:783:2: ( '{' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:783:4: '{'
{
match('{'); if (failed) return ;
@@ -1317,8 +1297,8 @@
public final void mRIGHT_CURLY() throws RecognitionException {
try {
int _type = RIGHT_CURLY;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:839:2: ( '}' )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:839:4: '}'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:787:2: ( '}' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:787:4: '}'
{
match('}'); if (failed) return ;
@@ -1335,8 +1315,8 @@
public final void mTILDE() throws RecognitionException {
try {
int _type = TILDE;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:842:7: ( '~' )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:842:9: '~'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:790:7: ( '~' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:790:9: '~'
{
match('~'); if (failed) return ;
@@ -1353,8 +1333,8 @@
public final void mAMPERSAND() throws RecognitionException {
try {
int _type = AMPERSAND;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:846:2: ( '&' )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:846:4: '&'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:794:2: ( '&' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:794:4: '&'
{
match('&'); if (failed) return ;
@@ -1371,8 +1351,8 @@
public final void mPIPE() throws RecognitionException {
try {
int _type = PIPE;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:850:2: ( '|' )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:850:4: '|'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:798:2: ( '|' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:798:4: '|'
{
match('|'); if (failed) return ;
@@ -1389,8 +1369,8 @@
public final void mASSIGN_OP() throws RecognitionException {
try {
int _type = ASSIGN_OP;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:854:2: ( '<-' )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:854:4: '<-'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:802:2: ( '<-' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:802:4: '<-'
{
match("<-"); if (failed) return ;
@@ -1408,8 +1388,8 @@
public final void mCOLON() throws RecognitionException {
try {
int _type = COLON;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:857:7: ( ':' )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:857:9: ':'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:805:7: ( ':' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:805:9: ':'
{
match(':'); if (failed) return ;
@@ -1426,8 +1406,8 @@
public final void mEQUALS() throws RecognitionException {
try {
int _type = EQUALS;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:859:8: ( '=' )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:859:10: '='
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:807:8: ( '=' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:807:10: '='
{
match('='); if (failed) return ;
@@ -1444,12 +1424,12 @@
public final void mMULTI_LINE_COMMENT() throws RecognitionException {
try {
int _type = MULTI_LINE_COMMENT;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:862:2: ( '/*' ( options {greedy=false; } : . )* '*/' )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:862:4: '/*' ( options {greedy=false; } : . )* '*/'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:810:2: ( '/*' ( options {greedy=false; } : . )* '*/' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:810:4: '/*' ( options {greedy=false; } : . )* '*/'
{
match("/*"); if (failed) return ;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:862:9: ( options {greedy=false; } : . )*
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:810:9: ( options {greedy=false; } : . )*
loop17:
do {
int alt17=2;
@@ -1474,7 +1454,7 @@
switch (alt17) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:862:35: .
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:810:35: .
{
matchAny(); if (failed) return ;
@@ -1505,8 +1485,8 @@
public final void mNAME() throws RecognitionException {
try {
int _type = NAME;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:866:6: ( SYMBOL )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:866:8: SYMBOL
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:814:6: ( SYMBOL )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:814:8: SYMBOL
{
mSYMBOL(); if (failed) return ;
@@ -1522,11 +1502,11 @@
// $ANTLR start SYMBOL
public final void mSYMBOL() throws RecognitionException {
try {
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:869:8: ( FIRST_SYMBOL_CHAR ( SYMBOL_CHAR )* )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:869:10: FIRST_SYMBOL_CHAR ( SYMBOL_CHAR )*
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:817:8: ( FIRST_SYMBOL_CHAR ( SYMBOL_CHAR )* )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:817:10: FIRST_SYMBOL_CHAR ( SYMBOL_CHAR )*
{
mFIRST_SYMBOL_CHAR(); if (failed) return ;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:869:28: ( SYMBOL_CHAR )*
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:817:28: ( SYMBOL_CHAR )*
loop18:
do {
int alt18=2;
@@ -1539,7 +1519,7 @@
switch (alt18) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:869:28: SYMBOL_CHAR
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:817:28: SYMBOL_CHAR
{
mSYMBOL_CHAR(); if (failed) return ;
@@ -1563,8 +1543,8 @@
// $ANTLR start FIRST_SYMBOL_CHAR
public final void mFIRST_SYMBOL_CHAR() throws RecognitionException {
try {
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:874:19: ( ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '!' | '$' | '%' | '^' | '*' | '_' | '-' | '+' | '=' | '\\\\' | '/' | '@' | '#' | ':' | '>' | '<' | ',' | '.' | '[' | ']' | '{' | '}' ) )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:874:21: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '!' | '$' | '%' | '^' | '*' | '_' | '-' | '+' | '=' | '\\\\' | '/' | '@' | '#' | ':' | '>' | '<' | ',' | '.' | '[' | ']' | '{' | '}' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:822:19: ( ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '!' | '$' | '%' | '^' | '*' | '_' | '-' | '+' | '=' | '\\\\' | '/' | '@' | '#' | ':' | '>' | '<' | ',' | '.' | '[' | ']' | '{' | '}' ) )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:822:21: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '!' | '$' | '%' | '^' | '*' | '_' | '-' | '+' | '=' | '\\\\' | '/' | '@' | '#' | ':' | '>' | '<' | ',' | '.' | '[' | ']' | '{' | '}' )
{
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)>='a' && input.LA(1)<='{')||input.LA(1)=='}' ) {
input.consume();
@@ -1589,8 +1569,8 @@
// $ANTLR start SYMBOL_CHAR
public final void mSYMBOL_CHAR() throws RecognitionException {
try {
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:879:13: ( ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '!' | '$' | '%' | '^' | '*' | '_' | '-' | '+' | '=' | '\\\\' | '/' | '@' | '#' | ':' | '>' | ',' | '.' | '[' | ']' | '{' | '}' | '?' ) )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:879:15: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '!' | '$' | '%' | '^' | '*' | '_' | '-' | '+' | '=' | '\\\\' | '/' | '@' | '#' | ':' | '>' | ',' | '.' | '[' | ']' | '{' | '}' | '?' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:827:13: ( ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '!' | '$' | '%' | '^' | '*' | '_' | '-' | '+' | '=' | '\\\\' | '/' | '@' | '#' | ':' | '>' | ',' | '.' | '[' | ']' | '{' | '}' | '?' ) )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:827:15: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '!' | '$' | '%' | '^' | '*' | '_' | '-' | '+' | '=' | '\\\\' | '/' | '@' | '#' | ':' | '>' | ',' | '.' | '[' | ']' | '{' | '}' | '?' )
{
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)>='a' && input.LA(1)<='{')||input.LA(1)=='}' ) {
input.consume();
@@ -1613,21 +1593,21 @@
// $ANTLR end SYMBOL_CHAR
public void mTokens() throws RecognitionException {
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:8: ( T44 | T45 | WS | DEFRULE | DEFFUNCTION | OR | AND | NOT | EXISTS | TEST | NULL | DECLARE | SALIENCE | INT | FLOAT | STRING | BOOL | VAR | SH_STYLE_SINGLE_LINE_COMMENT | C_STYLE_SINGLE_LINE_COMMENT | LEFT_PAREN | RIGHT_PAREN | LEFT_SQUARE | RIGHT_SQUARE | LEFT_CURLY | RIGHT_CURLY | TILDE | AMPERSAND | PIPE | ASSIGN_OP | COLON | EQUALS | MULTI_LINE_COMMENT | NAME )
- int alt19=34;
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:8: ( T43 | T44 | WS | DEFRULE | OR | AND | NOT | EXISTS | TEST | NULL | DECLARE | SALIENCE | INT | FLOAT | STRING | BOOL | VAR | SH_STYLE_SINGLE_LINE_COMMENT | C_STYLE_SINGLE_LINE_COMMENT | LEFT_PAREN | RIGHT_PAREN | LEFT_SQUARE | RIGHT_SQUARE | LEFT_CURLY | RIGHT_CURLY | TILDE | AMPERSAND | PIPE | ASSIGN_OP | COLON | EQUALS | MULTI_LINE_COMMENT | NAME )
+ int alt19=33;
alt19 = dfa19.predict(input);
switch (alt19) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:10: T44
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:10: T43
{
- mT44(); if (failed) return ;
+ mT43(); if (failed) return ;
}
break;
case 2 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:14: T45
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:14: T44
{
- mT45(); if (failed) return ;
+ mT44(); if (failed) return ;
}
break;
@@ -1646,211 +1626,204 @@
}
break;
case 5 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:29: DEFFUNCTION
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:29: OR
{
- mDEFFUNCTION(); if (failed) return ;
+ mOR(); if (failed) return ;
}
break;
case 6 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:41: OR
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:32: AND
{
- mOR(); if (failed) return ;
+ mAND(); if (failed) return ;
}
break;
case 7 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:44: AND
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:36: NOT
{
- mAND(); if (failed) return ;
+ mNOT(); if (failed) return ;
}
break;
case 8 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:48: NOT
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:40: EXISTS
{
- mNOT(); if (failed) return ;
+ mEXISTS(); if (failed) return ;
}
break;
case 9 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:52: EXISTS
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:47: TEST
{
- mEXISTS(); if (failed) return ;
+ mTEST(); if (failed) return ;
}
break;
case 10 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:59: TEST
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:52: NULL
{
- mTEST(); if (failed) return ;
+ mNULL(); if (failed) return ;
}
break;
case 11 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:64: NULL
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:57: DECLARE
{
- mNULL(); if (failed) return ;
+ mDECLARE(); if (failed) return ;
}
break;
case 12 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:69: DECLARE
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:65: SALIENCE
{
- mDECLARE(); if (failed) return ;
+ mSALIENCE(); if (failed) return ;
}
break;
case 13 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:77: SALIENCE
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:74: INT
{
- mSALIENCE(); if (failed) return ;
+ mINT(); if (failed) return ;
}
break;
case 14 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:86: INT
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:78: FLOAT
{
- mINT(); if (failed) return ;
+ mFLOAT(); if (failed) return ;
}
break;
case 15 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:90: FLOAT
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:84: STRING
{
- mFLOAT(); if (failed) return ;
+ mSTRING(); if (failed) return ;
}
break;
case 16 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:96: STRING
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:91: BOOL
{
- mSTRING(); if (failed) return ;
+ mBOOL(); if (failed) return ;
}
break;
case 17 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:103: BOOL
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:96: VAR
{
- mBOOL(); if (failed) return ;
+ mVAR(); if (failed) return ;
}
break;
case 18 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:108: VAR
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:100: SH_STYLE_SINGLE_LINE_COMMENT
{
- mVAR(); if (failed) return ;
+ mSH_STYLE_SINGLE_LINE_COMMENT(); if (failed) return ;
}
break;
case 19 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:112: SH_STYLE_SINGLE_LINE_COMMENT
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:129: C_STYLE_SINGLE_LINE_COMMENT
{
- mSH_STYLE_SINGLE_LINE_COMMENT(); if (failed) return ;
+ mC_STYLE_SINGLE_LINE_COMMENT(); if (failed) return ;
}
break;
case 20 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:141: C_STYLE_SINGLE_LINE_COMMENT
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:157: LEFT_PAREN
{
- mC_STYLE_SINGLE_LINE_COMMENT(); if (failed) return ;
+ mLEFT_PAREN(); if (failed) return ;
}
break;
case 21 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:169: LEFT_PAREN
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:168: RIGHT_PAREN
{
- mLEFT_PAREN(); if (failed) return ;
+ mRIGHT_PAREN(); if (failed) return ;
}
break;
case 22 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:180: RIGHT_PAREN
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:180: LEFT_SQUARE
{
- mRIGHT_PAREN(); if (failed) return ;
+ mLEFT_SQUARE(); if (failed) return ;
}
break;
case 23 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:192: LEFT_SQUARE
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:192: RIGHT_SQUARE
{
- mLEFT_SQUARE(); if (failed) return ;
+ mRIGHT_SQUARE(); if (failed) return ;
}
break;
case 24 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:204: RIGHT_SQUARE
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:205: LEFT_CURLY
{
- mRIGHT_SQUARE(); if (failed) return ;
+ mLEFT_CURLY(); if (failed) return ;
}
break;
case 25 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:217: LEFT_CURLY
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:216: RIGHT_CURLY
{
- mLEFT_CURLY(); if (failed) return ;
+ mRIGHT_CURLY(); if (failed) return ;
}
break;
case 26 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:228: RIGHT_CURLY
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:228: TILDE
{
- mRIGHT_CURLY(); if (failed) return ;
+ mTILDE(); if (failed) return ;
}
break;
case 27 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:240: TILDE
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:234: AMPERSAND
{
- mTILDE(); if (failed) return ;
+ mAMPERSAND(); if (failed) return ;
}
break;
case 28 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:246: AMPERSAND
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:244: PIPE
{
- mAMPERSAND(); if (failed) return ;
+ mPIPE(); if (failed) return ;
}
break;
case 29 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:256: PIPE
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:249: ASSIGN_OP
{
- mPIPE(); if (failed) return ;
+ mASSIGN_OP(); if (failed) return ;
}
break;
case 30 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:261: ASSIGN_OP
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:259: COLON
{
- mASSIGN_OP(); if (failed) return ;
+ mCOLON(); if (failed) return ;
}
break;
case 31 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:271: COLON
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:265: EQUALS
{
- mCOLON(); if (failed) return ;
+ mEQUALS(); if (failed) return ;
}
break;
case 32 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:277: EQUALS
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:272: MULTI_LINE_COMMENT
{
- mEQUALS(); if (failed) return ;
+ mMULTI_LINE_COMMENT(); if (failed) return ;
}
break;
case 33 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:284: MULTI_LINE_COMMENT
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:291: NAME
{
- mMULTI_LINE_COMMENT(); if (failed) return ;
-
- }
- break;
- case 34 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:303: NAME
- {
mNAME(); if (failed) return ;
}
@@ -1862,8 +1835,8 @@
// $ANTLR start synpred1
public final void synpred1_fragment() throws RecognitionException {
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:758:14: ( '\\r\\n' )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:758:16: '\\r\\n'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:706:14: ( '\\r\\n' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:706:16: '\\r\\n'
{
match("\r\n"); if (failed) return ;
@@ -1893,45 +1866,43 @@
"\1\uffff\1\35\1\40\1\uffff\10\35\1\54\1\uffff\1\35\1\uffff\2\35"+
"\2\uffff\1\62\1\63\1\64\1\65\3\uffff\1\35\1\67\1\uffff\1\35\1\71"+
"\1\uffff\1\35\1\74\7\35\1\54\1\35\1\uffff\2\35\1\uffff\2\35\4\uffff"+
- "\1\113\1\uffff\1\35\1\uffff\2\35\1\uffff\1\120\1\35\1\122\4\35\1"+
- "\127\2\35\1\uffff\1\35\1\uffff\1\35\1\uffff\4\35\1\uffff\1\136\1"+
- "\uffff\1\35\1\140\1\141\1\35\1\uffff\1\35\1\111\4\35\1\uffff\1\35"+
- "\2\uffff\1\35\1\140\1\152\3\35\1\156\1\35\1\uffff\1\35\1\161\1\162"+
- "\1\uffff\2\35\2\uffff\1\165\1\35\1\uffff\1\35\1\170\1\uffff";
+ "\1\113\1\uffff\1\35\1\uffff\2\35\1\uffff\1\117\1\120\5\35\1\126"+
+ "\2\35\1\uffff\1\35\1\uffff\1\35\1\uffff\3\35\2\uffff\1\134\1\35"+
+ "\1\136\1\137\1\35\1\uffff\1\35\1\111\3\35\1\uffff\1\35\2\uffff\1"+
+ "\35\1\136\1\147\2\35\1\152\1\35\1\uffff\1\154\1\155\1\uffff\1\35"+
+ "\2\uffff\1\157\1\uffff";
static final String DFA19_eofS =
- "\171\uffff";
+ "\160\uffff";
static final String DFA19_minS =
"\1\11\1\155\1\41\1\uffff\1\145\1\162\1\156\1\157\1\170\1\145\1\141"+
"\1\60\1\41\1\uffff\1\141\1\uffff\1\0\1\52\2\uffff\4\41\3\uffff\1"+
- "\55\1\41\1\uffff\1\160\1\41\1\uffff\1\143\1\41\1\144\1\154\1\164"+
+ "\55\1\41\1\uffff\1\160\1\41\1\uffff\1\143\1\41\1\144\1\164\1\154"+
"\1\151\1\165\1\163\1\154\1\41\1\60\1\uffff\1\154\1\0\1\uffff\2\0"+
- "\4\uffff\1\41\1\uffff\1\157\1\uffff\1\146\1\154\1\uffff\1\41\1\154"+
- "\1\41\1\163\1\145\1\164\1\151\1\41\1\163\1\0\1\uffff\1\0\1\uffff"+
- "\1\0\1\uffff\1\162\2\165\1\141\1\uffff\1\41\1\uffff\1\164\2\41\1"+
- "\145\1\uffff\1\145\1\41\1\164\1\156\1\154\1\162\1\uffff\1\163\2"+
- "\uffff\1\156\2\41\1\143\2\145\1\41\1\143\1\uffff\1\164\2\41\1\uffff"+
- "\1\145\1\151\2\uffff\1\41\1\157\1\uffff\1\156\1\41\1\uffff";
+ "\4\uffff\1\41\1\uffff\1\157\1\uffff\1\154\1\162\1\uffff\2\41\1\154"+
+ "\1\163\1\145\1\164\1\151\1\41\1\163\1\0\1\uffff\1\0\1\uffff\1\0"+
+ "\1\uffff\1\162\1\141\1\165\2\uffff\1\41\1\164\2\41\1\145\1\uffff"+
+ "\1\145\1\41\1\164\1\162\1\154\1\uffff\1\163\2\uffff\1\156\2\41\2"+
+ "\145\1\41\1\143\1\uffff\2\41\1\uffff\1\145\2\uffff\1\41\1\uffff";
static final String DFA19_maxS =
"\1\176\1\155\1\175\1\uffff\1\145\1\162\1\156\1\165\1\170\1\162\1"+
"\141\1\71\1\175\1\uffff\1\141\1\uffff\1\ufffe\1\57\2\uffff\4\175"+
"\3\uffff\1\55\1\175\1\uffff\1\160\1\175\1\uffff\1\146\1\175\1\144"+
- "\1\154\1\164\1\151\1\165\1\163\1\154\1\175\1\71\1\uffff\1\154\1"+
- "\ufffe\1\uffff\2\ufffe\4\uffff\1\175\1\uffff\1\157\1\uffff\1\162"+
- "\1\154\1\uffff\1\175\1\154\1\175\1\163\1\145\1\164\1\151\1\175\1"+
- "\163\1\ufffe\1\uffff\1\ufffe\1\uffff\1\ufffe\1\uffff\1\162\2\165"+
- "\1\141\1\uffff\1\175\1\uffff\1\164\2\175\1\145\1\uffff\1\145\1\175"+
- "\1\164\1\156\1\154\1\162\1\uffff\1\163\2\uffff\1\156\2\175\1\143"+
- "\2\145\1\175\1\143\1\uffff\1\164\2\175\1\uffff\1\145\1\151\2\uffff"+
- "\1\175\1\157\1\uffff\1\156\1\175\1\uffff";
+ "\1\164\1\154\1\151\1\165\1\163\1\154\1\175\1\71\1\uffff\1\154\1"+
+ "\ufffe\1\uffff\2\ufffe\4\uffff\1\175\1\uffff\1\157\1\uffff\1\154"+
+ "\1\162\1\uffff\2\175\1\154\1\163\1\145\1\164\1\151\1\175\1\163\1"+
+ "\ufffe\1\uffff\1\ufffe\1\uffff\1\ufffe\1\uffff\1\162\1\141\1\165"+
+ "\2\uffff\1\175\1\164\2\175\1\145\1\uffff\1\145\1\175\1\164\1\162"+
+ "\1\154\1\uffff\1\163\2\uffff\1\156\2\175\2\145\1\175\1\143\1\uffff"+
+ "\2\175\1\uffff\1\145\2\uffff\1\175\1\uffff";
static final String DFA19_acceptS =
- "\3\uffff\1\3\11\uffff\1\20\1\uffff\1\22\2\uffff\1\25\1\26\4\uffff"+
- "\1\33\1\34\1\35\2\uffff\1\42\2\uffff\1\40\13\uffff\1\16\2\uffff"+
- "\1\23\2\uffff\1\27\1\30\1\31\1\32\1\uffff\1\37\1\uffff\1\2\2\uffff"+
- "\1\6\12\uffff\1\24\1\uffff\1\41\1\uffff\1\36\4\uffff\1\7\1\uffff"+
- "\1\10\4\uffff\1\17\6\uffff\1\13\1\uffff\1\21\1\12\10\uffff\1\1\3"+
- "\uffff\1\11\2\uffff\1\4\1\14\2\uffff\1\15\2\uffff\1\5";
+ "\3\uffff\1\3\11\uffff\1\17\1\uffff\1\21\2\uffff\1\24\1\25\4\uffff"+
+ "\1\32\1\33\1\34\2\uffff\1\41\2\uffff\1\37\13\uffff\1\15\2\uffff"+
+ "\1\22\2\uffff\1\26\1\27\1\30\1\31\1\uffff\1\36\1\uffff\1\2\2\uffff"+
+ "\1\5\12\uffff\1\23\1\uffff\1\40\1\uffff\1\35\3\uffff\1\6\1\7\5\uffff"+
+ "\1\16\5\uffff\1\12\1\uffff\1\20\1\11\7\uffff\1\1\2\uffff\1\10\1"+
+ "\uffff\1\13\1\4\1\uffff\1\14";
static final String DFA19_specialS =
- "\171\uffff}>";
+ "\160\uffff}>";
static final String[] DFA19_transitionS = {
"\2\3\1\uffff\2\3\22\uffff\1\3\1\35\1\15\1\20\2\35\1\31\1\15"+
"\1\22\1\23\3\35\1\13\1\35\1\21\12\14\1\34\1\uffff\1\33\1\2\1"+
@@ -1945,7 +1916,7 @@
"\1\41",
"\1\42",
"\1\43",
- "\1\45\5\uffff\1\44",
+ "\1\44\5\uffff\1\45",
"\1\46",
"\1\50\14\uffff\1\47",
"\1\51",
@@ -1979,7 +1950,7 @@
"\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
"\1\uffff\1\35",
"",
- "\1\73\2\uffff\1\72",
+ "\1\72\2\uffff\1\73",
"\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
"\1\uffff\1\35",
"\1\75",
@@ -2010,85 +1981,75 @@
"",
"\1\114",
"",
- "\1\115\13\uffff\1\116",
- "\1\117",
+ "\1\115",
+ "\1\116",
"",
"\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
"\1\uffff\1\35",
- "\1\121",
"\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
"\1\uffff\1\35",
+ "\1\121",
+ "\1\122",
"\1\123",
"\1\124",
"\1\125",
- "\1\126",
"\1\35\1\uffff\3\35\4\uffff\6\35\12\104\1\35\2\uffff\43\35\1"+
"\uffff\33\35\1\uffff\1\35",
- "\1\130",
+ "\1\127",
"\41\107\1\106\1\107\3\106\4\107\21\106\2\107\43\106\1\107\33"+
"\106\1\107\1\106\uff81\107",
"",
- "\41\111\1\112\1\111\3\112\4\111\1\110\4\112\1\131\13\112\2\111"+
+ "\41\111\1\112\1\111\3\112\4\111\1\110\4\112\1\130\13\112\2\111"+
"\43\112\1\111\33\112\1\111\1\112\uff81\111",
"",
"\41\111\1\112\1\111\3\112\4\111\1\110\20\112\2\111\43\112\1"+
"\111\33\112\1\111\1\112\uff81\111",
"",
+ "\1\131",
"\1\132",
"\1\133",
- "\1\134",
- "\1\135",
"",
+ "",
"\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
"\1\uffff\1\35",
- "",
- "\1\137",
+ "\1\135",
"\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
"\1\uffff\1\35",
"\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
"\1\uffff\1\35",
- "\1\142",
+ "\1\140",
"",
- "\1\143",
+ "\1\141",
"\1\112\1\uffff\3\112\4\uffff\1\110\20\112\2\uffff\43\112\1\uffff"+
"\33\112\1\uffff\1\112",
+ "\1\142",
+ "\1\143",
"\1\144",
+ "",
"\1\145",
- "\1\146",
- "\1\147",
"",
- "\1\150",
"",
- "",
- "\1\151",
+ "\1\146",
"\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
"\1\uffff\1\35",
"\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
"\1\uffff\1\35",
- "\1\153",
- "\1\154",
- "\1\155",
+ "\1\150",
+ "\1\151",
"\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
"\1\uffff\1\35",
- "\1\157",
+ "\1\153",
"",
- "\1\160",
"\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
"\1\uffff\1\35",
"\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
"\1\uffff\1\35",
"",
- "\1\163",
- "\1\164",
+ "\1\156",
"",
"",
"\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
"\1\uffff\1\35",
- "\1\166",
- "",
- "\1\167",
- "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
- "\1\uffff\1\35",
""
};
@@ -2122,7 +2083,7 @@
this.transition = DFA19_transition;
}
public String getDescription() {
- return "1:1: Tokens : ( T44 | T45 | WS | DEFRULE | DEFFUNCTION | OR | AND | NOT | EXISTS | TEST | NULL | DECLARE | SALIENCE | INT | FLOAT | STRING | BOOL | VAR | SH_STYLE_SINGLE_LINE_COMMENT | C_STYLE_SINGLE_LINE_COMMENT | LEFT_PAREN | RIGHT_PAREN | LEFT_SQUARE | RIGHT_SQUARE | LEFT_CURLY | RIGHT_CURLY | TILDE | AMPERSAND | PIPE | ASSIGN_OP | COLON | EQUALS | MULTI_LINE_COMMENT | NAME );";
+ return "1:1: Tokens : ( T43 | T44 | WS | DEFRULE | OR | AND | NOT | EXISTS | TEST | NULL | DECLARE | SALIENCE | INT | FLOAT | STRING | BOOL | VAR | SH_STYLE_SINGLE_LINE_COMMENT | C_STYLE_SINGLE_LINE_COMMENT | LEFT_PAREN | RIGHT_PAREN | LEFT_SQUARE | RIGHT_SQUARE | LEFT_CURLY | RIGHT_CURLY | TILDE | AMPERSAND | PIPE | ASSIGN_OP | COLON | EQUALS | MULTI_LINE_COMMENT | NAME );";
}
}
Modified: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/CLPMVELParser.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/CLPMVELParser.java 2008-01-26 12:42:49 UTC (rev 18147)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/CLPMVELParser.java 2008-01-26 18:06:51 UTC (rev 18148)
@@ -1,4 +1,4 @@
-// $ANTLR 3.0.1 C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g 2008-01-25 00:37:25
+// $ANTLR 3.0.1 C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g 2008-01-26 17:55:37
package org.drools.clp;
@@ -24,53 +24,52 @@
import java.util.HashMap;
public class CLPMVELParser extends Parser {
public static final String[] tokenNames = new String[] {
- "<invalid>", "<EOR>", "<DOWN>", "<UP>", "LEFT_PAREN", "NAME", "RIGHT_PAREN", "DEFFUNCTION", "VAR", "DEFRULE", "STRING", "SALIENCE", "INT", "AND", "OR", "NOT", "EXISTS", "TEST", "ASSIGN_OP", "PIPE", "AMPERSAND", "TILDE", "COLON", "EQUALS", "FLOAT", "BOOL", "NULL", "EOL", "WS", "DECLARE", "EscapeSequence", "HexDigit", "UnicodeEscape", "OctalEscape", "SYMBOL_CHAR", "SH_STYLE_SINGLE_LINE_COMMENT", "C_STYLE_SINGLE_LINE_COMMENT", "LEFT_SQUARE", "RIGHT_SQUARE", "LEFT_CURLY", "RIGHT_CURLY", "MULTI_LINE_COMMENT", "SYMBOL", "FIRST_SYMBOL_CHAR", "'import'", "'=>'"
+ "<invalid>", "<EOR>", "<DOWN>", "<UP>", "LEFT_PAREN", "NAME", "RIGHT_PAREN", "DEFRULE", "STRING", "SALIENCE", "INT", "AND", "OR", "NOT", "EXISTS", "TEST", "VAR", "ASSIGN_OP", "PIPE", "AMPERSAND", "TILDE", "COLON", "EQUALS", "FLOAT", "BOOL", "NULL", "EOL", "WS", "DECLARE", "EscapeSequence", "HexDigit", "UnicodeEscape", "OctalEscape", "SYMBOL_CHAR", "SH_STYLE_SINGLE_LINE_COMMENT", "C_STYLE_SINGLE_LINE_COMMENT", "LEFT_SQUARE", "RIGHT_SQUARE", "LEFT_CURLY", "RIGHT_CURLY", "MULTI_LINE_COMMENT", "SYMBOL", "FIRST_SYMBOL_CHAR", "'import'", "'=>'"
};
- public static final int RIGHT_SQUARE=38;
- public static final int RIGHT_CURLY=40;
- public static final int EQUALS=23;
- public static final int FLOAT=24;
- public static final int NOT=15;
- public static final int SYMBOL_CHAR=34;
- public static final int SH_STYLE_SINGLE_LINE_COMMENT=35;
- public static final int AND=13;
+ public static final int RIGHT_SQUARE=37;
+ public static final int RIGHT_CURLY=39;
+ public static final int SYMBOL=41;
+ public static final int NULL=25;
+ public static final int BOOL=24;
+ public static final int SALIENCE=9;
+ public static final int AMPERSAND=19;
+ public static final int FLOAT=23;
+ public static final int EQUALS=22;
+ public static final int INT=10;
+ public static final int SH_STYLE_SINGLE_LINE_COMMENT=34;
+ public static final int SYMBOL_CHAR=33;
+ public static final int NOT=13;
+ public static final int AND=11;
+ public static final int FIRST_SYMBOL_CHAR=42;
public static final int EOF=-1;
- public static final int FIRST_SYMBOL_CHAR=43;
- public static final int HexDigit=31;
- public static final int DEFFUNCTION=7;
- public static final int ASSIGN_OP=18;
+ public static final int HexDigit=30;
+ public static final int MULTI_LINE_COMMENT=40;
+ public static final int COLON=21;
+ public static final int ASSIGN_OP=17;
public static final int RIGHT_PAREN=6;
public static final int NAME=5;
- public static final int EOL=27;
- public static final int DEFRULE=9;
- public static final int TILDE=21;
- public static final int PIPE=19;
- public static final int VAR=8;
- public static final int EXISTS=16;
- public static final int SYMBOL=42;
- public static final int NULL=26;
- public static final int BOOL=25;
- public static final int SALIENCE=11;
- public static final int AMPERSAND=20;
- public static final int INT=12;
- public static final int MULTI_LINE_COMMENT=41;
- public static final int COLON=22;
- public static final int WS=28;
- public static final int UnicodeEscape=32;
- public static final int LEFT_CURLY=39;
- public static final int OR=14;
- public static final int TEST=17;
+ public static final int WS=27;
+ public static final int EOL=26;
+ public static final int UnicodeEscape=31;
+ public static final int LEFT_CURLY=38;
+ public static final int DEFRULE=7;
+ public static final int OR=12;
+ public static final int TILDE=20;
+ public static final int TEST=15;
public static final int LEFT_PAREN=4;
- public static final int DECLARE=29;
- public static final int LEFT_SQUARE=37;
- public static final int EscapeSequence=30;
- public static final int OctalEscape=33;
- public static final int C_STYLE_SINGLE_LINE_COMMENT=36;
- public static final int STRING=10;
+ public static final int DECLARE=28;
+ public static final int PIPE=18;
+ public static final int VAR=16;
+ public static final int EXISTS=14;
+ public static final int LEFT_SQUARE=36;
+ public static final int OctalEscape=32;
+ public static final int EscapeSequence=29;
+ public static final int C_STYLE_SINGLE_LINE_COMMENT=35;
+ public static final int STRING=8;
public CLPMVELParser(TokenStream input) {
super(input);
- ruleMemo = new HashMap[30+1];
+ ruleMemo = new HashMap[26+1];
}
@@ -231,110 +230,15 @@
// $ANTLR start eval_script
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:228:1: eval_script[Shell shell] : (i= importDescr | r= defrule | fc= lisp_list[shell, new LispForm(shell) ] )* ;
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:228:1: eval_script[Shell shell] : ;
public final void eval_script(Shell shell) throws RecognitionException {
- ImportDescr i = null;
-
- RuleDescr r = null;
-
- ValueHandler fc = null;
-
-
try {
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:229:2: ( (i= importDescr | r= defrule | fc= lisp_list[shell, new LispForm(shell) ] )* )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:229:4: (i= importDescr | r= defrule | fc= lisp_list[shell, new LispForm(shell) ] )*
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:229:2: ()
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:234:2:
{
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:229:4: (i= importDescr | r= defrule | fc= lisp_list[shell, new LispForm(shell) ] )*
- loop1:
- do {
- int alt1=4;
- int LA1_0 = input.LA(1);
-
- if ( (LA1_0==LEFT_PAREN) ) {
- switch ( input.LA(2) ) {
- case DEFRULE:
- {
- alt1=2;
- }
- break;
- case 44:
- {
- alt1=1;
- }
- break;
- case LEFT_PAREN:
- case NAME:
- case RIGHT_PAREN:
- case VAR:
- case STRING:
- case INT:
- case FLOAT:
- case BOOL:
- case NULL:
- {
- alt1=3;
- }
- break;
-
- }
-
- }
-
-
- switch (alt1) {
- case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:229:9: i= importDescr
- {
- pushFollow(FOLLOW_importDescr_in_eval_script55);
- i=importDescr();
- _fsp--;
- if (failed) return ;
- if ( backtracking==0 ) {
- shell.importDescrHandler( i );
- }
-
- }
- break;
- case 2 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:230:7: r= defrule
- {
- pushFollow(FOLLOW_defrule_in_eval_script66);
- r=defrule();
- _fsp--;
- if (failed) return ;
- if ( backtracking==0 ) {
- shell.ruleDescrHandler( r );
- }
-
- }
- break;
- case 3 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:232:7: fc= lisp_list[shell, new LispForm(shell) ]
- {
- pushFollow(FOLLOW_lisp_list_in_eval_script83);
- fc=lisp_list(shell, new LispForm(shell) );
- _fsp--;
- if (failed) return ;
- if ( backtracking==0 ) {
- shell.lispFormHandler(fc);
- }
-
- }
- break;
-
- default :
- break loop1;
- }
- } while (true);
-
-
}
}
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
finally {
}
return ;
@@ -353,14 +257,14 @@
// C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:237:2: ( LEFT_PAREN 'import' importName= NAME RIGHT_PAREN )
// C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:237:4: LEFT_PAREN 'import' importName= NAME RIGHT_PAREN
{
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_importDescr106); if (failed) return importDescr;
- match(input,44,FOLLOW_44_in_importDescr108); if (failed) return importDescr;
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_importDescr63); if (failed) return importDescr;
+ match(input,43,FOLLOW_43_in_importDescr65); if (failed) return importDescr;
importName=(Token)input.LT(1);
- match(input,NAME,FOLLOW_NAME_in_importDescr112); if (failed) return importDescr;
+ match(input,NAME,FOLLOW_NAME_in_importDescr69); if (failed) return importDescr;
if ( backtracking==0 ) {
importDescr = new ImportDescr( importName.getText() );
}
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_importDescr115); if (failed) return importDescr;
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_importDescr72); if (failed) return importDescr;
}
@@ -376,126 +280,15 @@
// $ANTLR end importDescr
- // $ANTLR start deffunction
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:252:1: deffunction returns [Deffunction function] : loc= LEFT_PAREN DEFFUNCTION ruleName= NAME loc= LEFT_PAREN (v= VAR )* RIGHT_PAREN (fc= lisp_list[context, new LispForm(context) ] )* RIGHT_PAREN ;
- public final Deffunction deffunction() throws RecognitionException {
- Deffunction function = null;
-
- Token loc=null;
- Token ruleName=null;
- Token v=null;
- ValueHandler fc = null;
-
-
-
- BuildContext context = null;
-
- try {
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:256:2: (loc= LEFT_PAREN DEFFUNCTION ruleName= NAME loc= LEFT_PAREN (v= VAR )* RIGHT_PAREN (fc= lisp_list[context, new LispForm(context) ] )* RIGHT_PAREN )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:256:4: loc= LEFT_PAREN DEFFUNCTION ruleName= NAME loc= LEFT_PAREN (v= VAR )* RIGHT_PAREN (fc= lisp_list[context, new LispForm(context) ] )* RIGHT_PAREN
- {
- loc=(Token)input.LT(1);
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_deffunction141); if (failed) return function;
- match(input,DEFFUNCTION,FOLLOW_DEFFUNCTION_in_deffunction149); if (failed) return function;
- ruleName=(Token)input.LT(1);
- match(input,NAME,FOLLOW_NAME_in_deffunction158); if (failed) return function;
- if ( backtracking==0 ) {
-
- function = new Deffunction( ruleName.getText() );
- functionRegistry.addFunction( function );
- context = new ExecutionBuildContext( function, functionRegistry );
-
- }
- loc=(Token)input.LT(1);
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_deffunction166); if (failed) return function;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:264:4: (v= VAR )*
- loop2:
- do {
- int alt2=2;
- int LA2_0 = input.LA(1);
-
- if ( (LA2_0==VAR) ) {
- alt2=1;
- }
-
-
- switch (alt2) {
- case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:264:5: v= VAR
- {
- v=(Token)input.LT(1);
- match(input,VAR,FOLLOW_VAR_in_deffunction176); if (failed) return function;
- if ( backtracking==0 ) {
-
- context.addVariable( function.addParameter( v.getText() ) );
-
- }
-
- }
- break;
-
- default :
- break loop2;
- }
- } while (true);
-
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_deffunction189); if (failed) return function;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:268:5: (fc= lisp_list[context, new LispForm(context) ] )*
- loop3:
- do {
- int alt3=2;
- int LA3_0 = input.LA(1);
-
- if ( (LA3_0==LEFT_PAREN) ) {
- alt3=1;
- }
-
-
- switch (alt3) {
- case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:268:6: fc= lisp_list[context, new LispForm(context) ]
- {
- pushFollow(FOLLOW_lisp_list_in_deffunction198);
- fc=lisp_list(context, new LispForm(context) );
- _fsp--;
- if (failed) return function;
- if ( backtracking==0 ) {
- context.addFunction( (FunctionCaller) fc );
- }
-
- }
- break;
-
- default :
- break loop3;
- }
- } while (true);
-
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_deffunction209); if (failed) return function;
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return function;
- }
- // $ANTLR end deffunction
-
-
// $ANTLR start defrule
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:282:1: defrule returns [RuleDescr rule] : loc= LEFT_PAREN DEFRULE ruleName= NAME documentation= STRING ruleAttribute[rule] ( ce[lhs, declarations] )* '=>' engine= execution_block RIGHT_PAREN ;
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:284:1: defrule returns [RuleDescr rule] : loc= LEFT_PAREN DEFRULE ruleName= NAME documentation= STRING ruleAttribute[rule] ( ce[lhs, declarations] )* '=>' t= lisp_list RIGHT_PAREN ;
public final RuleDescr defrule() throws RecognitionException {
RuleDescr rule = null;
Token loc=null;
Token ruleName=null;
Token documentation=null;
- ExecutionEngine engine = null;
+ SExpression t = null;
@@ -506,14 +299,14 @@
Set declarations = null;
try {
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:290:2: (loc= LEFT_PAREN DEFRULE ruleName= NAME documentation= STRING ruleAttribute[rule] ( ce[lhs, declarations] )* '=>' engine= execution_block RIGHT_PAREN )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:290:4: loc= LEFT_PAREN DEFRULE ruleName= NAME documentation= STRING ruleAttribute[rule] ( ce[lhs, declarations] )* '=>' engine= execution_block RIGHT_PAREN
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:292:2: (loc= LEFT_PAREN DEFRULE ruleName= NAME documentation= STRING ruleAttribute[rule] ( ce[lhs, declarations] )* '=>' t= lisp_list RIGHT_PAREN )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:292:4: loc= LEFT_PAREN DEFRULE ruleName= NAME documentation= STRING ruleAttribute[rule] ( ce[lhs, declarations] )* '=>' t= lisp_list RIGHT_PAREN
{
loc=(Token)input.LT(1);
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_defrule235); if (failed) return rule;
- match(input,DEFRULE,FOLLOW_DEFRULE_in_defrule243); if (failed) return rule;
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_defrule106); if (failed) return rule;
+ match(input,DEFRULE,FOLLOW_DEFRULE_in_defrule114); if (failed) return rule;
ruleName=(Token)input.LT(1);
- match(input,NAME,FOLLOW_NAME_in_defrule247); if (failed) return rule;
+ match(input,NAME,FOLLOW_NAME_in_defrule118); if (failed) return rule;
if ( backtracking==0 ) {
debug( "start rule: " + ruleName.getText() );
@@ -548,32 +341,32 @@
}
documentation=(Token)input.LT(1);
- match(input,STRING,FOLLOW_STRING_in_defrule259); if (failed) return rule;
+ match(input,STRING,FOLLOW_STRING_in_defrule130); if (failed) return rule;
if ( backtracking==0 ) {
// do nothing here for now
}
- pushFollow(FOLLOW_ruleAttribute_in_defrule265);
+ pushFollow(FOLLOW_ruleAttribute_in_defrule136);
ruleAttribute(rule);
_fsp--;
if (failed) return rule;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:329:3: ( ce[lhs, declarations] )*
- loop4:
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:331:3: ( ce[lhs, declarations] )*
+ loop1:
do {
- int alt4=2;
- int LA4_0 = input.LA(1);
+ int alt1=2;
+ int LA1_0 = input.LA(1);
- if ( (LA4_0==LEFT_PAREN||LA4_0==VAR) ) {
- alt4=1;
+ if ( (LA1_0==LEFT_PAREN||LA1_0==VAR) ) {
+ alt1=1;
}
- switch (alt4) {
+ switch (alt1) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:329:3: ce[lhs, declarations]
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:331:3: ce[lhs, declarations]
{
- pushFollow(FOLLOW_ce_in_defrule273);
+ pushFollow(FOLLOW_ce_in_defrule144);
ce(lhs, declarations);
_fsp--;
if (failed) return rule;
@@ -582,19 +375,19 @@
break;
default :
- break loop4;
+ break loop1;
}
} while (true);
- match(input,45,FOLLOW_45_in_defrule282); if (failed) return rule;
- pushFollow(FOLLOW_execution_block_in_defrule291);
- engine=execution_block();
+ match(input,44,FOLLOW_44_in_defrule153); if (failed) return rule;
+ pushFollow(FOLLOW_lisp_list_in_defrule162);
+ t=lisp_list();
_fsp--;
if (failed) return rule;
if ( backtracking==0 ) {
- rule.setConsequence( engine );
+ rule.setConsequence( t );
}
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_defrule300); if (failed) return rule;
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_defrule171); if (failed) return rule;
}
@@ -611,59 +404,59 @@
// $ANTLR start ruleAttribute
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:339:1: ruleAttribute[RuleDescr rule] : ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )? ;
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:341:1: ruleAttribute[RuleDescr rule] : ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )? ;
public final void ruleAttribute(RuleDescr rule) throws RecognitionException {
AttributeDescr d = null;
try {
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:340:2: ( ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )? )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:341:3: ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )?
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:342:2: ( ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )? )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:343:3: ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )?
{
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:341:3: ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )?
- int alt6=2;
- int LA6_0 = input.LA(1);
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:343:3: ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )?
+ int alt3=2;
+ int LA3_0 = input.LA(1);
- if ( (LA6_0==LEFT_PAREN) ) {
- int LA6_1 = input.LA(2);
+ if ( (LA3_0==LEFT_PAREN) ) {
+ int LA3_1 = input.LA(2);
- if ( (LA6_1==DECLARE) ) {
- alt6=1;
+ if ( (LA3_1==DECLARE) ) {
+ alt3=1;
}
}
- switch (alt6) {
+ switch (alt3) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:341:5: LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:343:5: LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN
{
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_ruleAttribute317); if (failed) return ;
- match(input,DECLARE,FOLLOW_DECLARE_in_ruleAttribute319); if (failed) return ;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:342:4: ( LEFT_PAREN d= salience RIGHT_PAREN )?
- int alt5=2;
- int LA5_0 = input.LA(1);
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_ruleAttribute188); if (failed) return ;
+ match(input,DECLARE,FOLLOW_DECLARE_in_ruleAttribute190); if (failed) return ;
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:344:4: ( LEFT_PAREN d= salience RIGHT_PAREN )?
+ int alt2=2;
+ int LA2_0 = input.LA(1);
- if ( (LA5_0==LEFT_PAREN) ) {
- alt5=1;
+ if ( (LA2_0==LEFT_PAREN) ) {
+ alt2=1;
}
- switch (alt5) {
+ switch (alt2) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:342:6: LEFT_PAREN d= salience RIGHT_PAREN
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:344:6: LEFT_PAREN d= salience RIGHT_PAREN
{
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_ruleAttribute326); if (failed) return ;
- pushFollow(FOLLOW_salience_in_ruleAttribute330);
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_ruleAttribute197); if (failed) return ;
+ pushFollow(FOLLOW_salience_in_ruleAttribute201);
d=salience();
_fsp--;
if (failed) return ;
if ( backtracking==0 ) {
rule.addAttribute( d );
}
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_ruleAttribute334); if (failed) return ;
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_ruleAttribute205); if (failed) return ;
}
break;
}
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_ruleAttribute341); if (failed) return ;
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_ruleAttribute212); if (failed) return ;
}
break;
@@ -686,7 +479,7 @@
// $ANTLR start salience
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:346:1: salience returns [AttributeDescr d ] : loc= SALIENCE i= INT ;
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:348:1: salience returns [AttributeDescr d ] : loc= SALIENCE i= INT ;
public final AttributeDescr salience() throws RecognitionException {
AttributeDescr d = null;
@@ -697,13 +490,13 @@
d = null;
try {
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:350:2: (loc= SALIENCE i= INT )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:351:3: loc= SALIENCE i= INT
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:352:2: (loc= SALIENCE i= INT )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:353:3: loc= SALIENCE i= INT
{
loc=(Token)input.LT(1);
- match(input,SALIENCE,FOLLOW_SALIENCE_in_salience371); if (failed) return d;
+ match(input,SALIENCE,FOLLOW_SALIENCE_in_salience242); if (failed) return d;
i=(Token)input.LT(1);
- match(input,INT,FOLLOW_INT_in_salience375); if (failed) return d;
+ match(input,INT,FOLLOW_INT_in_salience246); if (failed) return d;
if ( backtracking==0 ) {
d = new AttributeDescr( "salience", i.getText() );
@@ -728,72 +521,72 @@
// $ANTLR start ce
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:361:1: ce[ConditionalElementDescr in_ce, Set declarations] : ( and_ce[in_ce, declarations] | or_ce[in_ce, declarations] | not_ce[in_ce, declarations] | exists_ce[in_ce, declarations] | eval_ce[in_ce, declarations] | normal_pattern[in_ce, declarations] | bound_pattern[in_ce, declarations] ) ;
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:363:1: ce[ConditionalElementDescr in_ce, Set declarations] : ( and_ce[in_ce, declarations] | or_ce[in_ce, declarations] | not_ce[in_ce, declarations] | exists_ce[in_ce, declarations] | eval_ce[in_ce, declarations] | normal_pattern[in_ce, declarations] | bound_pattern[in_ce, declarations] ) ;
public final void ce(ConditionalElementDescr in_ce, Set declarations) throws RecognitionException {
try {
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:362:2: ( ( and_ce[in_ce, declarations] | or_ce[in_ce, declarations] | not_ce[in_ce, declarations] | exists_ce[in_ce, declarations] | eval_ce[in_ce, declarations] | normal_pattern[in_ce, declarations] | bound_pattern[in_ce, declarations] ) )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:362:4: ( and_ce[in_ce, declarations] | or_ce[in_ce, declarations] | not_ce[in_ce, declarations] | exists_ce[in_ce, declarations] | eval_ce[in_ce, declarations] | normal_pattern[in_ce, declarations] | bound_pattern[in_ce, declarations] )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:364:2: ( ( and_ce[in_ce, declarations] | or_ce[in_ce, declarations] | not_ce[in_ce, declarations] | exists_ce[in_ce, declarations] | eval_ce[in_ce, declarations] | normal_pattern[in_ce, declarations] | bound_pattern[in_ce, declarations] ) )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:364:4: ( and_ce[in_ce, declarations] | or_ce[in_ce, declarations] | not_ce[in_ce, declarations] | exists_ce[in_ce, declarations] | eval_ce[in_ce, declarations] | normal_pattern[in_ce, declarations] | bound_pattern[in_ce, declarations] )
{
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:362:4: ( and_ce[in_ce, declarations] | or_ce[in_ce, declarations] | not_ce[in_ce, declarations] | exists_ce[in_ce, declarations] | eval_ce[in_ce, declarations] | normal_pattern[in_ce, declarations] | bound_pattern[in_ce, declarations] )
- int alt7=7;
- int LA7_0 = input.LA(1);
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:364:4: ( and_ce[in_ce, declarations] | or_ce[in_ce, declarations] | not_ce[in_ce, declarations] | exists_ce[in_ce, declarations] | eval_ce[in_ce, declarations] | normal_pattern[in_ce, declarations] | bound_pattern[in_ce, declarations] )
+ int alt4=7;
+ int LA4_0 = input.LA(1);
- if ( (LA7_0==LEFT_PAREN) ) {
+ if ( (LA4_0==LEFT_PAREN) ) {
switch ( input.LA(2) ) {
- case NAME:
+ case NOT:
{
- alt7=6;
+ alt4=3;
}
break;
- case TEST:
+ case OR:
{
- alt7=5;
+ alt4=2;
}
break;
- case AND:
+ case TEST:
{
- alt7=1;
+ alt4=5;
}
break;
- case EXISTS:
+ case NAME:
{
- alt7=4;
+ alt4=6;
}
break;
- case NOT:
+ case EXISTS:
{
- alt7=3;
+ alt4=4;
}
break;
- case OR:
+ case AND:
{
- alt7=2;
+ alt4=1;
}
break;
default:
if (backtracking>0) {failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("362:4: ( and_ce[in_ce, declarations] | or_ce[in_ce, declarations] | not_ce[in_ce, declarations] | exists_ce[in_ce, declarations] | eval_ce[in_ce, declarations] | normal_pattern[in_ce, declarations] | bound_pattern[in_ce, declarations] )", 7, 1, input);
+ new NoViableAltException("364:4: ( and_ce[in_ce, declarations] | or_ce[in_ce, declarations] | not_ce[in_ce, declarations] | exists_ce[in_ce, declarations] | eval_ce[in_ce, declarations] | normal_pattern[in_ce, declarations] | bound_pattern[in_ce, declarations] )", 4, 1, input);
throw nvae;
}
}
- else if ( (LA7_0==VAR) ) {
- alt7=7;
+ else if ( (LA4_0==VAR) ) {
+ alt4=7;
}
else {
if (backtracking>0) {failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("362:4: ( and_ce[in_ce, declarations] | or_ce[in_ce, declarations] | not_ce[in_ce, declarations] | exists_ce[in_ce, declarations] | eval_ce[in_ce, declarations] | normal_pattern[in_ce, declarations] | bound_pattern[in_ce, declarations] )", 7, 0, input);
+ new NoViableAltException("364:4: ( and_ce[in_ce, declarations] | or_ce[in_ce, declarations] | not_ce[in_ce, declarations] | exists_ce[in_ce, declarations] | eval_ce[in_ce, declarations] | normal_pattern[in_ce, declarations] | bound_pattern[in_ce, declarations] )", 4, 0, input);
throw nvae;
}
- switch (alt7) {
+ switch (alt4) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:362:8: and_ce[in_ce, declarations]
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:364:8: and_ce[in_ce, declarations]
{
- pushFollow(FOLLOW_and_ce_in_ce401);
+ pushFollow(FOLLOW_and_ce_in_ce272);
and_ce(in_ce, declarations);
_fsp--;
if (failed) return ;
@@ -801,9 +594,9 @@
}
break;
case 2 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:363:7: or_ce[in_ce, declarations]
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:365:7: or_ce[in_ce, declarations]
{
- pushFollow(FOLLOW_or_ce_in_ce411);
+ pushFollow(FOLLOW_or_ce_in_ce282);
or_ce(in_ce, declarations);
_fsp--;
if (failed) return ;
@@ -811,9 +604,9 @@
}
break;
case 3 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:364:7: not_ce[in_ce, declarations]
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:366:7: not_ce[in_ce, declarations]
{
- pushFollow(FOLLOW_not_ce_in_ce420);
+ pushFollow(FOLLOW_not_ce_in_ce291);
not_ce(in_ce, declarations);
_fsp--;
if (failed) return ;
@@ -821,9 +614,9 @@
}
break;
case 4 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:365:7: exists_ce[in_ce, declarations]
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:367:7: exists_ce[in_ce, declarations]
{
- pushFollow(FOLLOW_exists_ce_in_ce429);
+ pushFollow(FOLLOW_exists_ce_in_ce300);
exists_ce(in_ce, declarations);
_fsp--;
if (failed) return ;
@@ -831,9 +624,9 @@
}
break;
case 5 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:366:8: eval_ce[in_ce, declarations]
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:368:8: eval_ce[in_ce, declarations]
{
- pushFollow(FOLLOW_eval_ce_in_ce443);
+ pushFollow(FOLLOW_eval_ce_in_ce314);
eval_ce(in_ce, declarations);
_fsp--;
if (failed) return ;
@@ -841,9 +634,9 @@
}
break;
case 6 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:367:7: normal_pattern[in_ce, declarations]
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:369:7: normal_pattern[in_ce, declarations]
{
- pushFollow(FOLLOW_normal_pattern_in_ce457);
+ pushFollow(FOLLOW_normal_pattern_in_ce328);
normal_pattern(in_ce, declarations);
_fsp--;
if (failed) return ;
@@ -851,9 +644,9 @@
}
break;
case 7 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:368:7: bound_pattern[in_ce, declarations]
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:370:7: bound_pattern[in_ce, declarations]
{
- pushFollow(FOLLOW_bound_pattern_in_ce466);
+ pushFollow(FOLLOW_bound_pattern_in_ce337);
bound_pattern(in_ce, declarations);
_fsp--;
if (failed) return ;
@@ -878,103 +671,41 @@
// $ANTLR end ce
- // $ANTLR start execution_block
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:372:1: execution_block returns [ExecutionEngine engine] : (fc= lisp_list[context, new LispForm(context) ] )* ;
- public final ExecutionEngine execution_block() throws RecognitionException {
- ExecutionEngine engine = null;
-
- ValueHandler fc = null;
-
-
-
- engine = new BlockExecutionEngine();
- BuildContext context = new ExecutionBuildContext( engine, functionRegistry );
-
- try {
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:378:2: ( (fc= lisp_list[context, new LispForm(context) ] )* )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:379:3: (fc= lisp_list[context, new LispForm(context) ] )*
- {
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:379:3: (fc= lisp_list[context, new LispForm(context) ] )*
- loop8:
- do {
- int alt8=2;
- int LA8_0 = input.LA(1);
-
- if ( (LA8_0==LEFT_PAREN) ) {
- alt8=1;
- }
-
-
- switch (alt8) {
- case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:379:4: fc= lisp_list[context, new LispForm(context) ]
- {
- pushFollow(FOLLOW_lisp_list_in_execution_block498);
- fc=lisp_list(context, new LispForm(context) );
- _fsp--;
- if (failed) return engine;
- if ( backtracking==0 ) {
- context.addFunction( (FunctionCaller) fc );
- }
-
- }
- break;
-
- default :
- break loop8;
- }
- } while (true);
-
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return engine;
- }
- // $ANTLR end execution_block
-
-
// $ANTLR start and_ce
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:382:1: and_ce[ConditionalElementDescr in_ce, Set declarations] : LEFT_PAREN AND ( ce[andDescr, declarations] )+ RIGHT_PAREN ;
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:374:1: and_ce[ConditionalElementDescr in_ce, Set declarations] : LEFT_PAREN AND ( ce[andDescr, declarations] )+ RIGHT_PAREN ;
public final void and_ce(ConditionalElementDescr in_ce, Set declarations) throws RecognitionException {
AndDescr andDescr= null;
try {
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:386:2: ( LEFT_PAREN AND ( ce[andDescr, declarations] )+ RIGHT_PAREN )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:386:4: LEFT_PAREN AND ( ce[andDescr, declarations] )+ RIGHT_PAREN
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:378:2: ( LEFT_PAREN AND ( ce[andDescr, declarations] )+ RIGHT_PAREN )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:378:4: LEFT_PAREN AND ( ce[andDescr, declarations] )+ RIGHT_PAREN
{
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_and_ce526); if (failed) return ;
- match(input,AND,FOLLOW_AND_in_and_ce531); if (failed) return ;
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_and_ce364); if (failed) return ;
+ match(input,AND,FOLLOW_AND_in_and_ce369); if (failed) return ;
if ( backtracking==0 ) {
andDescr = new AndDescr();
in_ce.addDescr( andDescr );
}
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:391:3: ( ce[andDescr, declarations] )+
- int cnt9=0;
- loop9:
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:383:3: ( ce[andDescr, declarations] )+
+ int cnt5=0;
+ loop5:
do {
- int alt9=2;
- int LA9_0 = input.LA(1);
+ int alt5=2;
+ int LA5_0 = input.LA(1);
- if ( (LA9_0==LEFT_PAREN||LA9_0==VAR) ) {
- alt9=1;
+ if ( (LA5_0==LEFT_PAREN||LA5_0==VAR) ) {
+ alt5=1;
}
- switch (alt9) {
+ switch (alt5) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:391:3: ce[andDescr, declarations]
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:383:3: ce[andDescr, declarations]
{
- pushFollow(FOLLOW_ce_in_and_ce537);
+ pushFollow(FOLLOW_ce_in_and_ce375);
ce(andDescr, declarations);
_fsp--;
if (failed) return ;
@@ -983,16 +714,16 @@
break;
default :
- if ( cnt9 >= 1 ) break loop9;
+ if ( cnt5 >= 1 ) break loop5;
if (backtracking>0) {failed=true; return ;}
EarlyExitException eee =
- new EarlyExitException(9, input);
+ new EarlyExitException(5, input);
throw eee;
}
- cnt9++;
+ cnt5++;
} while (true);
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_and_ce546); if (failed) return ;
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_and_ce384); if (failed) return ;
}
@@ -1009,40 +740,40 @@
// $ANTLR start or_ce
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:395:1: or_ce[ConditionalElementDescr in_ce, Set declarations] : LEFT_PAREN OR ( ce[orDescr, declarations] )+ RIGHT_PAREN ;
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:387:1: or_ce[ConditionalElementDescr in_ce, Set declarations] : LEFT_PAREN OR ( ce[orDescr, declarations] )+ RIGHT_PAREN ;
public final void or_ce(ConditionalElementDescr in_ce, Set declarations) throws RecognitionException {
OrDescr orDescr= null;
try {
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:399:2: ( LEFT_PAREN OR ( ce[orDescr, declarations] )+ RIGHT_PAREN )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:399:4: LEFT_PAREN OR ( ce[orDescr, declarations] )+ RIGHT_PAREN
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:391:2: ( LEFT_PAREN OR ( ce[orDescr, declarations] )+ RIGHT_PAREN )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:391:4: LEFT_PAREN OR ( ce[orDescr, declarations] )+ RIGHT_PAREN
{
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_or_ce574); if (failed) return ;
- match(input,OR,FOLLOW_OR_in_or_ce579); if (failed) return ;
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_or_ce412); if (failed) return ;
+ match(input,OR,FOLLOW_OR_in_or_ce417); if (failed) return ;
if ( backtracking==0 ) {
orDescr = new OrDescr();
in_ce.addDescr( orDescr );
}
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:404:3: ( ce[orDescr, declarations] )+
- int cnt10=0;
- loop10:
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:396:3: ( ce[orDescr, declarations] )+
+ int cnt6=0;
+ loop6:
do {
- int alt10=2;
- int LA10_0 = input.LA(1);
+ int alt6=2;
+ int LA6_0 = input.LA(1);
- if ( (LA10_0==LEFT_PAREN||LA10_0==VAR) ) {
- alt10=1;
+ if ( (LA6_0==LEFT_PAREN||LA6_0==VAR) ) {
+ alt6=1;
}
- switch (alt10) {
+ switch (alt6) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:404:3: ce[orDescr, declarations]
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:396:3: ce[orDescr, declarations]
{
- pushFollow(FOLLOW_ce_in_or_ce585);
+ pushFollow(FOLLOW_ce_in_or_ce423);
ce(orDescr, declarations);
_fsp--;
if (failed) return ;
@@ -1051,16 +782,16 @@
break;
default :
- if ( cnt10 >= 1 ) break loop10;
+ if ( cnt6 >= 1 ) break loop6;
if (backtracking>0) {failed=true; return ;}
EarlyExitException eee =
- new EarlyExitException(10, input);
+ new EarlyExitException(6, input);
throw eee;
}
- cnt10++;
+ cnt6++;
} while (true);
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_or_ce594); if (failed) return ;
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_or_ce432); if (failed) return ;
}
@@ -1077,28 +808,28 @@
// $ANTLR start not_ce
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:408:1: not_ce[ConditionalElementDescr in_ce, Set declarations] : LEFT_PAREN NOT ce[notDescr, declarations] RIGHT_PAREN ;
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:400:1: not_ce[ConditionalElementDescr in_ce, Set declarations] : LEFT_PAREN NOT ce[notDescr, declarations] RIGHT_PAREN ;
public final void not_ce(ConditionalElementDescr in_ce, Set declarations) throws RecognitionException {
NotDescr notDescr= null;
try {
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:412:2: ( LEFT_PAREN NOT ce[notDescr, declarations] RIGHT_PAREN )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:412:4: LEFT_PAREN NOT ce[notDescr, declarations] RIGHT_PAREN
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:404:2: ( LEFT_PAREN NOT ce[notDescr, declarations] RIGHT_PAREN )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:404:4: LEFT_PAREN NOT ce[notDescr, declarations] RIGHT_PAREN
{
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_not_ce622); if (failed) return ;
- match(input,NOT,FOLLOW_NOT_in_not_ce627); if (failed) return ;
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_not_ce460); if (failed) return ;
+ match(input,NOT,FOLLOW_NOT_in_not_ce465); if (failed) return ;
if ( backtracking==0 ) {
notDescr = new NotDescr();
in_ce.addDescr( notDescr );
}
- pushFollow(FOLLOW_ce_in_not_ce633);
+ pushFollow(FOLLOW_ce_in_not_ce471);
ce(notDescr, declarations);
_fsp--;
if (failed) return ;
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_not_ce641); if (failed) return ;
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_not_ce479); if (failed) return ;
}
@@ -1115,28 +846,28 @@
// $ANTLR start exists_ce
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:421:1: exists_ce[ConditionalElementDescr in_ce, Set declarations] : LEFT_PAREN EXISTS ce[existsDescr, declarations] RIGHT_PAREN ;
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:413:1: exists_ce[ConditionalElementDescr in_ce, Set declarations] : LEFT_PAREN EXISTS ce[existsDescr, declarations] RIGHT_PAREN ;
public final void exists_ce(ConditionalElementDescr in_ce, Set declarations) throws RecognitionException {
ExistsDescr existsDescr= null;
try {
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:425:2: ( LEFT_PAREN EXISTS ce[existsDescr, declarations] RIGHT_PAREN )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:425:4: LEFT_PAREN EXISTS ce[existsDescr, declarations] RIGHT_PAREN
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:417:2: ( LEFT_PAREN EXISTS ce[existsDescr, declarations] RIGHT_PAREN )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:417:4: LEFT_PAREN EXISTS ce[existsDescr, declarations] RIGHT_PAREN
{
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_exists_ce670); if (failed) return ;
- match(input,EXISTS,FOLLOW_EXISTS_in_exists_ce675); if (failed) return ;
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_exists_ce508); if (failed) return ;
+ match(input,EXISTS,FOLLOW_EXISTS_in_exists_ce513); if (failed) return ;
if ( backtracking==0 ) {
existsDescr = new ExistsDescr();
in_ce.addDescr( existsDescr );
}
- pushFollow(FOLLOW_ce_in_exists_ce681);
+ pushFollow(FOLLOW_ce_in_exists_ce519);
ce(existsDescr, declarations);
_fsp--;
if (failed) return ;
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_exists_ce689); if (failed) return ;
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_exists_ce527); if (failed) return ;
}
@@ -1153,39 +884,25 @@
// $ANTLR start eval_ce
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:434:1: eval_ce[ConditionalElementDescr in_ce, Set declarations] : LEFT_PAREN TEST fc= lisp_list[context, new LispForm(context)] RIGHT_PAREN ;
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:426:1: eval_ce[ConditionalElementDescr in_ce, Set declarations] : LEFT_PAREN TEST t= lisp_list RIGHT_PAREN ;
public final void eval_ce(ConditionalElementDescr in_ce, Set declarations) throws RecognitionException {
- ValueHandler fc = null;
+ SExpression t = null;
-
- EvalDescr evalDescr= null;
- ExecutionEngine engine = new CLPEval();
- BuildContext context = new ExecutionBuildContext( engine, functionRegistry );
-
try {
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:440:2: ( LEFT_PAREN TEST fc= lisp_list[context, new LispForm(context)] RIGHT_PAREN )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:440:4: LEFT_PAREN TEST fc= lisp_list[context, new LispForm(context)] RIGHT_PAREN
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:427:2: ( LEFT_PAREN TEST t= lisp_list RIGHT_PAREN )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:427:4: LEFT_PAREN TEST t= lisp_list RIGHT_PAREN
{
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_eval_ce717); if (failed) return ;
- match(input,TEST,FOLLOW_TEST_in_eval_ce722); if (failed) return ;
- if ( backtracking==0 ) {
-
- evalDescr = new EvalDescr();
- in_ce.addDescr( evalDescr );
-
- }
- pushFollow(FOLLOW_lisp_list_in_eval_ce730);
- fc=lisp_list(context, new LispForm(context));
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_eval_ce546); if (failed) return ;
+ match(input,TEST,FOLLOW_TEST_in_eval_ce551); if (failed) return ;
+ pushFollow(FOLLOW_lisp_list_in_eval_ce558);
+ t=lisp_list();
_fsp--;
if (failed) return ;
if ( backtracking==0 ) {
-
- engine.addFunction( (FunctionCaller) fc );
- evalDescr.setContent( engine );
-
+ EvalDescr evalDescr = new EvalDescr(); evalDescr.setContent( t ); in_ce.addDescr( evalDescr );
}
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_eval_ce741); if (failed) return ;
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_eval_ce568); if (failed) return ;
}
@@ -1202,7 +919,7 @@
// $ANTLR start normal_pattern
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:452:1: normal_pattern[ConditionalElementDescr in_ce, Set declarations] : LEFT_PAREN name= NAME ( field_constriant[top, declarations] )* RIGHT_PAREN ;
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:433:1: normal_pattern[ConditionalElementDescr in_ce, Set declarations] : LEFT_PAREN name= NAME ( field_constriant[top, declarations] )* RIGHT_PAREN ;
public final void normal_pattern(ConditionalElementDescr in_ce, Set declarations) throws RecognitionException {
Token name=null;
@@ -1211,12 +928,12 @@
ConditionalElementDescr top = null;
try {
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:457:2: ( LEFT_PAREN name= NAME ( field_constriant[top, declarations] )* RIGHT_PAREN )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:457:4: LEFT_PAREN name= NAME ( field_constriant[top, declarations] )* RIGHT_PAREN
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:438:2: ( LEFT_PAREN name= NAME ( field_constriant[top, declarations] )* RIGHT_PAREN )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:438:4: LEFT_PAREN name= NAME ( field_constriant[top, declarations] )* RIGHT_PAREN
{
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_normal_pattern769); if (failed) return ;
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_normal_pattern596); if (failed) return ;
name=(Token)input.LT(1);
- match(input,NAME,FOLLOW_NAME_in_normal_pattern776); if (failed) return ;
+ match(input,NAME,FOLLOW_NAME_in_normal_pattern603); if (failed) return ;
if ( backtracking==0 ) {
pattern = new PatternDescr(name.getText());
@@ -1225,22 +942,22 @@
}
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:464:3: ( field_constriant[top, declarations] )*
- loop11:
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:445:3: ( field_constriant[top, declarations] )*
+ loop7:
do {
- int alt11=2;
- int LA11_0 = input.LA(1);
+ int alt7=2;
+ int LA7_0 = input.LA(1);
- if ( (LA11_0==LEFT_PAREN) ) {
- alt11=1;
+ if ( (LA7_0==LEFT_PAREN) ) {
+ alt7=1;
}
- switch (alt11) {
+ switch (alt7) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:464:3: field_constriant[top, declarations]
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:445:3: field_constriant[top, declarations]
{
- pushFollow(FOLLOW_field_constriant_in_normal_pattern782);
+ pushFollow(FOLLOW_field_constriant_in_normal_pattern609);
field_constriant(top, declarations);
_fsp--;
if (failed) return ;
@@ -1249,11 +966,11 @@
break;
default :
- break loop11;
+ break loop7;
}
} while (true);
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_normal_pattern792); if (failed) return ;
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_normal_pattern619); if (failed) return ;
}
@@ -1270,7 +987,7 @@
// $ANTLR start bound_pattern
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:470:1: bound_pattern[ConditionalElementDescr in_ce, Set declarations] : var= VAR ASSIGN_OP LEFT_PAREN name= NAME ( field_constriant[top, declarations] )* RIGHT_PAREN ;
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:451:1: bound_pattern[ConditionalElementDescr in_ce, Set declarations] : var= VAR ASSIGN_OP LEFT_PAREN name= NAME ( field_constriant[top, declarations] )* RIGHT_PAREN ;
public final void bound_pattern(ConditionalElementDescr in_ce, Set declarations) throws RecognitionException {
Token var=null;
Token name=null;
@@ -1281,20 +998,20 @@
ConditionalElementDescr top = null;
try {
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:476:2: (var= VAR ASSIGN_OP LEFT_PAREN name= NAME ( field_constriant[top, declarations] )* RIGHT_PAREN )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:476:4: var= VAR ASSIGN_OP LEFT_PAREN name= NAME ( field_constriant[top, declarations] )* RIGHT_PAREN
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:457:2: (var= VAR ASSIGN_OP LEFT_PAREN name= NAME ( field_constriant[top, declarations] )* RIGHT_PAREN )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:457:4: var= VAR ASSIGN_OP LEFT_PAREN name= NAME ( field_constriant[top, declarations] )* RIGHT_PAREN
{
var=(Token)input.LT(1);
- match(input,VAR,FOLLOW_VAR_in_bound_pattern820); if (failed) return ;
+ match(input,VAR,FOLLOW_VAR_in_bound_pattern647); if (failed) return ;
if ( backtracking==0 ) {
identifier = var.getText();
}
- match(input,ASSIGN_OP,FOLLOW_ASSIGN_OP_in_bound_pattern826); if (failed) return ;
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_bound_pattern828); if (failed) return ;
+ match(input,ASSIGN_OP,FOLLOW_ASSIGN_OP_in_bound_pattern653); if (failed) return ;
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_bound_pattern655); if (failed) return ;
name=(Token)input.LT(1);
- match(input,NAME,FOLLOW_NAME_in_bound_pattern832); if (failed) return ;
+ match(input,NAME,FOLLOW_NAME_in_bound_pattern659); if (failed) return ;
if ( backtracking==0 ) {
pattern = new PatternDescr(name.getText());
@@ -1303,22 +1020,22 @@
top = pattern.getConstraint();
}
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:486:3: ( field_constriant[top, declarations] )*
- loop12:
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:467:3: ( field_constriant[top, declarations] )*
+ loop8:
do {
- int alt12=2;
- int LA12_0 = input.LA(1);
+ int alt8=2;
+ int LA8_0 = input.LA(1);
- if ( (LA12_0==LEFT_PAREN) ) {
- alt12=1;
+ if ( (LA8_0==LEFT_PAREN) ) {
+ alt8=1;
}
- switch (alt12) {
+ switch (alt8) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:486:3: field_constriant[top, declarations]
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:467:3: field_constriant[top, declarations]
{
- pushFollow(FOLLOW_field_constriant_in_bound_pattern841);
+ pushFollow(FOLLOW_field_constriant_in_bound_pattern668);
field_constriant(top, declarations);
_fsp--;
if (failed) return ;
@@ -1327,11 +1044,11 @@
break;
default :
- break loop12;
+ break loop8;
}
} while (true);
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_bound_pattern848); if (failed) return ;
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_bound_pattern675); if (failed) return ;
}
@@ -1348,7 +1065,7 @@
// $ANTLR start field_constriant
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:490:1: field_constriant[ConditionalElementDescr base, Set declarations] : LEFT_PAREN f= NAME or_restr_connective[top, base, fc, declarations] RIGHT_PAREN ;
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:471:1: field_constriant[ConditionalElementDescr base, Set declarations] : LEFT_PAREN f= NAME or_restr_connective[top, base, fc, declarations] RIGHT_PAREN ;
public final void field_constriant(ConditionalElementDescr base, Set declarations) throws RecognitionException {
Token f=null;
@@ -1360,12 +1077,12 @@
String op = "==";
try {
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:498:2: ( LEFT_PAREN f= NAME or_restr_connective[top, base, fc, declarations] RIGHT_PAREN )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:499:3: LEFT_PAREN f= NAME or_restr_connective[top, base, fc, declarations] RIGHT_PAREN
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:479:2: ( LEFT_PAREN f= NAME or_restr_connective[top, base, fc, declarations] RIGHT_PAREN )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:480:3: LEFT_PAREN f= NAME or_restr_connective[top, base, fc, declarations] RIGHT_PAREN
{
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_field_constriant879); if (failed) return ;
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_field_constriant706); if (failed) return ;
f=(Token)input.LT(1);
- match(input,NAME,FOLLOW_NAME_in_field_constriant883); if (failed) return ;
+ match(input,NAME,FOLLOW_NAME_in_field_constriant710); if (failed) return ;
if ( backtracking==0 ) {
fc = new FieldConstraintDescr(f.getText());
@@ -1375,11 +1092,11 @@
top = fc.getRestriction();
}
- pushFollow(FOLLOW_or_restr_connective_in_field_constriant898);
+ pushFollow(FOLLOW_or_restr_connective_in_field_constriant725);
or_restr_connective(top, base, fc, declarations);
_fsp--;
if (failed) return ;
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_field_constriant904); if (failed) return ;
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_field_constriant731); if (failed) return ;
}
@@ -1396,41 +1113,41 @@
// $ANTLR start or_restr_connective
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:526:1: or_restr_connective[ RestrictionConnectiveDescr rcBase, ConditionalElementDescr ceBase, FieldConstraintDescr fcBase, Set declarations ] options {backtrack=true; } : and_restr_connective[or, ceBase, fcBase, declarations] ( options {backtrack=true; } : PIPE and_restr_connective[or, ceBase, fcBase, declarations] )* ;
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:507:1: or_restr_connective[ RestrictionConnectiveDescr rcBase, ConditionalElementDescr ceBase, FieldConstraintDescr fcBase, Set declarations ] options {backtrack=true; } : and_restr_connective[or, ceBase, fcBase, declarations] ( options {backtrack=true; } : PIPE and_restr_connective[or, ceBase, fcBase, declarations] )* ;
public final void or_restr_connective(RestrictionConnectiveDescr rcBase, ConditionalElementDescr ceBase, FieldConstraintDescr fcBase, Set declarations) throws RecognitionException {
RestrictionConnectiveDescr or = new RestrictionConnectiveDescr(RestrictionConnectiveDescr.OR);
try {
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:533:2: ( and_restr_connective[or, ceBase, fcBase, declarations] ( options {backtrack=true; } : PIPE and_restr_connective[or, ceBase, fcBase, declarations] )* )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:534:3: and_restr_connective[or, ceBase, fcBase, declarations] ( options {backtrack=true; } : PIPE and_restr_connective[or, ceBase, fcBase, declarations] )*
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:514:2: ( and_restr_connective[or, ceBase, fcBase, declarations] ( options {backtrack=true; } : PIPE and_restr_connective[or, ceBase, fcBase, declarations] )* )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:515:3: and_restr_connective[or, ceBase, fcBase, declarations] ( options {backtrack=true; } : PIPE and_restr_connective[or, ceBase, fcBase, declarations] )*
{
- pushFollow(FOLLOW_and_restr_connective_in_or_restr_connective943);
+ pushFollow(FOLLOW_and_restr_connective_in_or_restr_connective770);
and_restr_connective(or, ceBase, fcBase, declarations);
_fsp--;
if (failed) return ;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:535:3: ( options {backtrack=true; } : PIPE and_restr_connective[or, ceBase, fcBase, declarations] )*
- loop13:
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:516:3: ( options {backtrack=true; } : PIPE and_restr_connective[or, ceBase, fcBase, declarations] )*
+ loop9:
do {
- int alt13=2;
- int LA13_0 = input.LA(1);
+ int alt9=2;
+ int LA9_0 = input.LA(1);
- if ( (LA13_0==PIPE) ) {
- alt13=1;
+ if ( (LA9_0==PIPE) ) {
+ alt9=1;
}
- switch (alt13) {
+ switch (alt9) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:537:6: PIPE and_restr_connective[or, ceBase, fcBase, declarations]
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:518:6: PIPE and_restr_connective[or, ceBase, fcBase, declarations]
{
- match(input,PIPE,FOLLOW_PIPE_in_or_restr_connective967); if (failed) return ;
+ match(input,PIPE,FOLLOW_PIPE_in_or_restr_connective794); if (failed) return ;
if ( backtracking==0 ) {
location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_OPERATOR);
}
- pushFollow(FOLLOW_and_restr_connective_in_or_restr_connective977);
+ pushFollow(FOLLOW_and_restr_connective_in_or_restr_connective804);
and_restr_connective(or, ceBase, fcBase, declarations);
_fsp--;
if (failed) return ;
@@ -1439,7 +1156,7 @@
break;
default :
- break loop13;
+ break loop9;
}
} while (true);
@@ -1466,36 +1183,36 @@
// $ANTLR start and_restr_connective
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:552:1: and_restr_connective[ RestrictionConnectiveDescr rcBase, ConditionalElementDescr ceBase, FieldConstraintDescr fcBase, Set declarations ] : restriction[and, ceBase, fcBase, declarations] ( AMPERSAND restriction[and, ceBase, fcBase, declarations] )* ;
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:533:1: and_restr_connective[ RestrictionConnectiveDescr rcBase, ConditionalElementDescr ceBase, FieldConstraintDescr fcBase, Set declarations ] : restriction[and, ceBase, fcBase, declarations] ( AMPERSAND restriction[and, ceBase, fcBase, declarations] )* ;
public final void and_restr_connective(RestrictionConnectiveDescr rcBase, ConditionalElementDescr ceBase, FieldConstraintDescr fcBase, Set declarations) throws RecognitionException {
RestrictionConnectiveDescr and = new RestrictionConnectiveDescr(RestrictionConnectiveDescr.AND);
try {
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:556:2: ( restriction[and, ceBase, fcBase, declarations] ( AMPERSAND restriction[and, ceBase, fcBase, declarations] )* )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:557:3: restriction[and, ceBase, fcBase, declarations] ( AMPERSAND restriction[and, ceBase, fcBase, declarations] )*
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:537:2: ( restriction[and, ceBase, fcBase, declarations] ( AMPERSAND restriction[and, ceBase, fcBase, declarations] )* )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:538:3: restriction[and, ceBase, fcBase, declarations] ( AMPERSAND restriction[and, ceBase, fcBase, declarations] )*
{
- pushFollow(FOLLOW_restriction_in_and_restr_connective1009);
+ pushFollow(FOLLOW_restriction_in_and_restr_connective836);
restriction(and, ceBase, fcBase, declarations);
_fsp--;
if (failed) return ;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:558:3: ( AMPERSAND restriction[and, ceBase, fcBase, declarations] )*
- loop14:
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:539:3: ( AMPERSAND restriction[and, ceBase, fcBase, declarations] )*
+ loop10:
do {
- int alt14=2;
- int LA14_0 = input.LA(1);
+ int alt10=2;
+ int LA10_0 = input.LA(1);
- if ( (LA14_0==AMPERSAND) ) {
- alt14=1;
+ if ( (LA10_0==AMPERSAND) ) {
+ alt10=1;
}
- switch (alt14) {
+ switch (alt10) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:558:5: AMPERSAND restriction[and, ceBase, fcBase, declarations]
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:539:5: AMPERSAND restriction[and, ceBase, fcBase, declarations]
{
- match(input,AMPERSAND,FOLLOW_AMPERSAND_in_and_restr_connective1017); if (failed) return ;
- pushFollow(FOLLOW_restriction_in_and_restr_connective1019);
+ match(input,AMPERSAND,FOLLOW_AMPERSAND_in_and_restr_connective844); if (failed) return ;
+ pushFollow(FOLLOW_restriction_in_and_restr_connective846);
restriction(and, ceBase, fcBase, declarations);
_fsp--;
if (failed) return ;
@@ -1504,7 +1221,7 @@
break;
default :
- break loop14;
+ break loop10;
}
} while (true);
@@ -1531,7 +1248,7 @@
// $ANTLR start restriction
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:577:1: restriction[RestrictionConnectiveDescr rc, ConditionalElementDescr base, FieldConstraintDescr fcBase, Set declarations ] : ( TILDE )? ( predicate_constraint[rc, op, base] | return_value_restriction[op, rc] | variable_restriction[op, rc, base, fcBase, declarations] | lc= literal_restriction ) ;
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:558:1: restriction[RestrictionConnectiveDescr rc, ConditionalElementDescr base, FieldConstraintDescr fcBase, Set declarations ] : ( TILDE )? ( predicate_constraint[rc, op, base] | return_value_restriction[op, rc] | variable_restriction[op, rc, base, fcBase, declarations] | lc= literal_restriction ) ;
public final void restriction(RestrictionConnectiveDescr rc, ConditionalElementDescr base, FieldConstraintDescr fcBase, Set declarations) throws RecognitionException {
String lc = null;
@@ -1540,21 +1257,21 @@
String op = "==";
try {
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:581:2: ( ( TILDE )? ( predicate_constraint[rc, op, base] | return_value_restriction[op, rc] | variable_restriction[op, rc, base, fcBase, declarations] | lc= literal_restriction ) )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:581:4: ( TILDE )? ( predicate_constraint[rc, op, base] | return_value_restriction[op, rc] | variable_restriction[op, rc, base, fcBase, declarations] | lc= literal_restriction )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:562:2: ( ( TILDE )? ( predicate_constraint[rc, op, base] | return_value_restriction[op, rc] | variable_restriction[op, rc, base, fcBase, declarations] | lc= literal_restriction ) )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:562:4: ( TILDE )? ( predicate_constraint[rc, op, base] | return_value_restriction[op, rc] | variable_restriction[op, rc, base, fcBase, declarations] | lc= literal_restriction )
{
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:581:4: ( TILDE )?
- int alt15=2;
- int LA15_0 = input.LA(1);
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:562:4: ( TILDE )?
+ int alt11=2;
+ int LA11_0 = input.LA(1);
- if ( (LA15_0==TILDE) ) {
- alt15=1;
+ if ( (LA11_0==TILDE) ) {
+ alt11=1;
}
- switch (alt15) {
+ switch (alt11) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:581:5: TILDE
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:562:5: TILDE
{
- match(input,TILDE,FOLLOW_TILDE_in_restriction1052); if (failed) return ;
+ match(input,TILDE,FOLLOW_TILDE_in_restriction879); if (failed) return ;
if ( backtracking==0 ) {
op = "!=";
}
@@ -1564,22 +1281,22 @@
}
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:582:3: ( predicate_constraint[rc, op, base] | return_value_restriction[op, rc] | variable_restriction[op, rc, base, fcBase, declarations] | lc= literal_restriction )
- int alt16=4;
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:563:3: ( predicate_constraint[rc, op, base] | return_value_restriction[op, rc] | variable_restriction[op, rc, base, fcBase, declarations] | lc= literal_restriction )
+ int alt12=4;
switch ( input.LA(1) ) {
case COLON:
{
- alt16=1;
+ alt12=1;
}
break;
case EQUALS:
{
- alt16=2;
+ alt12=2;
}
break;
case VAR:
{
- alt16=3;
+ alt12=3;
}
break;
case NAME:
@@ -1589,22 +1306,22 @@
case BOOL:
case NULL:
{
- alt16=4;
+ alt12=4;
}
break;
default:
if (backtracking>0) {failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("582:3: ( predicate_constraint[rc, op, base] | return_value_restriction[op, rc] | variable_restriction[op, rc, base, fcBase, declarations] | lc= literal_restriction )", 16, 0, input);
+ new NoViableAltException("563:3: ( predicate_constraint[rc, op, base] | return_value_restriction[op, rc] | variable_restriction[op, rc, base, fcBase, declarations] | lc= literal_restriction )", 12, 0, input);
throw nvae;
}
- switch (alt16) {
+ switch (alt12) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:582:5: predicate_constraint[rc, op, base]
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:563:5: predicate_constraint[rc, op, base]
{
- pushFollow(FOLLOW_predicate_constraint_in_restriction1068);
+ pushFollow(FOLLOW_predicate_constraint_in_restriction895);
predicate_constraint(rc, op, base);
_fsp--;
if (failed) return ;
@@ -1612,9 +1329,9 @@
}
break;
case 2 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:583:7: return_value_restriction[op, rc]
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:564:7: return_value_restriction[op, rc]
{
- pushFollow(FOLLOW_return_value_restriction_in_restriction1084);
+ pushFollow(FOLLOW_return_value_restriction_in_restriction911);
return_value_restriction(op, rc);
_fsp--;
if (failed) return ;
@@ -1622,9 +1339,9 @@
}
break;
case 3 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:584:7: variable_restriction[op, rc, base, fcBase, declarations]
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:565:7: variable_restriction[op, rc, base, fcBase, declarations]
{
- pushFollow(FOLLOW_variable_restriction_in_restriction1093);
+ pushFollow(FOLLOW_variable_restriction_in_restriction920);
variable_restriction(op, rc, base, fcBase, declarations);
_fsp--;
if (failed) return ;
@@ -1632,9 +1349,9 @@
}
break;
case 4 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:585:8: lc= literal_restriction
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:566:8: lc= literal_restriction
{
- pushFollow(FOLLOW_literal_restriction_in_restriction1105);
+ pushFollow(FOLLOW_literal_restriction_in_restriction932);
lc=literal_restriction();
_fsp--;
if (failed) return ;
@@ -1666,29 +1383,22 @@
// $ANTLR start predicate_constraint
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:592:1: predicate_constraint[RestrictionConnectiveDescr rc, String op, ConditionalElementDescr base] : COLON fc= lisp_list[context, new LispForm(context)] ;
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:573:1: predicate_constraint[RestrictionConnectiveDescr rc, String op, ConditionalElementDescr base] : COLON t= lisp_list ;
public final void predicate_constraint(RestrictionConnectiveDescr rc, String op, ConditionalElementDescr base) throws RecognitionException {
- ValueHandler fc = null;
+ SExpression t = null;
-
- ExecutionEngine engine = new CLPPredicate();
- BuildContext context = new ExecutionBuildContext( engine, functionRegistry );
-
try {
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:597:2: ( COLON fc= lisp_list[context, new LispForm(context)] )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:597:4: COLON fc= lisp_list[context, new LispForm(context)]
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:574:2: ( COLON t= lisp_list )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:574:4: COLON t= lisp_list
{
- match(input,COLON,FOLLOW_COLON_in_predicate_constraint1147); if (failed) return ;
- pushFollow(FOLLOW_lisp_list_in_predicate_constraint1153);
- fc=lisp_list(context, new LispForm(context));
+ match(input,COLON,FOLLOW_COLON_in_predicate_constraint965); if (failed) return ;
+ pushFollow(FOLLOW_lisp_list_in_predicate_constraint971);
+ t=lisp_list();
_fsp--;
if (failed) return ;
if ( backtracking==0 ) {
-
- engine.addFunction( (FunctionCaller) fc );
- rc.addRestriction( new PredicateDescr( engine ) );
-
+ rc.addRestriction( new PredicateDescr( t ) );
}
}
@@ -1706,29 +1416,22 @@
// $ANTLR start return_value_restriction
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:606:1: return_value_restriction[String op, RestrictionConnectiveDescr rc] : EQUALS func= lisp_list[context, new LispForm(context)] ;
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:580:1: return_value_restriction[String op, RestrictionConnectiveDescr rc] : EQUALS t= lisp_list ;
public final void return_value_restriction(String op, RestrictionConnectiveDescr rc) throws RecognitionException {
- ValueHandler func = null;
+ SExpression t = null;
-
- ExecutionEngine engine = new CLPReturnValue();
- BuildContext context = new ExecutionBuildContext( engine, functionRegistry );
-
try {
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:611:2: ( EQUALS func= lisp_list[context, new LispForm(context)] )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:611:4: EQUALS func= lisp_list[context, new LispForm(context)]
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:581:2: ( EQUALS t= lisp_list )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:581:4: EQUALS t= lisp_list
{
- match(input,EQUALS,FOLLOW_EQUALS_in_return_value_restriction1179); if (failed) return ;
- pushFollow(FOLLOW_lisp_list_in_return_value_restriction1186);
- func=lisp_list(context, new LispForm(context));
+ match(input,EQUALS,FOLLOW_EQUALS_in_return_value_restriction990); if (failed) return ;
+ pushFollow(FOLLOW_lisp_list_in_return_value_restriction997);
+ t=lisp_list();
_fsp--;
if (failed) return ;
if ( backtracking==0 ) {
-
- engine.addFunction( (FunctionCaller) func );
- rc.addRestriction( new ReturnValueRestrictionDescr (op, engine ) );
-
+ rc.addRestriction( new ReturnValueRestrictionDescr (op, t ) );
}
}
@@ -1746,16 +1449,16 @@
// $ANTLR start variable_restriction
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:619:1: variable_restriction[String op, RestrictionConnectiveDescr rc, ConditionalElementDescr ceBase, FieldConstraintDescr fcBase, Set declarations ] : VAR ;
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:586:1: variable_restriction[String op, RestrictionConnectiveDescr rc, ConditionalElementDescr ceBase, FieldConstraintDescr fcBase, Set declarations ] : VAR ;
public final void variable_restriction(String op, RestrictionConnectiveDescr rc, ConditionalElementDescr ceBase, FieldConstraintDescr fcBase, Set declarations) throws RecognitionException {
Token VAR1=null;
try {
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:620:2: ( VAR )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:620:4: VAR
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:587:2: ( VAR )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:587:4: VAR
{
VAR1=(Token)input.LT(1);
- match(input,VAR,FOLLOW_VAR_in_variable_restriction1206); if (failed) return ;
+ match(input,VAR,FOLLOW_VAR_in_variable_restriction1016); if (failed) return ;
if ( backtracking==0 ) {
if ( declarations.contains( VAR1.getText() ) ) {
@@ -1785,7 +1488,7 @@
// $ANTLR start literal_restriction
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:634:1: literal_restriction returns [String text] : t= literal ;
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:601:1: literal_restriction returns [String text] : t= literal ;
public final String literal_restriction() throws RecognitionException {
String text = null;
@@ -1796,10 +1499,10 @@
text = null;
try {
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:638:2: (t= literal )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:639:6: t= literal
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:605:2: (t= literal )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:606:6: t= literal
{
- pushFollow(FOLLOW_literal_in_literal_restriction1239);
+ pushFollow(FOLLOW_literal_in_literal_restriction1049);
t=literal();
_fsp--;
if (failed) return text;
@@ -1824,7 +1527,7 @@
// $ANTLR start eval_sExpressions
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:645:1: eval_sExpressions returns [List<SExpression> list] : (a= lisp_list2 )* ;
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:612:1: eval_sExpressions returns [List<SExpression> list] : (a= lisp_list )* ;
public final List<SExpression> eval_sExpressions() throws RecognitionException {
List<SExpression> list = null;
@@ -1835,26 +1538,26 @@
list = new ArrayList<SExpression>();
try {
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:649:2: ( (a= lisp_list2 )* )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:650:3: (a= lisp_list2 )*
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:616:2: ( (a= lisp_list )* )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:617:3: (a= lisp_list )*
{
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:650:3: (a= lisp_list2 )*
- loop17:
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:617:3: (a= lisp_list )*
+ loop13:
do {
- int alt17=2;
- int LA17_0 = input.LA(1);
+ int alt13=2;
+ int LA13_0 = input.LA(1);
- if ( (LA17_0==LEFT_PAREN) ) {
- alt17=1;
+ if ( (LA13_0==LEFT_PAREN) ) {
+ alt13=1;
}
- switch (alt17) {
+ switch (alt13) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:650:4: a= lisp_list2
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:617:4: a= lisp_list
{
- pushFollow(FOLLOW_lisp_list2_in_eval_sExpressions1271);
- a=lisp_list2();
+ pushFollow(FOLLOW_lisp_list_in_eval_sExpressions1081);
+ a=lisp_list();
_fsp--;
if (failed) return list;
if ( backtracking==0 ) {
@@ -1865,7 +1568,7 @@
break;
default :
- break loop17;
+ break loop13;
}
} while (true);
@@ -1884,9 +1587,9 @@
// $ANTLR end eval_sExpressions
- // $ANTLR start lisp_list2
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:654:1: lisp_list2 returns [SExpression sExpression] : LEFT_PAREN t= ( NAME | VAR ) (a= lisp_atom2 | a= lisp_list2 )* RIGHT_PAREN ;
- public final SExpression lisp_list2() throws RecognitionException {
+ // $ANTLR start lisp_list
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:621:1: lisp_list returns [SExpression sExpression] : LEFT_PAREN (t= NAME | t= VAR ) (a= lisp_atom | a= lisp_list )* RIGHT_PAREN ;
+ public final SExpression lisp_list() throws RecognitionException {
SExpression sExpression = null;
Token t=null;
@@ -1898,282 +1601,75 @@
sExpression = null;
try {
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:659:2: ( LEFT_PAREN t= ( NAME | VAR ) (a= lisp_atom2 | a= lisp_list2 )* RIGHT_PAREN )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:659:4: LEFT_PAREN t= ( NAME | VAR ) (a= lisp_atom2 | a= lisp_list2 )* RIGHT_PAREN
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:626:2: ( LEFT_PAREN (t= NAME | t= VAR ) (a= lisp_atom | a= lisp_list )* RIGHT_PAREN )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:626:4: LEFT_PAREN (t= NAME | t= VAR ) (a= lisp_atom | a= lisp_list )* RIGHT_PAREN
{
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_lisp_list21300); if (failed) return sExpression;
- t=(Token)input.LT(1);
- if ( input.LA(1)==NAME||input.LA(1)==VAR ) {
- input.consume();
- errorRecovery=false;failed=false;
- }
- else {
- if (backtracking>0) {failed=true; return sExpression;}
- MismatchedSetException mse =
- new MismatchedSetException(null,input);
- recoverFromMismatchedSet(input,mse,FOLLOW_set_in_lisp_list21310); throw mse;
- }
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_lisp_list1110); if (failed) return sExpression;
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:628:3: (t= NAME | t= VAR )
+ int alt14=2;
+ int LA14_0 = input.LA(1);
- if ( backtracking==0 ) {
- list.add( new SymbolLispAtom2( t.getText() ) );
+ if ( (LA14_0==NAME) ) {
+ alt14=1;
}
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:661:3: (a= lisp_atom2 | a= lisp_list2 )*
- loop18:
- do {
- int alt18=3;
- int LA18_0 = input.LA(1);
-
- if ( (LA18_0==NAME||LA18_0==VAR||LA18_0==STRING||LA18_0==INT||(LA18_0>=FLOAT && LA18_0<=NULL)) ) {
- alt18=1;
- }
- else if ( (LA18_0==LEFT_PAREN) ) {
- alt18=2;
- }
-
-
- switch (alt18) {
- case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:661:6: a= lisp_atom2
- {
- pushFollow(FOLLOW_lisp_atom2_in_lisp_list21325);
- a=lisp_atom2();
- _fsp--;
- if (failed) return sExpression;
- if ( backtracking==0 ) {
- list.add( a );
- }
-
- }
- break;
- case 2 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:662:6: a= lisp_list2
- {
- pushFollow(FOLLOW_lisp_list2_in_lisp_list21336);
- a=lisp_list2();
- _fsp--;
- if (failed) return sExpression;
- if ( backtracking==0 ) {
- list.add( a );
- }
-
- }
- break;
-
- default :
- break loop18;
- }
- } while (true);
-
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_lisp_list21363); if (failed) return sExpression;
- if ( backtracking==0 ) {
- sExpression = new LispForm2( ( SExpression[] ) list.toArray( new SExpression[ list.size () ] ) );
+ else if ( (LA14_0==VAR) ) {
+ alt14=2;
}
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return sExpression;
- }
- // $ANTLR end lisp_list2
-
-
- // $ANTLR start lisp_atom2
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:668:1: lisp_atom2 returns [SExpression sExpression] : (t= VAR | t= STRING | t= FLOAT | t= INT | t= BOOL | t= NULL | t= NAME ) ;
- public final SExpression lisp_atom2() throws RecognitionException {
- SExpression sExpression = null;
-
- Token t=null;
-
-
- sExpression = null;
-
- try {
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:672:2: ( (t= VAR | t= STRING | t= FLOAT | t= INT | t= BOOL | t= NULL | t= NAME ) )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:683:3: (t= VAR | t= STRING | t= FLOAT | t= INT | t= BOOL | t= NULL | t= NAME )
- {
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:683:3: (t= VAR | t= STRING | t= FLOAT | t= INT | t= BOOL | t= NULL | t= NAME )
- int alt19=7;
- switch ( input.LA(1) ) {
- case VAR:
- {
- alt19=1;
- }
- break;
- case STRING:
- {
- alt19=2;
- }
- break;
- case FLOAT:
- {
- alt19=3;
- }
- break;
- case INT:
- {
- alt19=4;
- }
- break;
- case BOOL:
- {
- alt19=5;
- }
- break;
- case NULL:
- {
- alt19=6;
- }
- break;
- case NAME:
- {
- alt19=7;
- }
- break;
- default:
+ else {
if (backtracking>0) {failed=true; return sExpression;}
NoViableAltException nvae =
- new NoViableAltException("683:3: (t= VAR | t= STRING | t= FLOAT | t= INT | t= BOOL | t= NULL | t= NAME )", 19, 0, input);
+ new NoViableAltException("628:3: (t= NAME | t= VAR )", 14, 0, input);
throw nvae;
}
-
- switch (alt19) {
+ switch (alt14) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:684:6: t= VAR
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:629:7: t= NAME
{
t=(Token)input.LT(1);
- match(input,VAR,FOLLOW_VAR_in_lisp_atom21413); if (failed) return sExpression;
+ match(input,NAME,FOLLOW_NAME_in_lisp_list1127); if (failed) return sExpression;
if ( backtracking==0 ) {
- sExpression = new VariableLispAtom2( t.getText() );
+ list.add( new SymbolLispAtom( t.getText() ) );
}
}
break;
case 2 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:685:6: t= STRING
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:631:7: t= VAR
{
t=(Token)input.LT(1);
- match(input,STRING,FOLLOW_STRING_in_lisp_atom21425); if (failed) return sExpression;
+ match(input,VAR,FOLLOW_VAR_in_lisp_list1147); if (failed) return sExpression;
if ( backtracking==0 ) {
- sExpression = new StringLispAtom2( getString( t ) );
+ list.add( new VariableLispAtom( t.getText() ) );
}
}
break;
- case 3 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:686:6: t= FLOAT
- {
- t=(Token)input.LT(1);
- match(input,FLOAT,FOLLOW_FLOAT_in_lisp_atom21447); if (failed) return sExpression;
- if ( backtracking==0 ) {
- sExpression = new FloatLispAtom2( t.getText() );
- }
- }
- break;
- case 4 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:687:6: t= INT
- {
- t=(Token)input.LT(1);
- match(input,INT,FOLLOW_INT_in_lisp_atom21459); if (failed) return sExpression;
- if ( backtracking==0 ) {
- sExpression = new IntLispAtom2( t.getText() );
- }
-
- }
- break;
- case 5 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:688:7: t= BOOL
- {
- t=(Token)input.LT(1);
- match(input,BOOL,FOLLOW_BOOL_in_lisp_atom21472); if (failed) return sExpression;
- if ( backtracking==0 ) {
- sExpression = new BoolLispAtom2( t.getText() );
- }
-
- }
- break;
- case 6 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:689:7: t= NULL
- {
- t=(Token)input.LT(1);
- match(input,NULL,FOLLOW_NULL_in_lisp_atom21488); if (failed) return sExpression;
- if ( backtracking==0 ) {
- sExpression = new NullLispAtom2( null );
- }
-
- }
- break;
- case 7 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:690:14: t= NAME
- {
- t=(Token)input.LT(1);
- match(input,NAME,FOLLOW_NAME_in_lisp_atom21514); if (failed) return sExpression;
- if ( backtracking==0 ) {
- sExpression = new SymbolLispAtom2( "\"" +t.getText() + "\"");
- }
-
- }
- break;
-
}
-
- }
-
- }
- catch (RecognitionException re) {
- reportError(re);
- recover(input,re);
- }
- finally {
- }
- return sExpression;
- }
- // $ANTLR end lisp_atom2
-
-
- // $ANTLR start lisp_list
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:695:1: lisp_list[BuildContext context, LispList list] returns [ValueHandler valueHandler] : LEFT_PAREN (a= lisp_atom[context] | a= lisp_list[context, list.createList()] )* RIGHT_PAREN ;
- public final ValueHandler lisp_list(BuildContext context, LispList list) throws RecognitionException {
- ValueHandler valueHandler = null;
-
- ValueHandler a = null;
-
-
- try {
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:696:2: ( LEFT_PAREN (a= lisp_atom[context] | a= lisp_list[context, list.createList()] )* RIGHT_PAREN )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:696:4: LEFT_PAREN (a= lisp_atom[context] | a= lisp_list[context, list.createList()] )* RIGHT_PAREN
- {
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_lisp_list1545); if (failed) return valueHandler;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:697:3: (a= lisp_atom[context] | a= lisp_list[context, list.createList()] )*
- loop20:
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:633:3: (a= lisp_atom | a= lisp_list )*
+ loop15:
do {
- int alt20=3;
- int LA20_0 = input.LA(1);
+ int alt15=3;
+ int LA15_0 = input.LA(1);
- if ( (LA20_0==NAME||LA20_0==VAR||LA20_0==STRING||LA20_0==INT||(LA20_0>=FLOAT && LA20_0<=NULL)) ) {
- alt20=1;
+ if ( (LA15_0==NAME||LA15_0==STRING||LA15_0==INT||LA15_0==VAR||(LA15_0>=FLOAT && LA15_0<=NULL)) ) {
+ alt15=1;
}
- else if ( (LA20_0==LEFT_PAREN) ) {
- alt20=2;
+ else if ( (LA15_0==LEFT_PAREN) ) {
+ alt15=2;
}
- switch (alt20) {
+ switch (alt15) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:697:6: a= lisp_atom[context]
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:633:6: a= lisp_atom
{
- pushFollow(FOLLOW_lisp_atom_in_lisp_list1555);
- a=lisp_atom(context);
+ pushFollow(FOLLOW_lisp_atom_in_lisp_list1170);
+ a=lisp_atom();
_fsp--;
- if (failed) return valueHandler;
+ if (failed) return sExpression;
if ( backtracking==0 ) {
list.add( a );
}
@@ -2181,12 +1677,12 @@
}
break;
case 2 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:698:6: a= lisp_list[context, list.createList()]
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:634:6: a= lisp_list
{
- pushFollow(FOLLOW_lisp_list_in_lisp_list1571);
- a=lisp_list(context, list.createList());
+ pushFollow(FOLLOW_lisp_list_in_lisp_list1181);
+ a=lisp_list();
_fsp--;
- if (failed) return valueHandler;
+ if (failed) return sExpression;
if ( backtracking==0 ) {
list.add( a );
}
@@ -2195,13 +1691,13 @@
break;
default :
- break loop20;
+ break loop15;
}
} while (true);
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_lisp_list1601); if (failed) return valueHandler;
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_lisp_list1208); if (failed) return sExpression;
if ( backtracking==0 ) {
- valueHandler = list.getValueHandler();
+ sExpression = new LispForm( ( SExpression[] ) list.toArray( new SExpression[ list.size () ] ) );
}
}
@@ -2213,145 +1709,145 @@
}
finally {
}
- return valueHandler;
+ return sExpression;
}
// $ANTLR end lisp_list
// $ANTLR start lisp_atom
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:704:1: lisp_atom[BuildContext context] returns [ValueHandler value] : (t= VAR | t= STRING | t= NAME | t= FLOAT | t= INT | t= BOOL | t= NULL ) ;
- public final ValueHandler lisp_atom(BuildContext context) throws RecognitionException {
- ValueHandler value = null;
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:640:1: lisp_atom returns [SExpression sExpression] : (t= VAR | t= STRING | t= FLOAT | t= INT | t= BOOL | t= NULL | t= NAME ) ;
+ public final SExpression lisp_atom() throws RecognitionException {
+ SExpression sExpression = null;
Token t=null;
- value = null;
+ sExpression = null;
try {
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:708:2: ( (t= VAR | t= STRING | t= NAME | t= FLOAT | t= INT | t= BOOL | t= NULL ) )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:709:3: (t= VAR | t= STRING | t= NAME | t= FLOAT | t= INT | t= BOOL | t= NULL )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:644:2: ( (t= VAR | t= STRING | t= FLOAT | t= INT | t= BOOL | t= NULL | t= NAME ) )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:655:3: (t= VAR | t= STRING | t= FLOAT | t= INT | t= BOOL | t= NULL | t= NAME )
{
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:709:3: (t= VAR | t= STRING | t= NAME | t= FLOAT | t= INT | t= BOOL | t= NULL )
- int alt21=7;
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:655:3: (t= VAR | t= STRING | t= FLOAT | t= INT | t= BOOL | t= NULL | t= NAME )
+ int alt16=7;
switch ( input.LA(1) ) {
case VAR:
{
- alt21=1;
+ alt16=1;
}
break;
case STRING:
{
- alt21=2;
+ alt16=2;
}
break;
- case NAME:
- {
- alt21=3;
- }
- break;
case FLOAT:
{
- alt21=4;
+ alt16=3;
}
break;
case INT:
{
- alt21=5;
+ alt16=4;
}
break;
case BOOL:
{
- alt21=6;
+ alt16=5;
}
break;
case NULL:
{
- alt21=7;
+ alt16=6;
}
break;
+ case NAME:
+ {
+ alt16=7;
+ }
+ break;
default:
- if (backtracking>0) {failed=true; return value;}
+ if (backtracking>0) {failed=true; return sExpression;}
NoViableAltException nvae =
- new NoViableAltException("709:3: (t= VAR | t= STRING | t= NAME | t= FLOAT | t= INT | t= BOOL | t= NULL )", 21, 0, input);
+ new NoViableAltException("655:3: (t= VAR | t= STRING | t= FLOAT | t= INT | t= BOOL | t= NULL | t= NAME )", 16, 0, input);
throw nvae;
}
- switch (alt21) {
+ switch (alt16) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:709:6: t= VAR
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:656:6: t= VAR
{
t=(Token)input.LT(1);
- match(input,VAR,FOLLOW_VAR_in_lisp_atom1638); if (failed) return value;
+ match(input,VAR,FOLLOW_VAR_in_lisp_atom1258); if (failed) return sExpression;
if ( backtracking==0 ) {
- value = context.getVariableValueHandler(t.getText() );
+ sExpression = new VariableLispAtom( t.getText() );
}
}
break;
case 2 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:710:6: t= STRING
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:657:6: t= STRING
{
t=(Token)input.LT(1);
- match(input,STRING,FOLLOW_STRING_in_lisp_atom1650); if (failed) return value;
+ match(input,STRING,FOLLOW_STRING_in_lisp_atom1270); if (failed) return sExpression;
if ( backtracking==0 ) {
- value = new ObjectValueHandler( getString( t ) );
+ sExpression = new StringLispAtom( getString( t ) );
}
}
break;
case 3 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:711:7: t= NAME
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:658:6: t= FLOAT
{
t=(Token)input.LT(1);
- match(input,NAME,FOLLOW_NAME_in_lisp_atom1662); if (failed) return value;
+ match(input,FLOAT,FOLLOW_FLOAT_in_lisp_atom1292); if (failed) return sExpression;
if ( backtracking==0 ) {
- value = new ObjectValueHandler( t.getText() );
+ sExpression = new FloatLispAtom( t.getText() );
}
}
break;
case 4 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:712:6: t= FLOAT
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:659:6: t= INT
{
t=(Token)input.LT(1);
- match(input,FLOAT,FOLLOW_FLOAT_in_lisp_atom1677); if (failed) return value;
+ match(input,INT,FOLLOW_INT_in_lisp_atom1304); if (failed) return sExpression;
if ( backtracking==0 ) {
- value = new DoubleValueHandler( t.getText() );
+ sExpression = new IntLispAtom( t.getText() );
}
}
break;
case 5 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:713:6: t= INT
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:660:7: t= BOOL
{
t=(Token)input.LT(1);
- match(input,INT,FOLLOW_INT_in_lisp_atom1689); if (failed) return value;
+ match(input,BOOL,FOLLOW_BOOL_in_lisp_atom1317); if (failed) return sExpression;
if ( backtracking==0 ) {
- value = new LongValueHandler( t.getText() );
+ sExpression = new BoolLispAtom( t.getText() );
}
}
break;
case 6 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:714:6: t= BOOL
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:661:7: t= NULL
{
t=(Token)input.LT(1);
- match(input,BOOL,FOLLOW_BOOL_in_lisp_atom1705); if (failed) return value;
+ match(input,NULL,FOLLOW_NULL_in_lisp_atom1333); if (failed) return sExpression;
if ( backtracking==0 ) {
- value = new BooleanValueHandler( t.getText() );
+ sExpression = new NullLispAtom( null );
}
}
break;
case 7 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:715:6: t= NULL
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:662:14: t= NAME
{
t=(Token)input.LT(1);
- match(input,NULL,FOLLOW_NULL_in_lisp_atom1723); if (failed) return value;
+ match(input,NAME,FOLLOW_NAME_in_lisp_atom1359); if (failed) return sExpression;
if ( backtracking==0 ) {
- value = ObjectValueHandler.NULL;
+ sExpression = new SymbolLispAtom( "\"" +t.getText() + "\"");
}
}
@@ -2369,13 +1865,13 @@
}
finally {
}
- return value;
+ return sExpression;
}
// $ANTLR end lisp_atom
// $ANTLR start literal
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:719:1: literal returns [String text] : (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL ) ;
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:667:1: literal returns [String text] : (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL ) ;
public final String literal() throws RecognitionException {
String text = null;
@@ -2385,56 +1881,56 @@
text = null;
try {
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:723:2: ( (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL ) )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:723:4: (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:671:2: ( (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL ) )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:671:4: (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL )
{
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:723:4: (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL )
- int alt22=6;
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:671:4: (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL )
+ int alt17=6;
switch ( input.LA(1) ) {
case STRING:
{
- alt22=1;
+ alt17=1;
}
break;
case NAME:
{
- alt22=2;
+ alt17=2;
}
break;
case INT:
{
- alt22=3;
+ alt17=3;
}
break;
case FLOAT:
{
- alt22=4;
+ alt17=4;
}
break;
case BOOL:
{
- alt22=5;
+ alt17=5;
}
break;
case NULL:
{
- alt22=6;
+ alt17=6;
}
break;
default:
if (backtracking>0) {failed=true; return text;}
NoViableAltException nvae =
- new NoViableAltException("723:4: (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL )", 22, 0, input);
+ new NoViableAltException("671:4: (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL )", 17, 0, input);
throw nvae;
}
- switch (alt22) {
+ switch (alt17) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:723:8: t= STRING
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:671:8: t= STRING
{
t=(Token)input.LT(1);
- match(input,STRING,FOLLOW_STRING_in_literal1759); if (failed) return text;
+ match(input,STRING,FOLLOW_STRING_in_literal1403); if (failed) return text;
if ( backtracking==0 ) {
text = getString( t );
}
@@ -2442,10 +1938,10 @@
}
break;
case 2 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:724:7: t= NAME
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:672:7: t= NAME
{
t=(Token)input.LT(1);
- match(input,NAME,FOLLOW_NAME_in_literal1772); if (failed) return text;
+ match(input,NAME,FOLLOW_NAME_in_literal1416); if (failed) return text;
if ( backtracking==0 ) {
text = t.getText();
}
@@ -2453,10 +1949,10 @@
}
break;
case 3 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:725:7: t= INT
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:673:7: t= INT
{
t=(Token)input.LT(1);
- match(input,INT,FOLLOW_INT_in_literal1788); if (failed) return text;
+ match(input,INT,FOLLOW_INT_in_literal1432); if (failed) return text;
if ( backtracking==0 ) {
text = t.getText();
}
@@ -2464,10 +1960,10 @@
}
break;
case 4 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:726:7: t= FLOAT
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:674:7: t= FLOAT
{
t=(Token)input.LT(1);
- match(input,FLOAT,FOLLOW_FLOAT_in_literal1803); if (failed) return text;
+ match(input,FLOAT,FOLLOW_FLOAT_in_literal1447); if (failed) return text;
if ( backtracking==0 ) {
text = t.getText();
}
@@ -2475,10 +1971,10 @@
}
break;
case 5 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:727:7: t= BOOL
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:675:7: t= BOOL
{
t=(Token)input.LT(1);
- match(input,BOOL,FOLLOW_BOOL_in_literal1816); if (failed) return text;
+ match(input,BOOL,FOLLOW_BOOL_in_literal1460); if (failed) return text;
if ( backtracking==0 ) {
text = t.getText();
}
@@ -2486,10 +1982,10 @@
}
break;
case 6 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:728:7: t= NULL
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:676:7: t= NULL
{
t=(Token)input.LT(1);
- match(input,NULL,FOLLOW_NULL_in_literal1830); if (failed) return text;
+ match(input,NULL,FOLLOW_NULL_in_literal1474); if (failed) return text;
if ( backtracking==0 ) {
text = null;
}
@@ -2516,126 +2012,104 @@
- public static final BitSet FOLLOW_importDescr_in_eval_script55 = new BitSet(new long[]{0x0000000000000012L});
- public static final BitSet FOLLOW_defrule_in_eval_script66 = new BitSet(new long[]{0x0000000000000012L});
- public static final BitSet FOLLOW_lisp_list_in_eval_script83 = new BitSet(new long[]{0x0000000000000012L});
- public static final BitSet FOLLOW_LEFT_PAREN_in_importDescr106 = new BitSet(new long[]{0x0000100000000000L});
- public static final BitSet FOLLOW_44_in_importDescr108 = new BitSet(new long[]{0x0000000000000020L});
- public static final BitSet FOLLOW_NAME_in_importDescr112 = new BitSet(new long[]{0x0000000000000040L});
- public static final BitSet FOLLOW_RIGHT_PAREN_in_importDescr115 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_LEFT_PAREN_in_deffunction141 = new BitSet(new long[]{0x0000000000000080L});
- public static final BitSet FOLLOW_DEFFUNCTION_in_deffunction149 = new BitSet(new long[]{0x0000000000000020L});
- public static final BitSet FOLLOW_NAME_in_deffunction158 = new BitSet(new long[]{0x0000000000000010L});
- public static final BitSet FOLLOW_LEFT_PAREN_in_deffunction166 = new BitSet(new long[]{0x0000000000000140L});
- public static final BitSet FOLLOW_VAR_in_deffunction176 = new BitSet(new long[]{0x0000000000000140L});
- public static final BitSet FOLLOW_RIGHT_PAREN_in_deffunction189 = new BitSet(new long[]{0x0000000000000050L});
- public static final BitSet FOLLOW_lisp_list_in_deffunction198 = new BitSet(new long[]{0x0000000000000050L});
- public static final BitSet FOLLOW_RIGHT_PAREN_in_deffunction209 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_LEFT_PAREN_in_defrule235 = new BitSet(new long[]{0x0000000000000200L});
- public static final BitSet FOLLOW_DEFRULE_in_defrule243 = new BitSet(new long[]{0x0000000000000020L});
- public static final BitSet FOLLOW_NAME_in_defrule247 = new BitSet(new long[]{0x0000000000000400L});
- public static final BitSet FOLLOW_STRING_in_defrule259 = new BitSet(new long[]{0x0000200000000110L});
- public static final BitSet FOLLOW_ruleAttribute_in_defrule265 = new BitSet(new long[]{0x0000200000000110L});
- public static final BitSet FOLLOW_ce_in_defrule273 = new BitSet(new long[]{0x0000200000000110L});
- public static final BitSet FOLLOW_45_in_defrule282 = new BitSet(new long[]{0x0000000000000050L});
- public static final BitSet FOLLOW_execution_block_in_defrule291 = new BitSet(new long[]{0x0000000000000040L});
- public static final BitSet FOLLOW_RIGHT_PAREN_in_defrule300 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_LEFT_PAREN_in_ruleAttribute317 = new BitSet(new long[]{0x0000000020000000L});
- public static final BitSet FOLLOW_DECLARE_in_ruleAttribute319 = new BitSet(new long[]{0x0000000000000050L});
- public static final BitSet FOLLOW_LEFT_PAREN_in_ruleAttribute326 = new BitSet(new long[]{0x0000000000000800L});
- public static final BitSet FOLLOW_salience_in_ruleAttribute330 = new BitSet(new long[]{0x0000000000000040L});
- public static final BitSet FOLLOW_RIGHT_PAREN_in_ruleAttribute334 = new BitSet(new long[]{0x0000000000000040L});
- public static final BitSet FOLLOW_RIGHT_PAREN_in_ruleAttribute341 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_SALIENCE_in_salience371 = new BitSet(new long[]{0x0000000000001000L});
- public static final BitSet FOLLOW_INT_in_salience375 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_and_ce_in_ce401 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_or_ce_in_ce411 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_not_ce_in_ce420 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_exists_ce_in_ce429 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_eval_ce_in_ce443 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_normal_pattern_in_ce457 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_bound_pattern_in_ce466 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_lisp_list_in_execution_block498 = new BitSet(new long[]{0x0000000000000012L});
- public static final BitSet FOLLOW_LEFT_PAREN_in_and_ce526 = new BitSet(new long[]{0x0000000000002000L});
- public static final BitSet FOLLOW_AND_in_and_ce531 = new BitSet(new long[]{0x0000000000000110L});
- public static final BitSet FOLLOW_ce_in_and_ce537 = new BitSet(new long[]{0x0000000000000150L});
- public static final BitSet FOLLOW_RIGHT_PAREN_in_and_ce546 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_LEFT_PAREN_in_or_ce574 = new BitSet(new long[]{0x0000000000004000L});
- public static final BitSet FOLLOW_OR_in_or_ce579 = new BitSet(new long[]{0x0000000000000110L});
- public static final BitSet FOLLOW_ce_in_or_ce585 = new BitSet(new long[]{0x0000000000000150L});
- public static final BitSet FOLLOW_RIGHT_PAREN_in_or_ce594 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_LEFT_PAREN_in_not_ce622 = new BitSet(new long[]{0x0000000000008000L});
- public static final BitSet FOLLOW_NOT_in_not_ce627 = new BitSet(new long[]{0x0000000000000110L});
- public static final BitSet FOLLOW_ce_in_not_ce633 = new BitSet(new long[]{0x0000000000000040L});
- public static final BitSet FOLLOW_RIGHT_PAREN_in_not_ce641 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_LEFT_PAREN_in_exists_ce670 = new BitSet(new long[]{0x0000000000010000L});
- public static final BitSet FOLLOW_EXISTS_in_exists_ce675 = new BitSet(new long[]{0x0000000000000110L});
- public static final BitSet FOLLOW_ce_in_exists_ce681 = new BitSet(new long[]{0x0000000000000040L});
- public static final BitSet FOLLOW_RIGHT_PAREN_in_exists_ce689 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_LEFT_PAREN_in_eval_ce717 = new BitSet(new long[]{0x0000000000020000L});
- public static final BitSet FOLLOW_TEST_in_eval_ce722 = new BitSet(new long[]{0x0000000000000010L});
- public static final BitSet FOLLOW_lisp_list_in_eval_ce730 = new BitSet(new long[]{0x0000000000000040L});
- public static final BitSet FOLLOW_RIGHT_PAREN_in_eval_ce741 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_LEFT_PAREN_in_normal_pattern769 = new BitSet(new long[]{0x0000000000000020L});
- public static final BitSet FOLLOW_NAME_in_normal_pattern776 = new BitSet(new long[]{0x0000000000000050L});
- public static final BitSet FOLLOW_field_constriant_in_normal_pattern782 = new BitSet(new long[]{0x0000000000000050L});
- public static final BitSet FOLLOW_RIGHT_PAREN_in_normal_pattern792 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_VAR_in_bound_pattern820 = new BitSet(new long[]{0x0000000000040000L});
- public static final BitSet FOLLOW_ASSIGN_OP_in_bound_pattern826 = new BitSet(new long[]{0x0000000000000010L});
- public static final BitSet FOLLOW_LEFT_PAREN_in_bound_pattern828 = new BitSet(new long[]{0x0000000000000020L});
- public static final BitSet FOLLOW_NAME_in_bound_pattern832 = new BitSet(new long[]{0x0000000000000050L});
- public static final BitSet FOLLOW_field_constriant_in_bound_pattern841 = new BitSet(new long[]{0x0000000000000050L});
- public static final BitSet FOLLOW_RIGHT_PAREN_in_bound_pattern848 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_LEFT_PAREN_in_field_constriant879 = new BitSet(new long[]{0x0000000000000020L});
- public static final BitSet FOLLOW_NAME_in_field_constriant883 = new BitSet(new long[]{0x0000000007E01520L});
- public static final BitSet FOLLOW_or_restr_connective_in_field_constriant898 = new BitSet(new long[]{0x0000000000000040L});
- public static final BitSet FOLLOW_RIGHT_PAREN_in_field_constriant904 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_and_restr_connective_in_or_restr_connective943 = new BitSet(new long[]{0x0000000000080002L});
- public static final BitSet FOLLOW_PIPE_in_or_restr_connective967 = new BitSet(new long[]{0x0000000007E01520L});
- public static final BitSet FOLLOW_and_restr_connective_in_or_restr_connective977 = new BitSet(new long[]{0x0000000000080002L});
- public static final BitSet FOLLOW_restriction_in_and_restr_connective1009 = new BitSet(new long[]{0x0000000000100002L});
- public static final BitSet FOLLOW_AMPERSAND_in_and_restr_connective1017 = new BitSet(new long[]{0x0000000007E01520L});
- public static final BitSet FOLLOW_restriction_in_and_restr_connective1019 = new BitSet(new long[]{0x0000000000100002L});
- public static final BitSet FOLLOW_TILDE_in_restriction1052 = new BitSet(new long[]{0x0000000007C01520L});
- public static final BitSet FOLLOW_predicate_constraint_in_restriction1068 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_return_value_restriction_in_restriction1084 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_variable_restriction_in_restriction1093 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_literal_restriction_in_restriction1105 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_COLON_in_predicate_constraint1147 = new BitSet(new long[]{0x0000000000000010L});
- public static final BitSet FOLLOW_lisp_list_in_predicate_constraint1153 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_EQUALS_in_return_value_restriction1179 = new BitSet(new long[]{0x0000000000000010L});
- public static final BitSet FOLLOW_lisp_list_in_return_value_restriction1186 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_VAR_in_variable_restriction1206 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_literal_in_literal_restriction1239 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_lisp_list2_in_eval_sExpressions1271 = new BitSet(new long[]{0x0000000000000012L});
- public static final BitSet FOLLOW_LEFT_PAREN_in_lisp_list21300 = new BitSet(new long[]{0x0000000000000120L});
- public static final BitSet FOLLOW_set_in_lisp_list21310 = new BitSet(new long[]{0x0000000007001570L});
- public static final BitSet FOLLOW_lisp_atom2_in_lisp_list21325 = new BitSet(new long[]{0x0000000007001570L});
- public static final BitSet FOLLOW_lisp_list2_in_lisp_list21336 = new BitSet(new long[]{0x0000000007001570L});
- public static final BitSet FOLLOW_RIGHT_PAREN_in_lisp_list21363 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_VAR_in_lisp_atom21413 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_STRING_in_lisp_atom21425 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_FLOAT_in_lisp_atom21447 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_INT_in_lisp_atom21459 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_BOOL_in_lisp_atom21472 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_NULL_in_lisp_atom21488 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_NAME_in_lisp_atom21514 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_LEFT_PAREN_in_lisp_list1545 = new BitSet(new long[]{0x0000000007001570L});
- public static final BitSet FOLLOW_lisp_atom_in_lisp_list1555 = new BitSet(new long[]{0x0000000007001570L});
- public static final BitSet FOLLOW_lisp_list_in_lisp_list1571 = new BitSet(new long[]{0x0000000007001570L});
- public static final BitSet FOLLOW_RIGHT_PAREN_in_lisp_list1601 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_VAR_in_lisp_atom1638 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_STRING_in_lisp_atom1650 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_NAME_in_lisp_atom1662 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_FLOAT_in_lisp_atom1677 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_INT_in_lisp_atom1689 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_BOOL_in_lisp_atom1705 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_NULL_in_lisp_atom1723 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_STRING_in_literal1759 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_NAME_in_literal1772 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_INT_in_literal1788 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_FLOAT_in_literal1803 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_BOOL_in_literal1816 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_NULL_in_literal1830 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_importDescr63 = new BitSet(new long[]{0x0000080000000000L});
+ public static final BitSet FOLLOW_43_in_importDescr65 = new BitSet(new long[]{0x0000000000000020L});
+ public static final BitSet FOLLOW_NAME_in_importDescr69 = new BitSet(new long[]{0x0000000000000040L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_importDescr72 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_defrule106 = new BitSet(new long[]{0x0000000000000080L});
+ public static final BitSet FOLLOW_DEFRULE_in_defrule114 = new BitSet(new long[]{0x0000000000000020L});
+ public static final BitSet FOLLOW_NAME_in_defrule118 = new BitSet(new long[]{0x0000000000000100L});
+ public static final BitSet FOLLOW_STRING_in_defrule130 = new BitSet(new long[]{0x0000100000010010L});
+ public static final BitSet FOLLOW_ruleAttribute_in_defrule136 = new BitSet(new long[]{0x0000100000010010L});
+ public static final BitSet FOLLOW_ce_in_defrule144 = new BitSet(new long[]{0x0000100000010010L});
+ public static final BitSet FOLLOW_44_in_defrule153 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_lisp_list_in_defrule162 = new BitSet(new long[]{0x0000000000000040L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_defrule171 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_ruleAttribute188 = new BitSet(new long[]{0x0000000010000000L});
+ public static final BitSet FOLLOW_DECLARE_in_ruleAttribute190 = new BitSet(new long[]{0x0000000000000050L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_ruleAttribute197 = new BitSet(new long[]{0x0000000000000200L});
+ public static final BitSet FOLLOW_salience_in_ruleAttribute201 = new BitSet(new long[]{0x0000000000000040L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_ruleAttribute205 = new BitSet(new long[]{0x0000000000000040L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_ruleAttribute212 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_SALIENCE_in_salience242 = new BitSet(new long[]{0x0000000000000400L});
+ public static final BitSet FOLLOW_INT_in_salience246 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_and_ce_in_ce272 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_or_ce_in_ce282 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_not_ce_in_ce291 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_exists_ce_in_ce300 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_eval_ce_in_ce314 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_normal_pattern_in_ce328 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_bound_pattern_in_ce337 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_and_ce364 = new BitSet(new long[]{0x0000000000000800L});
+ public static final BitSet FOLLOW_AND_in_and_ce369 = new BitSet(new long[]{0x0000000000010010L});
+ public static final BitSet FOLLOW_ce_in_and_ce375 = new BitSet(new long[]{0x0000000000010050L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_and_ce384 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_or_ce412 = new BitSet(new long[]{0x0000000000001000L});
+ public static final BitSet FOLLOW_OR_in_or_ce417 = new BitSet(new long[]{0x0000000000010010L});
+ public static final BitSet FOLLOW_ce_in_or_ce423 = new BitSet(new long[]{0x0000000000010050L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_or_ce432 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_not_ce460 = new BitSet(new long[]{0x0000000000002000L});
+ public static final BitSet FOLLOW_NOT_in_not_ce465 = new BitSet(new long[]{0x0000000000010010L});
+ public static final BitSet FOLLOW_ce_in_not_ce471 = new BitSet(new long[]{0x0000000000000040L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_not_ce479 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_exists_ce508 = new BitSet(new long[]{0x0000000000004000L});
+ public static final BitSet FOLLOW_EXISTS_in_exists_ce513 = new BitSet(new long[]{0x0000000000010010L});
+ public static final BitSet FOLLOW_ce_in_exists_ce519 = new BitSet(new long[]{0x0000000000000040L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_exists_ce527 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_eval_ce546 = new BitSet(new long[]{0x0000000000008000L});
+ public static final BitSet FOLLOW_TEST_in_eval_ce551 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_lisp_list_in_eval_ce558 = new BitSet(new long[]{0x0000000000000040L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_eval_ce568 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_normal_pattern596 = new BitSet(new long[]{0x0000000000000020L});
+ public static final BitSet FOLLOW_NAME_in_normal_pattern603 = new BitSet(new long[]{0x0000000000000050L});
+ public static final BitSet FOLLOW_field_constriant_in_normal_pattern609 = new BitSet(new long[]{0x0000000000000050L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_normal_pattern619 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_VAR_in_bound_pattern647 = new BitSet(new long[]{0x0000000000020000L});
+ public static final BitSet FOLLOW_ASSIGN_OP_in_bound_pattern653 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_bound_pattern655 = new BitSet(new long[]{0x0000000000000020L});
+ public static final BitSet FOLLOW_NAME_in_bound_pattern659 = new BitSet(new long[]{0x0000000000000050L});
+ public static final BitSet FOLLOW_field_constriant_in_bound_pattern668 = new BitSet(new long[]{0x0000000000000050L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_bound_pattern675 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_field_constriant706 = new BitSet(new long[]{0x0000000000000020L});
+ public static final BitSet FOLLOW_NAME_in_field_constriant710 = new BitSet(new long[]{0x0000000003F10520L});
+ public static final BitSet FOLLOW_or_restr_connective_in_field_constriant725 = new BitSet(new long[]{0x0000000000000040L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_field_constriant731 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_and_restr_connective_in_or_restr_connective770 = new BitSet(new long[]{0x0000000000040002L});
+ public static final BitSet FOLLOW_PIPE_in_or_restr_connective794 = new BitSet(new long[]{0x0000000003F10520L});
+ public static final BitSet FOLLOW_and_restr_connective_in_or_restr_connective804 = new BitSet(new long[]{0x0000000000040002L});
+ public static final BitSet FOLLOW_restriction_in_and_restr_connective836 = new BitSet(new long[]{0x0000000000080002L});
+ public static final BitSet FOLLOW_AMPERSAND_in_and_restr_connective844 = new BitSet(new long[]{0x0000000003F10520L});
+ public static final BitSet FOLLOW_restriction_in_and_restr_connective846 = new BitSet(new long[]{0x0000000000080002L});
+ public static final BitSet FOLLOW_TILDE_in_restriction879 = new BitSet(new long[]{0x0000000003E10520L});
+ public static final BitSet FOLLOW_predicate_constraint_in_restriction895 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_return_value_restriction_in_restriction911 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_variable_restriction_in_restriction920 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_literal_restriction_in_restriction932 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_COLON_in_predicate_constraint965 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_lisp_list_in_predicate_constraint971 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_EQUALS_in_return_value_restriction990 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_lisp_list_in_return_value_restriction997 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_VAR_in_variable_restriction1016 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_literal_in_literal_restriction1049 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_lisp_list_in_eval_sExpressions1081 = new BitSet(new long[]{0x0000000000000012L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_lisp_list1110 = new BitSet(new long[]{0x0000000000010020L});
+ public static final BitSet FOLLOW_NAME_in_lisp_list1127 = new BitSet(new long[]{0x0000000003810570L});
+ public static final BitSet FOLLOW_VAR_in_lisp_list1147 = new BitSet(new long[]{0x0000000003810570L});
+ public static final BitSet FOLLOW_lisp_atom_in_lisp_list1170 = new BitSet(new long[]{0x0000000003810570L});
+ public static final BitSet FOLLOW_lisp_list_in_lisp_list1181 = new BitSet(new long[]{0x0000000003810570L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_lisp_list1208 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_VAR_in_lisp_atom1258 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_STRING_in_lisp_atom1270 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_FLOAT_in_lisp_atom1292 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_INT_in_lisp_atom1304 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_BOOL_in_lisp_atom1317 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_NULL_in_lisp_atom1333 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_NAME_in_lisp_atom1359 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_STRING_in_literal1403 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_NAME_in_literal1416 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_INT_in_literal1432 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_FLOAT_in_literal1447 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_BOOL_in_literal1460 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_NULL_in_literal1474 = new BitSet(new long[]{0x0000000000000002L});
}
\ No newline at end of file
Modified: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/CLPParser.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/CLPParser.java 2008-01-26 12:42:49 UTC (rev 18147)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/CLPParser.java 2008-01-26 18:06:51 UTC (rev 18148)
@@ -308,7 +308,7 @@
// C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:230:7: fc= lisp_list[shell, new LispForm(shell) ]
{
pushFollow(FOLLOW_lisp_list_in_eval_script83);
- fc=lisp_list(shell, new LispForm(shell) );
+ fc=lisp_list(shell, new LispForm2(shell) );
_fsp--;
if (failed) return ;
if ( backtracking==0 ) {
@@ -452,7 +452,7 @@
// C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:266:6: fc= lisp_list[context, new LispForm(context) ]
{
pushFollow(FOLLOW_lisp_list_in_deffunction198);
- fc=lisp_list(context, new LispForm(context) );
+ fc=lisp_list(context, new LispForm2(context) );
_fsp--;
if (failed) return function;
if ( backtracking==0 ) {
@@ -906,7 +906,7 @@
// C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLP.g:377:4: fc= lisp_list[context, new LispForm(context) ]
{
pushFollow(FOLLOW_lisp_list_in_execution_block498);
- fc=lisp_list(context, new LispForm(context) );
+ fc=lisp_list(context, new LispForm2(context) );
_fsp--;
if (failed) return engine;
if ( backtracking==0 ) {
@@ -1172,7 +1172,7 @@
}
pushFollow(FOLLOW_lisp_list_in_eval_ce730);
- fc=lisp_list(context, new LispForm(context));
+ fc=lisp_list(context, new LispForm2(context));
_fsp--;
if (failed) return ;
if ( backtracking==0 ) {
@@ -1677,7 +1677,7 @@
{
match(input,COLON,FOLLOW_COLON_in_predicate_constraint1147); if (failed) return ;
pushFollow(FOLLOW_lisp_list_in_predicate_constraint1153);
- fc=lisp_list(context, new LispForm(context));
+ fc=lisp_list(context, new LispForm2(context));
_fsp--;
if (failed) return ;
if ( backtracking==0 ) {
@@ -1717,7 +1717,7 @@
{
match(input,EQUALS,FOLLOW_EQUALS_in_return_value_restriction1179); if (failed) return ;
pushFollow(FOLLOW_lisp_list_in_return_value_restriction1186);
- func=lisp_list(context, new LispForm(context));
+ func=lisp_list(context, new LispForm2(context));
_fsp--;
if (failed) return ;
if ( backtracking==0 ) {
Modified: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/Deffunction.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/Deffunction.java 2008-01-26 12:42:49 UTC (rev 18147)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/Deffunction.java 2008-01-26 18:06:51 UTC (rev 18148)
@@ -99,7 +99,7 @@
}
public LispList createList(int index) {
- return new LispForm();
+ return new LispForm2();
}
public VariableValueHandler createLocalVariable(String identifier) {
Modified: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/LispData.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/LispData.java 2008-01-26 12:42:49 UTC (rev 18147)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/LispData.java 2008-01-26 18:06:51 UTC (rev 18148)
@@ -18,7 +18,7 @@
}
public LispList createList() {
- LispList list = new LispForm();
+ LispList list = new LispForm2();
list.setContext( this.context );
Deleted: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/LispForm.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/LispForm.java 2008-01-26 12:42:49 UTC (rev 18147)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/LispForm.java 2008-01-26 18:06:51 UTC (rev 18148)
@@ -1,72 +0,0 @@
-package org.drools.clp;
-
-import org.drools.clp.valuehandlers.FunctionCaller;
-
-public class LispForm
- implements
- LispList {
- private BuildContext context;
- private FunctionCaller caller;
-
- public LispForm(BuildContext context) {
- this.context = context;
- }
-
- public LispForm() {
- }
-
- public ValueHandler getValueHandler() {
- return this.caller;
- }
-
- public void add(ValueHandler valueHandler) {
- if ( this.caller == null ) {
- // we know this is a string literal, so can use null for the context
- this.caller = new FunctionCaller( this.context.getFunctionRegistry().getFunction( valueHandler.getStringValue( null ) ) );
-
- //We can only call initCallback on known functions
- FunctionDelegator delegator = (FunctionDelegator) this.caller.getFunction();
- if ( delegator.getFunction() != null ) {
- delegator.getFunction().initCallback( context );
- }
-
- } else {
- // we can only execute callbacks on known functions
- FunctionDelegator delegator = (FunctionDelegator) this.caller.getFunction();
- if ( delegator.getFunction() != null ) {
- int length;
- if ( this.caller == null || this.caller.getParameters() == null ) {
- length = 0;
- } else {
- length = (this.caller == null) ? 0 : this.caller.getParameters().length;
- }
- delegator.getFunction().addParameterCallback( length,
- this.caller,
- valueHandler,
- context );
- }
- //this.caller.addParameter( valueHandler );
-
- }
- }
-
- public LispList createList() {
- int length;
- if ( this.caller == null || this.caller.getParameters() == null ) {
- length = 0;
- } else {
- length = (this.caller == null) ? 0 : this.caller.getParameters().length;
- }
-
- LispList list = this.caller.createList( length );
-
- list.setContext( this.context );
-
- return list;
- }
-
- public void setContext(BuildContext context) {
- this.context = context;
- }
-
-}
Copied: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/LispForm2.java (from rev 18083, labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/LispForm.java)
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/LispForm2.java (rev 0)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/LispForm2.java 2008-01-26 18:06:51 UTC (rev 18148)
@@ -0,0 +1,72 @@
+package org.drools.clp;
+
+import org.drools.clp.valuehandlers.FunctionCaller;
+
+public class LispForm2
+ implements
+ LispList {
+ private BuildContext context;
+ private FunctionCaller caller;
+
+ public LispForm2(BuildContext context) {
+ this.context = context;
+ }
+
+ public LispForm2() {
+ }
+
+ public ValueHandler getValueHandler() {
+ return this.caller;
+ }
+
+ public void add(ValueHandler valueHandler) {
+ if ( this.caller == null ) {
+ // we know this is a string literal, so can use null for the context
+ this.caller = new FunctionCaller( this.context.getFunctionRegistry().getFunction( valueHandler.getStringValue( null ) ) );
+
+ //We can only call initCallback on known functions
+ FunctionDelegator delegator = (FunctionDelegator) this.caller.getFunction();
+ if ( delegator.getFunction() != null ) {
+ delegator.getFunction().initCallback( context );
+ }
+
+ } else {
+ // we can only execute callbacks on known functions
+ FunctionDelegator delegator = (FunctionDelegator) this.caller.getFunction();
+ if ( delegator.getFunction() != null ) {
+ int length;
+ if ( this.caller == null || this.caller.getParameters() == null ) {
+ length = 0;
+ } else {
+ length = (this.caller == null) ? 0 : this.caller.getParameters().length;
+ }
+ delegator.getFunction().addParameterCallback( length,
+ this.caller,
+ valueHandler,
+ context );
+ }
+ //this.caller.addParameter( valueHandler );
+
+ }
+ }
+
+ public LispList createList() {
+ int length;
+ if ( this.caller == null || this.caller.getParameters() == null ) {
+ length = 0;
+ } else {
+ length = (this.caller == null) ? 0 : this.caller.getParameters().length;
+ }
+
+ LispList list = this.caller.createList( length );
+
+ list.setContext( this.context );
+
+ return list;
+ }
+
+ public void setContext(BuildContext context) {
+ this.context = context;
+ }
+
+}
Modified: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/functions/BaseFunction.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/functions/BaseFunction.java 2008-01-26 12:42:49 UTC (rev 18147)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/functions/BaseFunction.java 2008-01-26 18:06:51 UTC (rev 18148)
@@ -2,7 +2,7 @@
import org.drools.clp.BuildContext;
import org.drools.clp.Function;
-import org.drools.clp.LispForm;
+import org.drools.clp.LispForm2;
import org.drools.clp.LispList;
import org.drools.clp.ValueHandler;
import org.drools.clp.valuehandlers.FunctionCaller;
@@ -24,7 +24,7 @@
}
public LispList createList(int index) {
- return new LispForm();
+ return new LispForm2();
}
public String toString() {
Modified: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/functions/IfFunction.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/functions/IfFunction.java 2008-01-26 12:42:49 UTC (rev 18147)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/functions/IfFunction.java 2008-01-26 18:06:51 UTC (rev 18148)
@@ -3,7 +3,7 @@
import org.drools.clp.BuildContext;
import org.drools.clp.ExecutionContext;
import org.drools.clp.Function;
-import org.drools.clp.LispForm;
+import org.drools.clp.LispForm2;
import org.drools.clp.LispList;
import org.drools.clp.ValueHandler;
import org.drools.clp.valuehandlers.BooleanValueHandler;
Modified: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/functions/SwitchCaseFunction.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/functions/SwitchCaseFunction.java 2008-01-26 12:42:49 UTC (rev 18147)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/functions/SwitchCaseFunction.java 2008-01-26 18:06:51 UTC (rev 18148)
@@ -3,7 +3,7 @@
import org.drools.clp.BuildContext;
import org.drools.clp.ExecutionContext;
import org.drools.clp.Function;
-import org.drools.clp.LispForm;
+import org.drools.clp.LispForm2;
import org.drools.clp.LispList;
import org.drools.clp.ValueHandler;
import org.drools.clp.valuehandlers.BaseValueHandler;
Modified: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/functions/SwitchDefaultFunction.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/functions/SwitchDefaultFunction.java 2008-01-26 12:42:49 UTC (rev 18147)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/functions/SwitchDefaultFunction.java 2008-01-26 18:06:51 UTC (rev 18148)
@@ -3,7 +3,7 @@
import org.drools.clp.ExecutionBuildContext;
import org.drools.clp.ExecutionContext;
import org.drools.clp.Function;
-import org.drools.clp.LispForm;
+import org.drools.clp.LispForm2;
import org.drools.clp.LispList;
import org.drools.clp.ValueHandler;
import org.drools.clp.valuehandlers.BooleanValueHandler;
Modified: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/functions/SwitchFunction.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/functions/SwitchFunction.java 2008-01-26 12:42:49 UTC (rev 18147)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/functions/SwitchFunction.java 2008-01-26 18:06:51 UTC (rev 18148)
@@ -3,7 +3,7 @@
import org.drools.clp.BuildContext;
import org.drools.clp.ExecutionContext;
import org.drools.clp.Function;
-import org.drools.clp.LispForm;
+import org.drools.clp.LispForm2;
import org.drools.clp.LispList;
import org.drools.clp.ValueHandler;
import org.drools.clp.valuehandlers.BaseValueHandler;
Modified: labs/jbossrules/trunk/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g 2008-01-26 12:42:49 UTC (rev 18147)
+++ labs/jbossrules/trunk/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g 2008-01-26 18:06:51 UTC (rev 18148)
@@ -226,11 +226,11 @@
*/
eval_script[Shell shell]
- : ( i=importDescr{ shell.importDescrHandler( i ); }
+ : /*( i=importDescr{ shell.importDescrHandler( i ); }
| r=defrule { shell.ruleDescrHandler( r ); }
//e=execution_block { parserHandler.lispFormHandler( e ); }
| fc=lisp_list[shell, new LispForm(shell) ] { shell.lispFormHandler(fc); }
- )*
+ )**/
;
importDescr returns[ImportDescr importDescr]
@@ -249,6 +249,7 @@
;
*/
+/*
deffunction returns[Deffunction function]
@init {
BuildContext context = null;
@@ -268,6 +269,7 @@
(fc=lisp_list[context, new LispForm(context) ] { context.addFunction( (FunctionCaller) fc ); })*
RIGHT_PAREN
;
+*/
/*
deffunction_params[BuildContext context]
@@ -330,7 +332,7 @@
'=>'
- engine=execution_block { rule.setConsequence( engine ); }
+ t=lisp_list { rule.setConsequence( t ); }
RIGHT_PAREN
;
@@ -368,17 +370,7 @@
| bound_pattern[in_ce, declarations]
)
;
-
-execution_block returns[ExecutionEngine engine]
- @init {
- engine = new BlockExecutionEngine();
- BuildContext context = new ExecutionBuildContext( engine, functionRegistry );
- }
- :
- (fc=lisp_list[context, new LispForm(context) ] { context.addFunction( (FunctionCaller) fc ); })*
- ;
-
and_ce[ConditionalElementDescr in_ce, Set declarations]
@init {
AndDescr andDescr= null;
@@ -432,20 +424,9 @@
;
eval_ce[ConditionalElementDescr in_ce, Set declarations]
- @init {
- EvalDescr evalDescr= null;
- ExecutionEngine engine = new CLPEval();
- BuildContext context = new ExecutionBuildContext( engine, functionRegistry );
- }
: LEFT_PAREN
- TEST {
- evalDescr = new EvalDescr();
- in_ce.addDescr( evalDescr );
- }
- fc=lisp_list[context, new LispForm(context)] {
- engine.addFunction( (FunctionCaller) fc );
- evalDescr.setContent( engine );
- }
+ TEST
+ t=lisp_list { EvalDescr evalDescr = new EvalDescr(); evalDescr.setContent( t ); in_ce.addDescr( evalDescr ); }
RIGHT_PAREN
;
@@ -590,29 +571,15 @@
;
predicate_constraint[RestrictionConnectiveDescr rc, String op, ConditionalElementDescr base]
- @init {
- ExecutionEngine engine = new CLPPredicate();
- BuildContext context = new ExecutionBuildContext( engine, functionRegistry );
- }
: COLON
- fc=lisp_list[context, new LispForm(context)] {
- engine.addFunction( (FunctionCaller) fc );
- $rc.addRestriction( new PredicateDescr( engine ) );
- }
+ t=lisp_list { $rc.addRestriction( new PredicateDescr( t ) ); }
;
return_value_restriction[String op, RestrictionConnectiveDescr rc]
- @init {
- ExecutionEngine engine = new CLPReturnValue();
- BuildContext context = new ExecutionBuildContext( engine, functionRegistry );
- }
: EQUALS
- func=lisp_list[context, new LispForm(context)] {
- engine.addFunction( (FunctionCaller) func );
- rc.addRestriction( new ReturnValueRestrictionDescr (op, engine ) );
- }
+ t=lisp_list {rc.addRestriction( new ReturnValueRestrictionDescr (op, t ) ); }
;
//will add a declaration field binding, if this is the first time the name is used
@@ -647,25 +614,30 @@
list = new ArrayList<SExpression>();
}
:
- (a=lisp_list2 { list.add( a ); })*
+ (a=lisp_list { list.add( a ); })*
// { sExpressions = ( SExpression[] ) list.toArray( new SExpression[ list.size () ] ); }
;
-lisp_list2 returns[SExpression sExpression]
+lisp_list returns[SExpression sExpression]
@init {
List list = new ArrayList();
sExpression = null;
}
: LEFT_PAREN
- t=(NAME|VAR) { list.add( new SymbolLispAtom2( t.getText() ) ); }
- ( a=lisp_atom2 { list.add( a ); }
- | a=lisp_list2 { list.add( a ); }
+
+ (
+ t=NAME { list.add( new SymbolLispAtom( t.getText() ) ); }
+ |
+ t=VAR { list.add( new VariableLispAtom( t.getText() ) ); }
+ )
+ ( a=lisp_atom { list.add( a ); }
+ | a=lisp_list { list.add( a ); }
)*
RIGHT_PAREN
- { sExpression = new LispForm2( ( SExpression[] ) list.toArray( new SExpression[ list.size () ] ) ); }
+ { sExpression = new LispForm( ( SExpression[] ) list.toArray( new SExpression[ list.size () ] ) ); }
;
-lisp_atom2 returns[SExpression sExpression]
+lisp_atom returns[SExpression sExpression]
@init {
sExpression = null;
}
@@ -681,41 +653,17 @@
)*/
(
- t=VAR { sExpression = new VariableLispAtom2( t.getText() ); }
- | t=STRING { sExpression = new StringLispAtom2( getString( t ) ); }
- | t=FLOAT { sExpression = new FloatLispAtom2( t.getText() ); }
- | t=INT { sExpression = new IntLispAtom2( t.getText() ); }
- | t=BOOL { sExpression = new BoolLispAtom2( t.getText() ); }
- | t=NULL { sExpression = new NullLispAtom2( null ); }
- | t=NAME { sExpression = new SymbolLispAtom2( "\"" +t.getText() + "\""); }
+ t=VAR { sExpression = new VariableLispAtom( t.getText() ); }
+ | t=STRING { sExpression = new StringLispAtom( getString( t ) ); }
+ | t=FLOAT { sExpression = new FloatLispAtom( t.getText() ); }
+ | t=INT { sExpression = new IntLispAtom( t.getText() ); }
+ | t=BOOL { sExpression = new BoolLispAtom( t.getText() ); }
+ | t=NULL { sExpression = new NullLispAtom( null ); }
+ | t=NAME { sExpression = new SymbolLispAtom( "\"" +t.getText() + "\""); }
)
;
-
-lisp_list[BuildContext context, LispList list] returns[ValueHandler valueHandler]
- : LEFT_PAREN
- ( a=lisp_atom[context] { list.add( a ); }
- | a=lisp_list[context, list.createList()] { list.add( a ); }
- )*
- RIGHT_PAREN
- { valueHandler = list.getValueHandler(); }
- ;
-lisp_atom[BuildContext context] returns[ValueHandler value]
- @init {
- value = null;
- }
- :
- ( t=VAR { value = context.getVariableValueHandler(t.getText() ); }
- | t=STRING { value = new ObjectValueHandler( getString( t ) ); }
- | t=NAME { value = new ObjectValueHandler( t.getText() ); }
- | t=FLOAT { value = new DoubleValueHandler( t.getText() ); }
- | t=INT { value = new LongValueHandler( t.getText() ); }
- | t=BOOL { value = new BooleanValueHandler( t.getText() ); }
- | t=NULL { value = ObjectValueHandler.NULL; }
- )
- ;
-
literal returns [String text]
@init {
text = null;
@@ -738,7 +686,7 @@
;
DEFRULE : 'defrule';
-DEFFUNCTION : 'deffunction';
+//DEFFUNCTION : 'deffunction';
OR : 'or';
AND : 'and';
NOT : 'not';
Modified: labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/LhsClpParserTest.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/LhsClpParserTest.java 2008-01-26 12:42:49 UTC (rev 18147)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/LhsClpParserTest.java 2008-01-26 18:06:51 UTC (rev 18148)
@@ -47,7 +47,7 @@
public void testParseFunction() throws Exception {
BuildContext context = new ExecutionBuildContext( new CLPPredicate(), this.registry );
- FunctionCaller fc = ( FunctionCaller ) parse( "(< 1 2)" ).lisp_list( context, new LispForm(context) );
+ FunctionCaller fc = ( FunctionCaller ) parse( "(< 1 2)" ).lisp_list( context, new LispForm2(context) );
assertEquals( "<", fc.getName() );
assertEquals( new LongValueHandler( 1 ), fc.getParameters()[0] );
Modified: labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/BaseInfixFunction.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/BaseInfixFunction.java 2008-01-26 12:42:49 UTC (rev 18147)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/BaseInfixFunction.java 2008-01-26 18:06:51 UTC (rev 18148)
@@ -3,13 +3,13 @@
public abstract class BaseInfixFunction implements Function {
public abstract String getMappedSymbol();
- public void dump(LispForm2 lispForm, Appendable appendable) {
+ public void dump(LispForm lispForm, Appendable appendable, MVELClipsContext context) {
SExpression[] sExpressions = lispForm.getSExpressions();
appendable.append("(");
for ( int i = 1, length = sExpressions.length; i < length; i++) {
- FunctionHandlers.getInstance().dump( sExpressions[i], appendable );
+ FunctionHandlers.dump( sExpressions[i], appendable, context );
if ( i != length -1 ) {
appendable.append( getMappedSymbol() );
Copied: labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/BoolLispAtom.java (from rev 18083, labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/BoolLispAtom2.java)
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/BoolLispAtom.java (rev 0)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/BoolLispAtom.java 2008-01-26 18:06:51 UTC (rev 18148)
@@ -0,0 +1,12 @@
+/**
+ *
+ */
+package org.drools.clp.mvel;
+
+public class BoolLispAtom extends LispAtom {
+
+ public BoolLispAtom(String value) {
+ super(value);
+ }
+
+}
\ No newline at end of file
Deleted: labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/BoolLispAtom2.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/BoolLispAtom2.java 2008-01-26 12:42:49 UTC (rev 18147)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/BoolLispAtom2.java 2008-01-26 18:06:51 UTC (rev 18148)
@@ -1,12 +0,0 @@
-/**
- *
- */
-package org.drools.clp.mvel;
-
-public class BoolLispAtom2 extends LispAtom2 {
-
- public BoolLispAtom2(String value) {
- super(value);
- }
-
-}
\ No newline at end of file
Modified: labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/CreateListFunction.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/CreateListFunction.java 2008-01-26 12:42:49 UTC (rev 18147)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/CreateListFunction.java 2008-01-26 18:06:51 UTC (rev 18148)
@@ -7,14 +7,14 @@
return name;
}
- public void dump(LispForm2 lispForm, Appendable appendable) {
+ public void dump(LispForm lispForm, Appendable appendable, MVELClipsContext context) {
SExpression[] sExpressions = lispForm.getSExpressions();
appendable.append("[");
for ( int i = 1, length = sExpressions.length; i < length; i++) {
- FunctionHandlers.getInstance().dump( sExpressions[i], appendable );
+ FunctionHandlers.dump( sExpressions[i], appendable, context );
if ( i != length -1 ) {
appendable.append( "," );
Added: labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/DeffunctionFunction.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/DeffunctionFunction.java (rev 0)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/DeffunctionFunction.java 2008-01-26 18:06:51 UTC (rev 18148)
@@ -0,0 +1,48 @@
+package org.drools.clp.mvel;
+
+import java.io.Serializable;
+import java.util.Map;
+
+import org.mvel.MVEL;
+import org.mvel.compiler.CompiledExpression;
+import org.mvel.compiler.ExpressionCompiler;
+import org.mvel.util.CompilerTools;
+
+public class DeffunctionFunction implements Function {
+ private static final String name = "deffunction";
+
+ public String getName() {
+ return name;
+ }
+
+ public void dump(LispForm lispForm, Appendable appendablex, MVELClipsContext context) {
+ SExpression[] sExpressions = lispForm.getSExpressions();
+
+ String functionName = ( (LispAtom) sExpressions[1]).getValue().trim();
+
+ Appendable functionText = new StringBuilderAppendable();
+
+ functionName = functionName.substring( 1, functionName.length() -1 );
+
+ functionText.append( "function " + functionName + "(" );
+
+ LispForm params = (LispForm) sExpressions[2];
+ for ( int i = 0, length = params.getSExpressions().length; i < length; i++ ) {
+ functionText.append( ( (LispAtom) params.getSExpressions()[i]).getValue() );
+ if ( i < length-1 ) {
+ functionText.append( ", " );
+ }
+ }
+
+ functionText.append( ") {\n" );
+ FunctionHandlers.dump( sExpressions[3], functionText, context );
+ functionText.append( "}" );
+
+ ExpressionCompiler compiler = new ExpressionCompiler( functionText.toString() );
+ Serializable s1 = compiler.compile();
+ Map<String, org.mvel.ast.Function> map = CompilerTools.extractAllDeclaredFunctions((CompiledExpression) s1);
+ for ( org.mvel.ast.Function function : map.values() ) {
+ context.addFunction( function );
+ }
+ }
+}
Copied: labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/FloatLispAtom.java (from rev 18083, labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/FloatLispAtom2.java)
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/FloatLispAtom.java (rev 0)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/FloatLispAtom.java 2008-01-26 18:06:51 UTC (rev 18148)
@@ -0,0 +1,12 @@
+/**
+ *
+ */
+package org.drools.clp.mvel;
+
+public class FloatLispAtom extends LispAtom {
+
+ public FloatLispAtom(String value) {
+ super(value);
+ }
+
+}
\ No newline at end of file
Deleted: labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/FloatLispAtom2.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/FloatLispAtom2.java 2008-01-26 12:42:49 UTC (rev 18147)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/FloatLispAtom2.java 2008-01-26 18:06:51 UTC (rev 18148)
@@ -1,12 +0,0 @@
-/**
- *
- */
-package org.drools.clp.mvel;
-
-public class FloatLispAtom2 extends LispAtom2 {
-
- public FloatLispAtom2(String value) {
- super(value);
- }
-
-}
\ No newline at end of file
Modified: labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/Function.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/Function.java 2008-01-26 12:42:49 UTC (rev 18147)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/Function.java 2008-01-26 18:06:51 UTC (rev 18148)
@@ -4,6 +4,6 @@
public abstract String getName();
- public abstract void dump(LispForm2 lispForm, Appendable appendable);
+ public abstract void dump(LispForm lispForm, Appendable appendable, MVELClipsContext context);
}
\ No newline at end of file
Modified: labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/FunctionHandlers.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/FunctionHandlers.java 2008-01-26 12:42:49 UTC (rev 18147)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/FunctionHandlers.java 2008-01-26 18:06:51 UTC (rev 18148)
@@ -24,14 +24,26 @@
this.map.put( function.getName(), function );
}
- public void dump(SExpression sExpression, Appendable appendable) {
- if ( sExpression instanceof LispAtom2 ) {
- appendable.append( ( ( LispAtom2 ) sExpression).getValue() );
+ public static void dump(SExpression sExpression, Appendable appendable, MVELClipsContext context) {
+ if ( sExpression instanceof LispAtom ) {
+ appendable.append( ( ( LispAtom ) sExpression).getValue() );
} else {
- LispForm2 form = (LispForm2) sExpression;
- Function function = FunctionHandlers.getInstance().getFunction( ( (LispAtom2) form.getSExpressions()[0]).getValue() );
- function.dump(form, appendable );
-
+ LispForm form = (LispForm) sExpression;
+ String functionName = ( (LispAtom) form.getSExpressions()[0]).getValue();
+ Function function = FunctionHandlers.getInstance().getFunction( functionName );
+ if ( function != null ) {
+ function.dump(form, appendable, context );
+ } else {
+ // execute as user function
+ appendable.append( functionName + "(" );
+ for ( int i = 1, length = form.getSExpressions().length; i < length; i++ ) {
+ dump( form.getSExpressions()[i], appendable, context );
+ if ( i < length -1 ) {
+ appendable.append( ", " );
+ }
+ }
+ appendable.append( ")" );
+ }
}
}
Modified: labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/IfFunction.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/IfFunction.java 2008-01-26 12:42:49 UTC (rev 18147)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/IfFunction.java 2008-01-26 18:06:51 UTC (rev 18148)
@@ -7,22 +7,37 @@
return name;
}
- public void dump(LispForm2 lispForm, Appendable appendable) {
+ public void dump(LispForm lispForm, Appendable appendable, MVELClipsContext context) {
SExpression[] sExpressions = lispForm.getSExpressions();
appendable.append( "if " );
- FunctionHandlers.getInstance().dump( sExpressions[1], appendable );
+ FunctionHandlers.dump( sExpressions[1], appendable, context );
appendable.append( "{" );
- FunctionHandlers.getInstance().dump( sExpressions[3], appendable );
+ int i = 3;
+ for ( int length = sExpressions.length; i < length; i++ ) {
+ SExpression sExpr = ( SExpression ) sExpressions[i];
+ if ( ( sExpr instanceof LispAtom ) && "\"else\"".equals( ((LispAtom)sExpr).getValue() ) ) {
+ i++;
+ break;
+ }
+ FunctionHandlers.dump( sExpressions[i], appendable, context );
+ }
appendable.append( "}" );
- if ( sExpressions.length > 4 ) {
- appendable.append( "else {" );
- FunctionHandlers.getInstance().dump( sExpressions[5], appendable );
- appendable.append( "}" );
- }
+ while ( i < sExpressions.length ) {
+ appendable.append( " else {" );
+ for ( int length = sExpressions.length; i < length; i++ ) {
+ SExpression sExpr = ( SExpression ) sExpressions[i];
+ if ( ( sExpr instanceof LispAtom ) && "\"else\"".equals( ((LispAtom)sExpr).getValue() ) ) {
+ i++;
+ break;
+ }
+ FunctionHandlers.dump( sExpressions[i], appendable, context );
+ }
+ appendable.append( "}" );
+ }
}
}
Copied: labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/IntLispAtom.java (from rev 18083, labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/IntLispAtom2.java)
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/IntLispAtom.java (rev 0)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/IntLispAtom.java 2008-01-26 18:06:51 UTC (rev 18148)
@@ -0,0 +1,12 @@
+/**
+ *
+ */
+package org.drools.clp.mvel;
+
+public class IntLispAtom extends LispAtom {
+
+ public IntLispAtom(String value) {
+ super(value);
+ }
+
+}
\ No newline at end of file
Deleted: labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/IntLispAtom2.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/IntLispAtom2.java 2008-01-26 12:42:49 UTC (rev 18147)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/IntLispAtom2.java 2008-01-26 18:06:51 UTC (rev 18148)
@@ -1,12 +0,0 @@
-/**
- *
- */
-package org.drools.clp.mvel;
-
-public class IntLispAtom2 extends LispAtom2 {
-
- public IntLispAtom2(String value) {
- super(value);
- }
-
-}
\ No newline at end of file
Copied: labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/LispAtom.java (from rev 18083, labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/LispAtom2.java)
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/LispAtom.java (rev 0)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/LispAtom.java 2008-01-26 18:06:51 UTC (rev 18148)
@@ -0,0 +1,24 @@
+/**
+ *
+ */
+package org.drools.clp.mvel;
+
+public class LispAtom implements SExpression {
+ private String value;
+
+ public LispAtom(String value) {
+ this.value = value;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ public String toString() {
+ return value;
+ }
+}
\ No newline at end of file
Deleted: labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/LispAtom2.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/LispAtom2.java 2008-01-26 12:42:49 UTC (rev 18147)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/LispAtom2.java 2008-01-26 18:06:51 UTC (rev 18148)
@@ -1,25 +0,0 @@
-/**
- *
- */
-package org.drools.clp.mvel;
-
-public class LispAtom2 implements SExpression {
- private String value;
-
- public LispAtom2(String value) {
- super();
- this.value = value;
- }
-
- public String getValue() {
- return value;
- }
-
- public void setValue(String value) {
- this.value = value;
- }
-
- public String toString() {
- return value;
- }
-}
\ No newline at end of file
Copied: labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/LispForm.java (from rev 18083, labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/LispForm2.java)
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/LispForm.java (rev 0)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/LispForm.java 2008-01-26 18:06:51 UTC (rev 18148)
@@ -0,0 +1,43 @@
+/**
+ *
+ */
+package org.drools.clp.mvel;
+
+public class LispForm implements SExpression {
+ private SExpression[] sExpressions;
+
+ public LispForm(SExpression[] sExpressions) {
+ this.sExpressions = sExpressions;
+ }
+
+ public SExpression[] getSExpressions() {
+ return sExpressions;
+ }
+
+ public void setSExpressions(SExpression[] sExpressions) {
+ this.sExpressions = sExpressions;
+ }
+
+// public String toString() {
+// StringBuilder builder = new StringBuilder();
+//
+// builder.append("(");
+// for ( int i = 0, length = sExpressions.length; i < length; i++) {
+// builder.append(" " + sExpressions[i] + " ");
+// }
+// builder.append(")");
+// return builder.toString();
+// }
+
+ public String toString() {
+ StringBuilder builder = new StringBuilder();
+
+ builder.append("(");
+ for ( SExpression sExpression : sExpressions) {
+ builder.append(" " + sExpression + " ");
+ }
+ builder.append(")");
+ return builder.toString();
+ }
+
+}
\ No newline at end of file
Deleted: labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/LispForm2.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/LispForm2.java 2008-01-26 12:42:49 UTC (rev 18147)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/LispForm2.java 2008-01-26 18:06:51 UTC (rev 18148)
@@ -1,43 +0,0 @@
-/**
- *
- */
-package org.drools.clp.mvel;
-
-public class LispForm2 implements SExpression {
- private SExpression[] sExpressions;
-
- public LispForm2(SExpression[] sExpressions) {
- this.sExpressions = sExpressions;
- }
-
- public SExpression[] getSExpressions() {
- return sExpressions;
- }
-
- public void setSExpressions(SExpression[] sExpressions) {
- this.sExpressions = sExpressions;
- }
-
-// public String toString() {
-// StringBuilder builder = new StringBuilder();
-//
-// builder.append("(");
-// for ( int i = 0, length = sExpressions.length; i < length; i++) {
-// builder.append(" " + sExpressions[i] + " ");
-// }
-// builder.append(")");
-// return builder.toString();
-// }
-
- public String toString() {
- StringBuilder builder = new StringBuilder();
-
- builder.append("(");
- for ( SExpression sExpression : sExpressions) {
- builder.append(" " + sExpression + " ");
- }
- builder.append(")");
- return builder.toString();
- }
-
-}
\ No newline at end of file
Added: labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/MVELClipsContext.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/MVELClipsContext.java (rev 0)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/MVELClipsContext.java 2008-01-26 18:06:51 UTC (rev 18148)
@@ -0,0 +1,25 @@
+package org.drools.clp.mvel;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.mvel.ast.Function;
+
+public class MVELClipsContext {
+ private Map<String, Function> map;
+
+ public MVELClipsContext() {
+ this.map = new HashMap<String, Function>();
+ }
+ public void addFunction(Function function) {
+ this.map.put( function.getAbsoluteName(), function );
+ }
+
+ public boolean removeFunction(String functionName) {
+ return ( this.map.remove( functionName ) != null );
+ }
+
+ public Map<String, Function> getFunctions() {
+ return this.map;
+ }
+}
Modified: labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/ModifyFunction.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/ModifyFunction.java 2008-01-26 12:42:49 UTC (rev 18147)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/ModifyFunction.java 2008-01-26 18:06:51 UTC (rev 18148)
@@ -7,18 +7,18 @@
return name;
}
- public void dump(LispForm2 lispForm, Appendable appendable) {
+ public void dump(LispForm lispForm, Appendable appendable, MVELClipsContext context) {
SExpression[] sExpressions = lispForm.getSExpressions();
- appendable.append("modify (" + ( (LispAtom2) lispForm.getSExpressions()[1]).getValue() + ") {");
+ appendable.append("modify (" + ( (LispAtom) lispForm.getSExpressions()[1]).getValue() + ") {");
for ( int i = 2, length = sExpressions.length; i < length; i++) {
- LispForm2 setter = (LispForm2) sExpressions[i];
- appendable.append( ( ( LispAtom2 ) setter.getSExpressions()[0]).getValue() );
+ LispForm setter = (LispForm) sExpressions[i];
+ appendable.append( ( ( LispAtom ) setter.getSExpressions()[0]).getValue() );
appendable.append( " = " );
- FunctionHandlers.getInstance().dump( setter.getSExpressions()[1], appendable);
+ FunctionHandlers.dump( setter.getSExpressions()[1], appendable, context);
if ( i != length -1 ) {
appendable.append( "," );
Copied: labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/NullLispAtom.java (from rev 18083, labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/NullLispAtom2.java)
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/NullLispAtom.java (rev 0)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/NullLispAtom.java 2008-01-26 18:06:51 UTC (rev 18148)
@@ -0,0 +1,12 @@
+/**
+ *
+ */
+package org.drools.clp.mvel;
+
+public class NullLispAtom extends LispAtom {
+
+ public NullLispAtom(String value) {
+ super(value);
+ }
+
+}
\ No newline at end of file
Deleted: labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/NullLispAtom2.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/NullLispAtom2.java 2008-01-26 12:42:49 UTC (rev 18147)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/NullLispAtom2.java 2008-01-26 18:06:51 UTC (rev 18148)
@@ -1,12 +0,0 @@
-/**
- *
- */
-package org.drools.clp.mvel;
-
-public class NullLispAtom2 extends LispAtom2 {
-
- public NullLispAtom2(String value) {
- super(value);
- }
-
-}
\ No newline at end of file
Modified: labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/PrintoutFunction.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/PrintoutFunction.java 2008-01-26 12:42:49 UTC (rev 18147)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/PrintoutFunction.java 2008-01-26 18:06:51 UTC (rev 18148)
@@ -9,11 +9,12 @@
return name;
}
- public void dump(LispForm2 lispForm, Appendable appendable) {
+ public void dump(LispForm lispForm, Appendable appendable, MVELClipsContext context) {
SExpression[] sExpressions = lispForm.getSExpressions();
- appendable.append( "((PrintStream) routers.get(" + ( ( LispAtom2 ) lispForm.getSExpressions()[route]).getValue()+ ")).print(" );
+ appendable.append( "routers.get(" + ( ( LispAtom ) lispForm.getSExpressions()[route]).getValue()+ ").print(" );
+ //appendable.append( "routers.get(" + ( ( LispAtom2 ) lispForm.getSExpressions()[route]).getValue()+ ").print(" );
for ( int i = 2, length = sExpressions.length; i < length; i++) {
- FunctionHandlers.getInstance().dump( sExpressions[i], appendable );
+ FunctionHandlers.dump( sExpressions[i], appendable, context );
if ( i != length -1 ) {
appendable.append( "+" );
Modified: labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/PrognFunction.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/PrognFunction.java 2008-01-26 12:42:49 UTC (rev 18147)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/PrognFunction.java 2008-01-26 18:06:51 UTC (rev 18148)
@@ -7,44 +7,26 @@
return name;
}
- public void dump(LispForm2 lispForm, Appendable appendable) {
+ public void dump(LispForm lispForm, Appendable appendable, MVELClipsContext context) {
Function createList = FunctionHandlers.getInstance().getFunction( "create$" );
SExpression[] sExpressions = lispForm.getSExpressions();
- LispForm2 listSpec = (LispForm2) sExpressions[1];
+ LispForm listSpec = (LispForm) sExpressions[1];
- String var = ( ( LispAtom2 ) listSpec.getSExpressions()[0] ).getValue();
+ String var = ( ( LispAtom ) listSpec.getSExpressions()[0] ).getValue();
appendable.append( "foreach( " + var + " : " );
- createList.dump( (LispForm2) listSpec.getSExpressions()[1], appendable );
+ createList.dump( (LispForm) listSpec.getSExpressions()[1], appendable, context );
appendable.append( " ) {" );
- FunctionHandlers.getInstance().dump( sExpressions[2], appendable );
- //Function function = FunctionHandlers.getInstance().getFunction( ( (LispAtom2) form.getSExpressions()[0]).getValue() );
+ for ( int i = 2, length = sExpressions.length; i < length; i++ ) {
+ FunctionHandlers.dump( sExpressions[i], appendable, context );
+ }
appendable.append( "}" );
-
-// SExpression[] sExpressions = lispForm.getSExpressions();
-// appendable.append( "((PrintStream) routers.get(" + ( ( LispAtom2 ) lispForm.getSExpressions()[1]).getValue()+ ")).print(" );
-// for ( int i = 2, length = sExpressions.length; i < length; i++) {
-// SExpression sExpression = sExpressions[i];
-// if ( sExpression instanceof LispAtom2 ) {
-// appendable.append( ( ( LispAtom2 ) sExpression).getValue() );
-// } else {
-// LispForm2 form = (LispForm2) sExpression;
-// Function function = FunctionHandlers.getInstance().getFunction( ( (LispAtom2) form.getSExpressions()[0]).getValue() );
-// function.dump(form, appendable);
-//
-// }
-//
-// if ( i != length -1 ) {
-// appendable.append( "+" );
-// }
-// }
-// appendable.append( ");" );
-
+
}
}
Added: labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/ReturnFunction.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/ReturnFunction.java (rev 0)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/ReturnFunction.java 2008-01-26 18:06:51 UTC (rev 18148)
@@ -0,0 +1,15 @@
+package org.drools.clp.mvel;
+
+public class ReturnFunction implements Function {
+ private static final String name = "return";
+
+ public String getName() {
+ return name;
+ }
+
+ public void dump(LispForm lispForm, Appendable appendable, MVELClipsContext context) {
+ appendable.append( "return " );
+ FunctionHandlers.dump( lispForm.getSExpressions()[1], appendable, context );
+ appendable.append( ";\n" );
+ }
+}
Copied: labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/StringLispAtom.java (from rev 18083, labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/StringLispAtom2.java)
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/StringLispAtom.java (rev 0)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/StringLispAtom.java 2008-01-26 18:06:51 UTC (rev 18148)
@@ -0,0 +1,13 @@
+/**
+ *
+ */
+package org.drools.clp.mvel;
+
+public class StringLispAtom extends LispAtom {
+
+ public StringLispAtom(String value) {
+ super("\"" + value + "\"");
+ }
+
+
+}
\ No newline at end of file
Deleted: labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/StringLispAtom2.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/StringLispAtom2.java 2008-01-26 12:42:49 UTC (rev 18147)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/StringLispAtom2.java 2008-01-26 18:06:51 UTC (rev 18148)
@@ -1,13 +0,0 @@
-/**
- *
- */
-package org.drools.clp.mvel;
-
-public class StringLispAtom2 extends LispAtom2 {
-
- public StringLispAtom2(String value) {
- super("\"" + value + "\"");
- }
-
-
-}
\ No newline at end of file
Modified: labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/SwitchFunction.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/SwitchFunction.java 2008-01-26 12:42:49 UTC (rev 18147)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/SwitchFunction.java 2008-01-26 18:06:51 UTC (rev 18148)
@@ -7,49 +7,58 @@
return name;
}
- public void dump(LispForm2 lispForm, Appendable appendable) {
+ public void dump(LispForm lispForm, Appendable appendable, MVELClipsContext context) {
SExpression[] sExpressions = lispForm.getSExpressions();
appendable.append( "switchvar = " );
- LispForm2 expr = ( LispForm2 ) sExpressions[1];
+ LispForm expr = ( LispForm ) sExpressions[1];
if ( expr.getSExpressions().length > 1 ) {
- FunctionHandlers.getInstance().dump( expr, appendable );
+ FunctionHandlers.dump( expr, appendable, context );
} else {
- FunctionHandlers.getInstance().dump( expr.getSExpressions()[0], appendable );
+ FunctionHandlers.dump( expr.getSExpressions()[0], appendable, context );
}
appendable.append( ";\n" );
- LispForm2 caseForm = ( LispForm2 ) sExpressions[2];
+ LispForm caseForm = ( LispForm ) sExpressions[2];
appendable.append( "if ( switchvar == " );
- FunctionHandlers.getInstance().dump( caseForm.getSExpressions()[1], appendable );
+ FunctionHandlers.dump( caseForm.getSExpressions()[1], appendable, context );
appendable.append( ") {" );
- FunctionHandlers.getInstance().dump( caseForm.getSExpressions()[3], appendable );
+ for ( int j = 3, jlength = caseForm.getSExpressions().length; j < jlength; j++ ) {
+ FunctionHandlers.dump( caseForm.getSExpressions()[j], appendable, context );
+ }
appendable.append( "}" );
for ( int i = 3, length = sExpressions.length-1; i < length; i++ ) {
- caseForm = ( LispForm2 ) sExpressions[i];
+ caseForm = ( LispForm ) sExpressions[i];
appendable.append( " else if ( switchvar == " );
- FunctionHandlers.getInstance().dump( caseForm.getSExpressions()[1], appendable );
+ FunctionHandlers.dump( caseForm.getSExpressions()[1], appendable, context );
appendable.append( ") {" );
- FunctionHandlers.getInstance().dump( caseForm.getSExpressions()[3], appendable );
+
+ for ( int j = 3, jlength = caseForm.getSExpressions().length; j < jlength; j++ ) {
+ FunctionHandlers.dump( caseForm.getSExpressions()[j], appendable, context );
+ }
appendable.append( "}" );
}
- caseForm = ( LispForm2 ) sExpressions[ sExpressions.length-1 ];
- if ( "case".equals( ((LispAtom2)caseForm.getSExpressions()[0]).getValue() ) ) {
+ caseForm = ( LispForm ) sExpressions[ sExpressions.length-1 ];
+ if ( "case".equals( ((LispAtom)caseForm.getSExpressions()[0]).getValue() ) ) {
appendable.append( " else if ( switchvar == " );
- FunctionHandlers.getInstance().dump( caseForm.getSExpressions()[1], appendable );
+ FunctionHandlers.dump( caseForm.getSExpressions()[1], appendable, context );
appendable.append( ") {" );
- FunctionHandlers.getInstance().dump( caseForm.getSExpressions()[3], appendable );
+ for ( int j = 3, length = caseForm.getSExpressions().length; j < length; j++ ) {
+ FunctionHandlers.dump( caseForm.getSExpressions()[j], appendable, context );
+ }
appendable.append( "}" );
} else {
appendable.append( " else { " );
- FunctionHandlers.getInstance().dump( caseForm.getSExpressions()[1], appendable );
+ for ( int j = 1, length = caseForm.getSExpressions().length; j < length; j++ ) {
+ FunctionHandlers.dump( caseForm.getSExpressions()[j], appendable, context );
+ }
appendable.append( "}" );
- }
-
+ }
}
+
}
Copied: labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/SymbolLispAtom.java (from rev 18083, labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/SymbolLispAtom2.java)
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/SymbolLispAtom.java (rev 0)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/SymbolLispAtom.java 2008-01-26 18:06:51 UTC (rev 18148)
@@ -0,0 +1,12 @@
+/**
+ *
+ */
+package org.drools.clp.mvel;
+
+public class SymbolLispAtom extends LispAtom {
+
+ public SymbolLispAtom(String value) {
+ super(value);
+ }
+
+}
\ No newline at end of file
Deleted: labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/SymbolLispAtom2.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/SymbolLispAtom2.java 2008-01-26 12:42:49 UTC (rev 18147)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/SymbolLispAtom2.java 2008-01-26 18:06:51 UTC (rev 18148)
@@ -1,12 +0,0 @@
-/**
- *
- */
-package org.drools.clp.mvel;
-
-public class SymbolLispAtom2 extends LispAtom2 {
-
- public SymbolLispAtom2(String value) {
- super(value);
- }
-
-}
\ No newline at end of file
Modified: labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/TestMVEL.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/TestMVEL.java 2008-01-26 12:42:49 UTC (rev 18147)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/TestMVEL.java 2008-01-26 18:06:51 UTC (rev 18148)
@@ -1,7 +1,13 @@
package org.drools.clp.mvel;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.PrintStream;
import java.io.Reader;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import junit.framework.TestCase;
@@ -13,8 +19,13 @@
import org.antlr.runtime.TokenStream;
import org.drools.clp.CLPMVELLexer;
import org.drools.clp.CLPMVELParser;
+import org.mvel.MVEL;
public class TestMVEL extends TestCase {
+ private Map vars;
+ private ByteArrayOutputStream baos;
+ private MVELClipsContext context;
+
public void setUp() {
FunctionHandlers handlers = FunctionHandlers.getInstance();
handlers.registerFunction( new PlusFunction() );
@@ -27,7 +38,17 @@
handlers.registerFunction( new LessThanFunction() );
handlers.registerFunction( new MoreThanFunction() );
handlers.registerFunction( new EqFunction() );
- handlers.registerFunction( new SwitchFunction() );
+ handlers.registerFunction( new SwitchFunction() );
+ handlers.registerFunction( new DeffunctionFunction() );
+ handlers.registerFunction( new ReturnFunction() );
+
+ baos = new ByteArrayOutputStream();
+ vars = new HashMap();
+ Map routers = new HashMap();
+ routers.put( "t", new PrintStream( baos ) );
+ vars.put( "routers", routers );
+
+ context = new MVELClipsContext();
}
public void test1() {
@@ -35,10 +56,10 @@
SExpression[] lisplists = evalString( expr );
- StringBuilderAppendable appendable = new StringBuilderAppendable();
-
+ StringBuilderAppendable appendable = new StringBuilderAppendable();
+ MVELClipsContext context = new MVELClipsContext();
for ( SExpression sExpression : lisplists ) {
- FunctionHandlers.getInstance().dump( sExpression, appendable );
+ FunctionHandlers.dump( sExpression, appendable, context );
}
System.out.println( appendable );
@@ -49,64 +70,102 @@
SExpression[] lisplists = evalString( expr );
- StringBuilderAppendable appendable = new StringBuilderAppendable();
-
+ StringBuilderAppendable appendable = new StringBuilderAppendable();
for ( SExpression sExpression : lisplists ) {
- FunctionHandlers.getInstance().dump( sExpression, appendable );
+ FunctionHandlers.dump( sExpression, appendable, context );
}
- System.out.println( appendable );
+ eval( appendable.toString() );
+ assertEquals( "102030", new String( baos.toByteArray() ));
}
public void testIf() {
- String expr = "(if (< 1 3) then (printout t x) )";
+ String expr = "(if (< 1 3) then (printout t hello) (printout t hello) )";
SExpression[] lisplists = evalString( expr );
- StringBuilderAppendable appendable = new StringBuilderAppendable();
-
+ StringBuilderAppendable appendable = new StringBuilderAppendable();
for ( SExpression sExpression : lisplists ) {
- FunctionHandlers.getInstance().dump( sExpression, appendable );
+ FunctionHandlers.dump( sExpression, appendable, context );
}
- System.out.println( appendable );
+ eval( appendable.toString() );
+ assertEquals( "hellohello", new String( baos.toByteArray() ));
}
public void testIfElse() {
- String expr = "(if (eq 1 3) then (printout t x) else (printout t y) )";
+ String expr = "(if (eq 1 3) then (printout t hello) (printout t 1) else (printout t hello) (printout t 2))";
SExpression[] lisplists = evalString( expr );
- StringBuilderAppendable appendable = new StringBuilderAppendable();
-
+ StringBuilderAppendable appendable = new StringBuilderAppendable();
for ( SExpression sExpression : lisplists ) {
- FunctionHandlers.getInstance().dump( sExpression, appendable );
+ FunctionHandlers.dump( sExpression, appendable, context );
}
- System.out.println( appendable );
+ eval( appendable.toString() );
+ assertEquals( "hello2", new String( baos.toByteArray() ) );
}
- public void testSwitch() {
- String expr = "(switch (?x) (case a then (printout t a)) (case b then (printout t b)) (default (printout t b)) )";
+ public void testSwitch() throws IOException {
+ String expr = "(switch (?x) (case a then (printout t hello)(printout t 1)) (case b then (printout t hello)(printout t 2)) (default (printout t hello)(printout t 3)) )";
SExpression[] lisplists = evalString( expr );
- StringBuilderAppendable appendable = new StringBuilderAppendable();
-
+ StringBuilderAppendable appendable = new StringBuilderAppendable();
for ( SExpression sExpression : lisplists ) {
- FunctionHandlers.getInstance().dump( sExpression, appendable );
- }
+ FunctionHandlers.dump( sExpression, appendable, context );
+ }
- System.out.println( appendable );
+ // check case a
+ vars.put("_Q_x", "a" );
+ MVEL.eval( appendable.toString(), vars);
+ assertEquals( "hello1", new String( baos.toByteArray() ) );
+
+ // check default
+ vars.put("_Q_x", "M" );
+ MVEL.eval( appendable.toString(), vars);
+ assertEquals( "hello1hello3", new String( baos.toByteArray() ) );
+
+ // check case b
+ vars.put("_Q_x", "b" );
+ eval( appendable.toString() );
+ assertEquals( "hello1hello3hello2", new String( baos.toByteArray() ) );
}
- public void test3() {
- String function = "(deffunction max (?a ?b) (return ?b) )";
- String expr = "(max (3 5) )";
+ public void testDeffunction() {
+ String function = "(deffunction max (?a ?b) (if (> ?a ?b) then (return ?a) else (return ?b) ) )";
+
+ SExpression[] lisplists = evalString( function );
+ StringBuilderAppendable appendable = new StringBuilderAppendable();
+ for ( SExpression sExpression : lisplists ) {
+ FunctionHandlers.dump( sExpression, appendable, context );
+ }
+ eval( appendable.toString() );
+
+ String expr = "(if (eq (max 3 5) 5) then (printout t hello) )";
+ lisplists = evalString( expr );
+ appendable = new StringBuilderAppendable();
+ for ( SExpression sExpression : lisplists ) {
+ FunctionHandlers.dump( sExpression, appendable, context );
+ }
+ eval( appendable.toString() );
+
+ // check case a
+ vars.put("_Q_a", "10" );
+ vars.put("_Q_b", "20" );
+ assertEquals( "hello", new String( baos.toByteArray() ) );
}
+
+ public void eval(String string) {
+ for ( org.mvel.ast.Function function : context.getFunctions().values() ) {
+ this.vars.put( function.getAbsoluteName(), function );
+ }
+ MVEL.eval( string, vars);
+ }
public SExpression[] evalReader(Reader reader) {
try {
Copied: labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/VariableLispAtom.java (from rev 18083, labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/VariableLispAtom2.java)
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/VariableLispAtom.java (rev 0)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/VariableLispAtom.java 2008-01-26 18:06:51 UTC (rev 18148)
@@ -0,0 +1,29 @@
+/**
+ *
+ */
+package org.drools.clp.mvel;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class VariableLispAtom extends LispAtom {
+ private static Map<String, String> mapping = new HashMap<String, String>();
+
+ public VariableLispAtom(String var) {
+ super(var);
+ String temp = mapping.get( var );
+ if ( temp == null ) {
+ temp = makeValid( var );
+ if ( !temp.equals( var ) ) {
+ mapping.put( var, temp );
+ }
+ }
+ setValue( temp );
+ }
+
+ private static String makeValid(String var) {
+ var = var.replaceAll( "\\?", "_Q_" );
+ return var;
+ }
+
+}
\ No newline at end of file
Deleted: labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/VariableLispAtom2.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/VariableLispAtom2.java 2008-01-26 12:42:49 UTC (rev 18147)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/mvel/VariableLispAtom2.java 2008-01-26 18:06:51 UTC (rev 18148)
@@ -1,12 +0,0 @@
-/**
- *
- */
-package org.drools.clp.mvel;
-
-public class VariableLispAtom2 extends LispAtom2 {
-
- public VariableLispAtom2(String value) {
- super(value);
- }
-
-}
\ No newline at end of file
More information about the jboss-svn-commits
mailing list