[jboss-svn-commits] JBL Code SVN: r18087 - 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 16:15:43 EST 2008
Author: mark.proctor at jboss.com
Date: 2008-01-24 16:15:43 -0500 (Thu, 24 Jan 2008)
New Revision: 18087
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:
JBRULES-720 Clips Parser
-Initial set of MVEL conversion tests are parsing.
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 21:10:22 UTC (rev 18086)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/CLPMVELLexer.java 2008-01-24 21:15:43 UTC (rev 18087)
@@ -1,8 +1,8 @@
-// $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
+// $ANTLR 3.0.1 C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g 2008-01-24 21:14:26
+
+ package org.drools.clp;
- package org.drools.clp;
-
import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
@@ -10,64 +10,63 @@
import java.util.Map;
import java.util.HashMap;
public class CLPMVELLexer extends Lexer {
- public static final int EXISTS=16;
- public static final int DEFRULE=9;
- public static final int HexDigit=31;
+ public static final int RIGHT_SQUARE=38;
+ public static final int RIGHT_CURLY=40;
+ public static final int EQUALS=23;
public static final int FLOAT=24;
- public static final int TILDE=21;
- public static final int T45=45;
- public static final int OR=14;
- public static final int PIPE=19;
- 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 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 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 SYMBOL_CHAR=34;
+ public static final int NOT=15;
+ public static final int AND=13;
+ public static final int FIRST_SYMBOL_CHAR=43;
+ public static final int EOF=-1;
+ public static final int HexDigit=31;
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 ASSIGN_OP=18;
+ public static final int RIGHT_PAREN=6;
+ public static final int NAME=5;
+ public static final int EOL=27;
+ public static final int DEFRULE=9;
+ public static final int TILDE=21;
+ public static final int PIPE=19;
public static final int VAR=8;
- public static final int EQUALS=23;
- public static final int UnicodeEscape=32;
- public static final int EOF=-1;
+ public static final int EXISTS=16;
+ public static final int SYMBOL=42;
public static final int NULL=26;
- public static final int EOL=27;
- public static final int Tokens=47;
- public static final int COLON=22;
+ public static final int BOOL=25;
public static final int SALIENCE=11;
- public static final int OctalEscape=33;
+ public static final int AMPERSAND=20;
+ public static final int INT=12;
+ public static final int Tokens=46;
public static final int MULTI_LINE_COMMENT=41;
+ public static final int T45=45;
+ public static final int T44=44;
+ public static final int COLON=22;
+ public static final int WS=28;
+ public static final int UnicodeEscape=32;
+ public static final int LEFT_CURLY=39;
+ public static final int OR=14;
public static final int TEST=17;
- public static final int 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 LEFT_PAREN=4;
+ public static final int DECLARE=29;
+ public static final int LEFT_SQUARE=37;
+ public static final int EscapeSequence=30;
+ public static final int OctalEscape=33;
public static final int C_STYLE_SINGLE_LINE_COMMENT=36;
+ public static final int STRING=10;
public CLPMVELLexer() {;}
public CLPMVELLexer(CharStream input) {
super(input);
- ruleMemo = new HashMap[45+1];
+ ruleMemo = new HashMap[44+1];
}
- public String getGrammarFileName() { return "/home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g"; }
+ public String getGrammarFileName() { return "C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g"; }
- // $ANTLR start T45
- public final void mT45() throws RecognitionException {
+ // $ANTLR start T44
+ public final void mT44() throws RecognitionException {
try {
- int _type = T45;
- // /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'
+ int _type = T44;
+ // 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'
{
match("import"); if (failed) return ;
@@ -79,14 +78,14 @@
finally {
}
}
- // $ANTLR end T45
+ // $ANTLR end T44
- // $ANTLR start T46
- public final void mT46() throws RecognitionException {
+ // $ANTLR start T45
+ public final void mT45() throws RecognitionException {
try {
- int _type = T46;
- // /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: '=>'
+ int _type = T45;
+ // 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: '=>'
{
match("=>"); if (failed) return ;
@@ -98,16 +97,16 @@
finally {
}
}
- // $ANTLR end T46
+ // $ANTLR end T45
// $ANTLR start WS
public final void mWS() throws RecognitionException {
try {
int _type = WS;
- // /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: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:17: ( ' ' | '\\t' | '\\f' | EOL )
+ // C:\\dev\\drools\\trunk\\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 +140,28 @@
switch (alt1) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:732:19: ' '
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:732:19: ' '
{
match(' '); if (failed) return ;
}
break;
case 2 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:733:19: '\\t'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:733:19: '\\t'
{
match('\t'); if (failed) return ;
}
break;
case 3 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:734:19: '\\f'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:734:19: '\\f'
{
match('\f'); if (failed) return ;
}
break;
case 4 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:735:19: EOL
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:735:19: EOL
{
mEOL(); if (failed) return ;
@@ -188,8 +187,8 @@
public final void mDEFRULE() throws RecognitionException {
try {
int _type = 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'
+ // 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'
{
match("defrule"); if (failed) return ;
@@ -207,8 +206,8 @@
public final void mDEFFUNCTION() throws RecognitionException {
try {
int _type = 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'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:741:13: ( 'deffunction' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:741:15: 'deffunction'
{
match("deffunction"); if (failed) return ;
@@ -226,8 +225,8 @@
public final void mOR() throws RecognitionException {
try {
int _type = 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'
+ // 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'
{
match("or"); if (failed) return ;
@@ -245,8 +244,8 @@
public final void mAND() throws RecognitionException {
try {
int _type = 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'
+ // 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'
{
match("and"); if (failed) return ;
@@ -264,8 +263,8 @@
public final void mNOT() throws RecognitionException {
try {
int _type = 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'
+ // 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'
{
match("not"); if (failed) return ;
@@ -283,8 +282,8 @@
public final void mEXISTS() throws RecognitionException {
try {
int _type = 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'
+ // 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'
{
match("exists"); if (failed) return ;
@@ -302,8 +301,8 @@
public final void mTEST() throws RecognitionException {
try {
int _type = 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'
+ // 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'
{
match("test"); if (failed) return ;
@@ -321,8 +320,8 @@
public final void mNULL() throws RecognitionException {
try {
int _type = 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'
+ // 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'
{
match("null"); if (failed) return ;
@@ -340,8 +339,8 @@
public final void mDECLARE() throws RecognitionException {
try {
int _type = 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'
+ // 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'
{
match("declare"); if (failed) return ;
@@ -359,8 +358,8 @@
public final void mSALIENCE() throws RecognitionException {
try {
int _type = 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'
+ // 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'
{
match("salience"); if (failed) return ;
@@ -377,10 +376,10 @@
// $ANTLR start EOL
public final void mEOL() throws RecognitionException {
try {
- // /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: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: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' )
int alt2=3;
int LA2_0 = input.LA(1);
@@ -405,7 +404,7 @@
}
switch (alt2) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:758:14: ( '\\r\\n' )=> '\\r\\n'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:758:14: ( '\\r\\n' )=> '\\r\\n'
{
match("\r\n"); if (failed) return ;
@@ -413,14 +412,14 @@
}
break;
case 2 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:759:25: '\\r'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:759:25: '\\r'
{
match('\r'); if (failed) return ;
}
break;
case 3 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:760:25: '\\n'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:760:25: '\\n'
{
match('\n'); if (failed) return ;
@@ -442,10 +441,10 @@
public final void mINT() throws RecognitionException {
try {
int _type = INT;
- // /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: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:4: ( '-' )?
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:765:4: ( '-' )?
int alt3=2;
int LA3_0 = input.LA(1);
@@ -454,7 +453,7 @@
}
switch (alt3) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:765:5: '-'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:765:5: '-'
{
match('-'); if (failed) return ;
@@ -463,7 +462,7 @@
}
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:765:10: ( '0' .. '9' )+
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:765:10: ( '0' .. '9' )+
int cnt4=0;
loop4:
do {
@@ -477,7 +476,7 @@
switch (alt4) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:765:11: '0' .. '9'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:765:11: '0' .. '9'
{
matchRange('0','9'); if (failed) return ;
@@ -508,10 +507,10 @@
public final void mFLOAT() throws RecognitionException {
try {
int _type = FLOAT;
- // /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: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:4: ( '-' )?
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:769:4: ( '-' )?
int alt5=2;
int LA5_0 = input.LA(1);
@@ -520,7 +519,7 @@
}
switch (alt5) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:769:5: '-'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:769:5: '-'
{
match('-'); if (failed) return ;
@@ -529,7 +528,7 @@
}
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:769:10: ( '0' .. '9' )+
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:769:10: ( '0' .. '9' )+
int cnt6=0;
loop6:
do {
@@ -543,7 +542,7 @@
switch (alt6) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:769:11: '0' .. '9'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:769:11: '0' .. '9'
{
matchRange('0','9'); if (failed) return ;
@@ -561,7 +560,7 @@
} while (true);
match('.'); if (failed) return ;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:769:26: ( '0' .. '9' )+
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:769:26: ( '0' .. '9' )+
int cnt7=0;
loop7:
do {
@@ -575,7 +574,7 @@
switch (alt7) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:769:27: '0' .. '9'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:769:27: '0' .. '9'
{
matchRange('0','9'); if (failed) return ;
@@ -606,7 +605,7 @@
public final void mSTRING() throws RecognitionException {
try {
int _type = STRING;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:773:5: ( ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' ) | ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' ) )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:773:5: ( ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' ) | ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' ) )
int alt10=2;
int LA10_0 = input.LA(1);
@@ -625,13 +624,13 @@
}
switch (alt10) {
case 1 :
- // /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 | ~ ( '\\\\' | '\"' ) )* '\"' )
{
- // /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 | ~ ( '\\\\' | '\"' ) )* '\"'
+ // 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 | ~ ( '\\\\' | '\"' ) )* '\"'
{
match('\"'); if (failed) return ;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:773:13: ( EscapeSequence | ~ ( '\\\\' | '\"' ) )*
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:773:13: ( EscapeSequence | ~ ( '\\\\' | '\"' ) )*
loop8:
do {
int alt8=3;
@@ -647,14 +646,14 @@
switch (alt8) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:773:15: EscapeSequence
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:773:15: EscapeSequence
{
mEscapeSequence(); if (failed) return ;
}
break;
case 2 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:773:32: ~ ( '\\\\' | '\"' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g: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 +683,13 @@
}
break;
case 2 :
- // /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 | ~ ( '\\\\' | '\\'' ) )* '\\'' )
{
- // /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 | ~ ( '\\\\' | '\\'' ) )* '\\''
+ // 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 | ~ ( '\\\\' | '\\'' ) )* '\\''
{
match('\''); if (failed) return ;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:774:14: ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )*
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:774:14: ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )*
loop9:
do {
int alt9=3;
@@ -706,14 +705,14 @@
switch (alt9) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:774:16: EscapeSequence
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:774:16: EscapeSequence
{
mEscapeSequence(); if (failed) return ;
}
break;
case 2 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:774:33: ~ ( '\\\\' | '\\'' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g: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 +753,8 @@
// $ANTLR start HexDigit
public final void mHexDigit() throws RecognitionException {
try {
- // /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' )
+ // 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' )
{
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,17 +779,12 @@
// $ANTLR start EscapeSequence
public final void mEscapeSequence() throws RecognitionException {
try {
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:782:5: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | UnicodeEscape | OctalEscape )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g: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 '\\':
@@ -803,6 +797,11 @@
alt11=1;
}
break;
+ case 'u':
+ {
+ alt11=2;
+ }
+ break;
case '0':
case '1':
case '2':
@@ -833,7 +832,7 @@
}
switch (alt11) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:782:9: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g: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 +850,14 @@
}
break;
case 2 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:783:9: UnicodeEscape
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:783:9: UnicodeEscape
{
mUnicodeEscape(); if (failed) return ;
}
break;
case 3 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:784:9: OctalEscape
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:784:9: OctalEscape
{
mOctalEscape(); if (failed) return ;
@@ -875,7 +874,7 @@
// $ANTLR start OctalEscape
public final void mOctalEscape() throws RecognitionException {
try {
- // /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' ) )
+ // 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' ) )
int alt12=3;
int LA12_0 = input.LA(1);
@@ -886,9 +885,9 @@
int LA12_2 = input.LA(3);
if ( ((LA12_2>='0' && LA12_2<='7')) ) {
- int LA12_5 = input.LA(4);
+ int LA12_4 = input.LA(4);
- if ( ((LA12_5>='0' && LA12_5<='7')) ) {
+ if ( ((LA12_4>='0' && LA12_4<='7')) ) {
alt12=1;
}
else {
@@ -923,25 +922,25 @@
}
switch (alt12) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:789:9: '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:789:9: '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' )
{
match('\\'); if (failed) return ;
- // /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'
+ // 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'
{
matchRange('0','3'); if (failed) return ;
}
- // /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'
+ // 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'
{
matchRange('0','7'); if (failed) return ;
}
- // /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'
+ // 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'
{
matchRange('0','7'); if (failed) return ;
@@ -951,18 +950,18 @@
}
break;
case 2 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:790:9: '\\\\' ( '0' .. '7' ) ( '0' .. '7' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:790:9: '\\\\' ( '0' .. '7' ) ( '0' .. '7' )
{
match('\\'); if (failed) return ;
- // /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'
+ // 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'
{
matchRange('0','7'); if (failed) return ;
}
- // /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'
+ // 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'
{
matchRange('0','7'); if (failed) return ;
@@ -972,11 +971,11 @@
}
break;
case 3 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:791:9: '\\\\' ( '0' .. '7' )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:791:9: '\\\\' ( '0' .. '7' )
{
match('\\'); if (failed) return ;
- // /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'
+ // 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'
{
matchRange('0','7'); if (failed) return ;
@@ -996,8 +995,8 @@
// $ANTLR start UnicodeEscape
public final void mUnicodeEscape() throws RecognitionException {
try {
- // /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
+ // 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
{
match('\\'); if (failed) return ;
match('u'); if (failed) return ;
@@ -1018,10 +1017,10 @@
public final void mBOOL() throws RecognitionException {
try {
int _type = BOOL;
- // /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: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:4: ( 'true' | 'false' )
+ // C:\\dev\\drools\\trunk\\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 +1039,7 @@
}
switch (alt13) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:800:5: 'true'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:800:5: 'true'
{
match("true"); if (failed) return ;
@@ -1048,7 +1047,7 @@
}
break;
case 2 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:800:12: 'false'
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:800:12: 'false'
{
match("false"); if (failed) return ;
@@ -1072,38 +1071,28 @@
public final void mVAR() throws RecognitionException {
try {
int _type = VAR;
- // /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 )+
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:803:6: ( '?' ( SYMBOL_CHAR )+ )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:803:8: '?' ( SYMBOL_CHAR )+
{
match('?'); if (failed) return ;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:803:11: (~ DELIM )+
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:803:12: ( SYMBOL_CHAR )+
int cnt14=0;
loop14:
do {
int alt14=2;
int LA14_0 = input.LA(1);
- if ( ((LA14_0>='\u0000' && LA14_0<='\b')||(LA14_0>='\u000B' && LA14_0<='\f')||(LA14_0>='\u000E' && LA14_0<='\u001F')||LA14_0=='!'||(LA14_0>='#' && LA14_0<='%')||LA14_0=='\''||(LA14_0>='*' && LA14_0<=':')||(LA14_0>='=' && LA14_0<='{')||LA14_0=='}'||(LA14_0>='\u007F' && LA14_0<='\uFFFE')) ) {
+ if ( (LA14_0=='!'||(LA14_0>='#' && LA14_0<='%')||(LA14_0>='*' && LA14_0<=':')||(LA14_0>='=' && LA14_0<='_')||(LA14_0>='a' && LA14_0<='{')||LA14_0=='}') ) {
alt14=1;
}
switch (alt14) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:803:11: ~ DELIM
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:803:12: SYMBOL_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;
- }
+ mSYMBOL_CHAR(); if (failed) return ;
-
}
break;
@@ -1131,11 +1120,11 @@
public final void mSH_STYLE_SINGLE_LINE_COMMENT() throws RecognitionException {
try {
int _type = SH_STYLE_SINGLE_LINE_COMMENT;
- // /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
+ // 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
{
match('#'); if (failed) return ;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:807:8: ( options {greedy=false; } : . )*
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:807:8: ( options {greedy=false; } : . )*
loop15:
do {
int alt15=2;
@@ -1154,7 +1143,7 @@
switch (alt15) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:807:35: .
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:807:35: .
{
matchAny(); if (failed) return ;
@@ -1184,12 +1173,12 @@
public final void mC_STYLE_SINGLE_LINE_COMMENT() throws RecognitionException {
try {
int _type = C_STYLE_SINGLE_LINE_COMMENT;
- // /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
+ // 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
{
match("//"); if (failed) return ;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:813:9: ( options {greedy=false; } : . )*
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:813:9: ( options {greedy=false; } : . )*
loop16:
do {
int alt16=2;
@@ -1208,7 +1197,7 @@
switch (alt16) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:813:36: .
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:813:36: .
{
matchAny(); if (failed) return ;
@@ -1238,8 +1227,8 @@
public final void mLEFT_PAREN() throws RecognitionException {
try {
int _type = LEFT_PAREN;
- // /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: '('
+ // 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: '('
{
match('('); if (failed) return ;
@@ -1256,8 +1245,8 @@
public final void mRIGHT_PAREN() throws RecognitionException {
try {
int _type = RIGHT_PAREN;
- // /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: ')'
+ // 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: ')'
{
match(')'); if (failed) return ;
@@ -1274,8 +1263,8 @@
public final void mLEFT_SQUARE() throws RecognitionException {
try {
int _type = LEFT_SQUARE;
- // /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: '['
+ // 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: '['
{
match('['); if (failed) return ;
@@ -1292,8 +1281,8 @@
public final void mRIGHT_SQUARE() throws RecognitionException {
try {
int _type = RIGHT_SQUARE;
- // /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: ']'
+ // 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: ']'
{
match(']'); if (failed) return ;
@@ -1310,8 +1299,8 @@
public final void mLEFT_CURLY() throws RecognitionException {
try {
int _type = LEFT_CURLY;
- // /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: '{'
+ // 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: '{'
{
match('{'); if (failed) return ;
@@ -1328,8 +1317,8 @@
public final void mRIGHT_CURLY() throws RecognitionException {
try {
int _type = RIGHT_CURLY;
- // /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: '}'
+ // 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: '}'
{
match('}'); if (failed) return ;
@@ -1346,8 +1335,8 @@
public final void mTILDE() throws RecognitionException {
try {
int _type = TILDE;
- // /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: '~'
+ // 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: '~'
{
match('~'); if (failed) return ;
@@ -1364,8 +1353,8 @@
public final void mAMPERSAND() throws RecognitionException {
try {
int _type = AMPERSAND;
- // /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: '&'
+ // 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: '&'
{
match('&'); if (failed) return ;
@@ -1382,8 +1371,8 @@
public final void mPIPE() throws RecognitionException {
try {
int _type = PIPE;
- // /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: '|'
+ // 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: '|'
{
match('|'); if (failed) return ;
@@ -1400,8 +1389,8 @@
public final void mASSIGN_OP() throws RecognitionException {
try {
int _type = ASSIGN_OP;
- // /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: '<-'
+ // 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: '<-'
{
match("<-"); if (failed) return ;
@@ -1419,8 +1408,8 @@
public final void mCOLON() throws RecognitionException {
try {
int _type = COLON;
- // /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: ':'
+ // 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: ':'
{
match(':'); if (failed) return ;
@@ -1437,8 +1426,8 @@
public final void mEQUALS() throws RecognitionException {
try {
int _type = EQUALS;
- // /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: '='
+ // 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: '='
{
match('='); if (failed) return ;
@@ -1455,12 +1444,12 @@
public final void mMULTI_LINE_COMMENT() throws RecognitionException {
try {
int _type = MULTI_LINE_COMMENT;
- // /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; } : . )* '*/'
+ // 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; } : . )* '*/'
{
match("/*"); if (failed) return ;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:862:9: ( options {greedy=false; } : . )*
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:862:9: ( options {greedy=false; } : . )*
loop17:
do {
int alt17=2;
@@ -1485,7 +1474,7 @@
switch (alt17) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:862:35: .
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:862:35: .
{
matchAny(); if (failed) return ;
@@ -1516,8 +1505,8 @@
public final void mNAME() throws RecognitionException {
try {
int _type = NAME;
- // /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
+ // 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
{
mSYMBOL(); if (failed) return ;
@@ -1533,25 +1522,26 @@
// $ANTLR start SYMBOL
public final void mSYMBOL() throws RecognitionException {
try {
- // /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 )*
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:869:8: ( FIRST_SYMBOL_CHAR ( SYMBOL_CHAR )* )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:869:10: FIRST_SYMBOL_CHAR ( SYMBOL_CHAR )*
{
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:869:10: ( CHAR )*
+ mFIRST_SYMBOL_CHAR(); if (failed) return ;
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:869:28: ( SYMBOL_CHAR )*
loop18:
do {
int alt18=2;
int LA18_0 = input.LA(1);
- 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=='}') ) {
+ if ( (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 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:869:10: CHAR
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:869:28: SYMBOL_CHAR
{
- mCHAR(); if (failed) return ;
+ mSYMBOL_CHAR(); if (failed) return ;
}
break;
@@ -1570,13 +1560,13 @@
}
// $ANTLR end SYMBOL
- // $ANTLR start START_DELIM
- public final void mSTART_DELIM() throws RecognitionException {
+ // $ANTLR start FIRST_SYMBOL_CHAR
+ public final void mFIRST_SYMBOL_CHAR() throws RecognitionException {
try {
- // /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:
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:882:19: ( ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '!' | '$' | '%' | '^' | '*' | '_' | '-' | '+' | '=' | '\\\\' | '/' | '@' | '#' | ':' | '>' | '<' | ',' | '.' | '[' | ']' | '{' | '}' ) )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:882:21: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '!' | '$' | '%' | '^' | '*' | '_' | '-' | '+' | '=' | '\\\\' | '/' | '@' | '#' | ':' | '>' | '<' | ',' | '.' | '[' | ']' | '{' | '}' )
{
- 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)=='~' ) {
+ 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;
}
@@ -1594,15 +1584,15 @@
finally {
}
}
- // $ANTLR end START_DELIM
+ // $ANTLR end FIRST_SYMBOL_CHAR
- // $ANTLR start DELIM
- public final void mDELIM() throws RecognitionException {
+ // $ANTLR start SYMBOL_CHAR
+ public final void mSYMBOL_CHAR() throws RecognitionException {
try {
- // /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:
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:887:13: ( ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '!' | '$' | '%' | '^' | '*' | '_' | '-' | '+' | '=' | '\\\\' | '/' | '@' | '#' | ':' | '>' | ',' | '.' | '[' | ']' | '{' | '}' | '?' ) )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:887:15: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '!' | '$' | '%' | '^' | '*' | '_' | '-' | '+' | '=' | '\\\\' | '/' | '@' | '#' | ':' | '>' | ',' | '.' | '[' | ']' | '{' | '}' | '?' )
{
- 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)=='~' ) {
+ if ( input.LA(1)=='!'||(input.LA(1)>='#' && input.LA(1)<='%')||(input.LA(1)>='*' && input.LA(1)<=':')||(input.LA(1)>='=' && input.LA(1)<='_')||(input.LA(1)>='a' && input.LA(1)<='{')||input.LA(1)=='}' ) {
input.consume();
failed=false;
}
@@ -1620,272 +1610,246 @@
finally {
}
}
- // $ANTLR end DELIM
+ // $ANTLR end SYMBOL_CHAR
- // $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 {
- // /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 )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:8: ( T44 | T45 | WS | DEFRULE | DEFFUNCTION | OR | AND | NOT | EXISTS | TEST | NULL | DECLARE | SALIENCE | INT | FLOAT | STRING | BOOL | VAR | SH_STYLE_SINGLE_LINE_COMMENT | C_STYLE_SINGLE_LINE_COMMENT | LEFT_PAREN | RIGHT_PAREN | LEFT_SQUARE | RIGHT_SQUARE | LEFT_CURLY | RIGHT_CURLY | TILDE | AMPERSAND | PIPE | ASSIGN_OP | COLON | EQUALS | MULTI_LINE_COMMENT | NAME )
int alt19=34;
alt19 = dfa19.predict(input);
switch (alt19) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:10: T45
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:10: T44
{
- mT45(); if (failed) return ;
+ mT44(); if (failed) return ;
}
break;
case 2 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:14: T46
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:14: T45
{
- mT46(); if (failed) return ;
+ mT45(); if (failed) return ;
}
break;
case 3 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:18: WS
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:18: WS
{
mWS(); if (failed) return ;
}
break;
case 4 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:21: DEFRULE
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:21: DEFRULE
{
mDEFRULE(); if (failed) return ;
}
break;
case 5 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:29: DEFFUNCTION
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:29: DEFFUNCTION
{
mDEFFUNCTION(); if (failed) return ;
}
break;
case 6 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:41: OR
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:41: OR
{
mOR(); if (failed) return ;
}
break;
case 7 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:44: AND
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:44: AND
{
mAND(); if (failed) return ;
}
break;
case 8 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:48: NOT
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:48: NOT
{
mNOT(); if (failed) return ;
}
break;
case 9 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:52: EXISTS
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:52: EXISTS
{
mEXISTS(); if (failed) return ;
}
break;
case 10 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:59: TEST
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:59: TEST
{
mTEST(); if (failed) return ;
}
break;
case 11 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:64: NULL
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:64: NULL
{
mNULL(); if (failed) return ;
}
break;
case 12 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:69: DECLARE
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:69: DECLARE
{
mDECLARE(); if (failed) return ;
}
break;
case 13 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:77: SALIENCE
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:77: SALIENCE
{
mSALIENCE(); if (failed) return ;
}
break;
case 14 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:86: INT
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:86: INT
{
mINT(); if (failed) return ;
}
break;
case 15 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:90: FLOAT
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:90: FLOAT
{
mFLOAT(); if (failed) return ;
}
break;
case 16 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:96: STRING
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:96: STRING
{
mSTRING(); if (failed) return ;
}
break;
case 17 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:103: BOOL
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:103: BOOL
{
mBOOL(); if (failed) return ;
}
break;
case 18 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:108: VAR
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:108: VAR
{
mVAR(); if (failed) return ;
}
break;
case 19 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:112: SH_STYLE_SINGLE_LINE_COMMENT
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:112: SH_STYLE_SINGLE_LINE_COMMENT
{
mSH_STYLE_SINGLE_LINE_COMMENT(); if (failed) return ;
}
break;
case 20 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:141: C_STYLE_SINGLE_LINE_COMMENT
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:141: C_STYLE_SINGLE_LINE_COMMENT
{
mC_STYLE_SINGLE_LINE_COMMENT(); if (failed) return ;
}
break;
case 21 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:169: LEFT_PAREN
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:169: LEFT_PAREN
{
mLEFT_PAREN(); if (failed) return ;
}
break;
case 22 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:180: RIGHT_PAREN
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:180: RIGHT_PAREN
{
mRIGHT_PAREN(); if (failed) return ;
}
break;
case 23 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:192: LEFT_SQUARE
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:192: LEFT_SQUARE
{
mLEFT_SQUARE(); if (failed) return ;
}
break;
case 24 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:204: RIGHT_SQUARE
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:204: RIGHT_SQUARE
{
mRIGHT_SQUARE(); if (failed) return ;
}
break;
case 25 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:217: LEFT_CURLY
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:217: LEFT_CURLY
{
mLEFT_CURLY(); if (failed) return ;
}
break;
case 26 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:228: RIGHT_CURLY
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:228: RIGHT_CURLY
{
mRIGHT_CURLY(); if (failed) return ;
}
break;
case 27 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:240: TILDE
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:240: TILDE
{
mTILDE(); if (failed) return ;
}
break;
case 28 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:246: AMPERSAND
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:246: AMPERSAND
{
mAMPERSAND(); if (failed) return ;
}
break;
case 29 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:256: PIPE
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:256: PIPE
{
mPIPE(); if (failed) return ;
}
break;
case 30 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:261: ASSIGN_OP
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:261: ASSIGN_OP
{
mASSIGN_OP(); if (failed) return ;
}
break;
case 31 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:271: COLON
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:271: COLON
{
mCOLON(); if (failed) return ;
}
break;
case 32 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:277: EQUALS
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:277: EQUALS
{
mEQUALS(); if (failed) return ;
}
break;
case 33 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:284: MULTI_LINE_COMMENT
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:284: MULTI_LINE_COMMENT
{
mMULTI_LINE_COMMENT(); if (failed) return ;
}
break;
case 34 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:1:303: NAME
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:1:303: NAME
{
mNAME(); if (failed) return ;
@@ -1898,8 +1862,8 @@
// $ANTLR start synpred1
public final void synpred1_fragment() throws RecognitionException {
- // /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'
+ // 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'
{
match("\r\n"); if (failed) return ;
@@ -1926,200 +1890,205 @@
protected DFA19 dfa19 = new DFA19(this);
static final String DFA19_eotS =
- "\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";
+ "\1\uffff\1\35\1\40\1\uffff\10\35\1\54\1\uffff\1\35\1\uffff\2\35"+
+ "\2\uffff\1\62\1\63\1\64\1\65\3\uffff\1\35\1\67\1\uffff\1\35\1\71"+
+ "\1\uffff\1\35\1\74\7\35\1\54\1\35\1\uffff\2\35\1\uffff\2\35\4\uffff"+
+ "\1\113\1\uffff\1\35\1\uffff\2\35\1\uffff\1\120\1\35\1\122\4\35\1"+
+ "\127\2\35\1\uffff\1\35\1\uffff\1\35\1\uffff\4\35\1\uffff\1\136\1"+
+ "\uffff\1\35\1\140\1\141\1\35\1\uffff\1\35\1\111\4\35\1\uffff\1\35"+
+ "\2\uffff\1\35\1\140\1\152\3\35\1\156\1\35\1\uffff\1\35\1\161\1\162"+
+ "\1\uffff\2\35\2\uffff\1\165\1\35\1\uffff\1\35\1\170\1\uffff";
static final String DFA19_eofS =
- "\166\uffff";
+ "\171\uffff";
static final String DFA19_minS =
"\1\11\1\155\1\41\1\uffff\1\145\1\162\1\156\1\157\1\170\1\145\1\141"+
- "\1\60\1\41\1\uffff\1\141\1\uffff\1\0\1\52\2\uffff\4\41\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";
+ "\1\60\1\41\1\uffff\1\141\1\uffff\1\0\1\52\2\uffff\4\41\3\uffff\1"+
+ "\55\1\41\1\uffff\1\160\1\41\1\uffff\1\143\1\41\1\144\1\154\1\164"+
+ "\1\151\1\165\1\163\1\154\1\41\1\60\1\uffff\1\154\1\0\1\uffff\2\0"+
+ "\4\uffff\1\41\1\uffff\1\157\1\uffff\1\146\1\154\1\uffff\1\41\1\154"+
+ "\1\41\1\163\1\145\1\164\1\151\1\41\1\163\1\0\1\uffff\1\0\1\uffff"+
+ "\1\0\1\uffff\1\162\2\165\1\141\1\uffff\1\41\1\uffff\1\164\2\41\1"+
+ "\145\1\uffff\1\145\1\41\1\164\1\156\1\154\1\162\1\uffff\1\163\2"+
+ "\uffff\1\156\2\41\1\143\2\145\1\41\1\143\1\uffff\1\164\2\41\1\uffff"+
+ "\1\145\1\151\2\uffff\1\41\1\157\1\uffff\1\156\1\41\1\uffff";
static final String DFA19_maxS =
"\1\176\1\155\1\175\1\uffff\1\145\1\162\1\156\1\165\1\170\1\162\1"+
"\141\1\71\1\175\1\uffff\1\141\1\uffff\1\ufffe\1\57\2\uffff\4\175"+
- "\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";
+ "\3\uffff\1\55\1\175\1\uffff\1\160\1\175\1\uffff\1\146\1\175\1\144"+
+ "\1\154\1\164\1\151\1\165\1\163\1\154\1\175\1\71\1\uffff\1\154\1"+
+ "\ufffe\1\uffff\2\ufffe\4\uffff\1\175\1\uffff\1\157\1\uffff\1\162"+
+ "\1\154\1\uffff\1\175\1\154\1\175\1\163\1\145\1\164\1\151\1\175\1"+
+ "\163\1\ufffe\1\uffff\1\ufffe\1\uffff\1\ufffe\1\uffff\1\162\2\165"+
+ "\1\141\1\uffff\1\175\1\uffff\1\164\2\175\1\145\1\uffff\1\145\1\175"+
+ "\1\164\1\156\1\154\1\162\1\uffff\1\163\2\uffff\1\156\2\175\1\143"+
+ "\2\145\1\175\1\143\1\uffff\1\164\2\175\1\uffff\1\145\1\151\2\uffff"+
+ "\1\175\1\157\1\uffff\1\156\1\175\1\uffff";
static final String DFA19_acceptS =
"\3\uffff\1\3\11\uffff\1\20\1\uffff\1\22\2\uffff\1\25\1\26\4\uffff"+
- "\1\33\1\34\1\35\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";
+ "\1\33\1\34\1\35\2\uffff\1\42\2\uffff\1\40\13\uffff\1\16\2\uffff"+
+ "\1\23\2\uffff\1\27\1\30\1\31\1\32\1\uffff\1\37\1\uffff\1\2\2\uffff"+
+ "\1\6\12\uffff\1\24\1\uffff\1\41\1\uffff\1\36\4\uffff\1\7\1\uffff"+
+ "\1\10\4\uffff\1\17\6\uffff\1\13\1\uffff\1\21\1\12\10\uffff\1\1\3"+
+ "\uffff\1\11\2\uffff\1\4\1\14\2\uffff\1\15\2\uffff\1\5";
static final String DFA19_specialS =
- "\166\uffff}>";
+ "\171\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",
+ "\2\3\1\uffff\2\3\22\uffff\1\3\1\35\1\15\1\20\2\35\1\31\1\15"+
+ "\1\22\1\23\3\35\1\13\1\35\1\21\12\14\1\34\1\uffff\1\33\1\2\1"+
+ "\35\1\17\33\35\1\24\1\35\1\25\2\35\1\uffff\1\6\2\35\1\4\1\10"+
+ "\1\16\2\35\1\1\4\35\1\7\1\5\3\35\1\12\1\11\6\35\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\35\1\uffff\3\35\4\uffff\21\35\2\uffff\1\35\1\37\41\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\50\14\uffff\1\47",
"\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",
+ "\12\52",
+ "\1\35\1\uffff\3\35\4\uffff\4\35\1\53\1\35\12\52\1\35\2\uffff"+
+ "\43\35\1\uffff\33\35\1\uffff\1\35",
"",
- "\1\54",
+ "\1\55",
"",
- "\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",
+ "\41\57\1\56\1\57\3\56\4\57\21\56\2\57\43\56\1\57\33\56\1\57"+
+ "\1\56\uff81\57",
+ "\1\61\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\43\35\1\uffff\33\35"+
+ "\1\uffff\1\35",
+ "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
+ "\1\uffff\1\35",
+ "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
+ "\1\uffff\1\35",
+ "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
+ "\1\uffff\1\35",
"",
"",
"",
- "",
- "\1\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\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\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\70",
+ "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
+ "\1\uffff\1\35",
+ "",
+ "\1\73\2\uffff\1\72",
+ "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
+ "\1\uffff\1\35",
"\1\75",
"\1\76",
"\1\77",
"\1\100",
"\1\101",
- "",
- "\12\102",
+ "\1\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",
+ "\1\35\1\uffff\3\35\4\uffff\4\35\1\53\1\35\12\52\1\35\2\uffff"+
+ "\43\35\1\uffff\33\35\1\uffff\1\35",
+ "\12\104",
"",
- "\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\105",
+ "\41\57\1\56\1\57\3\56\4\57\21\56\2\57\43\56\1\57\33\56\1\57"+
+ "\1\56\uff81\57",
"",
+ "\41\107\1\106\1\107\3\106\4\107\21\106\2\107\43\106\1\107\33"+
+ "\106\1\107\1\106\uff81\107",
+ "\41\111\1\112\1\111\3\112\4\111\1\110\20\112\2\111\43\112\1"+
+ "\111\33\112\1\111\1\112\uff81\111",
"",
"",
"",
"",
- "\1\111",
+ "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
+ "\1\uffff\1\35",
"",
- "\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\115\13\uffff\1\116",
+ "\1\117",
+ "",
+ "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
+ "\1\uffff\1\35",
"\1\121",
- "\1\122",
+ "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
+ "\1\uffff\1\35",
"\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\124",
"\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",
+ "\1\126",
+ "\1\35\1\uffff\3\35\4\uffff\6\35\12\104\1\35\2\uffff\43\35\1"+
+ "\uffff\33\35\1\uffff\1\35",
+ "\1\130",
+ "\41\107\1\106\1\107\3\106\4\107\21\106\2\107\43\106\1\107\33"+
+ "\106\1\107\1\106\uff81\107",
"",
- "\41\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",
+ "\41\111\1\112\1\111\3\112\4\111\1\110\4\112\1\131\13\112\2\111"+
+ "\43\112\1\111\33\112\1\111\1\112\uff81\111",
"",
- "\1\127",
- "\1\130",
- "\1\131",
+ "\41\111\1\112\1\111\3\112\4\111\1\110\20\112\2\111\43\112\1"+
+ "\111\33\112\1\111\1\112\uff81\111",
+ "",
"\1\132",
+ "\1\133",
+ "\1\134",
+ "\1\135",
"",
- "\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\43\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\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
+ "\1\uffff\1\35",
+ "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
+ "\1\uffff\1\35",
"\1\142",
+ "",
"\1\143",
+ "\1\112\1\uffff\3\112\4\uffff\1\110\20\112\2\uffff\43\112\1\uffff"+
+ "\33\112\1\uffff\1\112",
"\1\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\147",
+ "",
"\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\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
+ "\1\uffff\1\35",
+ "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
+ "\1\uffff\1\35",
+ "\1\153",
"\1\154",
+ "\1\155",
+ "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
+ "\1\uffff\1\35",
+ "\1\157",
"",
- "\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\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
+ "\1\uffff\1\35",
+ "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
+ "\1\uffff\1\35",
"",
- "\1\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",
+ "",
+ "",
+ "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
+ "\1\uffff\1\35",
+ "\1\166",
+ "",
+ "\1\167",
+ "\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
+ "\1\uffff\1\35",
""
};
@@ -2153,7 +2122,7 @@
this.transition = DFA19_transition;
}
public String getDescription() {
- return "1:1: Tokens : ( 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 );";
+ return "1:1: Tokens : ( T44 | T45 | WS | DEFRULE | DEFFUNCTION | OR | AND | NOT | EXISTS | TEST | NULL | DECLARE | SALIENCE | INT | FLOAT | STRING | BOOL | VAR | SH_STYLE_SINGLE_LINE_COMMENT | C_STYLE_SINGLE_LINE_COMMENT | LEFT_PAREN | RIGHT_PAREN | LEFT_SQUARE | RIGHT_SQUARE | LEFT_CURLY | RIGHT_CURLY | TILDE | AMPERSAND | PIPE | ASSIGN_OP | COLON | EQUALS | MULTI_LINE_COMMENT | NAME );";
}
}
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 21:10:22 UTC (rev 18086)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clp/CLPMVELParser.java 2008-01-24 21:15:43 UTC (rev 18087)
@@ -1,21 +1,21 @@
-// $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
+// $ANTLR 3.0.1 C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g 2008-01-24 21:14:26
+
+ 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;
- 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,49 @@
import java.util.HashMap;
public class CLPMVELParser extends Parser {
public static final String[] tokenNames = new String[] {
- "<invalid>", "<EOR>", "<DOWN>", "<UP>", "LEFT_PAREN", "NAME", "RIGHT_PAREN", "DEFFUNCTION", "VAR", "DEFRULE", "STRING", "SALIENCE", "INT", "AND", "OR", "NOT", "EXISTS", "TEST", "ASSIGN_OP", "PIPE", "AMPERSAND", "TILDE", "COLON", "EQUALS", "FLOAT", "BOOL", "NULL", "EOL", "WS", "DECLARE", "EscapeSequence", "HexDigit", "UnicodeEscape", "OctalEscape", "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'", "'=>'"
+ "<invalid>", "<EOR>", "<DOWN>", "<UP>", "LEFT_PAREN", "NAME", "RIGHT_PAREN", "DEFFUNCTION", "VAR", "DEFRULE", "STRING", "SALIENCE", "INT", "AND", "OR", "NOT", "EXISTS", "TEST", "ASSIGN_OP", "PIPE", "AMPERSAND", "TILDE", "COLON", "EQUALS", "FLOAT", "BOOL", "NULL", "EOL", "WS", "DECLARE", "EscapeSequence", "HexDigit", "UnicodeEscape", "OctalEscape", "SYMBOL_CHAR", "SH_STYLE_SINGLE_LINE_COMMENT", "C_STYLE_SINGLE_LINE_COMMENT", "LEFT_SQUARE", "RIGHT_SQUARE", "LEFT_CURLY", "RIGHT_CURLY", "MULTI_LINE_COMMENT", "SYMBOL", "FIRST_SYMBOL_CHAR", "'import'", "'=>'"
};
- public static final int EXISTS=16;
+ public static final int RIGHT_SQUARE=38;
+ public static final int RIGHT_CURLY=40;
+ public static final int EQUALS=23;
+ public static final int FLOAT=24;
+ public static final int NOT=15;
+ public static final int SYMBOL_CHAR=34;
+ public static final int SH_STYLE_SINGLE_LINE_COMMENT=35;
+ public static final int AND=13;
+ public static final int EOF=-1;
+ public static final int FIRST_SYMBOL_CHAR=43;
+ public static final int HexDigit=31;
+ public static final int DEFFUNCTION=7;
+ public static final int ASSIGN_OP=18;
+ public static final int RIGHT_PAREN=6;
+ public static final int NAME=5;
+ public static final int EOL=27;
public static final int DEFRULE=9;
- public static final int 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 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 VAR=8;
+ public static final int EXISTS=16;
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 NULL=26;
+ public static final int BOOL=25;
+ public static final int SALIENCE=11;
public static final int AMPERSAND=20;
- public static final int DECLARE=29;
- public static final int DELIM=34;
+ public static final int INT=12;
+ public static final int MULTI_LINE_COMMENT=41;
+ public static final int COLON=22;
+ public static final int WS=28;
+ public static final int UnicodeEscape=32;
public static final int LEFT_CURLY=39;
+ public static final int OR=14;
+ public static final int TEST=17;
public static final int 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 SALIENCE=11;
+ public static final int DECLARE=29;
+ public static final int LEFT_SQUARE=37;
+ public static final int EscapeSequence=30;
public static final int OctalEscape=33;
- public static final int MULTI_LINE_COMMENT=41;
- public static final int TEST=17;
- 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 static final int STRING=10;
public CLPMVELParser(TokenStream input) {
super(input);
@@ -76,163 +75,163 @@
public String[] getTokenNames() { return tokenNames; }
- public String getGrammarFileName() { return "/home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g"; }
+ public String getGrammarFileName() { return "C:\\dev\\drools\\trunk\\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
- // /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) ] )* ;
+ // 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) ] )* ;
public final void eval_script(Shell shell) throws RecognitionException {
ImportDescr i = null;
@@ -242,10 +241,10 @@
try {
- // /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: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: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) ] )*
loop1:
do {
int alt1=4;
@@ -253,14 +252,14 @@
if ( (LA1_0==LEFT_PAREN) ) {
switch ( input.LA(2) ) {
- case 45:
+ case DEFRULE:
{
- alt1=1;
+ alt1=2;
}
break;
- case DEFRULE:
+ case 44:
{
- alt1=2;
+ alt1=1;
}
break;
case LEFT_PAREN:
@@ -284,7 +283,7 @@
switch (alt1) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:229:9: i= importDescr
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:229:9: i= importDescr
{
pushFollow(FOLLOW_importDescr_in_eval_script55);
i=importDescr();
@@ -297,7 +296,7 @@
}
break;
case 2 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:230:7: r= defrule
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:230:7: r= defrule
{
pushFollow(FOLLOW_defrule_in_eval_script66);
r=defrule();
@@ -310,7 +309,7 @@
}
break;
case 3 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:232:7: fc= lisp_list[shell, new LispForm(shell) ]
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:232:7: fc= lisp_list[shell, new LispForm(shell) ]
{
pushFollow(FOLLOW_lisp_list_in_eval_script83);
fc=lisp_list(shell, new LispForm(shell) );
@@ -344,18 +343,18 @@
// $ANTLR start importDescr
- // /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 ;
+ // 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 ;
public final ImportDescr importDescr() throws RecognitionException {
ImportDescr importDescr = null;
Token importName=null;
try {
- // /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
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:237:2: ( LEFT_PAREN 'import' importName= NAME RIGHT_PAREN )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:237:4: LEFT_PAREN 'import' importName= NAME RIGHT_PAREN
{
match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_importDescr106); if (failed) return importDescr;
- match(input,45,FOLLOW_45_in_importDescr108); if (failed) return importDescr;
+ match(input,44,FOLLOW_44_in_importDescr108); if (failed) return importDescr;
importName=(Token)input.LT(1);
match(input,NAME,FOLLOW_NAME_in_importDescr112); if (failed) return importDescr;
if ( backtracking==0 ) {
@@ -378,7 +377,7 @@
// $ANTLR start deffunction
- // /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 ;
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:252:1: deffunction returns [Deffunction function] : loc= LEFT_PAREN DEFFUNCTION ruleName= NAME loc= LEFT_PAREN (v= VAR )* RIGHT_PAREN (fc= lisp_list[context, new LispForm(context) ] )* RIGHT_PAREN ;
public final Deffunction deffunction() throws RecognitionException {
Deffunction function = null;
@@ -388,12 +387,12 @@
ValueHandler fc = null;
-
- BuildContext context = null;
+
+ BuildContext context = null;
try {
- // /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
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:256:2: (loc= LEFT_PAREN DEFFUNCTION ruleName= NAME loc= LEFT_PAREN (v= VAR )* RIGHT_PAREN (fc= lisp_list[context, new LispForm(context) ] )* RIGHT_PAREN )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:256:4: loc= LEFT_PAREN DEFFUNCTION ruleName= NAME loc= LEFT_PAREN (v= VAR )* RIGHT_PAREN (fc= lisp_list[context, new LispForm(context) ] )* RIGHT_PAREN
{
loc=(Token)input.LT(1);
match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_deffunction141); if (failed) return function;
@@ -401,15 +400,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;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:264:4: (v= VAR )*
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:264:4: (v= VAR )*
loop2:
do {
int alt2=2;
@@ -422,13 +421,13 @@
switch (alt2) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:264:5: v= VAR
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:264:5: v= VAR
{
v=(Token)input.LT(1);
match(input,VAR,FOLLOW_VAR_in_deffunction176); if (failed) return function;
if ( backtracking==0 ) {
-
- context.addVariable( function.addParameter( v.getText() ) );
+
+ context.addVariable( function.addParameter( v.getText() ) );
}
@@ -441,7 +440,7 @@
} while (true);
match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_deffunction189); if (failed) return function;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:268:5: (fc= lisp_list[context, new LispForm(context) ] )*
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:268:5: (fc= lisp_list[context, new LispForm(context) ] )*
loop3:
do {
int alt3=2;
@@ -454,7 +453,7 @@
switch (alt3) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:268:6: fc= lisp_list[context, new LispForm(context) ]
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:268:6: fc= lisp_list[context, new LispForm(context) ]
{
pushFollow(FOLLOW_lisp_list_in_deffunction198);
fc=lisp_list(context, new LispForm(context) );
@@ -489,7 +488,7 @@
// $ANTLR start defrule
- // /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 ;
+ // 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 ;
public final RuleDescr defrule() throws RecognitionException {
RuleDescr rule = null;
@@ -499,16 +498,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 {
- // /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
+ // 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
{
loc=(Token)input.LT(1);
match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_defrule235); if (failed) return rule;
@@ -516,50 +515,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() );
+
+ 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();
- // 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;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:329:3: ( ce[lhs, declarations] )*
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:329:3: ( ce[lhs, declarations] )*
loop4:
do {
int alt4=2;
@@ -572,7 +571,7 @@
switch (alt4) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:329:3: ce[lhs, declarations]
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:329:3: ce[lhs, declarations]
{
pushFollow(FOLLOW_ce_in_defrule273);
ce(lhs, declarations);
@@ -587,7 +586,7 @@
}
} while (true);
- match(input,46,FOLLOW_46_in_defrule282); if (failed) return rule;
+ match(input,45,FOLLOW_45_in_defrule282); if (failed) return rule;
pushFollow(FOLLOW_execution_block_in_defrule291);
engine=execution_block();
_fsp--;
@@ -612,16 +611,16 @@
// $ANTLR start ruleAttribute
- // /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 )? ;
+ // 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 )? ;
public final void ruleAttribute(RuleDescr rule) throws RecognitionException {
AttributeDescr d = null;
try {
- // /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: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: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 )?
int alt6=2;
int LA6_0 = input.LA(1);
@@ -634,11 +633,11 @@
}
switch (alt6) {
case 1 :
- // /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
+ // 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
{
match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_ruleAttribute317); if (failed) return ;
match(input,DECLARE,FOLLOW_DECLARE_in_ruleAttribute319); if (failed) return ;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:342:4: ( LEFT_PAREN d= salience RIGHT_PAREN )?
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:342:4: ( LEFT_PAREN d= salience RIGHT_PAREN )?
int alt5=2;
int LA5_0 = input.LA(1);
@@ -647,7 +646,7 @@
}
switch (alt5) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:342:6: LEFT_PAREN d= salience RIGHT_PAREN
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g: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 +686,30 @@
// $ANTLR start salience
- // /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 ;
+ // C:\\dev\\drools\\trunk\\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 {
- // /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
+ // 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
{
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 +728,13 @@
// $ANTLR start ce
- // /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] ) ;
+ // 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] ) ;
public final void ce(ConditionalElementDescr in_ce, Set declarations) throws RecognitionException {
try {
- // /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: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:4: ( and_ce[in_ce, declarations] | or_ce[in_ce, declarations] | not_ce[in_ce, declarations] | exists_ce[in_ce, declarations] | eval_ce[in_ce, declarations] | normal_pattern[in_ce, declarations] | bound_pattern[in_ce, declarations] )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:362:4: ( and_ce[in_ce, declarations] | or_ce[in_ce, declarations] | not_ce[in_ce, declarations] | exists_ce[in_ce, declarations] | eval_ce[in_ce, declarations] | normal_pattern[in_ce, declarations] | bound_pattern[in_ce, declarations] )
int alt7=7;
int LA7_0 = input.LA(1);
@@ -746,9 +745,9 @@
alt7=6;
}
break;
- case OR:
+ case TEST:
{
- alt7=2;
+ alt7=5;
}
break;
case AND:
@@ -756,9 +755,9 @@
alt7=1;
}
break;
- case TEST:
+ case EXISTS:
{
- alt7=5;
+ alt7=4;
}
break;
case NOT:
@@ -766,9 +765,9 @@
alt7=3;
}
break;
- case EXISTS:
+ case OR:
{
- alt7=4;
+ alt7=2;
}
break;
default:
@@ -792,7 +791,7 @@
}
switch (alt7) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:362:8: and_ce[in_ce, declarations]
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:362:8: and_ce[in_ce, declarations]
{
pushFollow(FOLLOW_and_ce_in_ce401);
and_ce(in_ce, declarations);
@@ -802,7 +801,7 @@
}
break;
case 2 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:363:7: or_ce[in_ce, declarations]
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:363:7: or_ce[in_ce, declarations]
{
pushFollow(FOLLOW_or_ce_in_ce411);
or_ce(in_ce, declarations);
@@ -812,7 +811,7 @@
}
break;
case 3 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:364:7: not_ce[in_ce, declarations]
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:364:7: not_ce[in_ce, declarations]
{
pushFollow(FOLLOW_not_ce_in_ce420);
not_ce(in_ce, declarations);
@@ -822,7 +821,7 @@
}
break;
case 4 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:365:7: exists_ce[in_ce, declarations]
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:365:7: exists_ce[in_ce, declarations]
{
pushFollow(FOLLOW_exists_ce_in_ce429);
exists_ce(in_ce, declarations);
@@ -832,7 +831,7 @@
}
break;
case 5 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:366:8: eval_ce[in_ce, declarations]
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:366:8: eval_ce[in_ce, declarations]
{
pushFollow(FOLLOW_eval_ce_in_ce443);
eval_ce(in_ce, declarations);
@@ -842,7 +841,7 @@
}
break;
case 6 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:367:7: normal_pattern[in_ce, declarations]
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:367:7: normal_pattern[in_ce, declarations]
{
pushFollow(FOLLOW_normal_pattern_in_ce457);
normal_pattern(in_ce, declarations);
@@ -852,7 +851,7 @@
}
break;
case 7 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:368:7: bound_pattern[in_ce, declarations]
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:368:7: bound_pattern[in_ce, declarations]
{
pushFollow(FOLLOW_bound_pattern_in_ce466);
bound_pattern(in_ce, declarations);
@@ -880,22 +879,22 @@
// $ANTLR start execution_block
- // /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) ] )* ;
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:372:1: execution_block returns [ExecutionEngine engine] : (fc= lisp_list[context, new LispForm(context) ] )* ;
public final ExecutionEngine execution_block() throws RecognitionException {
ExecutionEngine engine = null;
ValueHandler fc = null;
-
- engine = new BlockExecutionEngine();
- BuildContext context = new ExecutionBuildContext( engine, functionRegistry );
+
+ engine = new BlockExecutionEngine();
+ BuildContext context = new ExecutionBuildContext( engine, functionRegistry );
try {
- // /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: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:379:3: (fc= lisp_list[context, new LispForm(context) ] )*
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:379:3: (fc= lisp_list[context, new LispForm(context) ] )*
loop8:
do {
int alt8=2;
@@ -908,7 +907,7 @@
switch (alt8) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:379:4: fc= lisp_list[context, new LispForm(context) ]
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:379:4: fc= lisp_list[context, new LispForm(context) ]
{
pushFollow(FOLLOW_lisp_list_in_execution_block498);
fc=lisp_list(context, new LispForm(context) );
@@ -942,24 +941,24 @@
// $ANTLR start and_ce
- // /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 ;
+ // 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 ;
public final void and_ce(ConditionalElementDescr in_ce, Set declarations) throws RecognitionException {
-
- AndDescr andDescr= null;
+
+ AndDescr andDescr= null;
try {
- // /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
+ // 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
{
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 );
}
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:391:3: ( ce[andDescr, declarations] )+
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:391:3: ( ce[andDescr, declarations] )+
int cnt9=0;
loop9:
do {
@@ -973,7 +972,7 @@
switch (alt9) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:391:3: ce[andDescr, declarations]
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:391:3: ce[andDescr, declarations]
{
pushFollow(FOLLOW_ce_in_and_ce537);
ce(andDescr, declarations);
@@ -1010,24 +1009,24 @@
// $ANTLR start or_ce
- // /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 ;
+ // 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 ;
public final void or_ce(ConditionalElementDescr in_ce, Set declarations) throws RecognitionException {
-
- OrDescr orDescr= null;
+
+ OrDescr orDescr= null;
try {
- // /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
+ // 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
{
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 );
}
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:404:3: ( ce[orDescr, declarations] )+
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:404:3: ( ce[orDescr, declarations] )+
int cnt10=0;
loop10:
do {
@@ -1041,7 +1040,7 @@
switch (alt10) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:404:3: ce[orDescr, declarations]
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:404:3: ce[orDescr, declarations]
{
pushFollow(FOLLOW_ce_in_or_ce585);
ce(orDescr, declarations);
@@ -1078,21 +1077,21 @@
// $ANTLR start not_ce
- // /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 ;
+ // 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 ;
public final void not_ce(ConditionalElementDescr in_ce, Set declarations) throws RecognitionException {
-
- NotDescr notDescr= null;
+
+ NotDescr notDescr= null;
try {
- // /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
+ // 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
{
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 +1115,21 @@
// $ANTLR start exists_ce
- // /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 ;
+ // 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 ;
public final void exists_ce(ConditionalElementDescr in_ce, Set declarations) throws RecognitionException {
-
- ExistsDescr existsDescr= null;
+
+ ExistsDescr existsDescr= null;
try {
- // /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
+ // 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
{
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 +1153,26 @@
// $ANTLR start eval_ce
- // /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 ;
+ // 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 ;
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 {
- // /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
+ // 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
{
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 +1180,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 +1202,30 @@
// $ANTLR start normal_pattern
- // /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 ;
+ // 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 ;
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 {
- // /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
+ // 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
{
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();
+
}
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:464:3: ( field_constriant[top, declarations] )*
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:464:3: ( field_constriant[top, declarations] )*
loop11:
do {
int alt11=2;
@@ -1239,7 +1238,7 @@
switch (alt11) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:464:3: field_constriant[top, declarations]
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:464:3: field_constriant[top, declarations]
{
pushFollow(FOLLOW_field_constriant_in_normal_pattern782);
field_constriant(top, declarations);
@@ -1271,25 +1270,25 @@
// $ANTLR start bound_pattern
- // /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 ;
+ // 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 ;
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 {
- // /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
+ // 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
{
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 +1296,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();
}
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:486:3: ( field_constriant[top, declarations] )*
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:486:3: ( field_constriant[top, declarations] )*
loop12:
do {
int alt12=2;
@@ -1317,7 +1316,7 @@
switch (alt12) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:486:3: field_constriant[top, declarations]
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:486:3: field_constriant[top, declarations]
{
pushFollow(FOLLOW_field_constriant_in_bound_pattern841);
field_constriant(top, declarations);
@@ -1349,31 +1348,31 @@
// $ANTLR start field_constriant
- // /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 ;
+ // 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 ;
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 {
- // /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
+ // 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
{
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 +1396,20 @@
// $ANTLR start or_restr_connective
- // /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] )* ;
+ // 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] )* ;
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 {
- // /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] )*
+ // 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] )*
{
pushFollow(FOLLOW_and_restr_connective_in_or_restr_connective943);
and_restr_connective(or, ceBase, fcBase, declarations);
_fsp--;
if (failed) return ;
- // /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] )*
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:535:3: ( options {backtrack=true; } : PIPE and_restr_connective[or, ceBase, fcBase, declarations] )*
loop13:
do {
int alt13=2;
@@ -1423,12 +1422,12 @@
switch (alt13) {
case 1 :
- // /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]
+ // C:\\dev\\drools\\trunk\\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 +1452,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 +1466,20 @@
// $ANTLR start and_restr_connective
- // /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] )* ;
+ // 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] )* ;
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 {
- // /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] )*
+ // 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] )*
{
pushFollow(FOLLOW_restriction_in_and_restr_connective1009);
restriction(and, ceBase, fcBase, declarations);
_fsp--;
if (failed) return ;
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:558:3: ( AMPERSAND restriction[and, ceBase, fcBase, declarations] )*
+ // C:\\dev\\drools\\trunk\\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 +1492,7 @@
switch (alt14) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:558:5: AMPERSAND restriction[and, ceBase, fcBase, declarations]
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g: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 +1517,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 +1531,19 @@
// $ANTLR start 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 ) ;
+ // 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 ) ;
public final void restriction(RestrictionConnectiveDescr rc, ConditionalElementDescr base, FieldConstraintDescr fcBase, Set declarations) throws RecognitionException {
String lc = null;
-
- String op = "==";
+
+ String op = "==";
try {
- // /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: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:4: ( TILDE )?
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:581:4: ( TILDE )?
int alt15=2;
int LA15_0 = input.LA(1);
@@ -1553,7 +1552,7 @@
}
switch (alt15) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:581:5: TILDE
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:581:5: TILDE
{
match(input,TILDE,FOLLOW_TILDE_in_restriction1052); if (failed) return ;
if ( backtracking==0 ) {
@@ -1565,7 +1564,7 @@
}
- // /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 )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:582:3: ( predicate_constraint[rc, op, base] | return_value_restriction[op, rc] | variable_restriction[op, rc, base, fcBase, declarations] | lc= literal_restriction )
int alt16=4;
switch ( input.LA(1) ) {
case COLON:
@@ -1603,7 +1602,7 @@
switch (alt16) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:582:5: predicate_constraint[rc, op, base]
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:582:5: predicate_constraint[rc, op, base]
{
pushFollow(FOLLOW_predicate_constraint_in_restriction1068);
predicate_constraint(rc, op, base);
@@ -1613,7 +1612,7 @@
}
break;
case 2 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:583:7: return_value_restriction[op, rc]
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:583:7: return_value_restriction[op, rc]
{
pushFollow(FOLLOW_return_value_restriction_in_restriction1084);
return_value_restriction(op, rc);
@@ -1623,7 +1622,7 @@
}
break;
case 3 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:584:7: variable_restriction[op, rc, base, fcBase, declarations]
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:584:7: variable_restriction[op, rc, base, fcBase, declarations]
{
pushFollow(FOLLOW_variable_restriction_in_restriction1093);
variable_restriction(op, rc, base, fcBase, declarations);
@@ -1633,16 +1632,16 @@
}
break;
case 4 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:585:8: lc= literal_restriction
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g: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 +1666,18 @@
// $ANTLR start predicate_constraint
- // /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)] ;
+ // 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)] ;
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 {
- // /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)]
+ // 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)]
{
match(input,COLON,FOLLOW_COLON_in_predicate_constraint1147); if (failed) return ;
pushFollow(FOLLOW_lisp_list_in_predicate_constraint1153);
@@ -1686,9 +1685,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 +1706,18 @@
// $ANTLR start return_value_restriction
- // /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)] ;
+ // 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)] ;
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 {
- // /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)]
+ // 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)]
{
match(input,EQUALS,FOLLOW_EQUALS_in_return_value_restriction1179); if (failed) return ;
pushFollow(FOLLOW_lisp_list_in_return_value_restriction1186);
@@ -1726,9 +1725,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 +1746,27 @@
// $ANTLR start variable_restriction
- // /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 ;
+ // 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 ;
public final void variable_restriction(String op, RestrictionConnectiveDescr rc, ConditionalElementDescr ceBase, FieldConstraintDescr fcBase, Set declarations) throws RecognitionException {
Token VAR1=null;
try {
- // /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
+ // 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
{
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 +1785,27 @@
// $ANTLR start literal_restriction
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:634:1: literal_restriction returns [String text] : t= literal ;
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g: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 {
- // /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
+ // 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
{
pushFollow(FOLLOW_literal_in_literal_restriction1239);
t=literal();
_fsp--;
if (failed) return text;
if ( backtracking==0 ) {
-
- text = t;
+
+ text = t;
}
@@ -1825,21 +1824,21 @@
// $ANTLR start eval_sExpressions
- // /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 )* ;
+ // 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 )* ;
public final List<SExpression> eval_sExpressions() throws RecognitionException {
List<SExpression> list = null;
SExpression a = null;
-
- list = new ArrayList<SExpression>();
+
+ list = new ArrayList<SExpression>();
try {
- // /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: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:650:3: (a= lisp_list2 )*
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:650:3: (a= lisp_list2 )*
loop17:
do {
int alt17=2;
@@ -1852,7 +1851,7 @@
switch (alt17) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:650:4: a= lisp_list2
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:650:4: a= lisp_list2
{
pushFollow(FOLLOW_lisp_list2_in_eval_sExpressions1271);
a=lisp_list2();
@@ -1886,7 +1885,7 @@
// $ANTLR start lisp_list2
- // /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 ;
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:654:1: lisp_list2 returns [SExpression sExpression] : LEFT_PAREN t= ( NAME | VAR ) (a= lisp_atom2 | a= lisp_list2 )+ RIGHT_PAREN ;
public final SExpression lisp_list2() throws RecognitionException {
SExpression sExpression = null;
@@ -1894,21 +1893,31 @@
SExpression a = null;
-
- List list = new ArrayList();
- sExpression = null;
+
+ List list = new ArrayList();
+ sExpression = null;
try {
- // /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
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:659:2: ( LEFT_PAREN t= ( NAME | VAR ) (a= lisp_atom2 | a= lisp_list2 )+ RIGHT_PAREN )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:659:4: LEFT_PAREN t= ( NAME | VAR ) (a= lisp_atom2 | a= lisp_list2 )+ RIGHT_PAREN
{
match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_lisp_list21300); if (failed) return sExpression;
t=(Token)input.LT(1);
- match(input,NAME,FOLLOW_NAME_in_lisp_list21310); if (failed) return sExpression;
+ if ( input.LA(1)==NAME||input.LA(1)==VAR ) {
+ input.consume();
+ errorRecovery=false;failed=false;
+ }
+ else {
+ if (backtracking>0) {failed=true; return sExpression;}
+ MismatchedSetException mse =
+ new MismatchedSetException(null,input);
+ recoverFromMismatchedSet(input,mse,FOLLOW_set_in_lisp_list21310); throw mse;
+ }
+
if ( backtracking==0 ) {
- list.add( new SymbolLispAtom2( t.getText() ) );
+ list.add( new SymbolLispAtom2( t.getText() ) );
}
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:661:3: (a= lisp_atom2 | a= lisp_list2 )+
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:661:3: (a= lisp_atom2 | a= lisp_list2 )+
int cnt18=0;
loop18:
do {
@@ -1925,9 +1934,9 @@
switch (alt18) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:661:6: a= lisp_atom2
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:661:6: a= lisp_atom2
{
- pushFollow(FOLLOW_lisp_atom2_in_lisp_list21321);
+ pushFollow(FOLLOW_lisp_atom2_in_lisp_list21325);
a=lisp_atom2();
_fsp--;
if (failed) return sExpression;
@@ -1938,9 +1947,9 @@
}
break;
case 2 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:662:6: a= lisp_list2
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:662:6: a= lisp_list2
{
- pushFollow(FOLLOW_lisp_list2_in_lisp_list21332);
+ pushFollow(FOLLOW_lisp_list2_in_lisp_list21336);
a=lisp_list2();
_fsp--;
if (failed) return sExpression;
@@ -1961,7 +1970,7 @@
cnt18++;
} while (true);
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_lisp_list21360); if (failed) return sExpression;
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_lisp_list21364); if (failed) return sExpression;
if ( backtracking==0 ) {
sExpression = new LispForm2( ( SExpression[] ) list.toArray( new SExpression[ list.size () ] ) );
}
@@ -1981,20 +1990,20 @@
// $ANTLR start lisp_atom2
- // /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 ) ;
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:668:1: lisp_atom2 returns [SExpression sExpression] : (t= VAR | t= STRING | t= FLOAT | t= INT | t= BOOL | t= NULL | t= NAME ) ;
public final SExpression lisp_atom2() throws RecognitionException {
SExpression sExpression = null;
Token t=null;
-
- sExpression = null;
+
+ sExpression = null;
try {
- // /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:672:2: ( (t= VAR | t= STRING | t= FLOAT | t= INT | t= BOOL | t= NULL | t= NAME ) )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:683:3: (t= VAR | t= STRING | t= FLOAT | t= INT | t= BOOL | t= NULL | t= NAME )
{
- // /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= NAME )
int alt19=7;
switch ( input.LA(1) ) {
case VAR:
@@ -2042,10 +2051,10 @@
switch (alt19) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:684:6: t= VAR
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:684:6: t= VAR
{
t=(Token)input.LT(1);
- match(input,VAR,FOLLOW_VAR_in_lisp_atom21410); if (failed) return sExpression;
+ match(input,VAR,FOLLOW_VAR_in_lisp_atom21414); if (failed) return sExpression;
if ( backtracking==0 ) {
sExpression = new VariableLispAtom2( t.getText() );
}
@@ -2053,10 +2062,10 @@
}
break;
case 2 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:685:6: t= STRING
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:685:6: t= STRING
{
t=(Token)input.LT(1);
- match(input,STRING,FOLLOW_STRING_in_lisp_atom21422); if (failed) return sExpression;
+ match(input,STRING,FOLLOW_STRING_in_lisp_atom21426); if (failed) return sExpression;
if ( backtracking==0 ) {
sExpression = new StringLispAtom2( getString( t ) );
}
@@ -2064,10 +2073,10 @@
}
break;
case 3 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:686:6: t= FLOAT
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:686:6: t= FLOAT
{
t=(Token)input.LT(1);
- match(input,FLOAT,FOLLOW_FLOAT_in_lisp_atom21444); if (failed) return sExpression;
+ match(input,FLOAT,FOLLOW_FLOAT_in_lisp_atom21448); if (failed) return sExpression;
if ( backtracking==0 ) {
sExpression = new FloatLispAtom2( t.getText() );
}
@@ -2075,10 +2084,10 @@
}
break;
case 4 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:687:6: t= INT
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:687:6: t= INT
{
t=(Token)input.LT(1);
- match(input,INT,FOLLOW_INT_in_lisp_atom21456); if (failed) return sExpression;
+ match(input,INT,FOLLOW_INT_in_lisp_atom21460); if (failed) return sExpression;
if ( backtracking==0 ) {
sExpression = new IntLispAtom2( t.getText() );
}
@@ -2086,10 +2095,10 @@
}
break;
case 5 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:688:7: t= BOOL
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:688:7: t= BOOL
{
t=(Token)input.LT(1);
- match(input,BOOL,FOLLOW_BOOL_in_lisp_atom21469); if (failed) return sExpression;
+ match(input,BOOL,FOLLOW_BOOL_in_lisp_atom21473); if (failed) return sExpression;
if ( backtracking==0 ) {
sExpression = new BoolLispAtom2( t.getText() );
}
@@ -2097,10 +2106,10 @@
}
break;
case 6 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:689:7: t= NULL
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:689:7: t= NULL
{
t=(Token)input.LT(1);
- match(input,NULL,FOLLOW_NULL_in_lisp_atom21485); if (failed) return sExpression;
+ match(input,NULL,FOLLOW_NULL_in_lisp_atom21489); if (failed) return sExpression;
if ( backtracking==0 ) {
sExpression = new NullLispAtom2( null );
}
@@ -2108,12 +2117,12 @@
}
break;
case 7 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:690:12: t= NAME
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:690:14: t= NAME
{
t=(Token)input.LT(1);
- match(input,NAME,FOLLOW_NAME_in_lisp_atom21509); if (failed) return sExpression;
+ match(input,NAME,FOLLOW_NAME_in_lisp_atom21515); if (failed) return sExpression;
if ( backtracking==0 ) {
- sExpression = new SymbolLispAtom2( t.getText() );
+ sExpression = new SymbolLispAtom2( "\"" +t.getText() + "\"");
}
}
@@ -2137,7 +2146,7 @@
// $ANTLR start lisp_list
- // /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 ;
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:695:1: lisp_list[BuildContext context, LispList list] returns [ValueHandler valueHandler] : LEFT_PAREN (a= lisp_atom[context] | a= lisp_list[context, list.createList()] )* RIGHT_PAREN ;
public final ValueHandler lisp_list(BuildContext context, LispList list) throws RecognitionException {
ValueHandler valueHandler = null;
@@ -2145,11 +2154,11 @@
try {
- // /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
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:696:2: ( LEFT_PAREN (a= lisp_atom[context] | a= lisp_list[context, list.createList()] )* RIGHT_PAREN )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:696:4: LEFT_PAREN (a= lisp_atom[context] | a= lisp_list[context, list.createList()] )* RIGHT_PAREN
{
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_lisp_list1539); if (failed) return valueHandler;
- // /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()] )*
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_lisp_list1546); if (failed) return valueHandler;
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:697:3: (a= lisp_atom[context] | a= lisp_list[context, list.createList()] )*
loop20:
do {
int alt20=3;
@@ -2165,9 +2174,9 @@
switch (alt20) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:697:6: a= lisp_atom[context]
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:697:6: a= lisp_atom[context]
{
- pushFollow(FOLLOW_lisp_atom_in_lisp_list1549);
+ pushFollow(FOLLOW_lisp_atom_in_lisp_list1556);
a=lisp_atom(context);
_fsp--;
if (failed) return valueHandler;
@@ -2178,9 +2187,9 @@
}
break;
case 2 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:698:6: a= lisp_list[context, list.createList()]
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:698:6: a= lisp_list[context, list.createList()]
{
- pushFollow(FOLLOW_lisp_list_in_lisp_list1565);
+ pushFollow(FOLLOW_lisp_list_in_lisp_list1572);
a=lisp_list(context, list.createList());
_fsp--;
if (failed) return valueHandler;
@@ -2196,7 +2205,7 @@
}
} while (true);
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_lisp_list1595); if (failed) return valueHandler;
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_lisp_list1602); if (failed) return valueHandler;
if ( backtracking==0 ) {
valueHandler = list.getValueHandler();
}
@@ -2216,20 +2225,20 @@
// $ANTLR start lisp_atom
- // /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 ) ;
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:704:1: lisp_atom[BuildContext context] returns [ValueHandler value] : (t= VAR | t= STRING | t= NAME | t= FLOAT | t= INT | t= BOOL | t= NULL ) ;
public final ValueHandler lisp_atom(BuildContext context) throws RecognitionException {
ValueHandler value = null;
Token t=null;
-
- value = null;
+
+ value = null;
try {
- // /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: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: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 )
int alt21=7;
switch ( input.LA(1) ) {
case VAR:
@@ -2277,10 +2286,10 @@
switch (alt21) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:709:6: t= VAR
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:709:6: t= VAR
{
t=(Token)input.LT(1);
- match(input,VAR,FOLLOW_VAR_in_lisp_atom1632); if (failed) return value;
+ match(input,VAR,FOLLOW_VAR_in_lisp_atom1639); if (failed) return value;
if ( backtracking==0 ) {
value = context.getVariableValueHandler(t.getText() );
}
@@ -2288,10 +2297,10 @@
}
break;
case 2 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:710:6: t= STRING
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:710:6: t= STRING
{
t=(Token)input.LT(1);
- match(input,STRING,FOLLOW_STRING_in_lisp_atom1644); if (failed) return value;
+ match(input,STRING,FOLLOW_STRING_in_lisp_atom1651); if (failed) return value;
if ( backtracking==0 ) {
value = new ObjectValueHandler( getString( t ) );
}
@@ -2299,10 +2308,10 @@
}
break;
case 3 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:711:7: t= NAME
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:711:7: t= NAME
{
t=(Token)input.LT(1);
- match(input,NAME,FOLLOW_NAME_in_lisp_atom1656); if (failed) return value;
+ match(input,NAME,FOLLOW_NAME_in_lisp_atom1663); if (failed) return value;
if ( backtracking==0 ) {
value = new ObjectValueHandler( t.getText() );
}
@@ -2310,10 +2319,10 @@
}
break;
case 4 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:712:6: t= FLOAT
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:712:6: t= FLOAT
{
t=(Token)input.LT(1);
- match(input,FLOAT,FOLLOW_FLOAT_in_lisp_atom1671); if (failed) return value;
+ match(input,FLOAT,FOLLOW_FLOAT_in_lisp_atom1678); if (failed) return value;
if ( backtracking==0 ) {
value = new DoubleValueHandler( t.getText() );
}
@@ -2321,10 +2330,10 @@
}
break;
case 5 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:713:6: t= INT
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:713:6: t= INT
{
t=(Token)input.LT(1);
- match(input,INT,FOLLOW_INT_in_lisp_atom1683); if (failed) return value;
+ match(input,INT,FOLLOW_INT_in_lisp_atom1690); if (failed) return value;
if ( backtracking==0 ) {
value = new LongValueHandler( t.getText() );
}
@@ -2332,10 +2341,10 @@
}
break;
case 6 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:714:6: t= BOOL
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:714:6: t= BOOL
{
t=(Token)input.LT(1);
- match(input,BOOL,FOLLOW_BOOL_in_lisp_atom1699); if (failed) return value;
+ match(input,BOOL,FOLLOW_BOOL_in_lisp_atom1706); if (failed) return value;
if ( backtracking==0 ) {
value = new BooleanValueHandler( t.getText() );
}
@@ -2343,10 +2352,10 @@
}
break;
case 7 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:715:6: t= NULL
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:715:6: t= NULL
{
t=(Token)input.LT(1);
- match(input,NULL,FOLLOW_NULL_in_lisp_atom1717); if (failed) return value;
+ match(input,NULL,FOLLOW_NULL_in_lisp_atom1724); if (failed) return value;
if ( backtracking==0 ) {
value = ObjectValueHandler.NULL;
}
@@ -2372,20 +2381,20 @@
// $ANTLR start literal
- // /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 ) ;
+ // 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 ) ;
public final String literal() throws RecognitionException {
String text = null;
Token t=null;
-
- text = null;
+
+ text = null;
try {
- // /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: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:4: (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL )
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:723:4: (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL )
int alt22=6;
switch ( input.LA(1) ) {
case STRING:
@@ -2428,10 +2437,10 @@
switch (alt22) {
case 1 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:723:8: t= STRING
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:723:8: t= STRING
{
t=(Token)input.LT(1);
- match(input,STRING,FOLLOW_STRING_in_literal1753); if (failed) return text;
+ match(input,STRING,FOLLOW_STRING_in_literal1760); if (failed) return text;
if ( backtracking==0 ) {
text = getString( t );
}
@@ -2439,10 +2448,10 @@
}
break;
case 2 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:724:7: t= NAME
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:724:7: t= NAME
{
t=(Token)input.LT(1);
- match(input,NAME,FOLLOW_NAME_in_literal1766); if (failed) return text;
+ match(input,NAME,FOLLOW_NAME_in_literal1773); if (failed) return text;
if ( backtracking==0 ) {
text = t.getText();
}
@@ -2450,10 +2459,10 @@
}
break;
case 3 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:725:7: t= INT
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:725:7: t= INT
{
t=(Token)input.LT(1);
- match(input,INT,FOLLOW_INT_in_literal1782); if (failed) return text;
+ match(input,INT,FOLLOW_INT_in_literal1789); if (failed) return text;
if ( backtracking==0 ) {
text = t.getText();
}
@@ -2461,10 +2470,10 @@
}
break;
case 4 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:726:7: t= FLOAT
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:726:7: t= FLOAT
{
t=(Token)input.LT(1);
- match(input,FLOAT,FOLLOW_FLOAT_in_literal1797); if (failed) return text;
+ match(input,FLOAT,FOLLOW_FLOAT_in_literal1804); if (failed) return text;
if ( backtracking==0 ) {
text = t.getText();
}
@@ -2472,10 +2481,10 @@
}
break;
case 5 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:727:7: t= BOOL
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:727:7: t= BOOL
{
t=(Token)input.LT(1);
- match(input,BOOL,FOLLOW_BOOL_in_literal1810); if (failed) return text;
+ match(input,BOOL,FOLLOW_BOOL_in_literal1817); if (failed) return text;
if ( backtracking==0 ) {
text = t.getText();
}
@@ -2483,10 +2492,10 @@
}
break;
case 6 :
- // /home/etirelli/workspace/jboss/jbossrules/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g:728:7: t= NULL
+ // C:\\dev\\drools\\trunk\\drools-clips\\src\\main\\resources\\org\\drools\\clp\\CLPMVEL.g:728:7: t= NULL
{
t=(Token)input.LT(1);
- match(input,NULL,FOLLOW_NULL_in_literal1824); if (failed) return text;
+ match(input,NULL,FOLLOW_NULL_in_literal1831); if (failed) return text;
if ( backtracking==0 ) {
text = null;
}
@@ -2516,8 +2525,8 @@
public static final BitSet FOLLOW_importDescr_in_eval_script55 = new BitSet(new long[]{0x0000000000000012L});
public static final BitSet FOLLOW_defrule_in_eval_script66 = new BitSet(new long[]{0x0000000000000012L});
public static final BitSet FOLLOW_lisp_list_in_eval_script83 = new BitSet(new long[]{0x0000000000000012L});
- public static final BitSet FOLLOW_LEFT_PAREN_in_importDescr106 = new BitSet(new long[]{0x0000200000000000L});
- public static final BitSet FOLLOW_45_in_importDescr108 = new BitSet(new long[]{0x0000000000000020L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_importDescr106 = new BitSet(new long[]{0x0000100000000000L});
+ public static final BitSet FOLLOW_44_in_importDescr108 = new BitSet(new long[]{0x0000000000000020L});
public static final BitSet FOLLOW_NAME_in_importDescr112 = new BitSet(new long[]{0x0000000000000040L});
public static final BitSet FOLLOW_RIGHT_PAREN_in_importDescr115 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_LEFT_PAREN_in_deffunction141 = new BitSet(new long[]{0x0000000000000080L});
@@ -2531,10 +2540,10 @@
public static final BitSet FOLLOW_LEFT_PAREN_in_defrule235 = new BitSet(new long[]{0x0000000000000200L});
public static final BitSet FOLLOW_DEFRULE_in_defrule243 = new BitSet(new long[]{0x0000000000000020L});
public static final BitSet FOLLOW_NAME_in_defrule247 = new BitSet(new long[]{0x0000000000000400L});
- public static final BitSet FOLLOW_STRING_in_defrule259 = new BitSet(new long[]{0x0000400000000110L});
- public static final BitSet FOLLOW_ruleAttribute_in_defrule265 = new BitSet(new long[]{0x0000400000000110L});
- public static final BitSet FOLLOW_ce_in_defrule273 = new BitSet(new long[]{0x0000400000000110L});
- public static final BitSet FOLLOW_46_in_defrule282 = new BitSet(new long[]{0x0000000000000050L});
+ public static final BitSet FOLLOW_STRING_in_defrule259 = new BitSet(new long[]{0x0000200000000110L});
+ public static final BitSet FOLLOW_ruleAttribute_in_defrule265 = new BitSet(new long[]{0x0000200000000110L});
+ public static final BitSet FOLLOW_ce_in_defrule273 = new BitSet(new long[]{0x0000200000000110L});
+ public static final BitSet FOLLOW_45_in_defrule282 = new BitSet(new long[]{0x0000000000000050L});
public static final BitSet FOLLOW_execution_block_in_defrule291 = new BitSet(new long[]{0x0000000000000040L});
public static final BitSet FOLLOW_RIGHT_PAREN_in_defrule300 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_LEFT_PAREN_in_ruleAttribute317 = new BitSet(new long[]{0x0000000020000000L});
@@ -2605,34 +2614,34 @@
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[]{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});
- public static final BitSet FOLLOW_FLOAT_in_lisp_atom21444 = new BitSet(new long[]{0x0000000000000002L});
- 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_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});
- public static final BitSet FOLLOW_NAME_in_lisp_atom1656 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_FLOAT_in_lisp_atom1671 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_INT_in_lisp_atom1683 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_BOOL_in_lisp_atom1699 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_NULL_in_lisp_atom1717 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_STRING_in_literal1753 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_NAME_in_literal1766 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_INT_in_literal1782 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_FLOAT_in_literal1797 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_BOOL_in_literal1810 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_NULL_in_literal1824 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_lisp_list21300 = new BitSet(new long[]{0x0000000000000120L});
+ public static final BitSet FOLLOW_set_in_lisp_list21310 = new BitSet(new long[]{0x0000000007001530L});
+ public static final BitSet FOLLOW_lisp_atom2_in_lisp_list21325 = new BitSet(new long[]{0x0000000007001570L});
+ public static final BitSet FOLLOW_lisp_list2_in_lisp_list21336 = new BitSet(new long[]{0x0000000007001570L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_lisp_list21364 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_VAR_in_lisp_atom21414 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_STRING_in_lisp_atom21426 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_FLOAT_in_lisp_atom21448 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_INT_in_lisp_atom21460 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_BOOL_in_lisp_atom21473 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_NULL_in_lisp_atom21489 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_NAME_in_lisp_atom21515 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_lisp_list1546 = new BitSet(new long[]{0x0000000007001570L});
+ public static final BitSet FOLLOW_lisp_atom_in_lisp_list1556 = new BitSet(new long[]{0x0000000007001570L});
+ public static final BitSet FOLLOW_lisp_list_in_lisp_list1572 = new BitSet(new long[]{0x0000000007001570L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_lisp_list1602 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_VAR_in_lisp_atom1639 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_STRING_in_lisp_atom1651 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_NAME_in_lisp_atom1663 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_FLOAT_in_lisp_atom1678 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_INT_in_lisp_atom1690 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_BOOL_in_lisp_atom1706 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_NULL_in_lisp_atom1724 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_STRING_in_literal1760 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_NAME_in_literal1773 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_INT_in_literal1789 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_FLOAT_in_literal1804 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_BOOL_in_literal1817 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_NULL_in_literal1831 = new BitSet(new long[]{0x0000000000000002L});
}
\ No newline at end of file
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 21:10:22 UTC (rev 18086)
+++ labs/jbossrules/trunk/drools-clips/src/main/resources/org/drools/clp/CLPMVEL.g 2008-01-24 21:15:43 UTC (rev 18087)
@@ -1,891 +1,900 @@
-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'|'"'|'('|')'|';'|'&'|'|'|'~'|'<'|'?'))*
- ;
-*/
-
-
-
-
+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|VAR) { 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 : '?' SYMBOL_CHAR+
+ ;
+
+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 : FIRST_SYMBOL_CHAR SYMBOL_CHAR* ;
+
+/*
+fragment
+START_DELIM : ' '|'\t'|'\n'|'\r'|'"'|'('|')'|';'|'&'|'|'|'~'|'?';
+
+fragment
+DELIM : ' '|'\t'|'\n'|'\r'|'"'|'('|')'|';'|'&'|'|'|'~'|'<';
+*/
+
+// allowed <
+// not allowed ?
+fragment
+FIRST_SYMBOL_CHAR : ('a'..'z'|'A'..'Z'|'0'..'9'|'!'|'$'|'%'|'^'|'*'|'_'|'-'|'+'|'='|'\\'|'/'|'@'|'#'|':'|'>'|'<'|','|'.'|'['|']'|'{'|'}');
+
+// allowed ?
+// not allowed <
+fragment
+SYMBOL_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 21:10:22 UTC (rev 18086)
+++ labs/jbossrules/trunk/drools-clips/src/test/java/org/drools/clp/ShellTest.java 2008-01-24 21:15:43 UTC (rev 18087)
@@ -35,7 +35,35 @@
WorkingMemory wm = shell.getWorkingMemory();
wm.insert( new Person("bob", "cheddar", 30) );
wm.insert( new Person("bob", "stilton", 35) );
- wm.fireAllRules();
+ wm.fireAllRules();
+ }
+
+ public void test2() {
+ Shell shell = new Shell();
- }
+ shell.evalString( "(import org.drools.Person)" );
+
+ shell.evalString( "(defrule yyy => (printout t yy \" \" (eq 1 1) \"\n\" ) ) )" );
+ Package pkg = shell.getWorkingMemory().getRuleBase().getPackage( "MAIN" );
+
+ Rule rule = pkg.getRule( "yyy" );
+ assertEquals( "yyy", rule.getName() );
+
+ shell.evalString( "(defrule xxx (Person (name ?name&bob) (age 30) ) (Person (name ?name) (age 35)) => (printout t ?name \" \" (eq 1 1) \"\n\" ) )" );
+
+
+ rule = pkg.getRule( "xxx" );
+ assertEquals( "xxx", rule.getName() );
+
+
+
+ assertEquals( 2, pkg.getRules().length );
+
+ assertTrue( pkg.getImports().containsKey( "org.drools.Person" ) );
+
+ WorkingMemory wm = shell.getWorkingMemory();
+ wm.insert( new Person("bob", "cheddar", 30) );
+ wm.insert( new Person("bob", "stilton", 35) );
+ wm.fireAllRules();
+ }
}
More information about the jboss-svn-commits
mailing list