[jboss-svn-commits] JBL Code SVN: r18083 - in labs/jbossrules/trunk/drools-clips/src: main/resources/org/drools/clp and 1 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Thu Jan 24 14:43:08 EST 2008
Author: tirelli
Date: 2008-01-24 14:43:07 -0500 (Thu, 24 Jan 2008)
New Revision: 18083
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/resources/org/drools/clp/CLPMVEL.g
labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/ShellTest.java
Log:
Fixing a couple things in clips parser
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-24 19:35:08 UTC (rev 18082)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/CLPMVELLexer.java 2008-01-24 19:43:07 UTC (rev 18083)
@@ -1,8 +1,8 @@
-// $ANTLR 3.0.1 C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g 2008-01-24 19:05:12
-
- package org.drools.clp;
+// $ANTLR 3.0.1 /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g 2008-01-24 17:41:14
+ package org.drools.clp;
+
import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
@@ -10,64 +10,64 @@
import java.util.Map;
import java.util.HashMap;
public class CLPMVELLexer extends Lexer {
- public static final int RIGHT_SQUARE=40;
- public static final int RIGHT_CURLY=42;
- public static final int EQUALS=23;
- public static final int FLOAT=25;
- public static final int SH_STYLE_SINGLE_LINE_COMMENT=37;
- public static final int NOT=15;
- public static final int DELIM=36;
- public static final int AND=13;
- public static final int EOF=-1;
- public static final int HexDigit=33;
- public static final int DEFFUNCTION=7;
- public static final int ASSIGN_OP=18;
- public static final int RIGHT_PAREN=6;
- public static final int NAME=5;
- public static final int EOL=29;
+ public static final int EXISTS=16;
public static final int DEFRULE=9;
+ public static final int HexDigit=31;
+ public static final int FLOAT=24;
public static final int TILDE=21;
+ public static final int T45=45;
+ public static final int OR=14;
public static final int PIPE=19;
- public static final int VAR=8;
- public static final int EXISTS=16;
- public static final int SYMBOL=28;
+ public static final int ASSIGN_OP=18;
+ public static final int AND=13;
+ public static final int EscapeSequence=30;
+ public static final int INT=12;
public static final int START_DELIM=44;
- public static final int NULL=27;
- public static final int BOOL=26;
- public static final int SALIENCE=11;
+ public static final int SYMBOL=42;
+ public static final int LEFT_SQUARE=37;
+ public static final int SH_STYLE_SINGLE_LINE_COMMENT=35;
+ public static final int T46=46;
public static final int AMPERSAND=20;
- public static final int INT=12;
+ public static final int DECLARE=29;
+ public static final int DELIM=34;
+ public static final int LEFT_CURLY=39;
+ public static final int LEFT_PAREN=4;
+ public static final int RIGHT_CURLY=40;
+ public static final int BOOL=25;
+ public static final int DEFFUNCTION=7;
+ public static final int WS=28;
+ public static final int CHAR=43;
+ public static final int STRING=10;
+ public static final int VAR=8;
+ public static final int EQUALS=23;
+ public static final int UnicodeEscape=32;
+ public static final int EOF=-1;
+ public static final int NULL=26;
+ public static final int EOL=27;
public static final int Tokens=47;
- public static final int MULTI_LINE_COMMENT=43;
- public static final int T46=46;
- public static final int T45=45;
public static final int COLON=22;
- public static final int WS=30;
- public static final int UnicodeEscape=34;
- public static final int LEFT_CURLY=41;
- public static final int OR=14;
+ public static final int SALIENCE=11;
+ public static final int OctalEscape=33;
+ public static final int MULTI_LINE_COMMENT=41;
public static final int TEST=17;
- public static final int LEFT_PAREN=4;
- public static final int DECLARE=31;
- public static final int FUNC_NAME=24;
- public static final int LEFT_SQUARE=39;
- public static final int EscapeSequence=32;
- public static final int OctalEscape=35;
- public static final int C_STYLE_SINGLE_LINE_COMMENT=38;
- public static final int STRING=10;
+ public static final int NAME=5;
+ public static final int NOT=15;
+ public static final int RIGHT_PAREN=6;
+ public static final int RIGHT_SQUARE=38;
+ public static final int C_STYLE_SINGLE_LINE_COMMENT=36;
public CLPMVELLexer() {;}
public CLPMVELLexer(CharStream input) {
super(input);
ruleMemo = new HashMap[45+1];
}
- public String getGrammarFileName() { return "C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g"; }
+ public String getGrammarFileName() { return "/home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g"; }
// $ANTLR start T45
public final void mT45() throws RecognitionException {
try {
int _type = T45;
- // 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'
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:6:5: ( 'import' )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:6:7: 'import'
{
match("import"); if (failed) return ;
@@ -85,8 +85,8 @@
public final void mT46() throws RecognitionException {
try {
int _type = T46;
- // 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: '=>'
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:7:5: ( '=>' )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:7:7: '=>'
{
match("=>"); if (failed) return ;
@@ -104,10 +104,10 @@
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 )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:732:9: ( ( ' ' | '\\t' | '\\f' | EOL ) )
+ // /home/etirelli/workspace/jboss/jbossrules/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:732:17: ( ' ' | '\\t' | '\\f' | EOL )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:732:17: ( ' ' | '\\t' | '\\f' | EOL )
int alt1=4;
switch ( input.LA(1) ) {
case ' ':
@@ -141,28 +141,28 @@
switch (alt1) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:732:19: ' '
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:732: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'
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:733: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'
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:734: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
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:735:19: EOL
{
mEOL(); if (failed) return ;
@@ -188,8 +188,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'
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:740:10: ( 'defrule' )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:740:12: 'defrule'
{
match("defrule"); if (failed) return ;
@@ -207,8 +207,8 @@
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'
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:741:13: ( 'deffunction' )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:741:15: 'deffunction'
{
match("deffunction"); if (failed) return ;
@@ -226,8 +226,8 @@
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'
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:742:7: ( 'or' )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:742:9: 'or'
{
match("or"); if (failed) return ;
@@ -245,8 +245,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'
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:743:7: ( 'and' )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:743:9: 'and'
{
match("and"); if (failed) return ;
@@ -264,8 +264,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'
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:744:7: ( 'not' )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:744:9: 'not'
{
match("not"); if (failed) return ;
@@ -283,8 +283,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'
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:745:10: ( 'exists' )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:745:12: 'exists'
{
match("exists"); if (failed) return ;
@@ -302,8 +302,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'
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:746:8: ( 'test' )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:746:10: 'test'
{
match("test"); if (failed) return ;
@@ -321,8 +321,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'
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:748:7: ( 'null' )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:748:9: 'null'
{
match("null"); if (failed) return ;
@@ -340,8 +340,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'
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:750:10: ( 'declare' )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:750:12: 'declare'
{
match("declare"); if (failed) return ;
@@ -359,8 +359,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'
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:752:10: ( 'salience' )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:752:12: 'salience'
{
match("salience"); if (failed) return ;
@@ -377,10 +377,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' )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:757:6: ( ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' ) )
+ // /home/etirelli/workspace/jboss/jbossrules/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:758:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:758:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
int alt2=3;
int LA2_0 = input.LA(1);
@@ -405,7 +405,7 @@
}
switch (alt2) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:758:14: ( '\\r\\n' )=> '\\r\\n'
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:758:14: ( '\\r\\n' )=> '\\r\\n'
{
match("\r\n"); if (failed) return ;
@@ -413,14 +413,14 @@
}
break;
case 2 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:759:25: '\\r'
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:759: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'
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:760:25: '\\n'
{
match('\n'); if (failed) return ;
@@ -442,10 +442,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' )+
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:765:2: ( ( '-' )? ( '0' .. '9' )+ )
+ // /home/etirelli/workspace/jboss/jbossrules/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:765:4: ( '-' )?
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:765:4: ( '-' )?
int alt3=2;
int LA3_0 = input.LA(1);
@@ -454,7 +454,7 @@
}
switch (alt3) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:765:5: '-'
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:765:5: '-'
{
match('-'); if (failed) return ;
@@ -463,7 +463,7 @@
}
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:765:10: ( '0' .. '9' )+
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:765:10: ( '0' .. '9' )+
int cnt4=0;
loop4:
do {
@@ -477,7 +477,7 @@
switch (alt4) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:765:11: '0' .. '9'
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:765:11: '0' .. '9'
{
matchRange('0','9'); if (failed) return ;
@@ -508,10 +508,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' )+
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:769:2: ( ( '-' )? ( '0' .. '9' )+ '.' ( '0' .. '9' )+ )
+ // /home/etirelli/workspace/jboss/jbossrules/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:769:4: ( '-' )?
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:769:4: ( '-' )?
int alt5=2;
int LA5_0 = input.LA(1);
@@ -520,7 +520,7 @@
}
switch (alt5) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:769:5: '-'
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:769:5: '-'
{
match('-'); if (failed) return ;
@@ -529,7 +529,7 @@
}
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:769:10: ( '0' .. '9' )+
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:769:10: ( '0' .. '9' )+
int cnt6=0;
loop6:
do {
@@ -543,7 +543,7 @@
switch (alt6) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:769:11: '0' .. '9'
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:769:11: '0' .. '9'
{
matchRange('0','9'); if (failed) return ;
@@ -561,7 +561,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' )+
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:769:26: ( '0' .. '9' )+
int cnt7=0;
loop7:
do {
@@ -575,7 +575,7 @@
switch (alt7) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:769:27: '0' .. '9'
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:769:27: '0' .. '9'
{
matchRange('0','9'); if (failed) return ;
@@ -606,7 +606,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 | ~ ( '\\\\' | '\\'' ) )* '\\'' ) )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:773:5: ( ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' ) | ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' ) )
int alt10=2;
int LA10_0 = input.LA(1);
@@ -625,13 +625,13 @@
}
switch (alt10) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:773:8: ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' )
+ // /home/etirelli/workspace/jboss/jbossrules/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:8: ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:773:9: '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"'
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:773:8: ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:773:9: '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"'
{
match('\"'); if (failed) return ;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:773:13: ( EscapeSequence | ~ ( '\\\\' | '\"' ) )*
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:773:13: ( EscapeSequence | ~ ( '\\\\' | '\"' ) )*
loop8:
do {
int alt8=3;
@@ -647,14 +647,14 @@
switch (alt8) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:773:15: EscapeSequence
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:773: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: ~ ( '\\\\' | '\"' )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:773:32: ~ ( '\\\\' | '\"' )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFE') ) {
input.consume();
@@ -684,13 +684,13 @@
}
break;
case 2 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:774:8: ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' )
+ // /home/etirelli/workspace/jboss/jbossrules/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:8: ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:774:9: '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\''
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:774:8: ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:774:9: '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\''
{
match('\''); if (failed) return ;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:774:14: ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )*
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:774:14: ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )*
loop9:
do {
int alt9=3;
@@ -706,14 +706,14 @@
switch (alt9) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:774:16: EscapeSequence
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:774: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: ~ ( '\\\\' | '\\'' )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:774:33: ~ ( '\\\\' | '\\'' )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFE') ) {
input.consume();
@@ -754,8 +754,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' )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:778:10: ( ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' ) )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:778: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();
@@ -780,12 +780,17 @@
// $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 )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:782:5: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | UnicodeEscape | OctalEscape )
int alt11=3;
int LA11_0 = input.LA(1);
if ( (LA11_0=='\\') ) {
switch ( input.LA(2) ) {
+ case 'u':
+ {
+ alt11=2;
+ }
+ break;
case '\"':
case '\'':
case '\\':
@@ -798,11 +803,6 @@
alt11=1;
}
break;
- case 'u':
- {
- alt11=2;
- }
- break;
case '0':
case '1':
case '2':
@@ -833,7 +833,7 @@
}
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' | '\\\"' | '\\'' | '\\\\' )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:782: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' ) {
@@ -851,14 +851,14 @@
}
break;
case 2 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:783:9: UnicodeEscape
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:783: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
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:784:9: OctalEscape
{
mOctalEscape(); if (failed) return ;
@@ -875,7 +875,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' ) )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:789:5: ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) )
int alt12=3;
int LA12_0 = input.LA(1);
@@ -886,9 +886,9 @@
int LA12_2 = input.LA(3);
if ( ((LA12_2>='0' && LA12_2<='7')) ) {
- int LA12_4 = input.LA(4);
+ int LA12_5 = input.LA(4);
- if ( ((LA12_4>='0' && LA12_4<='7')) ) {
+ if ( ((LA12_5>='0' && LA12_5<='7')) ) {
alt12=1;
}
else {
@@ -923,25 +923,25 @@
}
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' )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:789: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'
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:789:14: ( '0' .. '3' )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:789: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'
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:789:25: ( '0' .. '7' )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:789: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'
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:789:36: ( '0' .. '7' )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:789:37: '0' .. '7'
{
matchRange('0','7'); if (failed) return ;
@@ -951,18 +951,18 @@
}
break;
case 2 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:790:9: '\\\\' ( '0' .. '7' ) ( '0' .. '7' )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:790: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'
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:790:14: ( '0' .. '7' )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:790: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'
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:790:25: ( '0' .. '7' )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:790:26: '0' .. '7'
{
matchRange('0','7'); if (failed) return ;
@@ -972,11 +972,11 @@
}
break;
case 3 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:791:9: '\\\\' ( '0' .. '7' )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:791: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'
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:791:14: ( '0' .. '7' )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:791:15: '0' .. '7'
{
matchRange('0','7'); if (failed) return ;
@@ -996,8 +996,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
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:796:5: ( '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:796:9: '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit
{
match('\\'); if (failed) return ;
match('u'); if (failed) return ;
@@ -1018,10 +1018,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' )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:800:2: ( ( 'true' | 'false' ) )
+ // /home/etirelli/workspace/jboss/jbossrules/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:800:4: ( 'true' | 'false' )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:800:4: ( 'true' | 'false' )
int alt13=2;
int LA13_0 = input.LA(1);
@@ -1040,7 +1040,7 @@
}
switch (alt13) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:800:5: 'true'
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:800:5: 'true'
{
match("true"); if (failed) return ;
@@ -1048,7 +1048,7 @@
}
break;
case 2 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:800:12: 'false'
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:800:12: 'false'
{
match("false"); if (failed) return ;
@@ -1072,11 +1072,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: ( '?' (~ DELIM )+ )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:803:8: '?' (~ DELIM )+
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:803:6: ( '?' (~ DELIM )+ )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:803:8: '?' (~ DELIM )+
{
match('?'); if (failed) return ;
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:803:11: (~ DELIM )+
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:803:11: (~ DELIM )+
int cnt14=0;
loop14:
do {
@@ -1090,9 +1090,9 @@
switch (alt14) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:803:11: ~ DELIM
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:803:11: ~ DELIM
{
- if ( (input.LA(1)>='\u0000' && input.LA(1)<='#')||(input.LA(1)>='%' && input.LA(1)<='\uFFFE') ) {
+ if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='\uFFFE') ) {
input.consume();
failed=false;
}
@@ -1131,11 +1131,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
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:807:2: ( '#' ( options {greedy=false; } : . )* EOL )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:807: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; } : . )*
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:807:8: ( options {greedy=false; } : . )*
loop15:
do {
int alt15=2;
@@ -1154,7 +1154,7 @@
switch (alt15) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:807:35: .
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:807:35: .
{
matchAny(); if (failed) return ;
@@ -1184,12 +1184,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
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:813:2: ( '//' ( options {greedy=false; } : . )* EOL )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:813: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; } : . )*
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:813:9: ( options {greedy=false; } : . )*
loop16:
do {
int alt16=2;
@@ -1208,7 +1208,7 @@
switch (alt16) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:813:36: .
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:813:36: .
{
matchAny(); if (failed) return ;
@@ -1238,8 +1238,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: '('
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:819:2: ( '(' )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:819:4: '('
{
match('('); if (failed) return ;
@@ -1256,8 +1256,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: ')'
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:823:2: ( ')' )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:823:4: ')'
{
match(')'); if (failed) return ;
@@ -1274,8 +1274,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: '['
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:827:2: ( '[' )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:827:4: '['
{
match('['); if (failed) return ;
@@ -1292,8 +1292,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: ']'
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:831:2: ( ']' )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:831:4: ']'
{
match(']'); if (failed) return ;
@@ -1310,8 +1310,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: '{'
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:835:2: ( '{' )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:835:4: '{'
{
match('{'); if (failed) return ;
@@ -1328,8 +1328,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: '}'
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:839:2: ( '}' )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:839:4: '}'
{
match('}'); if (failed) return ;
@@ -1346,8 +1346,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: '~'
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:842:7: ( '~' )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:842:9: '~'
{
match('~'); if (failed) return ;
@@ -1364,8 +1364,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: '&'
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:846:2: ( '&' )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:846:4: '&'
{
match('&'); if (failed) return ;
@@ -1382,8 +1382,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: '|'
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:850:2: ( '|' )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:850:4: '|'
{
match('|'); if (failed) return ;
@@ -1400,8 +1400,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: '<-'
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:854:2: ( '<-' )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:854:4: '<-'
{
match("<-"); if (failed) return ;
@@ -1419,8 +1419,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: ':'
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:857:7: ( ':' )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:857:9: ':'
{
match(':'); if (failed) return ;
@@ -1437,8 +1437,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: '='
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:859:8: ( '=' )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:859:10: '='
{
match('='); if (failed) return ;
@@ -1455,12 +1455,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; } : . )* '*/'
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:862:2: ( '/*' ( options {greedy=false; } : . )* '*/' )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:862: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; } : . )*
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:862:9: ( options {greedy=false; } : . )*
loop17:
do {
int alt17=2;
@@ -1485,7 +1485,7 @@
switch (alt17) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:862:35: .
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:862:35: .
{
matchAny(); if (failed) return ;
@@ -1516,8 +1516,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
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:866:6: ( SYMBOL )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:866:8: SYMBOL
{
mSYMBOL(); if (failed) return ;
@@ -1530,66 +1530,29 @@
}
// $ANTLR end NAME
- // $ANTLR start FUNC_NAME
- public final void mFUNC_NAME() throws RecognitionException {
- try {
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:871:11: ( SYMBOL )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:871:14: SYMBOL
- {
- mSYMBOL(); if (failed) return ;
-
- }
-
- }
- finally {
- }
- }
- // $ANTLR end FUNC_NAME
-
// $ANTLR start SYMBOL
public final void mSYMBOL() throws RecognitionException {
try {
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:874:8: (~ START_DELIM (~ DELIM )* )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:874:10: ~ START_DELIM (~ DELIM )*
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:869:8: ( ( CHAR )* )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:869:10: ( CHAR )*
{
- if ( (input.LA(1)>='\u0000' && input.LA(1)<='+')||(input.LA(1)>='-' && input.LA(1)<='\uFFFE') ) {
- input.consume();
- failed=false;
- }
- else {
- if (backtracking>0) {failed=true; return ;}
- MismatchedSetException mse =
- new MismatchedSetException(null,input);
- recover(mse); throw mse;
- }
-
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:874:23: (~ DELIM )*
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:869:10: ( CHAR )*
loop18:
do {
int alt18=2;
int LA18_0 = input.LA(1);
- if ( ((LA18_0>='\u0000' && LA18_0<='\b')||(LA18_0>='\u000B' && LA18_0<='\f')||(LA18_0>='\u000E' && LA18_0<='\u001F')||LA18_0=='!'||(LA18_0>='#' && LA18_0<='%')||LA18_0=='\''||(LA18_0>='*' && LA18_0<=':')||(LA18_0>='=' && LA18_0<='{')||LA18_0=='}'||(LA18_0>='\u007F' && LA18_0<='\uFFFE')) ) {
+ if ( (LA18_0=='!'||(LA18_0>='#' && LA18_0<='%')||(LA18_0>='*' && LA18_0<=':')||(LA18_0>='=' && LA18_0<='>')||(LA18_0>='@' && LA18_0<='_')||(LA18_0>='a' && LA18_0<='{')||LA18_0=='}') ) {
alt18=1;
}
switch (alt18) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:874:23: ~ DELIM
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:869:10: CHAR
{
- if ( (input.LA(1)>='\u0000' && input.LA(1)<='#')||(input.LA(1)>='%' && input.LA(1)<='\uFFFE') ) {
- input.consume();
- failed=false;
- }
- else {
- if (backtracking>0) {failed=true; return ;}
- MismatchedSetException mse =
- new MismatchedSetException(null,input);
- recover(mse); throw mse;
- }
+ mCHAR(); if (failed) return ;
-
}
break;
@@ -1610,8 +1573,8 @@
// $ANTLR start START_DELIM
public final void mSTART_DELIM() throws RecognitionException {
try {
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:877:13: ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '?' )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:872:13: ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '?' )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:
{
if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||input.LA(1)=='\r'||input.LA(1)==' '||input.LA(1)=='\"'||input.LA(1)=='&'||(input.LA(1)>='(' && input.LA(1)<=')')||input.LA(1)==';'||input.LA(1)=='?'||input.LA(1)=='|'||input.LA(1)=='~' ) {
input.consume();
@@ -1636,8 +1599,8 @@
// $ANTLR start DELIM
public final void mDELIM() throws RecognitionException {
try {
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:880:11: ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' )
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:875:11: ( ' ' | '\\t' | '\\n' | '\\r' | '\"' | '(' | ')' | ';' | '&' | '|' | '~' | '<' )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:
{
if ( (input.LA(1)>='\t' && input.LA(1)<='\n')||input.LA(1)=='\r'||input.LA(1)==' '||input.LA(1)=='\"'||input.LA(1)=='&'||(input.LA(1)>='(' && input.LA(1)<=')')||(input.LA(1)>=';' && input.LA(1)<='<')||input.LA(1)=='|'||input.LA(1)=='~' ) {
input.consume();
@@ -1659,244 +1622,270 @@
}
// $ANTLR end DELIM
+ // $ANTLR start CHAR
+ public final void mCHAR() throws RecognitionException {
+ try {
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:878:6: ( ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '!' | '$' | '%' | '^' | '*' | '_' | '-' | '+' | '=' | '\\\\' | '/' | '@' | '#' | ':' | '>' | ',' | '.' | '[' | ']' | '{' | '}' ) )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:878:8: ( '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();
+ failed=false;
+ }
+ else {
+ if (backtracking>0) {failed=true; return ;}
+ MismatchedSetException mse =
+ new MismatchedSetException(null,input);
+ recover(mse); throw mse;
+ }
+
+
+ }
+
+ }
+ finally {
+ }
+ }
+ // $ANTLR end CHAR
+
public void mTokens() throws RecognitionException {
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:8: ( T45 | T46 | 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 )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:8: ( T45 | T46 | 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;
alt19 = dfa19.predict(input);
switch (alt19) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:10: T45
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:10: T45
{
mT45(); if (failed) return ;
}
break;
case 2 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:14: T46
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:14: T46
{
mT46(); if (failed) return ;
}
break;
case 3 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:18: WS
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:18: WS
{
mWS(); if (failed) return ;
}
break;
case 4 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:21: DEFRULE
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:21: DEFRULE
{
mDEFRULE(); if (failed) return ;
}
break;
case 5 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:29: DEFFUNCTION
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:29: DEFFUNCTION
{
mDEFFUNCTION(); if (failed) return ;
}
break;
case 6 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:41: OR
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:41: OR
{
mOR(); if (failed) return ;
}
break;
case 7 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:44: AND
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:44: AND
{
mAND(); if (failed) return ;
}
break;
case 8 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:48: NOT
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:48: NOT
{
mNOT(); if (failed) return ;
}
break;
case 9 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:52: EXISTS
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:52: EXISTS
{
mEXISTS(); if (failed) return ;
}
break;
case 10 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:59: TEST
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:59: TEST
{
mTEST(); if (failed) return ;
}
break;
case 11 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:64: NULL
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:64: NULL
{
mNULL(); if (failed) return ;
}
break;
case 12 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:69: DECLARE
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:69: DECLARE
{
mDECLARE(); if (failed) return ;
}
break;
case 13 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:77: SALIENCE
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:77: SALIENCE
{
mSALIENCE(); if (failed) return ;
}
break;
case 14 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:86: INT
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:86: INT
{
mINT(); if (failed) return ;
}
break;
case 15 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:90: FLOAT
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:90: FLOAT
{
mFLOAT(); if (failed) return ;
}
break;
case 16 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:96: STRING
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:96: STRING
{
mSTRING(); if (failed) return ;
}
break;
case 17 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:103: BOOL
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:103: BOOL
{
mBOOL(); if (failed) return ;
}
break;
case 18 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:108: VAR
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:108: VAR
{
mVAR(); 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
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:112: SH_STYLE_SINGLE_LINE_COMMENT
{
mSH_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
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:141: C_STYLE_SINGLE_LINE_COMMENT
{
mC_STYLE_SINGLE_LINE_COMMENT(); if (failed) return ;
}
break;
case 21 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:169: LEFT_PAREN
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:169: LEFT_PAREN
{
mLEFT_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
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:180: RIGHT_PAREN
{
mRIGHT_PAREN(); if (failed) return ;
}
break;
case 23 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:192: LEFT_SQUARE
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:192: LEFT_SQUARE
{
mLEFT_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
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:204: RIGHT_SQUARE
{
mRIGHT_SQUARE(); if (failed) return ;
}
break;
case 25 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:217: LEFT_CURLY
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:217: LEFT_CURLY
{
mLEFT_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
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:228: RIGHT_CURLY
{
mRIGHT_CURLY(); if (failed) return ;
}
break;
case 27 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:240: TILDE
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:240: TILDE
{
mTILDE(); if (failed) return ;
}
break;
case 28 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:246: AMPERSAND
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:246: AMPERSAND
{
mAMPERSAND(); if (failed) return ;
}
break;
case 29 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:256: PIPE
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:256: PIPE
{
mPIPE(); if (failed) return ;
}
break;
case 30 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:261: ASSIGN_OP
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:261: ASSIGN_OP
{
mASSIGN_OP(); if (failed) return ;
}
break;
case 31 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:271: COLON
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:271: COLON
{
mCOLON(); if (failed) return ;
}
break;
case 32 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:277: EQUALS
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:277: EQUALS
{
mEQUALS(); 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
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:284: MULTI_LINE_COMMENT
{
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
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:303: NAME
{
mNAME(); if (failed) return ;
@@ -1909,8 +1898,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'
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:758:14: ( '\\r\\n' )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:758:16: '\\r\\n'
{
match("\r\n"); if (failed) return ;
@@ -1937,51 +1926,201 @@
protected DFA19 dfa19 = new DFA19(this);
static final String DFA19_eotS =
- "\1\uffff\1\37\1\42\1\uffff\1\3\10\37\1\55\1\uffff\2\37\1\uffff\2"+
- "\37\2\uffff\1\67\1\70\1\71\1\72\3\uffff\1\37\1\74\1\uffff\1\37\1"+
- "\76\1\uffff\1\37\1\101\7\37\1\55\1\uffff\3\37\1\16\1\37\1\uffff"+
- "\3\37\4\uffff\1\124\1\uffff\1\37\1\uffff\2\37\1\uffff\1\131\1\132"+
- "\5\37\1\140\5\37\1\uffff\3\37\2\uffff\4\37\2\uffff\1\152\1\37\1"+
- "\154\1\155\1\37\1\uffff\4\37\1\123\4\37\1\uffff\1\37\2\uffff\3\37"+
- "\1\154\1\171\3\37\1\175\2\37\1\uffff\1\u0080\1\37\1\u0082\1\uffff"+
- "\2\37\1\uffff\1\37\1\uffff\1\u0085\1\37\1\uffff\1\37\1\u0088\1\uffff";
+ "\2\35\1\40\1\uffff\10\35\1\52\1\uffff\1\35\1\uffff\2\35\2\uffff"+
+ "\1\61\1\62\1\63\1\64\4\uffff\1\65\1\uffff\1\35\1\67\1\uffff\1\35"+
+ "\1\72\7\35\1\uffff\3\35\1\uffff\2\35\5\uffff\1\35\1\uffff\2\35\1"+
+ "\uffff\1\115\1\35\1\117\4\35\1\124\2\35\1\uffff\2\35\1\uffff\4\35"+
+ "\1\uffff\1\133\1\uffff\1\35\1\135\1\136\1\35\1\uffff\1\35\1\105"+
+ "\4\35\1\uffff\1\35\2\uffff\1\35\1\136\1\147\3\35\1\153\1\35\1\uffff"+
+ "\1\155\1\35\1\157\1\uffff\1\35\1\uffff\1\35\1\uffff\1\162\1\35\1"+
+ "\uffff\1\35\1\165\1\uffff";
static final String DFA19_eofS =
- "\u0089\uffff";
+ "\166\uffff";
static final String DFA19_minS =
- "\1\0\1\155\1\0\1\uffff\1\0\1\145\1\162\1\156\1\157\1\170\1\145\1"+
- "\141\1\60\1\0\1\uffff\1\0\1\141\1\uffff\1\0\1\52\2\uffff\4\0\3\uffff"+
- "\1\55\1\0\1\uffff\1\160\1\0\1\uffff\1\143\1\0\1\144\1\164\1\154"+
- "\1\151\1\165\1\163\1\154\1\0\1\uffff\1\60\1\42\2\0\1\154\1\uffff"+
- "\3\0\4\uffff\1\0\1\uffff\1\157\1\uffff\1\154\1\146\1\uffff\2\0\1"+
- "\154\1\163\1\145\1\164\1\151\2\0\1\60\2\0\1\163\1\uffff\3\0\2\uffff"+
- "\1\162\1\141\2\165\2\uffff\1\0\1\164\2\0\1\145\1\uffff\1\60\2\0"+
- "\1\145\1\0\1\164\1\162\1\156\1\154\1\uffff\1\163\2\uffff\1\156\1"+
- "\60\3\0\1\145\1\143\1\145\1\0\1\143\1\60\1\uffff\1\0\1\164\1\0\1"+
- "\uffff\1\145\1\0\1\uffff\1\151\1\uffff\1\0\1\157\1\uffff\1\156\1"+
- "\0\1\uffff";
+ "\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\4\uffff\1"+
+ "\41\1\uffff\1\160\1\41\1\uffff\1\143\1\41\1\144\1\154\1\164\1\151"+
+ "\1\163\1\165\1\154\1\uffff\1\60\1\154\1\0\1\uffff\2\0\5\uffff\1"+
+ "\157\1\uffff\1\146\1\154\1\uffff\1\41\1\154\1\41\1\163\1\164\1\145"+
+ "\1\151\1\41\1\163\1\0\1\uffff\2\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\154\1"+
+ "\156\1\162\1\uffff\1\163\2\uffff\1\156\2\41\1\145\1\143\1\145\1"+
+ "\41\1\143\1\uffff\1\41\1\164\1\41\1\uffff\1\145\1\uffff\1\151\1"+
+ "\uffff\1\41\1\157\1\uffff\1\156\1\41\1\uffff";
static final String DFA19_maxS =
- "\1\ufffe\1\155\1\ufffe\1\uffff\1\ufffe\1\145\1\162\1\156\1\165\1"+
- "\170\1\162\1\141\1\71\1\ufffe\1\uffff\1\ufffe\1\141\1\uffff\1\ufffe"+
- "\1\57\2\uffff\4\ufffe\3\uffff\1\55\1\ufffe\1\uffff\1\160\1\ufffe"+
- "\1\uffff\1\146\1\ufffe\1\144\1\164\1\154\1\151\1\165\1\163\1\154"+
- "\1\ufffe\1\uffff\1\71\1\165\2\ufffe\1\154\1\uffff\3\ufffe\4\uffff"+
- "\1\ufffe\1\uffff\1\157\1\uffff\1\154\1\162\1\uffff\2\ufffe\1\154"+
- "\1\163\1\145\1\164\1\151\2\ufffe\1\146\2\ufffe\1\163\1\uffff\3\ufffe"+
- "\2\uffff\1\162\1\141\2\165\2\uffff\1\ufffe\1\164\2\ufffe\1\145\1"+
- "\uffff\1\146\2\ufffe\1\145\1\ufffe\1\164\1\162\1\156\1\154\1\uffff"+
- "\1\163\2\uffff\1\156\1\146\3\ufffe\1\145\1\143\1\145\1\ufffe\1\143"+
- "\1\146\1\uffff\1\ufffe\1\164\1\ufffe\1\uffff\1\145\1\ufffe\1\uffff"+
- "\1\151\1\uffff\1\ufffe\1\157\1\uffff\1\156\1\ufffe\1\uffff";
+ "\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"+
+ "\4\uffff\1\175\1\uffff\1\160\1\175\1\uffff\1\146\1\175\1\144\1\154"+
+ "\1\164\1\151\1\163\1\165\1\154\1\uffff\1\71\1\154\1\ufffe\1\uffff"+
+ "\2\ufffe\5\uffff\1\157\1\uffff\1\162\1\154\1\uffff\1\175\1\154\1"+
+ "\175\1\163\1\164\1\145\1\151\1\175\1\163\1\ufffe\1\uffff\2\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\154\1\156\1\162\1\uffff\1\163\2\uffff"+
+ "\1\156\2\175\1\145\1\143\1\145\1\175\1\143\1\uffff\1\175\1\164\1"+
+ "\175\1\uffff\1\145\1\uffff\1\151\1\uffff\1\175\1\157\1\uffff\1\156"+
+ "\1\175\1\uffff";
static final String DFA19_acceptS =
- "\3\uffff\1\3\12\uffff\1\20\2\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\12\uffff\1\16\5\uffff"+
- "\1\23\3\uffff\1\27\1\30\1\31\1\32\1\uffff\1\37\1\uffff\1\2\2\uffff"+
- "\1\6\15\uffff\1\24\3\uffff\1\41\1\36\4\uffff\1\7\1\10\5\uffff\1"+
- "\17\11\uffff\1\13\1\uffff\1\21\1\12\13\uffff\1\1\3\uffff\1\11\2"+
- "\uffff\1\14\1\uffff\1\4\2\uffff\1\15\2\uffff\1\5";
+ "\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\1\36\1\uffff\1\42\2\uffff\1\40\11\uffff\1\16\3\uffff"+
+ "\1\23\2\uffff\1\27\1\30\1\31\1\32\1\37\1\uffff\1\2\2\uffff\1\6\12"+
+ "\uffff\1\41\2\uffff\1\24\4\uffff\1\7\1\uffff\1\10\4\uffff\1\17\6"+
+ "\uffff\1\13\1\uffff\1\12\1\21\10\uffff\1\1\3\uffff\1\11\1\uffff"+
+ "\1\4\1\uffff\1\14\2\uffff\1\15\2\uffff\1\5";
static final String DFA19_specialS =
- "\u0089\uffff}>";
+ "\166\uffff}>";
static final String[] DFA19_transitionS = {
+ "\2\3\1\uffff\2\3\22\uffff\1\3\1\uffff\1\15\1\20\2\uffff\1\31"+
+ "\1\15\1\22\1\23\3\uffff\1\13\1\uffff\1\21\12\14\1\34\1\uffff"+
+ "\1\33\1\2\1\uffff\1\17\33\uffff\1\24\1\uffff\1\25\3\uffff\1"+
+ "\6\2\uffff\1\4\1\10\1\16\2\uffff\1\1\4\uffff\1\7\1\5\3\uffff"+
+ "\1\12\1\11\6\uffff\1\26\1\32\1\27\1\30",
+ "\1\36",
+ "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\1\35\1\37\1\uffff\40"+
+ "\35\1\uffff\33\35\1\uffff\1\35",
+ "",
+ "\1\41",
+ "\1\42",
+ "\1\43",
+ "\1\45\5\uffff\1\44",
+ "\1\46",
+ "\1\47\14\uffff\1\50",
+ "\1\51",
+ "\12\14",
+ "\1\35\1\uffff\3\35\4\uffff\4\35\1\53\1\35\12\14\1\35\2\uffff"+
+ "\2\35\1\uffff\40\35\1\uffff\33\35\1\uffff\1\35",
+ "",
+ "\1\54",
+ "",
+ "\41\56\1\55\1\56\3\55\4\56\21\55\2\56\2\55\1\56\40\55\1\56\33"+
+ "\55\1\56\1\55\uff81\56",
+ "\1\57\4\uffff\1\60",
+ "",
+ "",
+ "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\2\35\1\uffff\40\35"+
+ "\1\uffff\33\35\1\uffff\1\35",
+ "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\2\35\1\uffff\40\35"+
+ "\1\uffff\33\35\1\uffff\1\35",
+ "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\2\35\1\uffff\40\35"+
+ "\1\uffff\33\35\1\uffff\1\35",
+ "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\2\35\1\uffff\40\35"+
+ "\1\uffff\33\35\1\uffff\1\35",
+ "",
+ "",
+ "",
+ "",
+ "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\2\35\1\uffff\40\35"+
+ "\1\uffff\33\35\1\uffff\1\35",
+ "",
+ "\1\66",
+ "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\2\35\1\uffff\40\35"+
+ "\1\uffff\33\35\1\uffff\1\35",
+ "",
+ "\1\71\2\uffff\1\70",
+ "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\2\35\1\uffff\40\35"+
+ "\1\uffff\33\35\1\uffff\1\35",
+ "\1\73",
+ "\1\74",
+ "\1\75",
+ "\1\76",
+ "\1\77",
+ "\1\100",
+ "\1\101",
+ "",
+ "\12\102",
+ "\1\103",
+ "\41\56\1\55\1\56\3\55\4\56\21\55\2\56\2\55\1\56\40\55\1\56\33"+
+ "\55\1\56\1\55\uff81\56",
+ "",
+ "\41\105\1\106\1\105\3\106\4\105\1\104\20\106\2\105\2\106\1\105"+
+ "\40\106\1\105\33\106\1\105\1\106\uff81\105",
+ "\41\110\1\107\1\110\3\107\4\110\21\107\2\110\2\107\1\110\40"+
+ "\107\1\110\33\107\1\110\1\107\uff81\110",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "\1\111",
+ "",
+ "\1\113\13\uffff\1\112",
+ "\1\114",
+ "",
+ "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\2\35\1\uffff\40\35"+
+ "\1\uffff\33\35\1\uffff\1\35",
+ "\1\116",
+ "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\2\35\1\uffff\40\35"+
+ "\1\uffff\33\35\1\uffff\1\35",
+ "\1\120",
+ "\1\121",
+ "\1\122",
+ "\1\123",
+ "\1\35\1\uffff\3\35\4\uffff\6\35\12\102\1\35\2\uffff\2\35\1\uffff"+
+ "\40\35\1\uffff\33\35\1\uffff\1\35",
+ "\1\125",
+ "\41\105\1\106\1\105\3\106\4\105\1\104\4\106\1\126\13\106\2\105"+
+ "\2\106\1\105\40\106\1\105\33\106\1\105\1\106\uff81\105",
+ "",
+ "\41\105\1\106\1\105\3\106\4\105\1\104\20\106\2\105\2\106\1\105"+
+ "\40\106\1\105\33\106\1\105\1\106\uff81\105",
+ "\41\110\1\107\1\110\3\107\4\110\21\107\2\110\2\107\1\110\40"+
+ "\107\1\110\33\107\1\110\1\107\uff81\110",
+ "",
+ "\1\127",
+ "\1\130",
+ "\1\131",
+ "\1\132",
+ "",
+ "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\2\35\1\uffff\40\35"+
+ "\1\uffff\33\35\1\uffff\1\35",
+ "",
+ "\1\134",
+ "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\2\35\1\uffff\40\35"+
+ "\1\uffff\33\35\1\uffff\1\35",
+ "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\2\35\1\uffff\40\35"+
+ "\1\uffff\33\35\1\uffff\1\35",
+ "\1\137",
+ "",
+ "\1\140",
+ "\1\106\1\uffff\3\106\4\uffff\1\104\20\106\2\uffff\2\106\1\uffff"+
+ "\40\106\1\uffff\33\106\1\uffff\1\106",
+ "\1\141",
+ "\1\142",
+ "\1\143",
+ "\1\144",
+ "",
+ "\1\145",
+ "",
+ "",
+ "\1\146",
+ "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\2\35\1\uffff\40\35"+
+ "\1\uffff\33\35\1\uffff\1\35",
+ "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\2\35\1\uffff\40\35"+
+ "\1\uffff\33\35\1\uffff\1\35",
+ "\1\150",
+ "\1\151",
+ "\1\152",
+ "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\2\35\1\uffff\40\35"+
+ "\1\uffff\33\35\1\uffff\1\35",
+ "\1\154",
+ "",
+ "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\2\35\1\uffff\40\35"+
+ "\1\uffff\33\35\1\uffff\1\35",
+ "\1\156",
+ "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\2\35\1\uffff\40\35"+
+ "\1\uffff\33\35\1\uffff\1\35",
+ "",
+ "\1\160",
+ "",
+ "\1\161",
+ "",
+ "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\2\35\1\uffff\40\35"+
+ "\1\uffff\33\35\1\uffff\1\35",
+ "\1\163",
+ "",
+ "\1\164",
+ "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\2\35\1\uffff\40\35"+
+ "\1\uffff\33\35\1\uffff\1\35",
+ ""
};
static final short[] DFA19_eot = DFA.unpackEncodedString(DFA19_eotS);
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-24 19:35:08 UTC (rev 18082)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/CLPMVELParser.java 2008-01-24 19:43:07 UTC (rev 18083)
@@ -1,21 +1,21 @@
-// $ANTLR 3.0.1 C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g 2008-01-24 19:05:12
-
- package org.drools.clp;
-
- import org.drools.clp.mvel.*;
-
- import org.drools.clp.valuehandlers.*;
- import java.util.List;
- import java.util.ArrayList;
- import java.util.Iterator;
- import java.util.HashMap;
- import java.util.Set;
- import java.util.HashSet;
- import java.util.StringTokenizer;
- import org.drools.lang.descr.*;
- import org.drools.lang.Location;
+// $ANTLR 3.0.1 /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g 2008-01-24 17:41:14
+ package org.drools.clp;
+
+ import org.drools.clp.mvel.*;
+
+ import org.drools.clp.valuehandlers.*;
+ import java.util.List;
+ import java.util.ArrayList;
+ import java.util.Iterator;
+ import java.util.HashMap;
+ import java.util.Set;
+ import java.util.HashSet;
+ import java.util.StringTokenizer;
+ import org.drools.lang.descr.*;
+ import org.drools.lang.Location;
+
import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
@@ -24,50 +24,50 @@
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", "FUNC_NAME", "FLOAT", "BOOL", "NULL", "SYMBOL", "EOL", "WS", "DECLARE", "EscapeSequence", "HexDigit", "UnicodeEscape", "OctalEscape", "DELIM", "SH_STYLE_SINGLE_LINE_COMMENT", "C_STYLE_SINGLE_LINE_COMMENT", "LEFT_SQUARE", "RIGHT_SQUARE", "LEFT_CURLY", "RIGHT_CURLY", "MULTI_LINE_COMMENT", "START_DELIM", "'import'", "'=>'"
+ "<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", "DELIM", "SH_STYLE_SINGLE_LINE_COMMENT", "C_STYLE_SINGLE_LINE_COMMENT", "LEFT_SQUARE", "RIGHT_SQUARE", "LEFT_CURLY", "RIGHT_CURLY", "MULTI_LINE_COMMENT", "SYMBOL", "CHAR", "START_DELIM", "'import'", "'=>'"
};
- public static final int RIGHT_SQUARE=40;
- public static final int RIGHT_CURLY=42;
- public static final int EQUALS=23;
- public static final int FLOAT=25;
- public static final int NOT=15;
- public static final int SH_STYLE_SINGLE_LINE_COMMENT=37;
- public static final int AND=13;
- public static final int DELIM=36;
- public static final int EOF=-1;
- public static final int HexDigit=33;
- public static final int DEFFUNCTION=7;
- public static final int ASSIGN_OP=18;
- public static final int RIGHT_PAREN=6;
- public static final int NAME=5;
- public static final int EOL=29;
+ public static final int EXISTS=16;
public static final int DEFRULE=9;
+ public static final int HexDigit=31;
+ public static final int FLOAT=24;
public static final int TILDE=21;
+ public static final int OR=14;
public static final int PIPE=19;
- public static final int VAR=8;
- public static final int EXISTS=16;
- public static final int SYMBOL=28;
+ public static final int ASSIGN_OP=18;
+ public static final int AND=13;
+ public static final int EscapeSequence=30;
+ public static final int INT=12;
public static final int START_DELIM=44;
- public static final int NULL=27;
- public static final int BOOL=26;
- public static final int SALIENCE=11;
+ public static final int SYMBOL=42;
+ public static final int LEFT_SQUARE=37;
+ public static final int SH_STYLE_SINGLE_LINE_COMMENT=35;
public static final int AMPERSAND=20;
- public static final int INT=12;
- public static final int MULTI_LINE_COMMENT=43;
+ public static final int DECLARE=29;
+ public static final int DELIM=34;
+ public static final int LEFT_CURLY=39;
+ public static final int LEFT_PAREN=4;
+ public static final int RIGHT_CURLY=40;
+ public static final int BOOL=25;
+ public static final int DEFFUNCTION=7;
+ public static final int WS=28;
+ public static final int CHAR=43;
+ public static final int STRING=10;
+ public static final int VAR=8;
+ public static final int EQUALS=23;
+ public static final int UnicodeEscape=32;
+ public static final int EOF=-1;
+ public static final int NULL=26;
+ public static final int EOL=27;
public static final int COLON=22;
- public static final int WS=30;
- public static final int UnicodeEscape=34;
- public static final int LEFT_CURLY=41;
- public static final int OR=14;
+ public static final int SALIENCE=11;
+ public static final int OctalEscape=33;
+ public static final int MULTI_LINE_COMMENT=41;
public static final int TEST=17;
- public static final int LEFT_PAREN=4;
- public static final int DECLARE=31;
- public static final int FUNC_NAME=24;
- public static final int LEFT_SQUARE=39;
- public static final int EscapeSequence=32;
- public static final int OctalEscape=35;
- public static final int C_STYLE_SINGLE_LINE_COMMENT=38;
- public static final int STRING=10;
+ public static final int NAME=5;
+ public static final int NOT=15;
+ public static final int RIGHT_PAREN=6;
+ public static final int RIGHT_SQUARE=38;
+ public static final int C_STYLE_SINGLE_LINE_COMMENT=36;
public CLPMVELParser(TokenStream input) {
super(input);
@@ -76,163 +76,163 @@
public String[] getTokenNames() { return tokenNames; }
- public String getGrammarFileName() { return "C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g"; }
+ public String getGrammarFileName() { return "/home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g"; }
-
- private PackageDescr packageDescr;
- private List errors = new ArrayList();
- private String source = "unknown";
- private int lineOffset = 0;
- private DescrFactory factory = new DescrFactory();
- private boolean parserDebug = false;
- private FunctionRegistry functionRegistry;
- private Location location = new Location( Location.LOCATION_UNKNOWN );
-
- public void setFunctionRegistry(FunctionRegistry functionRegistry) {
- this.functionRegistry = functionRegistry;
- }
-
- public void setParserDebug(boolean parserDebug) {
- this.parserDebug = parserDebug;
- }
-
- public void debug(String message) {
- if ( parserDebug )
- System.err.println( "drl parser: " + message );
- }
-
- public void setSource(String source) {
- this.source = source;
- }
- public DescrFactory getFactory() {
- return factory;
- }
-
- public String getSource() {
- return this.source;
- }
-
- public PackageDescr getPackageDescr() {
- return packageDescr;
- }
-
- private int offset(int line) {
- return line + lineOffset;
- }
-
- /**
- * This will set the offset to record when reparsing. Normally is zero of course
- */
- public void setLineOffset(int i) {
- this.lineOffset = i;
- }
-
- private String getString(Token token) {
- String orig = token.getText();
- return orig.substring( 1, orig.length() -1 );
- }
-
- public void reportError(RecognitionException ex) {
- // if we've already reported an error and have not matched a token
- // yet successfully, don't report any errors.
- if ( errorRecovery ) {
- return;
- }
- errorRecovery = true;
-
- ex.line = offset(ex.line); //add the offset if there is one
- errors.add( ex );
- }
-
- /** return the raw RecognitionException errors */
- public List getErrors() {
- return errors;
- }
-
- /** Return a list of pretty strings summarising the errors */
- public List getErrorMessages() {
- List messages = new ArrayList();
- for ( Iterator errorIter = errors.iterator() ; errorIter.hasNext() ; ) {
- messages.add( createErrorMessage( (RecognitionException) errorIter.next() ) );
- }
- return messages;
- }
-
- /** return true if any parser errors were accumulated */
- public boolean hasErrors() {
- return ! errors.isEmpty();
- }
-
- /** This will take a RecognitionException, and create a sensible error message out of it */
- public String createErrorMessage(RecognitionException e)
- {
- StringBuffer message = new StringBuffer();
- message.append( source + ":"+e.line+":"+e.charPositionInLine+" ");
- if ( e instanceof MismatchedTokenException ) {
- MismatchedTokenException mte = (MismatchedTokenException)e;
- message.append("mismatched token: "+
- e.token+
- "; expecting type "+
- tokenNames[mte.expecting]);
- }
- else if ( e instanceof MismatchedTreeNodeException ) {
- MismatchedTreeNodeException mtne = (MismatchedTreeNodeException)e;
- message.append("mismatched tree node: "+
- //mtne.foundNode+ FIXME
- "; expecting type "+
- tokenNames[mtne.expecting]);
- }
- else if ( e instanceof NoViableAltException ) {
- NoViableAltException nvae = (NoViableAltException)e;
- message.append( "Unexpected token '" + e.token.getText() + "'" );
- /*
- message.append("decision=<<"+nvae.grammarDecisionDescription+">>"+
- " state "+nvae.stateNumber+
- " (decision="+nvae.decisionNumber+
- ") no viable alt; token="+
- e.token);
- */
- }
- else if ( e instanceof EarlyExitException ) {
- EarlyExitException eee = (EarlyExitException)e;
- message.append("required (...)+ loop (decision="+
- eee.decisionNumber+
- ") did not match anything; token="+
- e.token);
- }
- else if ( e instanceof MismatchedSetException ) {
- MismatchedSetException mse = (MismatchedSetException)e;
- message.append("mismatched token '"+
- e.token+
- "' expecting set "+mse.expecting);
- }
- else if ( e instanceof MismatchedNotSetException ) {
- MismatchedNotSetException mse = (MismatchedNotSetException)e;
- message.append("mismatched token '"+
- e.token+
- "' expecting set "+mse.expecting);
- }
- else if ( e instanceof FailedPredicateException ) {
- FailedPredicateException fpe = (FailedPredicateException)e;
- message.append("rule "+fpe.ruleName+" failed predicate: {"+
- fpe.predicateText+"}?");
- } else if (e instanceof GeneralParseException) {
- message.append(" " + e.getMessage());
- }
- return message.toString();
- }
-
- void checkTrailingSemicolon(String text, int line) {
- if (text.trim().endsWith( ";" ) ) {
- this.errors.add( new GeneralParseException( "Trailing semi-colon not allowed", offset(line) ) );
- }
- }
-
+ private PackageDescr packageDescr;
+ private List errors = new ArrayList();
+ private String source = "unknown";
+ private int lineOffset = 0;
+ private DescrFactory factory = new DescrFactory();
+ private boolean parserDebug = false;
+ private FunctionRegistry functionRegistry;
+ private Location location = new Location( Location.LOCATION_UNKNOWN );
+
+ public void setFunctionRegistry(FunctionRegistry functionRegistry) {
+ this.functionRegistry = functionRegistry;
+ }
+
+ public void setParserDebug(boolean parserDebug) {
+ this.parserDebug = parserDebug;
+ }
+
+ public void debug(String message) {
+ if ( parserDebug )
+ System.err.println( "drl parser: " + message );
+ }
+
+ public void setSource(String source) {
+ this.source = source;
+ }
+ public DescrFactory getFactory() {
+ return factory;
+ }
+ public String getSource() {
+ return this.source;
+ }
+
+ public PackageDescr getPackageDescr() {
+ return packageDescr;
+ }
+
+ private int offset(int line) {
+ return line + lineOffset;
+ }
+
+ /**
+ * This will set the offset to record when reparsing. Normally is zero of course
+ */
+ public void setLineOffset(int i) {
+ this.lineOffset = i;
+ }
+
+ private String getString(Token token) {
+ String orig = token.getText();
+ return orig.substring( 1, orig.length() -1 );
+ }
+
+ public void reportError(RecognitionException ex) {
+ // if we've already reported an error and have not matched a token
+ // yet successfully, don't report any errors.
+ if ( errorRecovery ) {
+ return;
+ }
+ errorRecovery = true;
+ ex.line = offset(ex.line); //add the offset if there is one
+ errors.add( ex );
+ }
+
+ /** return the raw RecognitionException errors */
+ public List getErrors() {
+ return errors;
+ }
+
+ /** Return a list of pretty strings summarising the errors */
+ public List getErrorMessages() {
+ List messages = new ArrayList();
+ for ( Iterator errorIter = errors.iterator() ; errorIter.hasNext() ; ) {
+ messages.add( createErrorMessage( (RecognitionException) errorIter.next() ) );
+ }
+ return messages;
+ }
+
+ /** return true if any parser errors were accumulated */
+ public boolean hasErrors() {
+ return ! errors.isEmpty();
+ }
+
+ /** This will take a RecognitionException, and create a sensible error message out of it */
+ public String createErrorMessage(RecognitionException e)
+ {
+ StringBuffer message = new StringBuffer();
+ message.append( source + ":"+e.line+":"+e.charPositionInLine+" ");
+ if ( e instanceof MismatchedTokenException ) {
+ MismatchedTokenException mte = (MismatchedTokenException)e;
+ message.append("mismatched token: "+
+ e.token+
+ "; expecting type "+
+ tokenNames[mte.expecting]);
+ }
+ else if ( e instanceof MismatchedTreeNodeException ) {
+ MismatchedTreeNodeException mtne = (MismatchedTreeNodeException)e;
+ message.append("mismatched tree node: "+
+ //mtne.foundNode+ FIXME
+ "; expecting type "+
+ tokenNames[mtne.expecting]);
+ }
+ else if ( e instanceof NoViableAltException ) {
+ NoViableAltException nvae = (NoViableAltException)e;
+ message.append( "Unexpected token '" + e.token.getText() + "'" );
+ /*
+ message.append("decision=<<"+nvae.grammarDecisionDescription+">>"+
+ " state "+nvae.stateNumber+
+ " (decision="+nvae.decisionNumber+
+ ") no viable alt; token="+
+ e.token);
+ */
+ }
+ else if ( e instanceof EarlyExitException ) {
+ EarlyExitException eee = (EarlyExitException)e;
+ message.append("required (...)+ loop (decision="+
+ eee.decisionNumber+
+ ") did not match anything; token="+
+ e.token);
+ }
+ else if ( e instanceof MismatchedSetException ) {
+ MismatchedSetException mse = (MismatchedSetException)e;
+ message.append("mismatched token '"+
+ e.token+
+ "' expecting set "+mse.expecting);
+ }
+ else if ( e instanceof MismatchedNotSetException ) {
+ MismatchedNotSetException mse = (MismatchedNotSetException)e;
+ message.append("mismatched token '"+
+ e.token+
+ "' expecting set "+mse.expecting);
+ }
+ else if ( e instanceof FailedPredicateException ) {
+ FailedPredicateException fpe = (FailedPredicateException)e;
+ message.append("rule "+fpe.ruleName+" failed predicate: {"+
+ fpe.predicateText+"}?");
+ } else if (e instanceof GeneralParseException) {
+ message.append(" " + e.getMessage());
+ }
+ return message.toString();
+ }
+
+ void checkTrailingSemicolon(String text, int line) {
+ if (text.trim().endsWith( ";" ) ) {
+ this.errors.add( new GeneralParseException( "Trailing semi-colon not allowed", offset(line) ) );
+ }
+ }
+
+
+
+
// $ANTLR start 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) ] )* ;
+ // /home/etirelli/workspace/jboss/jbossrules/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) ] )* ;
public final void eval_script(Shell shell) throws RecognitionException {
ImportDescr i = null;
@@ -242,10 +242,10 @@
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) ] )*
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:229:2: ( (i= importDescr | r= defrule | fc= lisp_list[shell, new LispForm(shell) ] )* )
+ // /home/etirelli/workspace/jboss/jbossrules/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:4: (i= importDescr | r= defrule | fc= lisp_list[shell, new LispForm(shell) ] )*
+ // /home/etirelli/workspace/jboss/jbossrules/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;
@@ -253,14 +253,14 @@
if ( (LA1_0==LEFT_PAREN) ) {
switch ( input.LA(2) ) {
- case DEFRULE:
+ case 45:
{
- alt1=2;
+ alt1=1;
}
break;
- case 45:
+ case DEFRULE:
{
- alt1=1;
+ alt1=2;
}
break;
case LEFT_PAREN:
@@ -284,7 +284,7 @@
switch (alt1) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:229:9: i= importDescr
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:229:9: i= importDescr
{
pushFollow(FOLLOW_importDescr_in_eval_script55);
i=importDescr();
@@ -297,7 +297,7 @@
}
break;
case 2 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:230:7: r= defrule
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:230:7: r= defrule
{
pushFollow(FOLLOW_defrule_in_eval_script66);
r=defrule();
@@ -310,7 +310,7 @@
}
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) ]
+ // /home/etirelli/workspace/jboss/jbossrules/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) );
@@ -344,15 +344,15 @@
// $ANTLR start importDescr
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:236:1: importDescr returns [ImportDescr importDescr] : LEFT_PAREN 'import' importName= NAME RIGHT_PAREN ;
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:236:1: importDescr returns [ImportDescr importDescr] : LEFT_PAREN 'import' importName= NAME RIGHT_PAREN ;
public final ImportDescr importDescr() throws RecognitionException {
ImportDescr importDescr = null;
Token importName=null;
try {
- // 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
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:237:2: ( LEFT_PAREN 'import' importName= NAME RIGHT_PAREN )
+ // /home/etirelli/workspace/jboss/jbossrules/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,45,FOLLOW_45_in_importDescr108); if (failed) return importDescr;
@@ -378,7 +378,7 @@
// $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 ;
+ // /home/etirelli/workspace/jboss/jbossrules/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;
@@ -388,12 +388,12 @@
ValueHandler fc = null;
-
- BuildContext context = 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
+ // /home/etirelli/workspace/jboss/jbossrules/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 )
+ // /home/etirelli/workspace/jboss/jbossrules/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;
@@ -401,15 +401,15 @@
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 );
+
+ 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 )*
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:264:4: (v= VAR )*
loop2:
do {
int alt2=2;
@@ -422,13 +422,13 @@
switch (alt2) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:264:5: v= VAR
+ // /home/etirelli/workspace/jboss/jbossrules/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() ) );
+
+ context.addVariable( function.addParameter( v.getText() ) );
}
@@ -441,7 +441,7 @@
} 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) ] )*
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:268:5: (fc= lisp_list[context, new LispForm(context) ] )*
loop3:
do {
int alt3=2;
@@ -454,7 +454,7 @@
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) ]
+ // /home/etirelli/workspace/jboss/jbossrules/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) );
@@ -489,7 +489,7 @@
// $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 ;
+ // /home/etirelli/workspace/jboss/jbossrules/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 ;
public final RuleDescr defrule() throws RecognitionException {
RuleDescr rule = null;
@@ -499,16 +499,16 @@
ExecutionEngine engine = null;
-
- rule = null;
- AndDescr lhs = null;
- PatternDescr colum = null;
- AttributeDescr module = null;
- Set declarations = null;
+
+ rule = null;
+ AndDescr lhs = null;
+ PatternDescr colum = null;
+ AttributeDescr module = null;
+ 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
+ // /home/etirelli/workspace/jboss/jbossrules/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 )
+ // /home/etirelli/workspace/jboss/jbossrules/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
{
loc=(Token)input.LT(1);
match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_defrule235); if (failed) return rule;
@@ -516,50 +516,50 @@
ruleName=(Token)input.LT(1);
match(input,NAME,FOLLOW_NAME_in_defrule247); if (failed) return rule;
if ( backtracking==0 ) {
-
- debug( "start rule: " + ruleName.getText() );
- String ruleStr = ruleName.getText();
-
- if ( ruleStr.indexOf("::") >= 0 ) {
- String mod = ruleStr.substring(0, ruleStr.indexOf("::"));
- ruleStr = ruleStr.substring(ruleStr.indexOf("::")+2);
- module = new AttributeDescr( "agenda-group", mod );
- module.setLocation( offset(ruleName.getLine()), ruleName.getCharPositionInLine() );
- module.setStartCharacter( ((CommonToken)ruleName).getStartIndex() );
- module.setEndCharacter( ((CommonToken)ruleName).getStopIndex() );
- }
-
- rule = new RuleDescr( ruleStr, null );
- if( module != null ) {
- rule.addAttribute( module );
- }
-
- rule.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
- rule.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-
- // not sure how you define where a LHS starts in clips, so just putting it here for now
- lhs = new AndDescr();
- rule.setLhs( lhs );
- lhs.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
- lhs.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-
- rule.addAttribute( new AttributeDescr( "dialect", "clips") );
-
- declarations = new HashSet();
+
+ debug( "start rule: " + ruleName.getText() );
+ String ruleStr = ruleName.getText();
+
+ if ( ruleStr.indexOf("::") >= 0 ) {
+ String mod = ruleStr.substring(0, ruleStr.indexOf("::"));
+ ruleStr = ruleStr.substring(ruleStr.indexOf("::")+2);
+ module = new AttributeDescr( "agenda-group", mod );
+ module.setLocation( offset(ruleName.getLine()), ruleName.getCharPositionInLine() );
+ module.setStartCharacter( ((CommonToken)ruleName).getStartIndex() );
+ module.setEndCharacter( ((CommonToken)ruleName).getStopIndex() );
+ }
+
+ rule = new RuleDescr( ruleStr, null );
+ if( module != null ) {
+ rule.addAttribute( module );
+ }
+
+ rule.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+ rule.setStartCharacter( ((CommonToken)loc).getStartIndex() );
+ // not sure how you define where a LHS starts in clips, so just putting it here for now
+ lhs = new AndDescr();
+ rule.setLhs( lhs );
+ lhs.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+ lhs.setStartCharacter( ((CommonToken)loc).getStartIndex() );
+
+ rule.addAttribute( new AttributeDescr( "dialect", "clips") );
+
+ declarations = new HashSet();
+
}
documentation=(Token)input.LT(1);
match(input,STRING,FOLLOW_STRING_in_defrule259); if (failed) return rule;
if ( backtracking==0 ) {
-
- // do nothing here for now
+
+ // do nothing here for now
}
pushFollow(FOLLOW_ruleAttribute_in_defrule265);
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] )*
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:329:3: ( ce[lhs, declarations] )*
loop4:
do {
int alt4=2;
@@ -572,7 +572,7 @@
switch (alt4) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:329:3: ce[lhs, declarations]
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:329:3: ce[lhs, declarations]
{
pushFollow(FOLLOW_ce_in_defrule273);
ce(lhs, declarations);
@@ -612,16 +612,16 @@
// $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 )? ;
+ // /home/etirelli/workspace/jboss/jbossrules/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 )? ;
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 )?
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:340:2: ( ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )? )
+ // /home/etirelli/workspace/jboss/jbossrules/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:341:3: ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )?
+ // /home/etirelli/workspace/jboss/jbossrules/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);
@@ -634,11 +634,11 @@
}
switch (alt6) {
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
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:341: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 )?
+ // /home/etirelli/workspace/jboss/jbossrules/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);
@@ -647,7 +647,7 @@
}
switch (alt5) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:342:6: LEFT_PAREN d= salience RIGHT_PAREN
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:342:6: LEFT_PAREN d= salience RIGHT_PAREN
{
match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_ruleAttribute326); if (failed) return ;
pushFollow(FOLLOW_salience_in_ruleAttribute330);
@@ -687,30 +687,30 @@
// $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 ;
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:346:1: salience returns [AttributeDescr d ] : loc= SALIENCE i= INT ;
public final AttributeDescr salience() throws RecognitionException {
AttributeDescr d = null;
Token loc=null;
Token i=null;
-
- d = null;
+
+ 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
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:350:2: (loc= SALIENCE i= INT )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:351:3: loc= SALIENCE i= INT
{
loc=(Token)input.LT(1);
match(input,SALIENCE,FOLLOW_SALIENCE_in_salience371); if (failed) return d;
i=(Token)input.LT(1);
match(input,INT,FOLLOW_INT_in_salience375); if (failed) return d;
if ( backtracking==0 ) {
-
- d = new AttributeDescr( "salience", i.getText() );
- d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
- d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
- d.setEndCharacter( ((CommonToken)i).getStopIndex() );
+
+ d = new AttributeDescr( "salience", i.getText() );
+ d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+ d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
+ d.setEndCharacter( ((CommonToken)i).getStopIndex() );
}
@@ -729,13 +729,13 @@
// $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] ) ;
+ // /home/etirelli/workspace/jboss/jbossrules/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] ) ;
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] )
+ // /home/etirelli/workspace/jboss/jbossrules/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] ) )
+ // /home/etirelli/workspace/jboss/jbossrules/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: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] )
+ // /home/etirelli/workspace/jboss/jbossrules/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);
@@ -746,9 +746,9 @@
alt7=6;
}
break;
- case TEST:
+ case OR:
{
- alt7=5;
+ alt7=2;
}
break;
case AND:
@@ -756,9 +756,9 @@
alt7=1;
}
break;
- case EXISTS:
+ case TEST:
{
- alt7=4;
+ alt7=5;
}
break;
case NOT:
@@ -766,9 +766,9 @@
alt7=3;
}
break;
- case OR:
+ case EXISTS:
{
- alt7=2;
+ alt7=4;
}
break;
default:
@@ -792,7 +792,7 @@
}
switch (alt7) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:362:8: and_ce[in_ce, declarations]
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:362:8: and_ce[in_ce, declarations]
{
pushFollow(FOLLOW_and_ce_in_ce401);
and_ce(in_ce, declarations);
@@ -802,7 +802,7 @@
}
break;
case 2 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:363:7: or_ce[in_ce, declarations]
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:363:7: or_ce[in_ce, declarations]
{
pushFollow(FOLLOW_or_ce_in_ce411);
or_ce(in_ce, declarations);
@@ -812,7 +812,7 @@
}
break;
case 3 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:364:7: not_ce[in_ce, declarations]
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:364:7: not_ce[in_ce, declarations]
{
pushFollow(FOLLOW_not_ce_in_ce420);
not_ce(in_ce, declarations);
@@ -822,7 +822,7 @@
}
break;
case 4 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:365:7: exists_ce[in_ce, declarations]
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:365:7: exists_ce[in_ce, declarations]
{
pushFollow(FOLLOW_exists_ce_in_ce429);
exists_ce(in_ce, declarations);
@@ -832,7 +832,7 @@
}
break;
case 5 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:366:8: eval_ce[in_ce, declarations]
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:366:8: eval_ce[in_ce, declarations]
{
pushFollow(FOLLOW_eval_ce_in_ce443);
eval_ce(in_ce, declarations);
@@ -842,7 +842,7 @@
}
break;
case 6 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:367:7: normal_pattern[in_ce, declarations]
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:367:7: normal_pattern[in_ce, declarations]
{
pushFollow(FOLLOW_normal_pattern_in_ce457);
normal_pattern(in_ce, declarations);
@@ -852,7 +852,7 @@
}
break;
case 7 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:368:7: bound_pattern[in_ce, declarations]
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:368:7: bound_pattern[in_ce, declarations]
{
pushFollow(FOLLOW_bound_pattern_in_ce466);
bound_pattern(in_ce, declarations);
@@ -880,22 +880,22 @@
// $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) ] )* ;
+ // /home/etirelli/workspace/jboss/jbossrules/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 );
+
+ 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) ] )*
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:378:2: ( (fc= lisp_list[context, new LispForm(context) ] )* )
+ // /home/etirelli/workspace/jboss/jbossrules/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) ] )*
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:379:3: (fc= lisp_list[context, new LispForm(context) ] )*
loop8:
do {
int alt8=2;
@@ -908,7 +908,7 @@
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) ]
+ // /home/etirelli/workspace/jboss/jbossrules/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) );
@@ -942,24 +942,24 @@
// $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 ;
+ // /home/etirelli/workspace/jboss/jbossrules/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 ;
public final void and_ce(ConditionalElementDescr in_ce, Set declarations) throws RecognitionException {
-
- AndDescr andDescr= null;
+
+ 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
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:386:2: ( LEFT_PAREN AND ( ce[andDescr, declarations] )+ RIGHT_PAREN )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:386: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 ;
if ( backtracking==0 ) {
-
- andDescr = new AndDescr();
- in_ce.addDescr( andDescr );
+
+ 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] )+
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:391:3: ( ce[andDescr, declarations] )+
int cnt9=0;
loop9:
do {
@@ -973,7 +973,7 @@
switch (alt9) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:391:3: ce[andDescr, declarations]
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:391:3: ce[andDescr, declarations]
{
pushFollow(FOLLOW_ce_in_and_ce537);
ce(andDescr, declarations);
@@ -1010,24 +1010,24 @@
// $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 ;
+ // /home/etirelli/workspace/jboss/jbossrules/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 ;
public final void or_ce(ConditionalElementDescr in_ce, Set declarations) throws RecognitionException {
-
- OrDescr orDescr= null;
+
+ 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
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:399:2: ( LEFT_PAREN OR ( ce[orDescr, declarations] )+ RIGHT_PAREN )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:399: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 ;
if ( backtracking==0 ) {
-
- orDescr = new OrDescr();
- in_ce.addDescr( orDescr );
+
+ 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] )+
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:404:3: ( ce[orDescr, declarations] )+
int cnt10=0;
loop10:
do {
@@ -1041,7 +1041,7 @@
switch (alt10) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:404:3: ce[orDescr, declarations]
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:404:3: ce[orDescr, declarations]
{
pushFollow(FOLLOW_ce_in_or_ce585);
ce(orDescr, declarations);
@@ -1078,21 +1078,21 @@
// $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 ;
+ // /home/etirelli/workspace/jboss/jbossrules/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 ;
public final void not_ce(ConditionalElementDescr in_ce, Set declarations) throws RecognitionException {
-
- NotDescr notDescr= null;
+
+ 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
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:412:2: ( LEFT_PAREN NOT ce[notDescr, declarations] RIGHT_PAREN )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:412: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 ;
if ( backtracking==0 ) {
-
- notDescr = new NotDescr();
- in_ce.addDescr( notDescr );
+
+ notDescr = new NotDescr();
+ in_ce.addDescr( notDescr );
}
pushFollow(FOLLOW_ce_in_not_ce633);
@@ -1116,21 +1116,21 @@
// $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 ;
+ // /home/etirelli/workspace/jboss/jbossrules/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 ;
public final void exists_ce(ConditionalElementDescr in_ce, Set declarations) throws RecognitionException {
-
- ExistsDescr existsDescr= null;
+
+ 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
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:425:2: ( LEFT_PAREN EXISTS ce[existsDescr, declarations] RIGHT_PAREN )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:425: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 ;
if ( backtracking==0 ) {
-
- existsDescr = new ExistsDescr();
- in_ce.addDescr( existsDescr );
+
+ existsDescr = new ExistsDescr();
+ in_ce.addDescr( existsDescr );
}
pushFollow(FOLLOW_ce_in_exists_ce681);
@@ -1154,26 +1154,26 @@
// $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 ;
+ // /home/etirelli/workspace/jboss/jbossrules/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 ;
public final void eval_ce(ConditionalElementDescr in_ce, Set declarations) throws RecognitionException {
ValueHandler fc = null;
-
- EvalDescr evalDescr= null;
- ExecutionEngine engine = new CLPEval();
- BuildContext context = new ExecutionBuildContext( engine, functionRegistry );
+
+ 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
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:440:2: ( LEFT_PAREN TEST fc= lisp_list[context, new LispForm(context)] RIGHT_PAREN )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:440:4: LEFT_PAREN TEST fc= lisp_list[context, new LispForm(context)] 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 );
+
+ evalDescr = new EvalDescr();
+ in_ce.addDescr( evalDescr );
}
pushFollow(FOLLOW_lisp_list_in_eval_ce730);
@@ -1181,9 +1181,9 @@
_fsp--;
if (failed) return ;
if ( backtracking==0 ) {
-
- engine.addFunction( (FunctionCaller) fc );
- evalDescr.setContent( engine );
+
+ engine.addFunction( (FunctionCaller) fc );
+ evalDescr.setContent( engine );
}
match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_eval_ce741); if (failed) return ;
@@ -1203,30 +1203,30 @@
// $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 ;
+ // /home/etirelli/workspace/jboss/jbossrules/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 ;
public final void normal_pattern(ConditionalElementDescr in_ce, Set declarations) throws RecognitionException {
Token name=null;
-
- PatternDescr pattern = null;
- ConditionalElementDescr top = null;
+
+ PatternDescr pattern = null;
+ 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
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:457:2: ( LEFT_PAREN name= NAME ( field_constriant[top, declarations] )* RIGHT_PAREN )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:457:4: LEFT_PAREN name= NAME ( field_constriant[top, declarations] )* RIGHT_PAREN
{
match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_normal_pattern769); if (failed) return ;
name=(Token)input.LT(1);
match(input,NAME,FOLLOW_NAME_in_normal_pattern776); if (failed) return ;
if ( backtracking==0 ) {
-
- pattern = new PatternDescr(name.getText());
- in_ce.addDescr( pattern );
- top = pattern.getConstraint();
-
+
+ pattern = new PatternDescr(name.getText());
+ in_ce.addDescr( pattern );
+ top = pattern.getConstraint();
+
}
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:464:3: ( field_constriant[top, declarations] )*
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:464:3: ( field_constriant[top, declarations] )*
loop11:
do {
int alt11=2;
@@ -1239,7 +1239,7 @@
switch (alt11) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:464:3: field_constriant[top, declarations]
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:464:3: field_constriant[top, declarations]
{
pushFollow(FOLLOW_field_constriant_in_normal_pattern782);
field_constriant(top, declarations);
@@ -1271,25 +1271,25 @@
// $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 ;
+ // /home/etirelli/workspace/jboss/jbossrules/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 ;
public final void bound_pattern(ConditionalElementDescr in_ce, Set declarations) throws RecognitionException {
Token var=null;
Token name=null;
-
- PatternDescr pattern = null;
- String identifier = null;
- ConditionalElementDescr top = null;
+
+ PatternDescr pattern = null;
+ String identifier = null;
+ 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
+ // /home/etirelli/workspace/jboss/jbossrules/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 )
+ // /home/etirelli/workspace/jboss/jbossrules/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
{
var=(Token)input.LT(1);
match(input,VAR,FOLLOW_VAR_in_bound_pattern820); if (failed) return ;
if ( backtracking==0 ) {
-
- identifier = var.getText();
+
+ identifier = var.getText();
}
match(input,ASSIGN_OP,FOLLOW_ASSIGN_OP_in_bound_pattern826); if (failed) return ;
@@ -1297,14 +1297,14 @@
name=(Token)input.LT(1);
match(input,NAME,FOLLOW_NAME_in_bound_pattern832); if (failed) return ;
if ( backtracking==0 ) {
-
- pattern = new PatternDescr(name.getText());
- pattern.setIdentifier( identifier );
- in_ce.addDescr( pattern );
- top = pattern.getConstraint();
+
+ pattern = new PatternDescr(name.getText());
+ pattern.setIdentifier( identifier );
+ in_ce.addDescr( pattern );
+ top = pattern.getConstraint();
}
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:486:3: ( field_constriant[top, declarations] )*
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:486:3: ( field_constriant[top, declarations] )*
loop12:
do {
int alt12=2;
@@ -1317,7 +1317,7 @@
switch (alt12) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:486:3: field_constriant[top, declarations]
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:486:3: field_constriant[top, declarations]
{
pushFollow(FOLLOW_field_constriant_in_bound_pattern841);
field_constriant(top, declarations);
@@ -1349,31 +1349,31 @@
// $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 ;
+ // /home/etirelli/workspace/jboss/jbossrules/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 ;
public final void field_constriant(ConditionalElementDescr base, Set declarations) throws RecognitionException {
Token f=null;
-
- List list = new ArrayList();
- FieldBindingDescr fbd = null;
- FieldConstraintDescr fc = null;
- RestrictionConnectiveDescr top = null;
- String op = "==";
+
+ List list = new ArrayList();
+ FieldBindingDescr fbd = null;
+ FieldConstraintDescr fc = null;
+ RestrictionConnectiveDescr top = null;
+ 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
+ // /home/etirelli/workspace/jboss/jbossrules/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 )
+ // /home/etirelli/workspace/jboss/jbossrules/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
{
match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_field_constriant879); if (failed) return ;
f=(Token)input.LT(1);
match(input,NAME,FOLLOW_NAME_in_field_constriant883); if (failed) return ;
if ( backtracking==0 ) {
-
- fc = new FieldConstraintDescr(f.getText());
- fc.setLocation( offset(f.getLine()), f.getCharPositionInLine() );
- fc.setStartCharacter( ((CommonToken)f).getStartIndex() );
- base.addDescr( fc );
- top = fc.getRestriction();
+
+ fc = new FieldConstraintDescr(f.getText());
+ fc.setLocation( offset(f.getLine()), f.getCharPositionInLine() );
+ fc.setStartCharacter( ((CommonToken)f).getStartIndex() );
+ base.addDescr( fc );
+ top = fc.getRestriction();
}
pushFollow(FOLLOW_or_restr_connective_in_field_constriant898);
@@ -1397,20 +1397,20 @@
// $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] )* ;
+ // /home/etirelli/workspace/jboss/jbossrules/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] )* ;
public final void or_restr_connective(RestrictionConnectiveDescr rcBase, ConditionalElementDescr ceBase, FieldConstraintDescr fcBase, Set declarations) throws RecognitionException {
-
- RestrictionConnectiveDescr or = new RestrictionConnectiveDescr(RestrictionConnectiveDescr.OR);
+
+ 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] )*
+ // /home/etirelli/workspace/jboss/jbossrules/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] )* )
+ // /home/etirelli/workspace/jboss/jbossrules/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] )*
{
pushFollow(FOLLOW_and_restr_connective_in_or_restr_connective943);
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] )*
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:535:3: ( options {backtrack=true; } : PIPE and_restr_connective[or, ceBase, fcBase, declarations] )*
loop13:
do {
int alt13=2;
@@ -1423,12 +1423,12 @@
switch (alt13) {
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]
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:537:6: PIPE and_restr_connective[or, ceBase, fcBase, declarations]
{
match(input,PIPE,FOLLOW_PIPE_in_or_restr_connective967); if (failed) return ;
if ( backtracking==0 ) {
-
- location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_OPERATOR);
+
+ location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_OPERATOR);
}
pushFollow(FOLLOW_and_restr_connective_in_or_restr_connective977);
@@ -1453,12 +1453,12 @@
recover(input,re);
}
finally {
-
- if( or.getRestrictions().size() == 1 ) {
- rcBase.addOrMerge( (RestrictionDescr) or.getRestrictions().get( 0 ) );
- } else if ( or.getRestrictions().size() > 1 ) {
- rcBase.addRestriction( or );
- }
+
+ if( or.getRestrictions().size() == 1 ) {
+ rcBase.addOrMerge( (RestrictionDescr) or.getRestrictions().get( 0 ) );
+ } else if ( or.getRestrictions().size() > 1 ) {
+ rcBase.addRestriction( or );
+ }
}
return ;
@@ -1467,20 +1467,20 @@
// $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] )* ;
+ // /home/etirelli/workspace/jboss/jbossrules/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] )* ;
public final void and_restr_connective(RestrictionConnectiveDescr rcBase, ConditionalElementDescr ceBase, FieldConstraintDescr fcBase, Set declarations) throws RecognitionException {
-
- RestrictionConnectiveDescr and = new RestrictionConnectiveDescr(RestrictionConnectiveDescr.AND);
+
+ 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] )*
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:556:2: ( restriction[and, ceBase, fcBase, declarations] ( AMPERSAND restriction[and, ceBase, fcBase, declarations] )* )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:557:3: restriction[and, ceBase, fcBase, declarations] ( AMPERSAND restriction[and, ceBase, fcBase, declarations] )*
{
pushFollow(FOLLOW_restriction_in_and_restr_connective1009);
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] )*
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:558:3: ( AMPERSAND restriction[and, ceBase, fcBase, declarations] )*
loop14:
do {
int alt14=2;
@@ -1493,7 +1493,7 @@
switch (alt14) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:558:5: AMPERSAND restriction[and, ceBase, fcBase, declarations]
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:558: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);
@@ -1518,12 +1518,12 @@
recover(input,re);
}
finally {
-
- if( and.getRestrictions().size() == 1) {
- rcBase.addOrMerge( (RestrictionDescr) and.getRestrictions().get( 0 ) );
- } else if ( and.getRestrictions().size() > 1 ) {
- rcBase.addRestriction( and );
- }
+
+ if( and.getRestrictions().size() == 1) {
+ rcBase.addOrMerge( (RestrictionDescr) and.getRestrictions().get( 0 ) );
+ } else if ( and.getRestrictions().size() > 1 ) {
+ rcBase.addRestriction( and );
+ }
}
return ;
@@ -1532,19 +1532,19 @@
// $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 ) ;
+ // /home/etirelli/workspace/jboss/jbossrules/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 ) ;
public final void restriction(RestrictionConnectiveDescr rc, ConditionalElementDescr base, FieldConstraintDescr fcBase, Set declarations) throws RecognitionException {
String lc = null;
-
- String op = "==";
+
+ 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 )
+ // /home/etirelli/workspace/jboss/jbossrules/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 ) )
+ // /home/etirelli/workspace/jboss/jbossrules/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:581:4: ( TILDE )?
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:581:4: ( TILDE )?
int alt15=2;
int LA15_0 = input.LA(1);
@@ -1553,7 +1553,7 @@
}
switch (alt15) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:581:5: TILDE
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:581:5: TILDE
{
match(input,TILDE,FOLLOW_TILDE_in_restriction1052); if (failed) return ;
if ( backtracking==0 ) {
@@ -1565,7 +1565,7 @@
}
- // 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 )
+ // /home/etirelli/workspace/jboss/jbossrules/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;
switch ( input.LA(1) ) {
case COLON:
@@ -1603,7 +1603,7 @@
switch (alt16) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:582:5: predicate_constraint[rc, op, base]
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:582:5: predicate_constraint[rc, op, base]
{
pushFollow(FOLLOW_predicate_constraint_in_restriction1068);
predicate_constraint(rc, op, base);
@@ -1613,7 +1613,7 @@
}
break;
case 2 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:583:7: return_value_restriction[op, rc]
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:583:7: return_value_restriction[op, rc]
{
pushFollow(FOLLOW_return_value_restriction_in_restriction1084);
return_value_restriction(op, rc);
@@ -1623,7 +1623,7 @@
}
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]
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:584:7: variable_restriction[op, rc, base, fcBase, declarations]
{
pushFollow(FOLLOW_variable_restriction_in_restriction1093);
variable_restriction(op, rc, base, fcBase, declarations);
@@ -1633,16 +1633,16 @@
}
break;
case 4 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:585:8: lc= literal_restriction
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:585:8: lc= literal_restriction
{
pushFollow(FOLLOW_literal_restriction_in_restriction1105);
lc=literal_restriction();
_fsp--;
if (failed) return ;
if ( backtracking==0 ) {
-
- rc.addRestriction( new LiteralRestrictionDescr(op, lc) );
- op = "==";
+
+ rc.addRestriction( new LiteralRestrictionDescr(op, lc) );
+ op = "==";
}
@@ -1667,18 +1667,18 @@
// $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)] ;
+ // /home/etirelli/workspace/jboss/jbossrules/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)] ;
public final void predicate_constraint(RestrictionConnectiveDescr rc, String op, ConditionalElementDescr base) throws RecognitionException {
ValueHandler fc = null;
-
- ExecutionEngine engine = new CLPPredicate();
- BuildContext context = new ExecutionBuildContext( engine, functionRegistry );
+
+ 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)]
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:597:2: ( COLON fc= lisp_list[context, new LispForm(context)] )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:597:4: COLON fc= lisp_list[context, new LispForm(context)]
{
match(input,COLON,FOLLOW_COLON_in_predicate_constraint1147); if (failed) return ;
pushFollow(FOLLOW_lisp_list_in_predicate_constraint1153);
@@ -1686,9 +1686,9 @@
_fsp--;
if (failed) return ;
if ( backtracking==0 ) {
-
- engine.addFunction( (FunctionCaller) fc );
- rc.addRestriction( new PredicateDescr( engine ) );
+
+ engine.addFunction( (FunctionCaller) fc );
+ rc.addRestriction( new PredicateDescr( engine ) );
}
@@ -1707,18 +1707,18 @@
// $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)] ;
+ // /home/etirelli/workspace/jboss/jbossrules/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)] ;
public final void return_value_restriction(String op, RestrictionConnectiveDescr rc) throws RecognitionException {
ValueHandler func = null;
-
- ExecutionEngine engine = new CLPReturnValue();
- BuildContext context = new ExecutionBuildContext( engine, functionRegistry );
+
+ 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)]
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:611:2: ( EQUALS func= lisp_list[context, new LispForm(context)] )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:611:4: EQUALS func= lisp_list[context, new LispForm(context)]
{
match(input,EQUALS,FOLLOW_EQUALS_in_return_value_restriction1179); if (failed) return ;
pushFollow(FOLLOW_lisp_list_in_return_value_restriction1186);
@@ -1726,9 +1726,9 @@
_fsp--;
if (failed) return ;
if ( backtracking==0 ) {
-
- engine.addFunction( (FunctionCaller) func );
- rc.addRestriction( new ReturnValueRestrictionDescr (op, engine ) );
+
+ engine.addFunction( (FunctionCaller) func );
+ rc.addRestriction( new ReturnValueRestrictionDescr (op, engine ) );
}
@@ -1747,27 +1747,27 @@
// $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 ;
+ // /home/etirelli/workspace/jboss/jbossrules/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 ;
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
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:620:2: ( VAR )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:620:4: VAR
{
VAR1=(Token)input.LT(1);
match(input,VAR,FOLLOW_VAR_in_variable_restriction1206); if (failed) return ;
if ( backtracking==0 ) {
-
- if ( declarations.contains( VAR1.getText() ) ) {
- rc.addRestriction( new VariableRestrictionDescr(op, VAR1.getText()) );
- } else {
- FieldBindingDescr fbd = new FieldBindingDescr();
- fbd.setIdentifier( VAR1.getText() );
- fbd.setFieldName( fcBase.getFieldName() );
- ceBase.insertBeforeLast( FieldConstraintDescr.class, fbd );
- declarations.add( VAR1.getText() );
- }
+
+ if ( declarations.contains( VAR1.getText() ) ) {
+ rc.addRestriction( new VariableRestrictionDescr(op, VAR1.getText()) );
+ } else {
+ FieldBindingDescr fbd = new FieldBindingDescr();
+ fbd.setIdentifier( VAR1.getText() );
+ fbd.setFieldName( fcBase.getFieldName() );
+ ceBase.insertBeforeLast( FieldConstraintDescr.class, fbd );
+ declarations.add( VAR1.getText() );
+ }
}
@@ -1786,27 +1786,27 @@
// $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 ;
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:634:1: literal_restriction returns [String text] : t= literal ;
public final String literal_restriction() throws RecognitionException {
String text = null;
String t = null;
-
- text = null;
+
+ 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
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:638:2: (t= literal )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:639:6: t= literal
{
pushFollow(FOLLOW_literal_in_literal_restriction1239);
t=literal();
_fsp--;
if (failed) return text;
if ( backtracking==0 ) {
-
- text = t;
+
+ text = t;
}
@@ -1825,21 +1825,21 @@
// $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 )* ;
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:645:1: eval_sExpressions returns [List<SExpression> list] : (a= lisp_list2 )* ;
public final List<SExpression> eval_sExpressions() throws RecognitionException {
List<SExpression> list = null;
SExpression a = null;
-
- list = new ArrayList<SExpression>();
+
+ 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 )*
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:649:2: ( (a= lisp_list2 )* )
+ // /home/etirelli/workspace/jboss/jbossrules/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:650:3: (a= lisp_list2 )*
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:650:3: (a= lisp_list2 )*
loop17:
do {
int alt17=2;
@@ -1852,7 +1852,7 @@
switch (alt17) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:650:4: a= lisp_list2
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:650:4: a= lisp_list2
{
pushFollow(FOLLOW_lisp_list2_in_eval_sExpressions1271);
a=lisp_list2();
@@ -1886,7 +1886,7 @@
// $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= FUNC_NAME (a= lisp_atom2 | a= lisp_list2 )+ RIGHT_PAREN ;
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:654:1: lisp_list2 returns [SExpression sExpression] : LEFT_PAREN t= NAME (a= lisp_atom2 | a= lisp_list2 )+ RIGHT_PAREN ;
public final SExpression lisp_list2() throws RecognitionException {
SExpression sExpression = null;
@@ -1894,28 +1894,28 @@
SExpression a = null;
-
- List list = new ArrayList();
- sExpression = null;
+
+ List list = new ArrayList();
+ sExpression = null;
try {
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:659:2: ( LEFT_PAREN t= FUNC_NAME (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= FUNC_NAME (a= lisp_atom2 | a= lisp_list2 )+ RIGHT_PAREN
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:659:2: ( LEFT_PAREN t= NAME (a= lisp_atom2 | a= lisp_list2 )+ RIGHT_PAREN )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:659:4: LEFT_PAREN t= NAME (a= lisp_atom2 | a= lisp_list2 )+ RIGHT_PAREN
{
match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_lisp_list21300); if (failed) return sExpression;
t=(Token)input.LT(1);
- match(input,FUNC_NAME,FOLLOW_FUNC_NAME_in_lisp_list21310); if (failed) return sExpression;
+ match(input,NAME,FOLLOW_NAME_in_lisp_list21310); if (failed) return sExpression;
if ( backtracking==0 ) {
list.add( new SymbolLispAtom2( t.getText() ) );
}
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:661:3: (a= lisp_atom2 | a= lisp_list2 )+
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:661:3: (a= lisp_atom2 | a= lisp_list2 )+
int cnt18=0;
loop18:
do {
int alt18=3;
int LA18_0 = input.LA(1);
- if ( (LA18_0==VAR||LA18_0==STRING||LA18_0==INT||(LA18_0>=FLOAT && LA18_0<=SYMBOL)) ) {
+ 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) ) {
@@ -1925,7 +1925,7 @@
switch (alt18) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:661:6: a= lisp_atom2
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:661:6: a= lisp_atom2
{
pushFollow(FOLLOW_lisp_atom2_in_lisp_list21321);
a=lisp_atom2();
@@ -1938,7 +1938,7 @@
}
break;
case 2 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:662:6: a= lisp_list2
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:662:6: a= lisp_list2
{
pushFollow(FOLLOW_lisp_list2_in_lisp_list21332);
a=lisp_list2();
@@ -1981,20 +1981,20 @@
// $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= SYMBOL ) ;
+ // /home/etirelli/workspace/jboss/jbossrules/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;
+
+ 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= SYMBOL ) )
- // 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= SYMBOL )
+ // /home/etirelli/workspace/jboss/jbossrules/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 ) )
+ // /home/etirelli/workspace/jboss/jbossrules/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= SYMBOL )
+ // /home/etirelli/workspace/jboss/jbossrules/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:
@@ -2027,7 +2027,7 @@
alt19=6;
}
break;
- case SYMBOL:
+ case NAME:
{
alt19=7;
}
@@ -2035,14 +2035,14 @@
default:
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= SYMBOL )", 19, 0, input);
+ new NoViableAltException("683:3: (t= VAR | t= STRING | t= FLOAT | t= INT | t= BOOL | t= NULL | t= NAME )", 19, 0, input);
throw nvae;
}
switch (alt19) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:684:6: t= VAR
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:684:6: t= VAR
{
t=(Token)input.LT(1);
match(input,VAR,FOLLOW_VAR_in_lisp_atom21410); if (failed) return sExpression;
@@ -2053,7 +2053,7 @@
}
break;
case 2 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:685:6: t= STRING
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:685:6: t= STRING
{
t=(Token)input.LT(1);
match(input,STRING,FOLLOW_STRING_in_lisp_atom21422); if (failed) return sExpression;
@@ -2064,7 +2064,7 @@
}
break;
case 3 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:686:6: t= FLOAT
+ // /home/etirelli/workspace/jboss/jbossrules/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_atom21444); if (failed) return sExpression;
@@ -2075,7 +2075,7 @@
}
break;
case 4 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:687:6: t= INT
+ // /home/etirelli/workspace/jboss/jbossrules/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_atom21456); if (failed) return sExpression;
@@ -2086,7 +2086,7 @@
}
break;
case 5 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:688:7: t= BOOL
+ // /home/etirelli/workspace/jboss/jbossrules/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_atom21469); if (failed) return sExpression;
@@ -2097,7 +2097,7 @@
}
break;
case 6 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:689:7: t= NULL
+ // /home/etirelli/workspace/jboss/jbossrules/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_atom21485); if (failed) return sExpression;
@@ -2108,10 +2108,10 @@
}
break;
case 7 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:690:12: t= SYMBOL
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:690:12: t= NAME
{
t=(Token)input.LT(1);
- match(input,SYMBOL,FOLLOW_SYMBOL_in_lisp_atom21509); if (failed) return sExpression;
+ match(input,NAME,FOLLOW_NAME_in_lisp_atom21509); if (failed) return sExpression;
if ( backtracking==0 ) {
sExpression = new SymbolLispAtom2( t.getText() );
}
@@ -2137,7 +2137,7 @@
// $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 ;
+ // /home/etirelli/workspace/jboss/jbossrules/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;
@@ -2145,11 +2145,11 @@
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
+ // /home/etirelli/workspace/jboss/jbossrules/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 )
+ // /home/etirelli/workspace/jboss/jbossrules/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_list1539); 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()] )*
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:697:3: (a= lisp_atom[context] | a= lisp_list[context, list.createList()] )*
loop20:
do {
int alt20=3;
@@ -2165,7 +2165,7 @@
switch (alt20) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:697:6: a= lisp_atom[context]
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:697:6: a= lisp_atom[context]
{
pushFollow(FOLLOW_lisp_atom_in_lisp_list1549);
a=lisp_atom(context);
@@ -2178,7 +2178,7 @@
}
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()]
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:698:6: a= lisp_list[context, list.createList()]
{
pushFollow(FOLLOW_lisp_list_in_lisp_list1565);
a=lisp_list(context, list.createList());
@@ -2216,20 +2216,20 @@
// $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 ) ;
+ // /home/etirelli/workspace/jboss/jbossrules/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;
Token t=null;
-
- value = null;
+
+ value = 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 )
+ // /home/etirelli/workspace/jboss/jbossrules/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 ) )
+ // /home/etirelli/workspace/jboss/jbossrules/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:709:3: (t= VAR | t= STRING | t= NAME | t= FLOAT | t= INT | t= BOOL | t= NULL )
+ // /home/etirelli/workspace/jboss/jbossrules/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;
switch ( input.LA(1) ) {
case VAR:
@@ -2277,7 +2277,7 @@
switch (alt21) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:709:6: t= VAR
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:709:6: t= VAR
{
t=(Token)input.LT(1);
match(input,VAR,FOLLOW_VAR_in_lisp_atom1632); if (failed) return value;
@@ -2288,7 +2288,7 @@
}
break;
case 2 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:710:6: t= STRING
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:710:6: t= STRING
{
t=(Token)input.LT(1);
match(input,STRING,FOLLOW_STRING_in_lisp_atom1644); if (failed) return value;
@@ -2299,7 +2299,7 @@
}
break;
case 3 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:711:7: t= NAME
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:711:7: t= NAME
{
t=(Token)input.LT(1);
match(input,NAME,FOLLOW_NAME_in_lisp_atom1656); if (failed) return value;
@@ -2310,7 +2310,7 @@
}
break;
case 4 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:712:6: t= FLOAT
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:712:6: t= FLOAT
{
t=(Token)input.LT(1);
match(input,FLOAT,FOLLOW_FLOAT_in_lisp_atom1671); if (failed) return value;
@@ -2321,7 +2321,7 @@
}
break;
case 5 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:713:6: t= INT
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:713:6: t= INT
{
t=(Token)input.LT(1);
match(input,INT,FOLLOW_INT_in_lisp_atom1683); if (failed) return value;
@@ -2332,7 +2332,7 @@
}
break;
case 6 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:714:6: t= BOOL
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:714:6: t= BOOL
{
t=(Token)input.LT(1);
match(input,BOOL,FOLLOW_BOOL_in_lisp_atom1699); if (failed) return value;
@@ -2343,7 +2343,7 @@
}
break;
case 7 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:715:6: t= NULL
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:715:6: t= NULL
{
t=(Token)input.LT(1);
match(input,NULL,FOLLOW_NULL_in_lisp_atom1717); if (failed) return value;
@@ -2372,20 +2372,20 @@
// $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 ) ;
+ // /home/etirelli/workspace/jboss/jbossrules/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 ) ;
public final String literal() throws RecognitionException {
String text = null;
Token t=null;
-
- text = null;
+
+ 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 )
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:723:2: ( (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL ) )
+ // /home/etirelli/workspace/jboss/jbossrules/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:723:4: (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL )
+ // /home/etirelli/workspace/jboss/jbossrules/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;
switch ( input.LA(1) ) {
case STRING:
@@ -2428,7 +2428,7 @@
switch (alt22) {
case 1 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:723:8: t= STRING
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:723:8: t= STRING
{
t=(Token)input.LT(1);
match(input,STRING,FOLLOW_STRING_in_literal1753); if (failed) return text;
@@ -2439,7 +2439,7 @@
}
break;
case 2 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:724:7: t= NAME
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:724:7: t= NAME
{
t=(Token)input.LT(1);
match(input,NAME,FOLLOW_NAME_in_literal1766); if (failed) return text;
@@ -2450,7 +2450,7 @@
}
break;
case 3 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:725:7: t= INT
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:725:7: t= INT
{
t=(Token)input.LT(1);
match(input,INT,FOLLOW_INT_in_literal1782); if (failed) return text;
@@ -2461,7 +2461,7 @@
}
break;
case 4 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:726:7: t= FLOAT
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:726:7: t= FLOAT
{
t=(Token)input.LT(1);
match(input,FLOAT,FOLLOW_FLOAT_in_literal1797); if (failed) return text;
@@ -2472,7 +2472,7 @@
}
break;
case 5 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:727:7: t= BOOL
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:727:7: t= BOOL
{
t=(Token)input.LT(1);
match(input,BOOL,FOLLOW_BOOL_in_literal1810); if (failed) return text;
@@ -2483,7 +2483,7 @@
}
break;
case 6 :
- // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:728:7: t= NULL
+ // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:728:7: t= NULL
{
t=(Token)input.LT(1);
match(input,NULL,FOLLOW_NULL_in_literal1824); if (failed) return text;
@@ -2537,7 +2537,7 @@
public static final BitSet FOLLOW_46_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[]{0x0000000080000000L});
+ 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});
@@ -2584,16 +2584,16 @@
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[]{0x000000000EE01520L});
+ 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[]{0x000000000EE01520L});
+ 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[]{0x000000000EE01520L});
+ 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[]{0x000000000EC01520L});
+ 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});
@@ -2605,10 +2605,10 @@
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[]{0x0000000001000000L});
- public static final BitSet FOLLOW_FUNC_NAME_in_lisp_list21310 = new BitSet(new long[]{0x000000001E001510L});
- public static final BitSet FOLLOW_lisp_atom2_in_lisp_list21321 = new BitSet(new long[]{0x000000001E001550L});
- public static final BitSet FOLLOW_lisp_list2_in_lisp_list21332 = new BitSet(new long[]{0x000000001E001550L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_lisp_list21300 = new BitSet(new long[]{0x0000000000000020L});
+ public static final BitSet FOLLOW_NAME_in_lisp_list21310 = new BitSet(new long[]{0x0000000007001530L});
+ public static final BitSet FOLLOW_lisp_atom2_in_lisp_list21321 = new BitSet(new long[]{0x0000000007001570L});
+ public static final BitSet FOLLOW_lisp_list2_in_lisp_list21332 = new BitSet(new long[]{0x0000000007001570L});
public static final BitSet FOLLOW_RIGHT_PAREN_in_lisp_list21360 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_VAR_in_lisp_atom21410 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_STRING_in_lisp_atom21422 = new BitSet(new long[]{0x0000000000000002L});
@@ -2616,10 +2616,10 @@
public static final BitSet FOLLOW_INT_in_lisp_atom21456 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_BOOL_in_lisp_atom21469 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_NULL_in_lisp_atom21485 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_SYMBOL_in_lisp_atom21509 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_LEFT_PAREN_in_lisp_list1539 = new BitSet(new long[]{0x000000000E001570L});
- public static final BitSet FOLLOW_lisp_atom_in_lisp_list1549 = new BitSet(new long[]{0x000000000E001570L});
- public static final BitSet FOLLOW_lisp_list_in_lisp_list1565 = new BitSet(new long[]{0x000000000E001570L});
+ public static final BitSet FOLLOW_NAME_in_lisp_atom21509 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_lisp_list1539 = new BitSet(new long[]{0x0000000007001570L});
+ public static final BitSet FOLLOW_lisp_atom_in_lisp_list1549 = new BitSet(new long[]{0x0000000007001570L});
+ public static final BitSet FOLLOW_lisp_list_in_lisp_list1565 = new BitSet(new long[]{0x0000000007001570L});
public static final BitSet FOLLOW_RIGHT_PAREN_in_lisp_list1595 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_VAR_in_lisp_atom1632 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_STRING_in_lisp_atom1644 = new BitSet(new long[]{0x0000000000000002L});
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-24 19:35:08 UTC (rev 18082)
+++ labs/jbossrules/trunk/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g 2008-01-24 19:43:07 UTC (rev 18083)
@@ -1,892 +1,891 @@
-grammar CLPMVEL;
-
- at parser::header {
- package org.drools.clp;
-
- import org.drools.clp.mvel.*;
-
- import org.drools.clp.valuehandlers.*;
- import java.util.List;
- import java.util.ArrayList;
- import java.util.Iterator;
- import java.util.HashMap;
- import java.util.Set;
- import java.util.HashSet;
- import java.util.StringTokenizer;
- import org.drools.lang.descr.*;
- import org.drools.lang.Location;
-}
-
- at parser::members {
- private PackageDescr packageDescr;
- private List errors = new ArrayList();
- private String source = "unknown";
- private int lineOffset = 0;
- private DescrFactory factory = new DescrFactory();
- private boolean parserDebug = false;
- private FunctionRegistry functionRegistry;
- private Location location = new Location( Location.LOCATION_UNKNOWN );
-
- public void setFunctionRegistry(FunctionRegistry functionRegistry) {
- this.functionRegistry = functionRegistry;
- }
-
- public void setParserDebug(boolean parserDebug) {
- this.parserDebug = parserDebug;
- }
-
- public void debug(String message) {
- if ( parserDebug )
- System.err.println( "drl parser: " + message );
- }
-
- public void setSource(String source) {
- this.source = source;
- }
- public DescrFactory getFactory() {
- return factory;
- }
-
- public String getSource() {
- return this.source;
- }
-
- public PackageDescr getPackageDescr() {
- return packageDescr;
- }
-
- private int offset(int line) {
- return line + lineOffset;
- }
-
- /**
- * This will set the offset to record when reparsing. Normally is zero of course
- */
- public void setLineOffset(int i) {
- this.lineOffset = i;
- }
-
- private String getString(Token token) {
- String orig = token.getText();
- return orig.substring( 1, orig.length() -1 );
- }
-
- public void reportError(RecognitionException ex) {
- // if we've already reported an error and have not matched a token
- // yet successfully, don't report any errors.
- if ( errorRecovery ) {
- return;
- }
- errorRecovery = true;
-
- ex.line = offset(ex.line); //add the offset if there is one
- errors.add( ex );
- }
-
- /** return the raw RecognitionException errors */
- public List getErrors() {
- return errors;
- }
-
- /** Return a list of pretty strings summarising the errors */
- public List getErrorMessages() {
- List messages = new ArrayList();
- for ( Iterator errorIter = errors.iterator() ; errorIter.hasNext() ; ) {
- messages.add( createErrorMessage( (RecognitionException) errorIter.next() ) );
- }
- return messages;
- }
-
- /** return true if any parser errors were accumulated */
- public boolean hasErrors() {
- return ! errors.isEmpty();
- }
-
- /** This will take a RecognitionException, and create a sensible error message out of it */
- public String createErrorMessage(RecognitionException e)
- {
- StringBuffer message = new StringBuffer();
- message.append( source + ":"+e.line+":"+e.charPositionInLine+" ");
- if ( e instanceof MismatchedTokenException ) {
- MismatchedTokenException mte = (MismatchedTokenException)e;
- message.append("mismatched token: "+
- e.token+
- "; expecting type "+
- tokenNames[mte.expecting]);
- }
- else if ( e instanceof MismatchedTreeNodeException ) {
- MismatchedTreeNodeException mtne = (MismatchedTreeNodeException)e;
- message.append("mismatched tree node: "+
- //mtne.foundNode+ FIXME
- "; expecting type "+
- tokenNames[mtne.expecting]);
- }
- else if ( e instanceof NoViableAltException ) {
- NoViableAltException nvae = (NoViableAltException)e;
- message.append( "Unexpected token '" + e.token.getText() + "'" );
- /*
- message.append("decision=<<"+nvae.grammarDecisionDescription+">>"+
- " state "+nvae.stateNumber+
- " (decision="+nvae.decisionNumber+
- ") no viable alt; token="+
- e.token);
- */
- }
- else if ( e instanceof EarlyExitException ) {
- EarlyExitException eee = (EarlyExitException)e;
- message.append("required (...)+ loop (decision="+
- eee.decisionNumber+
- ") did not match anything; token="+
- e.token);
- }
- else if ( e instanceof MismatchedSetException ) {
- MismatchedSetException mse = (MismatchedSetException)e;
- message.append("mismatched token '"+
- e.token+
- "' expecting set "+mse.expecting);
- }
- else if ( e instanceof MismatchedNotSetException ) {
- MismatchedNotSetException mse = (MismatchedNotSetException)e;
- message.append("mismatched token '"+
- e.token+
- "' expecting set "+mse.expecting);
- }
- else if ( e instanceof FailedPredicateException ) {
- FailedPredicateException fpe = (FailedPredicateException)e;
- message.append("rule "+fpe.ruleName+" failed predicate: {"+
- fpe.predicateText+"}?");
- } else if (e instanceof GeneralParseException) {
- message.append(" " + e.getMessage());
- }
- return message.toString();
- }
-
- void checkTrailingSemicolon(String text, int line) {
- if (text.trim().endsWith( ";" ) ) {
- this.errors.add( new GeneralParseException( "Trailing semi-colon not allowed", offset(line) ) );
- }
- }
-
-}
-
- at lexer::header {
- package org.drools.clp;
-}
-
-/*
-opt_semicolon
- : ';'?
- ;
-
-
-compilation_unit
- :
- ( statement )+
- ;
-*/
-/*
-statement
- :
- //later we add the other possible statements here
- ( //do something with the returned rule here )
- ;
-*/
-/* prolog
- @init {
- String packageName = "";
- }
- : ( n=package_statement { packageName = n; } )?
- {
- this.packageDescr = factory.createPackage( packageName );
- }
- ;
-
-statement
- :
- ( import_statement
- | function_import_statement
- | global
- | function
- | t=template {this.packageDescr.addFactTemplate( t ); }
- | r=rule { if( r != null ) this.packageDescr.addRule( r ); }
- | q=query { if( q != null ) this.packageDescr.addRule( q ); }
- )
- ;
-
-package_statement returns [String packageName]
- @init{
- packageName = null;
- }
- :
- PACKAGE n=dotted_name[null] opt_semicolon
- {
- packageName = n;
- }
- ;
-*/
-
-eval_script[Shell shell]
- : ( 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]
- : LEFT_PAREN 'import' importName=NAME { importDescr = new ImportDescr( importName.getText() ); }RIGHT_PAREN
- ;
-/*
-
-execution_list returns[ExecutionEngine engine]
- @init {
- engine = new BlockExecutionEngine();
- BuildContext context = new ExecutionBuildContext( engine, functionRegistry );
- }
-
- :
- (fc=lisp_list[context, new LispForm(context) ] { context.addFunction( (FunctionCaller) fc ); })
- ;
-*/
-
-deffunction returns[Deffunction function]
- @init {
- BuildContext context = null;
- }
- : loc=LEFT_PAREN
- DEFFUNCTION
- ruleName=NAME {
- function = new Deffunction( ruleName.getText() );
- functionRegistry.addFunction( function );
- context = new ExecutionBuildContext( function, functionRegistry );
- }
- loc=LEFT_PAREN
- (v=VAR {
- context.addVariable( function.addParameter( v.getText() ) );
- })*
- RIGHT_PAREN
- (fc=lisp_list[context, new LispForm(context) ] { context.addFunction( (FunctionCaller) fc ); })*
- RIGHT_PAREN
- ;
-
-/*
-deffunction_params[BuildContext context]
- : loc=LEFT_PAREN
- (v=VAR {
- // this creates a parameter on the underlying function
- context.createLocalVariable( v.getText() );
- })*
- RIGHT_PAREN
- ;
-*/
-defrule returns [RuleDescr rule]
- @init {
- rule = null;
- AndDescr lhs = null;
- PatternDescr colum = null;
- AttributeDescr module = null;
- Set declarations = null;
- }
- : loc=LEFT_PAREN
-
- DEFRULE ruleName=NAME
- {
- debug( "start rule: " + ruleName.getText() );
- String ruleStr = ruleName.getText();
-
- if ( ruleStr.indexOf("::") >= 0 ) {
- String mod = ruleStr.substring(0, ruleStr.indexOf("::"));
- ruleStr = ruleStr.substring(ruleStr.indexOf("::")+2);
- module = new AttributeDescr( "agenda-group", mod );
- module.setLocation( offset(ruleName.getLine()), ruleName.getCharPositionInLine() );
- module.setStartCharacter( ((CommonToken)ruleName).getStartIndex() );
- module.setEndCharacter( ((CommonToken)ruleName).getStopIndex() );
- }
-
- rule = new RuleDescr( ruleStr, null );
- if( module != null ) {
- rule.addAttribute( module );
- }
-
- rule.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
- rule.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-
- // not sure how you define where a LHS starts in clips, so just putting it here for now
- lhs = new AndDescr();
- rule.setLhs( lhs );
- lhs.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
- lhs.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-
- rule.addAttribute( new AttributeDescr( "dialect", "clips") );
-
- declarations = new HashSet();
- }
- documentation=STRING {
- // do nothing here for now
- }
- ruleAttribute[rule]
-
- ce[lhs, declarations]*
-
- '=>'
-
- engine=execution_block { rule.setConsequence( engine ); }
-
- RIGHT_PAREN
- ;
-
-
-ruleAttribute[RuleDescr rule]
- :
- ( LEFT_PAREN 'declare'
- ( LEFT_PAREN d=salience { rule.addAttribute( d ); } RIGHT_PAREN )?
- RIGHT_PAREN )?
- ;
-
-salience returns [AttributeDescr d ]
- @init {
- d = null;
- }
- :
- loc=SALIENCE i=INT
- {
- d = new AttributeDescr( "salience", i.getText() );
- d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
- d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
- d.setEndCharacter( ((CommonToken)i).getStopIndex() );
- }
- ;
-
-
-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]
- )
- ;
-
-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;
- }
- : LEFT_PAREN
- AND {
- andDescr = new AndDescr();
- in_ce.addDescr( andDescr );
- }
- ce[andDescr, declarations]+
- RIGHT_PAREN
- ;
-
-or_ce[ConditionalElementDescr in_ce, Set declarations]
- @init {
- OrDescr orDescr= null;
- }
- : LEFT_PAREN
- OR {
- orDescr = new OrDescr();
- in_ce.addDescr( orDescr );
- }
- ce[orDescr, declarations]+
- RIGHT_PAREN
- ;
-
-not_ce[ConditionalElementDescr in_ce, Set declarations]
- @init {
- NotDescr notDescr= null;
- }
- : LEFT_PAREN
- NOT {
- notDescr = new NotDescr();
- in_ce.addDescr( notDescr );
- }
- ce[notDescr, declarations]
- RIGHT_PAREN
- ;
-
-exists_ce[ConditionalElementDescr in_ce, Set declarations]
- @init {
- ExistsDescr existsDescr= null;
- }
- : LEFT_PAREN
- EXISTS {
- existsDescr = new ExistsDescr();
- in_ce.addDescr( existsDescr );
- }
- ce[existsDescr, declarations]
- RIGHT_PAREN
- ;
-
-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 );
- }
- RIGHT_PAREN
- ;
-
-normal_pattern[ConditionalElementDescr in_ce, Set declarations]
- @init {
- PatternDescr pattern = null;
- ConditionalElementDescr top = null;
- }
- : LEFT_PAREN
- name=NAME {
- pattern = new PatternDescr(name.getText());
- in_ce.addDescr( pattern );
- top = pattern.getConstraint();
-
- }
- field_constriant[top, declarations]*
- RIGHT_PAREN
- ;
-
-
-
-bound_pattern[ConditionalElementDescr in_ce, Set declarations]
- @init {
- PatternDescr pattern = null;
- String identifier = null;
- ConditionalElementDescr top = null;
- }
- : var=VAR {
- identifier = var.getText();
- }
- ASSIGN_OP LEFT_PAREN name=NAME
- {
- pattern = new PatternDescr(name.getText());
- pattern.setIdentifier( identifier );
- in_ce.addDescr( pattern );
- top = pattern.getConstraint();
- }
- field_constriant[top, declarations]*
- RIGHT_PAREN
- ;
-
-field_constriant[ConditionalElementDescr base, Set declarations]
- @init {
- List list = new ArrayList();
- FieldBindingDescr fbd = null;
- FieldConstraintDescr fc = null;
- RestrictionConnectiveDescr top = null;
- String op = "==";
- }
- :
- LEFT_PAREN f=NAME
- {
- fc = new FieldConstraintDescr(f.getText());
- fc.setLocation( offset(f.getLine()), f.getCharPositionInLine() );
- fc.setStartCharacter( ((CommonToken)f).getStartIndex() );
- base.addDescr( fc );
- top = fc.getRestriction();
- }
-
- or_restr_connective[top, base, fc, declarations]
- RIGHT_PAREN
- ;
-/*
-connected_constraint[RestrictionConnectiveDescr rc, ConditionalElementDescr base]
- :
- restriction[rc, base]
- (
- AMPERSAND { rc.addRestriction(new RestrictionConnectiveDescr(RestrictionConnectiveDescr.AND)); }
- connected_constraint[rc, base]
- |
- PIPE {rc.addRestriction(new RestrictionConnectiveDescr(RestrictionConnectiveDescr.OR)); }
- connected_constraint[rc, base]
- )?
- ;
-*/
-
-
-or_restr_connective[ RestrictionConnectiveDescr rcBase, ConditionalElementDescr ceBase, FieldConstraintDescr fcBase, Set declarations ]
- options {
- backtrack=true;
- }
- @init {
- RestrictionConnectiveDescr or = new RestrictionConnectiveDescr(RestrictionConnectiveDescr.OR);
- }
- :
- and_restr_connective[or, ceBase, fcBase, declarations]
- (
- options {backtrack=true;}
- : PIPE
- {
- location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_OPERATOR);
- }
- and_restr_connective[or, ceBase, fcBase, declarations]
- )*
- ;
- finally {
- if( or.getRestrictions().size() == 1 ) {
- $rcBase.addOrMerge( (RestrictionDescr) or.getRestrictions().get( 0 ) );
- } else if ( or.getRestrictions().size() > 1 ) {
- $rcBase.addRestriction( or );
- }
- }
-
-and_restr_connective[ RestrictionConnectiveDescr rcBase, ConditionalElementDescr ceBase, FieldConstraintDescr fcBase, Set declarations ]
- @init {
- RestrictionConnectiveDescr and = new RestrictionConnectiveDescr(RestrictionConnectiveDescr.AND);
- }
- :
- restriction[and, ceBase, fcBase, declarations]
- ( AMPERSAND restriction[and, ceBase, fcBase, declarations] )*
- /*
- ( options {backtrack=true;}
- : t=AMPERSAND
- {
- location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_OPERATOR);
- }
- restriction[and, ceBase]
- )*
- */
- ;
- finally {
- if( and.getRestrictions().size() == 1) {
- $rcBase.addOrMerge( (RestrictionDescr) and.getRestrictions().get( 0 ) );
- } else if ( and.getRestrictions().size() > 1 ) {
- $rcBase.addRestriction( and );
- }
- }
-
-restriction[RestrictionConnectiveDescr rc, ConditionalElementDescr base, FieldConstraintDescr fcBase, Set declarations ]
- @init {
- String op = "==";
- }
- : (TILDE{op = "!=";})?
- ( predicate_constraint[rc, op, base]
- | return_value_restriction[op, rc]
- | variable_restriction[op, rc, base, fcBase, declarations]
- | lc=literal_restriction {
- rc.addRestriction( new LiteralRestrictionDescr(op, lc) );
- op = "==";
- }
- )
- ;
-
-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 ) );
- }
-
- ;
-
-
-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 ) );
- }
- ;
-
-//will add a declaration field binding, if this is the first time the name is used
-variable_restriction[String op, RestrictionConnectiveDescr rc, ConditionalElementDescr ceBase, FieldConstraintDescr fcBase, Set declarations ]
- : VAR {
- if ( declarations.contains( $VAR.text ) ) {
- rc.addRestriction( new VariableRestrictionDescr(op, $VAR.text) );
- } else {
- FieldBindingDescr fbd = new FieldBindingDescr();
- fbd.setIdentifier( $VAR.text );
- fbd.setFieldName( fcBase.getFieldName() );
- ceBase.insertBeforeLast( FieldConstraintDescr.class, fbd );
- declarations.add( $VAR.text );
- }
- }
- ;
-
-
-literal_restriction returns [String text]
- @init {
- text = null;
- }
- :
- t=literal {
- text = t;
- }
- ;
-
-
-eval_sExpressions returns[List<SExpression> list]
- @init {
- list = new ArrayList<SExpression>();
- }
- :
- (a=lisp_list2 { list.add( a ); })*
-// { sExpressions = ( SExpression[] ) list.toArray( new SExpression[ list.size () ] ); }
- ;
-
-lisp_list2 returns[SExpression sExpression]
- @init {
- List list = new ArrayList();
- sExpression = null;
- }
- : LEFT_PAREN
- t=FUNC_NAME { list.add( new SymbolLispAtom2( t.getText() ) ); }
- ( a=lisp_atom2 { list.add( a ); }
- | a=lisp_list2 { list.add( a ); }
- )+
- RIGHT_PAREN
- { sExpression = new LispForm2( ( SExpression[] ) list.toArray( new SExpression[ list.size () ] ) ); }
- ;
-
-lisp_atom2 returns[SExpression sExpression]
- @init {
- sExpression = null;
- }
- :
- /*(
- t=FLOAT { sExpression = new LispAtom2( t.getText() ); }
- | t=INT { sExpression = new LispAtom2( t.getText() ); }
- | t=BOOL { sExpression = new LispAtom2( t.getText() ); }
- | t=NULL { sExpression = new LispAtom2( null ); }
- | t=STRING { sExpression = new LispAtom2( getString( t ) ); }
- | t=NAME { sExpression = new LispAtom2( t.getText() ); }
-
- )*/
-
- (
- 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=SYMBOL { sExpression = new SymbolLispAtom2( 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;
- }
- : ( t=STRING { text = getString( t ); }
- | t=NAME { text = t.getText(); }
- | t=INT { text = t.getText(); }
- | t=FLOAT { text = t.getText(); }
- | t=BOOL { text = t.getText(); }
- | t=NULL { text = null; }
- )
- ;
-
-WS : ( ' '
- | '\t'
- | '\f'
- | EOL
- )
- { $channel=HIDDEN; }
- ;
-
-DEFRULE : 'defrule';
-DEFFUNCTION : 'deffunction';
-OR : 'or';
-AND : 'and';
-NOT : 'not';
-EXISTS : 'exists';
-TEST : 'test';
-
-NULL : 'null';
-
-DECLARE : 'declare';
-
-SALIENCE : 'salience';
-
-//MODIFY : 'modify';
-
-fragment
-EOL :
- ( ( '\r\n' )=> '\r\n' // Evil DOS
- | '\r' // Macintosh
- | '\n' // Unix (the right way)
- )
- ;
-
-INT
- : ('-')?('0'..'9')+
- ;
-
-FLOAT
- : ('-')?('0'..'9')+ '.' ('0'..'9')+
- ;
-
-STRING
- : ('"' ( EscapeSequence | ~('\\'|'"') )* '"')
- | ('\'' ( EscapeSequence | ~('\\'|'\'') )* '\'')
- ;
-
-fragment
-HexDigit : ('0'..'9'|'a'..'f'|'A'..'F') ;
-
-fragment
-EscapeSequence
- : '\\' ('b'|'t'|'n'|'f'|'r'|'\"'|'\''|'\\')
- | UnicodeEscape
- | OctalEscape
- ;
-
-fragment
-OctalEscape
- : '\\' ('0'..'3') ('0'..'7') ('0'..'7')
- | '\\' ('0'..'7') ('0'..'7')
- | '\\' ('0'..'7')
- ;
-
-fragment
-UnicodeEscape
- : '\\' 'u' HexDigit HexDigit HexDigit HexDigit
- ;
-
-BOOL
- : ('true'|'false')
- ;
-
-VAR : '?'~DELIM+
- ;
-
-SH_STYLE_SINGLE_LINE_COMMENT
- : '#' ( options{greedy=false;} : .)* EOL /* ('\r')? '\n' */
- { $channel=HIDDEN; }
- ;
-
-
-C_STYLE_SINGLE_LINE_COMMENT
- : '//' ( options{greedy=false;} : .)* EOL // ('\r')? '\n'
- { $channel=HIDDEN; }
- ;
-
-
-LEFT_PAREN
- : '('
- ;
-
-RIGHT_PAREN
- : ')'
- ;
-
-LEFT_SQUARE
- : '['
- ;
-
-RIGHT_SQUARE
- : ']'
- ;
-
-LEFT_CURLY
- : '{'
- ;
-
-RIGHT_CURLY
- : '}'
- ;
-
-TILDE : '~'
- ;
-
-AMPERSAND
- : '&'
- ;
-
-PIPE
- : '|'
- ;
-
-ASSIGN_OP
- : '<-'
- ;
-
-COLON : ':';
-
-EQUALS : '=';
-
-MULTI_LINE_COMMENT
- : '/*' (options{greedy=false;} : .)* '*/'
- { $channel=HIDDEN; }
- ;
-
-NAME : SYMBOL ;
-
-//FUNC_NAME : ('a'..'z'|'A'..'Z'|'0'..'9'|'!'|'$'|'%'|'^'|'&'|'*'|'_'|'-'|'+'|'='|'|'|'\'|'/'|'@'|'~'|'#'|':'|';'|'<'|'>'|','|'.'|'['|']'|'{'|'}')+;
-
-fragment
-FUNC_NAME : SYMBOL ;
-
-fragment
-SYMBOL : ~START_DELIM ~DELIM* ;
-
-fragment
-START_DELIM : ' '|'\t'|'\n'|'\r'|'"'|'('|')'|';'|'&'|'|'|'~'|'?';
-
-fragment
-DELIM : ' '|'\t'|'\n'|'\r'|'"'|'('|')'|';'|'&'|'|'|'~'|'<';
-
-/*
-fragment
-SYMBOL
- : ((~(' '|'\t'|'\n'|'\r'|'"'|'('|')'|';'|'&'|'|'|'~'|'?'|'$'))|('$' ~('?'|' '|'\t'|'\n'|'\r'|'"'|'('|')'|';'|'&'|'|'|'~'|'<')))
- (~(' '|'\t'|'\n'|'\r'|'"'|'('|')'|';'|'&'|'|'|'~'|'<'|'?'))*
- ;
-*/
-
-
-
-
+grammar CLPMVEL;
+
+ at parser::header {
+ package org.drools.clp;
+
+ import org.drools.clp.mvel.*;
+
+ import org.drools.clp.valuehandlers.*;
+ import java.util.List;
+ import java.util.ArrayList;
+ import java.util.Iterator;
+ import java.util.HashMap;
+ import java.util.Set;
+ import java.util.HashSet;
+ import java.util.StringTokenizer;
+ import org.drools.lang.descr.*;
+ import org.drools.lang.Location;
+}
+
+ at parser::members {
+ private PackageDescr packageDescr;
+ private List errors = new ArrayList();
+ private String source = "unknown";
+ private int lineOffset = 0;
+ private DescrFactory factory = new DescrFactory();
+ private boolean parserDebug = false;
+ private FunctionRegistry functionRegistry;
+ private Location location = new Location( Location.LOCATION_UNKNOWN );
+
+ public void setFunctionRegistry(FunctionRegistry functionRegistry) {
+ this.functionRegistry = functionRegistry;
+ }
+
+ public void setParserDebug(boolean parserDebug) {
+ this.parserDebug = parserDebug;
+ }
+
+ public void debug(String message) {
+ if ( parserDebug )
+ System.err.println( "drl parser: " + message );
+ }
+
+ public void setSource(String source) {
+ this.source = source;
+ }
+ public DescrFactory getFactory() {
+ return factory;
+ }
+
+ public String getSource() {
+ return this.source;
+ }
+
+ public PackageDescr getPackageDescr() {
+ return packageDescr;
+ }
+
+ private int offset(int line) {
+ return line + lineOffset;
+ }
+
+ /**
+ * This will set the offset to record when reparsing. Normally is zero of course
+ */
+ public void setLineOffset(int i) {
+ this.lineOffset = i;
+ }
+
+ private String getString(Token token) {
+ String orig = token.getText();
+ return orig.substring( 1, orig.length() -1 );
+ }
+
+ public void reportError(RecognitionException ex) {
+ // if we've already reported an error and have not matched a token
+ // yet successfully, don't report any errors.
+ if ( errorRecovery ) {
+ return;
+ }
+ errorRecovery = true;
+
+ ex.line = offset(ex.line); //add the offset if there is one
+ errors.add( ex );
+ }
+
+ /** return the raw RecognitionException errors */
+ public List getErrors() {
+ return errors;
+ }
+
+ /** Return a list of pretty strings summarising the errors */
+ public List getErrorMessages() {
+ List messages = new ArrayList();
+ for ( Iterator errorIter = errors.iterator() ; errorIter.hasNext() ; ) {
+ messages.add( createErrorMessage( (RecognitionException) errorIter.next() ) );
+ }
+ return messages;
+ }
+
+ /** return true if any parser errors were accumulated */
+ public boolean hasErrors() {
+ return ! errors.isEmpty();
+ }
+
+ /** This will take a RecognitionException, and create a sensible error message out of it */
+ public String createErrorMessage(RecognitionException e)
+ {
+ StringBuffer message = new StringBuffer();
+ message.append( source + ":"+e.line+":"+e.charPositionInLine+" ");
+ if ( e instanceof MismatchedTokenException ) {
+ MismatchedTokenException mte = (MismatchedTokenException)e;
+ message.append("mismatched token: "+
+ e.token+
+ "; expecting type "+
+ tokenNames[mte.expecting]);
+ }
+ else if ( e instanceof MismatchedTreeNodeException ) {
+ MismatchedTreeNodeException mtne = (MismatchedTreeNodeException)e;
+ message.append("mismatched tree node: "+
+ //mtne.foundNode+ FIXME
+ "; expecting type "+
+ tokenNames[mtne.expecting]);
+ }
+ else if ( e instanceof NoViableAltException ) {
+ NoViableAltException nvae = (NoViableAltException)e;
+ message.append( "Unexpected token '" + e.token.getText() + "'" );
+ /*
+ message.append("decision=<<"+nvae.grammarDecisionDescription+">>"+
+ " state "+nvae.stateNumber+
+ " (decision="+nvae.decisionNumber+
+ ") no viable alt; token="+
+ e.token);
+ */
+ }
+ else if ( e instanceof EarlyExitException ) {
+ EarlyExitException eee = (EarlyExitException)e;
+ message.append("required (...)+ loop (decision="+
+ eee.decisionNumber+
+ ") did not match anything; token="+
+ e.token);
+ }
+ else if ( e instanceof MismatchedSetException ) {
+ MismatchedSetException mse = (MismatchedSetException)e;
+ message.append("mismatched token '"+
+ e.token+
+ "' expecting set "+mse.expecting);
+ }
+ else if ( e instanceof MismatchedNotSetException ) {
+ MismatchedNotSetException mse = (MismatchedNotSetException)e;
+ message.append("mismatched token '"+
+ e.token+
+ "' expecting set "+mse.expecting);
+ }
+ else if ( e instanceof FailedPredicateException ) {
+ FailedPredicateException fpe = (FailedPredicateException)e;
+ message.append("rule "+fpe.ruleName+" failed predicate: {"+
+ fpe.predicateText+"}?");
+ } else if (e instanceof GeneralParseException) {
+ message.append(" " + e.getMessage());
+ }
+ return message.toString();
+ }
+
+ void checkTrailingSemicolon(String text, int line) {
+ if (text.trim().endsWith( ";" ) ) {
+ this.errors.add( new GeneralParseException( "Trailing semi-colon not allowed", offset(line) ) );
+ }
+ }
+
+}
+
+ at lexer::header {
+ package org.drools.clp;
+}
+
+/*
+opt_semicolon
+ : ';'?
+ ;
+
+
+compilation_unit
+ :
+ ( statement )+
+ ;
+*/
+/*
+statement
+ :
+ //later we add the other possible statements here
+ ( //do something with the returned rule here )
+ ;
+*/
+/* prolog
+ @init {
+ String packageName = "";
+ }
+ : ( n=package_statement { packageName = n; } )?
+ {
+ this.packageDescr = factory.createPackage( packageName );
+ }
+ ;
+
+statement
+ :
+ ( import_statement
+ | function_import_statement
+ | global
+ | function
+ | t=template {this.packageDescr.addFactTemplate( t ); }
+ | r=rule { if( r != null ) this.packageDescr.addRule( r ); }
+ | q=query { if( q != null ) this.packageDescr.addRule( q ); }
+ )
+ ;
+
+package_statement returns [String packageName]
+ @init{
+ packageName = null;
+ }
+ :
+ PACKAGE n=dotted_name[null] opt_semicolon
+ {
+ packageName = n;
+ }
+ ;
+*/
+
+eval_script[Shell shell]
+ : ( 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]
+ : LEFT_PAREN 'import' importName=NAME { importDescr = new ImportDescr( importName.getText() ); }RIGHT_PAREN
+ ;
+/*
+
+execution_list returns[ExecutionEngine engine]
+ @init {
+ engine = new BlockExecutionEngine();
+ BuildContext context = new ExecutionBuildContext( engine, functionRegistry );
+ }
+
+ :
+ (fc=lisp_list[context, new LispForm(context) ] { context.addFunction( (FunctionCaller) fc ); })
+ ;
+*/
+
+deffunction returns[Deffunction function]
+ @init {
+ BuildContext context = null;
+ }
+ : loc=LEFT_PAREN
+ DEFFUNCTION
+ ruleName=NAME {
+ function = new Deffunction( ruleName.getText() );
+ functionRegistry.addFunction( function );
+ context = new ExecutionBuildContext( function, functionRegistry );
+ }
+ loc=LEFT_PAREN
+ (v=VAR {
+ context.addVariable( function.addParameter( v.getText() ) );
+ })*
+ RIGHT_PAREN
+ (fc=lisp_list[context, new LispForm(context) ] { context.addFunction( (FunctionCaller) fc ); })*
+ RIGHT_PAREN
+ ;
+
+/*
+deffunction_params[BuildContext context]
+ : loc=LEFT_PAREN
+ (v=VAR {
+ // this creates a parameter on the underlying function
+ context.createLocalVariable( v.getText() );
+ })*
+ RIGHT_PAREN
+ ;
+*/
+defrule returns [RuleDescr rule]
+ @init {
+ rule = null;
+ AndDescr lhs = null;
+ PatternDescr colum = null;
+ AttributeDescr module = null;
+ Set declarations = null;
+ }
+ : loc=LEFT_PAREN
+
+ DEFRULE ruleName=NAME
+ {
+ debug( "start rule: " + ruleName.getText() );
+ String ruleStr = ruleName.getText();
+
+ if ( ruleStr.indexOf("::") >= 0 ) {
+ String mod = ruleStr.substring(0, ruleStr.indexOf("::"));
+ ruleStr = ruleStr.substring(ruleStr.indexOf("::")+2);
+ module = new AttributeDescr( "agenda-group", mod );
+ module.setLocation( offset(ruleName.getLine()), ruleName.getCharPositionInLine() );
+ module.setStartCharacter( ((CommonToken)ruleName).getStartIndex() );
+ module.setEndCharacter( ((CommonToken)ruleName).getStopIndex() );
+ }
+
+ rule = new RuleDescr( ruleStr, null );
+ if( module != null ) {
+ rule.addAttribute( module );
+ }
+
+ rule.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+ rule.setStartCharacter( ((CommonToken)loc).getStartIndex() );
+
+ // not sure how you define where a LHS starts in clips, so just putting it here for now
+ lhs = new AndDescr();
+ rule.setLhs( lhs );
+ lhs.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+ lhs.setStartCharacter( ((CommonToken)loc).getStartIndex() );
+
+ rule.addAttribute( new AttributeDescr( "dialect", "clips") );
+
+ declarations = new HashSet();
+ }
+ documentation=STRING {
+ // do nothing here for now
+ }
+ ruleAttribute[rule]
+
+ ce[lhs, declarations]*
+
+ '=>'
+
+ engine=execution_block { rule.setConsequence( engine ); }
+
+ RIGHT_PAREN
+ ;
+
+
+ruleAttribute[RuleDescr rule]
+ :
+ ( LEFT_PAREN 'declare'
+ ( LEFT_PAREN d=salience { rule.addAttribute( d ); } RIGHT_PAREN )?
+ RIGHT_PAREN )?
+ ;
+
+salience returns [AttributeDescr d ]
+ @init {
+ d = null;
+ }
+ :
+ loc=SALIENCE i=INT
+ {
+ d = new AttributeDescr( "salience", i.getText() );
+ d.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+ d.setStartCharacter( ((CommonToken)loc).getStartIndex() );
+ d.setEndCharacter( ((CommonToken)i).getStopIndex() );
+ }
+ ;
+
+
+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]
+ )
+ ;
+
+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;
+ }
+ : LEFT_PAREN
+ AND {
+ andDescr = new AndDescr();
+ in_ce.addDescr( andDescr );
+ }
+ ce[andDescr, declarations]+
+ RIGHT_PAREN
+ ;
+
+or_ce[ConditionalElementDescr in_ce, Set declarations]
+ @init {
+ OrDescr orDescr= null;
+ }
+ : LEFT_PAREN
+ OR {
+ orDescr = new OrDescr();
+ in_ce.addDescr( orDescr );
+ }
+ ce[orDescr, declarations]+
+ RIGHT_PAREN
+ ;
+
+not_ce[ConditionalElementDescr in_ce, Set declarations]
+ @init {
+ NotDescr notDescr= null;
+ }
+ : LEFT_PAREN
+ NOT {
+ notDescr = new NotDescr();
+ in_ce.addDescr( notDescr );
+ }
+ ce[notDescr, declarations]
+ RIGHT_PAREN
+ ;
+
+exists_ce[ConditionalElementDescr in_ce, Set declarations]
+ @init {
+ ExistsDescr existsDescr= null;
+ }
+ : LEFT_PAREN
+ EXISTS {
+ existsDescr = new ExistsDescr();
+ in_ce.addDescr( existsDescr );
+ }
+ ce[existsDescr, declarations]
+ RIGHT_PAREN
+ ;
+
+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 );
+ }
+ RIGHT_PAREN
+ ;
+
+normal_pattern[ConditionalElementDescr in_ce, Set declarations]
+ @init {
+ PatternDescr pattern = null;
+ ConditionalElementDescr top = null;
+ }
+ : LEFT_PAREN
+ name=NAME {
+ pattern = new PatternDescr(name.getText());
+ in_ce.addDescr( pattern );
+ top = pattern.getConstraint();
+
+ }
+ field_constriant[top, declarations]*
+ RIGHT_PAREN
+ ;
+
+
+
+bound_pattern[ConditionalElementDescr in_ce, Set declarations]
+ @init {
+ PatternDescr pattern = null;
+ String identifier = null;
+ ConditionalElementDescr top = null;
+ }
+ : var=VAR {
+ identifier = var.getText();
+ }
+ ASSIGN_OP LEFT_PAREN name=NAME
+ {
+ pattern = new PatternDescr(name.getText());
+ pattern.setIdentifier( identifier );
+ in_ce.addDescr( pattern );
+ top = pattern.getConstraint();
+ }
+ field_constriant[top, declarations]*
+ RIGHT_PAREN
+ ;
+
+field_constriant[ConditionalElementDescr base, Set declarations]
+ @init {
+ List list = new ArrayList();
+ FieldBindingDescr fbd = null;
+ FieldConstraintDescr fc = null;
+ RestrictionConnectiveDescr top = null;
+ String op = "==";
+ }
+ :
+ LEFT_PAREN f=NAME
+ {
+ fc = new FieldConstraintDescr(f.getText());
+ fc.setLocation( offset(f.getLine()), f.getCharPositionInLine() );
+ fc.setStartCharacter( ((CommonToken)f).getStartIndex() );
+ base.addDescr( fc );
+ top = fc.getRestriction();
+ }
+
+ or_restr_connective[top, base, fc, declarations]
+ RIGHT_PAREN
+ ;
+/*
+connected_constraint[RestrictionConnectiveDescr rc, ConditionalElementDescr base]
+ :
+ restriction[rc, base]
+ (
+ AMPERSAND { rc.addRestriction(new RestrictionConnectiveDescr(RestrictionConnectiveDescr.AND)); }
+ connected_constraint[rc, base]
+ |
+ PIPE {rc.addRestriction(new RestrictionConnectiveDescr(RestrictionConnectiveDescr.OR)); }
+ connected_constraint[rc, base]
+ )?
+ ;
+*/
+
+
+or_restr_connective[ RestrictionConnectiveDescr rcBase, ConditionalElementDescr ceBase, FieldConstraintDescr fcBase, Set declarations ]
+ options {
+ backtrack=true;
+ }
+ @init {
+ RestrictionConnectiveDescr or = new RestrictionConnectiveDescr(RestrictionConnectiveDescr.OR);
+ }
+ :
+ and_restr_connective[or, ceBase, fcBase, declarations]
+ (
+ options {backtrack=true;}
+ : PIPE
+ {
+ location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_OPERATOR);
+ }
+ and_restr_connective[or, ceBase, fcBase, declarations]
+ )*
+ ;
+ finally {
+ if( or.getRestrictions().size() == 1 ) {
+ $rcBase.addOrMerge( (RestrictionDescr) or.getRestrictions().get( 0 ) );
+ } else if ( or.getRestrictions().size() > 1 ) {
+ $rcBase.addRestriction( or );
+ }
+ }
+
+and_restr_connective[ RestrictionConnectiveDescr rcBase, ConditionalElementDescr ceBase, FieldConstraintDescr fcBase, Set declarations ]
+ @init {
+ RestrictionConnectiveDescr and = new RestrictionConnectiveDescr(RestrictionConnectiveDescr.AND);
+ }
+ :
+ restriction[and, ceBase, fcBase, declarations]
+ ( AMPERSAND restriction[and, ceBase, fcBase, declarations] )*
+ /*
+ ( options {backtrack=true;}
+ : t=AMPERSAND
+ {
+ location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_OPERATOR);
+ }
+ restriction[and, ceBase]
+ )*
+ */
+ ;
+ finally {
+ if( and.getRestrictions().size() == 1) {
+ $rcBase.addOrMerge( (RestrictionDescr) and.getRestrictions().get( 0 ) );
+ } else if ( and.getRestrictions().size() > 1 ) {
+ $rcBase.addRestriction( and );
+ }
+ }
+
+restriction[RestrictionConnectiveDescr rc, ConditionalElementDescr base, FieldConstraintDescr fcBase, Set declarations ]
+ @init {
+ String op = "==";
+ }
+ : (TILDE{op = "!=";})?
+ ( predicate_constraint[rc, op, base]
+ | return_value_restriction[op, rc]
+ | variable_restriction[op, rc, base, fcBase, declarations]
+ | lc=literal_restriction {
+ rc.addRestriction( new LiteralRestrictionDescr(op, lc) );
+ op = "==";
+ }
+ )
+ ;
+
+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 ) );
+ }
+
+ ;
+
+
+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 ) );
+ }
+ ;
+
+//will add a declaration field binding, if this is the first time the name is used
+variable_restriction[String op, RestrictionConnectiveDescr rc, ConditionalElementDescr ceBase, FieldConstraintDescr fcBase, Set declarations ]
+ : VAR {
+ if ( declarations.contains( $VAR.text ) ) {
+ rc.addRestriction( new VariableRestrictionDescr(op, $VAR.text) );
+ } else {
+ FieldBindingDescr fbd = new FieldBindingDescr();
+ fbd.setIdentifier( $VAR.text );
+ fbd.setFieldName( fcBase.getFieldName() );
+ ceBase.insertBeforeLast( FieldConstraintDescr.class, fbd );
+ declarations.add( $VAR.text );
+ }
+ }
+ ;
+
+
+literal_restriction returns [String text]
+ @init {
+ text = null;
+ }
+ :
+ t=literal {
+ text = t;
+ }
+ ;
+
+
+eval_sExpressions returns[List<SExpression> list]
+ @init {
+ list = new ArrayList<SExpression>();
+ }
+ :
+ (a=lisp_list2 { list.add( a ); })*
+// { sExpressions = ( SExpression[] ) list.toArray( new SExpression[ list.size () ] ); }
+ ;
+
+lisp_list2 returns[SExpression sExpression]
+ @init {
+ List list = new ArrayList();
+ sExpression = null;
+ }
+ : LEFT_PAREN
+ t=NAME { list.add( new SymbolLispAtom2( t.getText() ) ); }
+ ( a=lisp_atom2 { list.add( a ); }
+ | a=lisp_list2 { list.add( a ); }
+ )+
+ RIGHT_PAREN
+ { sExpression = new LispForm2( ( SExpression[] ) list.toArray( new SExpression[ list.size () ] ) ); }
+ ;
+
+lisp_atom2 returns[SExpression sExpression]
+ @init {
+ sExpression = null;
+ }
+ :
+ /*(
+ t=FLOAT { sExpression = new LispAtom2( t.getText() ); }
+ | t=INT { sExpression = new LispAtom2( t.getText() ); }
+ | t=BOOL { sExpression = new LispAtom2( t.getText() ); }
+ | t=NULL { sExpression = new LispAtom2( null ); }
+ | t=STRING { sExpression = new LispAtom2( getString( t ) ); }
+ | t=NAME { sExpression = new LispAtom2( t.getText() ); }
+
+ )*/
+
+ (
+ 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() ); }
+
+ )
+ ;
+
+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;
+ }
+ : ( t=STRING { text = getString( t ); }
+ | t=NAME { text = t.getText(); }
+ | t=INT { text = t.getText(); }
+ | t=FLOAT { text = t.getText(); }
+ | t=BOOL { text = t.getText(); }
+ | t=NULL { text = null; }
+ )
+ ;
+
+WS : ( ' '
+ | '\t'
+ | '\f'
+ | EOL
+ )
+ { $channel=HIDDEN; }
+ ;
+
+DEFRULE : 'defrule';
+DEFFUNCTION : 'deffunction';
+OR : 'or';
+AND : 'and';
+NOT : 'not';
+EXISTS : 'exists';
+TEST : 'test';
+
+NULL : 'null';
+
+DECLARE : 'declare';
+
+SALIENCE : 'salience';
+
+//MODIFY : 'modify';
+
+fragment
+EOL :
+ ( ( '\r\n' )=> '\r\n' // Evil DOS
+ | '\r' // Macintosh
+ | '\n' // Unix (the right way)
+ )
+ ;
+
+INT
+ : ('-')?('0'..'9')+
+ ;
+
+FLOAT
+ : ('-')?('0'..'9')+ '.' ('0'..'9')+
+ ;
+
+STRING
+ : ('"' ( EscapeSequence | ~('\\'|'"') )* '"')
+ | ('\'' ( EscapeSequence | ~('\\'|'\'') )* '\'')
+ ;
+
+fragment
+HexDigit : ('0'..'9'|'a'..'f'|'A'..'F') ;
+
+fragment
+EscapeSequence
+ : '\\' ('b'|'t'|'n'|'f'|'r'|'\"'|'\''|'\\')
+ | UnicodeEscape
+ | OctalEscape
+ ;
+
+fragment
+OctalEscape
+ : '\\' ('0'..'3') ('0'..'7') ('0'..'7')
+ | '\\' ('0'..'7') ('0'..'7')
+ | '\\' ('0'..'7')
+ ;
+
+fragment
+UnicodeEscape
+ : '\\' 'u' HexDigit HexDigit HexDigit HexDigit
+ ;
+
+BOOL
+ : ('true'|'false')
+ ;
+
+VAR : '?'~DELIM+
+ ;
+
+SH_STYLE_SINGLE_LINE_COMMENT
+ : '#' ( options{greedy=false;} : .)* EOL /* ('\r')? '\n' */
+ { $channel=HIDDEN; }
+ ;
+
+
+C_STYLE_SINGLE_LINE_COMMENT
+ : '//' ( options{greedy=false;} : .)* EOL // ('\r')? '\n'
+ { $channel=HIDDEN; }
+ ;
+
+
+LEFT_PAREN
+ : '('
+ ;
+
+RIGHT_PAREN
+ : ')'
+ ;
+
+LEFT_SQUARE
+ : '['
+ ;
+
+RIGHT_SQUARE
+ : ']'
+ ;
+
+LEFT_CURLY
+ : '{'
+ ;
+
+RIGHT_CURLY
+ : '}'
+ ;
+
+TILDE : '~'
+ ;
+
+AMPERSAND
+ : '&'
+ ;
+
+PIPE
+ : '|'
+ ;
+
+ASSIGN_OP
+ : '<-'
+ ;
+
+COLON : ':';
+
+EQUALS : '=';
+
+MULTI_LINE_COMMENT
+ : '/*' (options{greedy=false;} : .)* '*/'
+ { $channel=HIDDEN; }
+ ;
+
+NAME : SYMBOL ;
+
+fragment
+SYMBOL : CHAR* ;
+
+fragment
+START_DELIM : ' '|'\t'|'\n'|'\r'|'"'|'('|')'|';'|'&'|'|'|'~'|'?';
+
+fragment
+DELIM : ' '|'\t'|'\n'|'\r'|'"'|'('|')'|';'|'&'|'|'|'~'|'<';
+
+fragment
+CHAR : ('a'..'z'|'A'..'Z'|'0'..'9'|'!'|'$'|'%'|'^'|'*'|'_'|'-'|'+'|'='|'\\'|'/'|'@'|'#'|':'|'>'|','|'.'|'['|']'|'{'|'}');
+
+
+/*
+fragment
+SYMBOL
+ : ((~(' '|'\t'|'\n'|'\r'|'"'|'('|')'|';'|'&'|'|'|'~'|'?'|'$'))|('$' ~('?'|' '|'\t'|'\n'|'\r'|'"'|'('|')'|';'|'&'|'|'|'~'|'<')))
+ (~(' '|'\t'|'\n'|'\r'|'"'|'('|')'|';'|'&'|'|'|'~'|'<'|'?'))*
+ ;
+*/
+
+
+
+
Modified: labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/ShellTest.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/ShellTest.java 2008-01-24 19:35:08 UTC (rev 18082)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/ShellTest.java 2008-01-24 19:43:07 UTC (rev 18083)
@@ -30,7 +30,7 @@
assertEquals( 2, pkg.getRules().length );
- assertTrue( pkg.getImports().contains( "org.drools.Person" ) );
+ assertTrue( pkg.getImports().containsKey( "org.drools.Person" ) );
WorkingMemory wm = shell.getWorkingMemory();
wm.insert( new Person("bob", "cheddar", 30) );
More information about the jboss-svn-commits
mailing list