[jboss-svn-commits] JBL Code SVN: r24101 - in labs/jbossrules/trunk/drools-clips/src/main: resources/org/drools/clips and 1 other directory.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Tue Nov 25 16:35:43 EST 2008
Author: tirelli
Date: 2008-11-25 16:35:43 -0500 (Tue, 25 Nov 2008)
New Revision: 24101
Modified:
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clips/ClipsLexer.java
labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clips/ClipsParser.java
labs/jbossrules/trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g
Log:
JBRULES-1869: Upgrading to ANTLR 3.1.1. Removing the need of an escape character for pluggable operators with parameters in the parser.
Modified: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clips/ClipsLexer.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clips/ClipsLexer.java 2008-11-25 21:30:40 UTC (rev 24100)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clips/ClipsLexer.java 2008-11-25 21:35:43 UTC (rev 24101)
@@ -1,117 +1,124 @@
-// $ANTLR 3.0.1 C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g 2008-06-26 02:09:38
-
- package org.drools.clips;
+// $ANTLR 3.1.1 /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g 2008-11-24 17:53:59
+ package org.drools.clips;
+
+import org.antlr.runtime.*;
+import java.util.Stack;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
import java.util.HashMap;
-
-import org.antlr.runtime.BaseRecognizer;
-import org.antlr.runtime.CharStream;
-import org.antlr.runtime.DFA;
-import org.antlr.runtime.EarlyExitException;
-import org.antlr.runtime.Lexer;
-import org.antlr.runtime.MismatchedSetException;
-import org.antlr.runtime.NoViableAltException;
-import org.antlr.runtime.RecognitionException;
public class ClipsLexer extends Lexer {
- public static final int RIGHT_SQUARE=39;
- public static final int RIGHT_CURLY=41;
- public static final int EQUALS=23;
+ public static final int EXISTS=15;
+ public static final int DEFRULE=8;
+ public static final int SYMBOL_CHAR=35;
+ public static final int HexDigit=32;
public static final int FLOAT=24;
- public static final int SH_STYLE_SINGLE_LINE_COMMENT=36;
- public static final int SYMBOL_CHAR=35;
- public static final int NOT=14;
+ public static final int TILDE=21;
+ public static final int OR=13;
+ public static final int PIPE=19;
+ public static final int ASSIGN_OP=18;
public static final int AND=12;
+ public static final int T__46=46;
public static final int FIRST_SYMBOL_CHAR=44;
- public static final int EOF=-1;
- public static final int HexDigit=32;
+ public static final int DEFTEMPLATE=27;
+ public static final int EscapeSequence=31;
+ public static final int INT=11;
+ public static final int SYMBOL=43;
+ public static final int LEFT_SQUARE=38;
+ public static final int SH_STYLE_SINGLE_LINE_COMMENT=36;
+ public static final int AMPERSAND=20;
+ public static final int DECLARE=30;
+ public static final int LEFT_CURLY=40;
+ public static final int LEFT_PAREN=4;
+ public static final int RIGHT_CURLY=41;
+ public static final int BOOL=25;
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=28;
- public static final int DEFRULE=8;
- public static final int TILDE=21;
- public static final int PIPE=19;
+ public static final int WS=29;
+ public static final int STRING=9;
+ public static final int T__45=45;
public static final int VAR=17;
- public static final int EXISTS=15;
- public static final int SYMBOL=43;
+ public static final int EQUALS=23;
+ public static final int UnicodeEscape=33;
+ public static final int EOF=-1;
public static final int NULL=26;
- public static final int BOOL=25;
+ public static final int EOL=28;
+ public static final int COLON=22;
public static final int SALIENCE=10;
- public static final int AMPERSAND=20;
- public static final int INT=11;
- public static final int Tokens=47;
+ public static final int OctalEscape=34;
public static final int MULTI_LINE_COMMENT=42;
- public static final int T46=46;
- public static final int T45=45;
- public static final int COLON=22;
- public static final int WS=29;
- public static final int UnicodeEscape=33;
- public static final int LEFT_CURLY=40;
- public static final int OR=13;
public static final int TEST=16;
- public static final int LEFT_PAREN=4;
- public static final int DECLARE=30;
- public static final int DEFTEMPLATE=27;
- public static final int LEFT_SQUARE=38;
- public static final int EscapeSequence=31;
- public static final int OctalEscape=34;
+ public static final int NAME=5;
+ public static final int RIGHT_PAREN=6;
+ public static final int NOT=14;
+ public static final int RIGHT_SQUARE=39;
public static final int C_STYLE_SINGLE_LINE_COMMENT=37;
- public static final int STRING=9;
+
+ // delegates
+ // delegators
+
public ClipsLexer() {;}
public ClipsLexer(CharStream input) {
- super(input);
- ruleMemo = new HashMap[45+1];
- }
- public String getGrammarFileName() { return "C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g"; }
+ this(input, new RecognizerSharedState());
+ }
+ public ClipsLexer(CharStream input, RecognizerSharedState state) {
+ super(input,state);
- // $ANTLR start T45
- public final void mT45() throws RecognitionException {
+ }
+ public String getGrammarFileName() { return "/Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g"; }
+
+ // $ANTLR start "T__45"
+ public final void mT__45() throws RecognitionException {
try {
- int _type = T45;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:6:5: ( 'import' )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:6:7: 'import'
+ int _type = T__45;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:7:7: ( 'import' )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:7:9: 'import'
{
- match("import"); if (failed) return ;
+ match("import"); if (state.failed) return ;
}
- this.type = _type;
+ state.type = _type;
+ state.channel = _channel;
}
finally {
}
}
- // $ANTLR end T45
+ // $ANTLR end "T__45"
- // $ANTLR start T46
- public final void mT46() throws RecognitionException {
+ // $ANTLR start "T__46"
+ public final void mT__46() throws RecognitionException {
try {
- int _type = T46;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:7:5: ( '=>' )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:7:7: '=>'
+ int _type = T__46;
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:8:7: ( '=>' )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:8:9: '=>'
{
- match("=>"); if (failed) return ;
+ match("=>"); if (state.failed) return ;
}
- this.type = _type;
+ state.type = _type;
+ state.channel = _channel;
}
finally {
}
}
- // $ANTLR end T46
+ // $ANTLR end "T__46"
- // $ANTLR start WS
+ // $ANTLR start "WS"
public final void mWS() throws RecognitionException {
try {
int _type = WS;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:800:9: ( ( ' ' | '\\t' | '\\f' | EOL ) )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:800:17: ( ' ' | '\\t' | '\\f' | EOL )
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:802:9: ( ( ' ' | '\\t' | '\\f' | EOL ) )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:802:17: ( ' ' | '\\t' | '\\f' | EOL )
{
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:800:17: ( ' ' | '\\t' | '\\f' | EOL )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:802:17: ( ' ' | '\\t' | '\\f' | EOL )
int alt1=4;
switch ( input.LA(1) ) {
case ' ':
@@ -136,281 +143,304 @@
}
break;
default:
- if (backtracking>0) {failed=true; return ;}
+ if (state.backtracking>0) {state.failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("800:17: ( ' ' | '\\t' | '\\f' | EOL )", 1, 0, input);
+ new NoViableAltException("", 1, 0, input);
throw nvae;
}
switch (alt1) {
case 1 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:800:19: ' '
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:802:19: ' '
{
- match(' '); if (failed) return ;
+ match(' '); if (state.failed) return ;
}
break;
case 2 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:801:19: '\\t'
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:803:19: '\\t'
{
- match('\t'); if (failed) return ;
+ match('\t'); if (state.failed) return ;
}
break;
case 3 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:802:19: '\\f'
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:804:19: '\\f'
{
- match('\f'); if (failed) return ;
+ match('\f'); if (state.failed) return ;
}
break;
case 4 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:803:19: EOL
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:805:19: EOL
{
- mEOL(); if (failed) return ;
+ mEOL(); if (state.failed) return ;
}
break;
}
- if ( backtracking==0 ) {
- channel=HIDDEN;
+ if ( state.backtracking==0 ) {
+ _channel=HIDDEN;
}
}
- this.type = _type;
+ state.type = _type;
+ state.channel = _channel;
}
finally {
}
}
- // $ANTLR end WS
+ // $ANTLR end "WS"
- // $ANTLR start DEFTEMPLATE
+ // $ANTLR start "DEFTEMPLATE"
public final void mDEFTEMPLATE() throws RecognitionException {
try {
int _type = DEFTEMPLATE;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:809:13: ( 'deftemplate' )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:809:17: 'deftemplate'
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:811:13: ( 'deftemplate' )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:811:17: 'deftemplate'
{
- match("deftemplate"); if (failed) return ;
+ match("deftemplate"); if (state.failed) return ;
}
- this.type = _type;
+ state.type = _type;
+ state.channel = _channel;
}
finally {
}
}
- // $ANTLR end DEFTEMPLATE
+ // $ANTLR end "DEFTEMPLATE"
- // $ANTLR start DEFRULE
+ // $ANTLR start "DEFRULE"
public final void mDEFRULE() throws RecognitionException {
try {
int _type = DEFRULE;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:812:10: ( 'defrule' )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:812:12: 'defrule'
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:814:10: ( 'defrule' )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:814:12: 'defrule'
{
- match("defrule"); if (failed) return ;
+ match("defrule"); if (state.failed) return ;
}
- this.type = _type;
+ state.type = _type;
+ state.channel = _channel;
}
finally {
}
}
- // $ANTLR end DEFRULE
+ // $ANTLR end "DEFRULE"
- // $ANTLR start DEFFUNCTION
+ // $ANTLR start "DEFFUNCTION"
public final void mDEFFUNCTION() throws RecognitionException {
try {
int _type = DEFFUNCTION;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:813:13: ( 'deffunction' )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:813:15: 'deffunction'
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:815:13: ( 'deffunction' )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:815:15: 'deffunction'
{
- match("deffunction"); if (failed) return ;
+ match("deffunction"); if (state.failed) return ;
}
- this.type = _type;
+ state.type = _type;
+ state.channel = _channel;
}
finally {
}
}
- // $ANTLR end DEFFUNCTION
+ // $ANTLR end "DEFFUNCTION"
- // $ANTLR start OR
+ // $ANTLR start "OR"
public final void mOR() throws RecognitionException {
try {
int _type = OR;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:814:7: ( 'or' )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:814:9: 'or'
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:816:7: ( 'or' )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:816:9: 'or'
{
- match("or"); if (failed) return ;
+ match("or"); if (state.failed) return ;
}
- this.type = _type;
+ state.type = _type;
+ state.channel = _channel;
}
finally {
}
}
- // $ANTLR end OR
+ // $ANTLR end "OR"
- // $ANTLR start AND
+ // $ANTLR start "AND"
public final void mAND() throws RecognitionException {
try {
int _type = AND;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:815:7: ( 'and' )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:815:9: 'and'
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:817:7: ( 'and' )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:817:9: 'and'
{
- match("and"); if (failed) return ;
+ match("and"); if (state.failed) return ;
}
- this.type = _type;
+ state.type = _type;
+ state.channel = _channel;
}
finally {
}
}
- // $ANTLR end AND
+ // $ANTLR end "AND"
- // $ANTLR start NOT
+ // $ANTLR start "NOT"
public final void mNOT() throws RecognitionException {
try {
int _type = NOT;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:816:7: ( 'not' )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:816:9: 'not'
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:818:7: ( 'not' )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:818:9: 'not'
{
- match("not"); if (failed) return ;
+ match("not"); if (state.failed) return ;
}
- this.type = _type;
+ state.type = _type;
+ state.channel = _channel;
}
finally {
}
}
- // $ANTLR end NOT
+ // $ANTLR end "NOT"
- // $ANTLR start EXISTS
+ // $ANTLR start "EXISTS"
public final void mEXISTS() throws RecognitionException {
try {
int _type = EXISTS;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:817:10: ( 'exists' )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:817:12: 'exists'
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:819:10: ( 'exists' )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:819:12: 'exists'
{
- match("exists"); if (failed) return ;
+ match("exists"); if (state.failed) return ;
}
- this.type = _type;
+ state.type = _type;
+ state.channel = _channel;
}
finally {
}
}
- // $ANTLR end EXISTS
+ // $ANTLR end "EXISTS"
- // $ANTLR start TEST
+ // $ANTLR start "TEST"
public final void mTEST() throws RecognitionException {
try {
int _type = TEST;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:818:8: ( 'test' )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:818:10: 'test'
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:820:8: ( 'test' )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:820:10: 'test'
{
- match("test"); if (failed) return ;
+ match("test"); if (state.failed) return ;
}
- this.type = _type;
+ state.type = _type;
+ state.channel = _channel;
}
finally {
}
}
- // $ANTLR end TEST
+ // $ANTLR end "TEST"
- // $ANTLR start NULL
+ // $ANTLR start "NULL"
public final void mNULL() throws RecognitionException {
try {
int _type = NULL;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:819:7: ( 'null' )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:819:9: 'null'
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:821:7: ( 'null' )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:821:9: 'null'
{
- match("null"); if (failed) return ;
+ match("null"); if (state.failed) return ;
}
- this.type = _type;
+ state.type = _type;
+ state.channel = _channel;
}
finally {
}
}
- // $ANTLR end NULL
+ // $ANTLR end "NULL"
- // $ANTLR start DECLARE
+ // $ANTLR start "DECLARE"
public final void mDECLARE() throws RecognitionException {
try {
int _type = DECLARE;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:821:10: ( 'declare' )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:821:12: 'declare'
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:823:10: ( 'declare' )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:823:12: 'declare'
{
- match("declare"); if (failed) return ;
+ match("declare"); if (state.failed) return ;
}
- this.type = _type;
+ state.type = _type;
+ state.channel = _channel;
}
finally {
}
}
- // $ANTLR end DECLARE
+ // $ANTLR end "DECLARE"
- // $ANTLR start SALIENCE
+ // $ANTLR start "SALIENCE"
public final void mSALIENCE() throws RecognitionException {
try {
int _type = SALIENCE;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:823:10: ( 'salience' )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:823:12: 'salience'
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:825:10: ( 'salience' )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:825:12: 'salience'
{
- match("salience"); if (failed) return ;
+ match("salience"); if (state.failed) return ;
}
- this.type = _type;
+ state.type = _type;
+ state.channel = _channel;
}
finally {
}
}
- // $ANTLR end SALIENCE
+ // $ANTLR end "SALIENCE"
- // $ANTLR start EOL
+ // $ANTLR start "EOL"
public final void mEOL() throws RecognitionException {
try {
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:828:6: ( ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' ) )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:829:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:830:6: ( ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' ) )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:831:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
{
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:829:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:831:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
int alt2=3;
int LA2_0 = input.LA(1);
if ( (LA2_0=='\r') ) {
int LA2_1 = input.LA(2);
- if ( (LA2_1=='\n') && (synpred1())) {
+ if ( (LA2_1=='\n') && (synpred1_Clips())) {
alt2=1;
}
else {
@@ -420,32 +450,32 @@
alt2=3;
}
else {
- if (backtracking>0) {failed=true; return ;}
+ if (state.backtracking>0) {state.failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("829:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )", 2, 0, input);
+ new NoViableAltException("", 2, 0, input);
throw nvae;
}
switch (alt2) {
case 1 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:829:14: ( '\\r\\n' )=> '\\r\\n'
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:831:14: ( '\\r\\n' )=> '\\r\\n'
{
- match("\r\n"); if (failed) return ;
+ match("\r\n"); if (state.failed) return ;
}
break;
case 2 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:830:25: '\\r'
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:832:25: '\\r'
{
- match('\r'); if (failed) return ;
+ match('\r'); if (state.failed) return ;
}
break;
case 3 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:831:25: '\\n'
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:833:25: '\\n'
{
- match('\n'); if (failed) return ;
+ match('\n'); if (state.failed) return ;
}
break;
@@ -459,16 +489,17 @@
finally {
}
}
- // $ANTLR end EOL
+ // $ANTLR end "EOL"
- // $ANTLR start INT
+ // $ANTLR start "INT"
public final void mINT() throws RecognitionException {
try {
int _type = INT;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:836:2: ( ( '-' )? ( '0' .. '9' )+ )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:836:4: ( '-' )? ( '0' .. '9' )+
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:838:2: ( ( '-' )? ( '0' .. '9' )+ )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:838:4: ( '-' )? ( '0' .. '9' )+
{
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:836:4: ( '-' )?
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:838:4: ( '-' )?
int alt3=2;
int LA3_0 = input.LA(1);
@@ -477,16 +508,16 @@
}
switch (alt3) {
case 1 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:836:5: '-'
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:838:5: '-'
{
- match('-'); if (failed) return ;
+ match('-'); if (state.failed) return ;
}
break;
}
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:836:10: ( '0' .. '9' )+
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:838:10: ( '0' .. '9' )+
int cnt4=0;
loop4:
do {
@@ -500,16 +531,16 @@
switch (alt4) {
case 1 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:836:11: '0' .. '9'
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:838:11: '0' .. '9'
{
- matchRange('0','9'); if (failed) return ;
+ matchRange('0','9'); if (state.failed) return ;
}
break;
default :
if ( cnt4 >= 1 ) break loop4;
- if (backtracking>0) {failed=true; return ;}
+ if (state.backtracking>0) {state.failed=true; return ;}
EarlyExitException eee =
new EarlyExitException(4, input);
throw eee;
@@ -520,21 +551,23 @@
}
- this.type = _type;
+ state.type = _type;
+ state.channel = _channel;
}
finally {
}
}
- // $ANTLR end INT
+ // $ANTLR end "INT"
- // $ANTLR start FLOAT
+ // $ANTLR start "FLOAT"
public final void mFLOAT() throws RecognitionException {
try {
int _type = FLOAT;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:840:2: ( ( '-' )? ( '0' .. '9' )+ '.' ( '0' .. '9' )+ )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:840:4: ( '-' )? ( '0' .. '9' )+ '.' ( '0' .. '9' )+
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:842:2: ( ( '-' )? ( '0' .. '9' )+ '.' ( '0' .. '9' )+ )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:842:4: ( '-' )? ( '0' .. '9' )+ '.' ( '0' .. '9' )+
{
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:840:4: ( '-' )?
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:842:4: ( '-' )?
int alt5=2;
int LA5_0 = input.LA(1);
@@ -543,16 +576,16 @@
}
switch (alt5) {
case 1 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:840:5: '-'
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:842:5: '-'
{
- match('-'); if (failed) return ;
+ match('-'); if (state.failed) return ;
}
break;
}
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:840:10: ( '0' .. '9' )+
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:842:10: ( '0' .. '9' )+
int cnt6=0;
loop6:
do {
@@ -566,16 +599,16 @@
switch (alt6) {
case 1 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:840:11: '0' .. '9'
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:842:11: '0' .. '9'
{
- matchRange('0','9'); if (failed) return ;
+ matchRange('0','9'); if (state.failed) return ;
}
break;
default :
if ( cnt6 >= 1 ) break loop6;
- if (backtracking>0) {failed=true; return ;}
+ if (state.backtracking>0) {state.failed=true; return ;}
EarlyExitException eee =
new EarlyExitException(6, input);
throw eee;
@@ -583,8 +616,8 @@
cnt6++;
} while (true);
- match('.'); if (failed) return ;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:840:26: ( '0' .. '9' )+
+ match('.'); if (state.failed) return ;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:842:26: ( '0' .. '9' )+
int cnt7=0;
loop7:
do {
@@ -598,16 +631,16 @@
switch (alt7) {
case 1 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:840:27: '0' .. '9'
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:842:27: '0' .. '9'
{
- matchRange('0','9'); if (failed) return ;
+ matchRange('0','9'); if (state.failed) return ;
}
break;
default :
if ( cnt7 >= 1 ) break loop7;
- if (backtracking>0) {failed=true; return ;}
+ if (state.backtracking>0) {state.failed=true; return ;}
EarlyExitException eee =
new EarlyExitException(7, input);
throw eee;
@@ -618,18 +651,20 @@
}
- this.type = _type;
+ state.type = _type;
+ state.channel = _channel;
}
finally {
}
}
- // $ANTLR end FLOAT
+ // $ANTLR end "FLOAT"
- // $ANTLR start STRING
+ // $ANTLR start "STRING"
public final void mSTRING() throws RecognitionException {
try {
int _type = STRING;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:844:5: ( ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' ) | ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' ) )
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:846:5: ( ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' ) | ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' ) )
int alt10=2;
int LA10_0 = input.LA(1);
@@ -640,21 +675,21 @@
alt10=2;
}
else {
- if (backtracking>0) {failed=true; return ;}
+ if (state.backtracking>0) {state.failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("843:1: STRING : ( ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' ) | ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' ) );", 10, 0, input);
+ new NoViableAltException("", 10, 0, input);
throw nvae;
}
switch (alt10) {
case 1 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:844:8: ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:846:8: ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' )
{
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:844:8: ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:844:9: '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"'
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:846:8: ( '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"' )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:846:9: '\"' ( EscapeSequence | ~ ( '\\\\' | '\"' ) )* '\"'
{
- match('\"'); if (failed) return ;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:844:13: ( EscapeSequence | ~ ( '\\\\' | '\"' ) )*
+ match('\"'); if (state.failed) return ;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:846:13: ( EscapeSequence | ~ ( '\\\\' | '\"' ) )*
loop8:
do {
int alt8=3;
@@ -663,32 +698,31 @@
if ( (LA8_0=='\\') ) {
alt8=1;
}
- else if ( ((LA8_0>='\u0000' && LA8_0<='!')||(LA8_0>='#' && LA8_0<='[')||(LA8_0>=']' && LA8_0<='\uFFFE')) ) {
+ else if ( ((LA8_0>='\u0000' && LA8_0<='!')||(LA8_0>='#' && LA8_0<='[')||(LA8_0>=']' && LA8_0<='\uFFFF')) ) {
alt8=2;
}
switch (alt8) {
case 1 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:844:15: EscapeSequence
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:846:15: EscapeSequence
{
- mEscapeSequence(); if (failed) return ;
+ mEscapeSequence(); if (state.failed) return ;
}
break;
case 2 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:844:32: ~ ( '\\\\' | '\"' )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:846:32: ~ ( '\\\\' | '\"' )
{
- if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFE') ) {
+ if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) {
input.consume();
- failed=false;
+ state.failed=false;
}
else {
- if (backtracking>0) {failed=true; return ;}
- MismatchedSetException mse =
- new MismatchedSetException(null,input);
- recover(mse); throw mse;
- }
+ if (state.backtracking>0) {state.failed=true; return ;}
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
}
@@ -699,7 +733,7 @@
}
} while (true);
- match('\"'); if (failed) return ;
+ match('\"'); if (state.failed) return ;
}
@@ -707,13 +741,13 @@
}
break;
case 2 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:845:8: ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:847:8: ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' )
{
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:845:8: ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:845:9: '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\''
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:847:8: ( '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\'' )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:847:9: '\\'' ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )* '\\''
{
- match('\''); if (failed) return ;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:845:14: ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )*
+ match('\''); if (state.failed) return ;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:847:14: ( EscapeSequence | ~ ( '\\\\' | '\\'' ) )*
loop9:
do {
int alt9=3;
@@ -722,32 +756,31 @@
if ( (LA9_0=='\\') ) {
alt9=1;
}
- else if ( ((LA9_0>='\u0000' && LA9_0<='&')||(LA9_0>='(' && LA9_0<='[')||(LA9_0>=']' && LA9_0<='\uFFFE')) ) {
+ else if ( ((LA9_0>='\u0000' && LA9_0<='&')||(LA9_0>='(' && LA9_0<='[')||(LA9_0>=']' && LA9_0<='\uFFFF')) ) {
alt9=2;
}
switch (alt9) {
case 1 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:845:16: EscapeSequence
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:847:16: EscapeSequence
{
- mEscapeSequence(); if (failed) return ;
+ mEscapeSequence(); if (state.failed) return ;
}
break;
case 2 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:845:33: ~ ( '\\\\' | '\\'' )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:847:33: ~ ( '\\\\' | '\\'' )
{
- if ( (input.LA(1)>='\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFE') ) {
+ if ( (input.LA(1)>='\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) {
input.consume();
- failed=false;
+ state.failed=false;
}
else {
- if (backtracking>0) {failed=true; return ;}
- MismatchedSetException mse =
- new MismatchedSetException(null,input);
- recover(mse); throw mse;
- }
+ if (state.backtracking>0) {state.failed=true; return ;}
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
}
@@ -758,7 +791,7 @@
}
} while (true);
- match('\''); if (failed) return ;
+ match('\''); if (state.failed) return ;
}
@@ -767,29 +800,29 @@
break;
}
- this.type = _type;
+ state.type = _type;
+ state.channel = _channel;
}
finally {
}
}
- // $ANTLR end STRING
+ // $ANTLR end "STRING"
- // $ANTLR start HexDigit
+ // $ANTLR start "HexDigit"
public final void mHexDigit() throws RecognitionException {
try {
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:849:10: ( ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' ) )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:849:12: ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:851:10: ( ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' ) )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:851: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();
- failed=false;
+ state.failed=false;
}
else {
- if (backtracking>0) {failed=true; return ;}
- MismatchedSetException mse =
- new MismatchedSetException(null,input);
- recover(mse); throw mse;
- }
+ if (state.backtracking>0) {state.failed=true; return ;}
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
}
@@ -798,22 +831,17 @@
finally {
}
}
- // $ANTLR end HexDigit
+ // $ANTLR end "HexDigit"
- // $ANTLR start EscapeSequence
+ // $ANTLR start "EscapeSequence"
public final void mEscapeSequence() throws RecognitionException {
try {
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:853:5: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | UnicodeEscape | OctalEscape )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:855: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 '\\':
@@ -826,6 +854,11 @@
alt11=1;
}
break;
+ case 'u':
+ {
+ alt11=2;
+ }
+ break;
case '0':
case '1':
case '2':
@@ -839,51 +872,50 @@
}
break;
default:
- if (backtracking>0) {failed=true; return ;}
+ if (state.backtracking>0) {state.failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("851:1: fragment EscapeSequence : ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | UnicodeEscape | OctalEscape );", 11, 1, input);
+ new NoViableAltException("", 11, 1, input);
throw nvae;
}
}
else {
- if (backtracking>0) {failed=true; return ;}
+ if (state.backtracking>0) {state.failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("851:1: fragment EscapeSequence : ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | UnicodeEscape | OctalEscape );", 11, 0, input);
+ new NoViableAltException("", 11, 0, input);
throw nvae;
}
switch (alt11) {
case 1 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:853:9: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:855:9: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' )
{
- match('\\'); if (failed) return ;
+ match('\\'); if (state.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' ) {
input.consume();
- failed=false;
+ state.failed=false;
}
else {
- if (backtracking>0) {failed=true; return ;}
- MismatchedSetException mse =
- new MismatchedSetException(null,input);
- recover(mse); throw mse;
- }
+ if (state.backtracking>0) {state.failed=true; return ;}
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
}
break;
case 2 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:854:9: UnicodeEscape
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:856:9: UnicodeEscape
{
- mUnicodeEscape(); if (failed) return ;
+ mUnicodeEscape(); if (state.failed) return ;
}
break;
case 3 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:855:9: OctalEscape
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:857:9: OctalEscape
{
- mOctalEscape(); if (failed) return ;
+ mOctalEscape(); if (state.failed) return ;
}
break;
@@ -893,12 +925,12 @@
finally {
}
}
- // $ANTLR end EscapeSequence
+ // $ANTLR end "EscapeSequence"
- // $ANTLR start OctalEscape
+ // $ANTLR start "OctalEscape"
public final void mOctalEscape() throws RecognitionException {
try {
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:860:5: ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:862:5: ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) )
int alt12=3;
int LA12_0 = input.LA(1);
@@ -909,9 +941,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 {
@@ -930,43 +962,43 @@
alt12=3;}
}
else {
- if (backtracking>0) {failed=true; return ;}
+ if (state.backtracking>0) {state.failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("858:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 12, 1, input);
+ new NoViableAltException("", 12, 1, input);
throw nvae;
}
}
else {
- if (backtracking>0) {failed=true; return ;}
+ if (state.backtracking>0) {state.failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("858:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 12, 0, input);
+ new NoViableAltException("", 12, 0, input);
throw nvae;
}
switch (alt12) {
case 1 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:860:9: '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:862:9: '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' )
{
- match('\\'); if (failed) return ;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:860:14: ( '0' .. '3' )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:860:15: '0' .. '3'
+ match('\\'); if (state.failed) return ;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:862:14: ( '0' .. '3' )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:862:15: '0' .. '3'
{
- matchRange('0','3'); if (failed) return ;
+ matchRange('0','3'); if (state.failed) return ;
}
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:860:25: ( '0' .. '7' )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:860:26: '0' .. '7'
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:862:25: ( '0' .. '7' )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:862:26: '0' .. '7'
{
- matchRange('0','7'); if (failed) return ;
+ matchRange('0','7'); if (state.failed) return ;
}
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:860:36: ( '0' .. '7' )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:860:37: '0' .. '7'
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:862:36: ( '0' .. '7' )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:862:37: '0' .. '7'
{
- matchRange('0','7'); if (failed) return ;
+ matchRange('0','7'); if (state.failed) return ;
}
@@ -974,20 +1006,20 @@
}
break;
case 2 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:861:9: '\\\\' ( '0' .. '7' ) ( '0' .. '7' )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:863:9: '\\\\' ( '0' .. '7' ) ( '0' .. '7' )
{
- match('\\'); if (failed) return ;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:861:14: ( '0' .. '7' )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:861:15: '0' .. '7'
+ match('\\'); if (state.failed) return ;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:863:14: ( '0' .. '7' )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:863:15: '0' .. '7'
{
- matchRange('0','7'); if (failed) return ;
+ matchRange('0','7'); if (state.failed) return ;
}
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:861:25: ( '0' .. '7' )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:861:26: '0' .. '7'
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:863:25: ( '0' .. '7' )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:863:26: '0' .. '7'
{
- matchRange('0','7'); if (failed) return ;
+ matchRange('0','7'); if (state.failed) return ;
}
@@ -995,13 +1027,13 @@
}
break;
case 3 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:862:9: '\\\\' ( '0' .. '7' )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:864:9: '\\\\' ( '0' .. '7' )
{
- match('\\'); if (failed) return ;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:862:14: ( '0' .. '7' )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:862:15: '0' .. '7'
+ match('\\'); if (state.failed) return ;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:864:14: ( '0' .. '7' )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:864:15: '0' .. '7'
{
- matchRange('0','7'); if (failed) return ;
+ matchRange('0','7'); if (state.failed) return ;
}
@@ -1014,20 +1046,20 @@
finally {
}
}
- // $ANTLR end OctalEscape
+ // $ANTLR end "OctalEscape"
- // $ANTLR start UnicodeEscape
+ // $ANTLR start "UnicodeEscape"
public final void mUnicodeEscape() throws RecognitionException {
try {
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:867:5: ( '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:867:9: '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:869:5: ( '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:869:9: '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit
{
- match('\\'); if (failed) return ;
- match('u'); if (failed) return ;
- mHexDigit(); if (failed) return ;
- mHexDigit(); if (failed) return ;
- mHexDigit(); if (failed) return ;
- mHexDigit(); if (failed) return ;
+ match('\\'); if (state.failed) return ;
+ match('u'); if (state.failed) return ;
+ mHexDigit(); if (state.failed) return ;
+ mHexDigit(); if (state.failed) return ;
+ mHexDigit(); if (state.failed) return ;
+ mHexDigit(); if (state.failed) return ;
}
@@ -1035,16 +1067,17 @@
finally {
}
}
- // $ANTLR end UnicodeEscape
+ // $ANTLR end "UnicodeEscape"
- // $ANTLR start BOOL
+ // $ANTLR start "BOOL"
public final void mBOOL() throws RecognitionException {
try {
int _type = BOOL;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:871:2: ( ( 'true' | 'false' ) )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:871:4: ( 'true' | 'false' )
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:873:2: ( ( 'true' | 'false' ) )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:873:4: ( 'true' | 'false' )
{
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:871:4: ( 'true' | 'false' )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:873:4: ( 'true' | 'false' )
int alt13=2;
int LA13_0 = input.LA(1);
@@ -1055,25 +1088,25 @@
alt13=2;
}
else {
- if (backtracking>0) {failed=true; return ;}
+ if (state.backtracking>0) {state.failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("871:4: ( 'true' | 'false' )", 13, 0, input);
+ new NoViableAltException("", 13, 0, input);
throw nvae;
}
switch (alt13) {
case 1 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:871:5: 'true'
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:873:5: 'true'
{
- match("true"); if (failed) return ;
+ match("true"); if (state.failed) return ;
}
break;
case 2 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:871:12: 'false'
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:873:12: 'false'
{
- match("false"); if (failed) return ;
+ match("false"); if (state.failed) return ;
}
@@ -1084,22 +1117,24 @@
}
- this.type = _type;
+ state.type = _type;
+ state.channel = _channel;
}
finally {
}
}
- // $ANTLR end BOOL
+ // $ANTLR end "BOOL"
- // $ANTLR start VAR
+ // $ANTLR start "VAR"
public final void mVAR() throws RecognitionException {
try {
int _type = VAR;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:874:6: ( '?' ( SYMBOL_CHAR )+ )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:874:8: '?' ( SYMBOL_CHAR )+
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:876:6: ( '?' ( SYMBOL_CHAR )+ )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:876:8: '?' ( SYMBOL_CHAR )+
{
- match('?'); if (failed) return ;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:874:12: ( SYMBOL_CHAR )+
+ match('?'); if (state.failed) return ;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:876:12: ( SYMBOL_CHAR )+
int cnt14=0;
loop14:
do {
@@ -1113,16 +1148,16 @@
switch (alt14) {
case 1 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:874:12: SYMBOL_CHAR
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:876:12: SYMBOL_CHAR
{
- mSYMBOL_CHAR(); if (failed) return ;
+ mSYMBOL_CHAR(); if (state.failed) return ;
}
break;
default :
if ( cnt14 >= 1 ) break loop14;
- if (backtracking>0) {failed=true; return ;}
+ if (state.backtracking>0) {state.failed=true; return ;}
EarlyExitException eee =
new EarlyExitException(14, input);
throw eee;
@@ -1133,22 +1168,24 @@
}
- this.type = _type;
+ state.type = _type;
+ state.channel = _channel;
}
finally {
}
}
- // $ANTLR end VAR
+ // $ANTLR end "VAR"
- // $ANTLR start SH_STYLE_SINGLE_LINE_COMMENT
+ // $ANTLR start "SH_STYLE_SINGLE_LINE_COMMENT"
public final void mSH_STYLE_SINGLE_LINE_COMMENT() throws RecognitionException {
try {
int _type = SH_STYLE_SINGLE_LINE_COMMENT;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:878:2: ( '#' ( options {greedy=false; } : . )* EOL )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:878:4: '#' ( options {greedy=false; } : . )* EOL
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:880:2: ( '#' ( options {greedy=false; } : . )* EOL )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:880:4: '#' ( options {greedy=false; } : . )* EOL
{
- match('#'); if (failed) return ;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:878:8: ( options {greedy=false; } : . )*
+ match('#'); if (state.failed) return ;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:880:8: ( options {greedy=false; } : . )*
loop15:
do {
int alt15=2;
@@ -1160,16 +1197,16 @@
else if ( (LA15_0=='\n') ) {
alt15=2;
}
- else if ( ((LA15_0>='\u0000' && LA15_0<='\t')||(LA15_0>='\u000B' && LA15_0<='\f')||(LA15_0>='\u000E' && LA15_0<='\uFFFE')) ) {
+ else if ( ((LA15_0>='\u0000' && LA15_0<='\t')||(LA15_0>='\u000B' && LA15_0<='\f')||(LA15_0>='\u000E' && LA15_0<='\uFFFF')) ) {
alt15=1;
}
switch (alt15) {
case 1 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:878:35: .
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:880:35: .
{
- matchAny(); if (failed) return ;
+ matchAny(); if (state.failed) return ;
}
break;
@@ -1179,30 +1216,32 @@
}
} while (true);
- mEOL(); if (failed) return ;
- if ( backtracking==0 ) {
- channel=HIDDEN;
+ mEOL(); if (state.failed) return ;
+ if ( state.backtracking==0 ) {
+ _channel=HIDDEN;
}
}
- this.type = _type;
+ state.type = _type;
+ state.channel = _channel;
}
finally {
}
}
- // $ANTLR end SH_STYLE_SINGLE_LINE_COMMENT
+ // $ANTLR end "SH_STYLE_SINGLE_LINE_COMMENT"
- // $ANTLR start C_STYLE_SINGLE_LINE_COMMENT
+ // $ANTLR start "C_STYLE_SINGLE_LINE_COMMENT"
public final void mC_STYLE_SINGLE_LINE_COMMENT() throws RecognitionException {
try {
int _type = C_STYLE_SINGLE_LINE_COMMENT;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:884:2: ( '//' ( options {greedy=false; } : . )* EOL )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:884:4: '//' ( options {greedy=false; } : . )* EOL
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:886:2: ( '//' ( options {greedy=false; } : . )* EOL )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:886:4: '//' ( options {greedy=false; } : . )* EOL
{
- match("//"); if (failed) return ;
+ match("//"); if (state.failed) return ;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:884:9: ( options {greedy=false; } : . )*
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:886:9: ( options {greedy=false; } : . )*
loop16:
do {
int alt16=2;
@@ -1214,16 +1253,16 @@
else if ( (LA16_0=='\n') ) {
alt16=2;
}
- else if ( ((LA16_0>='\u0000' && LA16_0<='\t')||(LA16_0>='\u000B' && LA16_0<='\f')||(LA16_0>='\u000E' && LA16_0<='\uFFFE')) ) {
+ else if ( ((LA16_0>='\u0000' && LA16_0<='\t')||(LA16_0>='\u000B' && LA16_0<='\f')||(LA16_0>='\u000E' && LA16_0<='\uFFFF')) ) {
alt16=1;
}
switch (alt16) {
case 1 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:884:36: .
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:886:36: .
{
- matchAny(); if (failed) return ;
+ matchAny(); if (state.failed) return ;
}
break;
@@ -1233,247 +1272,273 @@
}
} while (true);
- mEOL(); if (failed) return ;
- if ( backtracking==0 ) {
- channel=HIDDEN;
+ mEOL(); if (state.failed) return ;
+ if ( state.backtracking==0 ) {
+ _channel=HIDDEN;
}
}
- this.type = _type;
+ state.type = _type;
+ state.channel = _channel;
}
finally {
}
}
- // $ANTLR end C_STYLE_SINGLE_LINE_COMMENT
+ // $ANTLR end "C_STYLE_SINGLE_LINE_COMMENT"
- // $ANTLR start LEFT_PAREN
+ // $ANTLR start "LEFT_PAREN"
public final void mLEFT_PAREN() throws RecognitionException {
try {
int _type = LEFT_PAREN;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:890:2: ( '(' )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:890:4: '('
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:892:2: ( '(' )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:892:4: '('
{
- match('('); if (failed) return ;
+ match('('); if (state.failed) return ;
}
- this.type = _type;
+ state.type = _type;
+ state.channel = _channel;
}
finally {
}
}
- // $ANTLR end LEFT_PAREN
+ // $ANTLR end "LEFT_PAREN"
- // $ANTLR start RIGHT_PAREN
+ // $ANTLR start "RIGHT_PAREN"
public final void mRIGHT_PAREN() throws RecognitionException {
try {
int _type = RIGHT_PAREN;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:894:2: ( ')' )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:894:4: ')'
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:896:2: ( ')' )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:896:4: ')'
{
- match(')'); if (failed) return ;
+ match(')'); if (state.failed) return ;
}
- this.type = _type;
+ state.type = _type;
+ state.channel = _channel;
}
finally {
}
}
- // $ANTLR end RIGHT_PAREN
+ // $ANTLR end "RIGHT_PAREN"
- // $ANTLR start LEFT_SQUARE
+ // $ANTLR start "LEFT_SQUARE"
public final void mLEFT_SQUARE() throws RecognitionException {
try {
int _type = LEFT_SQUARE;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:898:2: ( '[' )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:898:4: '['
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:900:2: ( '[' )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:900:4: '['
{
- match('['); if (failed) return ;
+ match('['); if (state.failed) return ;
}
- this.type = _type;
+ state.type = _type;
+ state.channel = _channel;
}
finally {
}
}
- // $ANTLR end LEFT_SQUARE
+ // $ANTLR end "LEFT_SQUARE"
- // $ANTLR start RIGHT_SQUARE
+ // $ANTLR start "RIGHT_SQUARE"
public final void mRIGHT_SQUARE() throws RecognitionException {
try {
int _type = RIGHT_SQUARE;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:902:2: ( ']' )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:902:4: ']'
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:904:2: ( ']' )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:904:4: ']'
{
- match(']'); if (failed) return ;
+ match(']'); if (state.failed) return ;
}
- this.type = _type;
+ state.type = _type;
+ state.channel = _channel;
}
finally {
}
}
- // $ANTLR end RIGHT_SQUARE
+ // $ANTLR end "RIGHT_SQUARE"
- // $ANTLR start LEFT_CURLY
+ // $ANTLR start "LEFT_CURLY"
public final void mLEFT_CURLY() throws RecognitionException {
try {
int _type = LEFT_CURLY;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:906:2: ( '{' )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:906:4: '{'
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:908:2: ( '{' )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:908:4: '{'
{
- match('{'); if (failed) return ;
+ match('{'); if (state.failed) return ;
}
- this.type = _type;
+ state.type = _type;
+ state.channel = _channel;
}
finally {
}
}
- // $ANTLR end LEFT_CURLY
+ // $ANTLR end "LEFT_CURLY"
- // $ANTLR start RIGHT_CURLY
+ // $ANTLR start "RIGHT_CURLY"
public final void mRIGHT_CURLY() throws RecognitionException {
try {
int _type = RIGHT_CURLY;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:910:2: ( '}' )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:910:4: '}'
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:912:2: ( '}' )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:912:4: '}'
{
- match('}'); if (failed) return ;
+ match('}'); if (state.failed) return ;
}
- this.type = _type;
+ state.type = _type;
+ state.channel = _channel;
}
finally {
}
}
- // $ANTLR end RIGHT_CURLY
+ // $ANTLR end "RIGHT_CURLY"
- // $ANTLR start TILDE
+ // $ANTLR start "TILDE"
public final void mTILDE() throws RecognitionException {
try {
int _type = TILDE;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:913:7: ( '~' )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:913:9: '~'
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:915:7: ( '~' )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:915:9: '~'
{
- match('~'); if (failed) return ;
+ match('~'); if (state.failed) return ;
}
- this.type = _type;
+ state.type = _type;
+ state.channel = _channel;
}
finally {
}
}
- // $ANTLR end TILDE
+ // $ANTLR end "TILDE"
- // $ANTLR start AMPERSAND
+ // $ANTLR start "AMPERSAND"
public final void mAMPERSAND() throws RecognitionException {
try {
int _type = AMPERSAND;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:917:2: ( '&' )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:917:4: '&'
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:919:2: ( '&' )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:919:4: '&'
{
- match('&'); if (failed) return ;
+ match('&'); if (state.failed) return ;
}
- this.type = _type;
+ state.type = _type;
+ state.channel = _channel;
}
finally {
}
}
- // $ANTLR end AMPERSAND
+ // $ANTLR end "AMPERSAND"
- // $ANTLR start PIPE
+ // $ANTLR start "PIPE"
public final void mPIPE() throws RecognitionException {
try {
int _type = PIPE;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:921:2: ( '|' )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:921:4: '|'
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:923:2: ( '|' )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:923:4: '|'
{
- match('|'); if (failed) return ;
+ match('|'); if (state.failed) return ;
}
- this.type = _type;
+ state.type = _type;
+ state.channel = _channel;
}
finally {
}
}
- // $ANTLR end PIPE
+ // $ANTLR end "PIPE"
- // $ANTLR start ASSIGN_OP
+ // $ANTLR start "ASSIGN_OP"
public final void mASSIGN_OP() throws RecognitionException {
try {
int _type = ASSIGN_OP;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:925:2: ( '<-' )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:925:4: '<-'
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:927:2: ( '<-' )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:927:4: '<-'
{
- match("<-"); if (failed) return ;
+ match("<-"); if (state.failed) return ;
}
- this.type = _type;
+ state.type = _type;
+ state.channel = _channel;
}
finally {
}
}
- // $ANTLR end ASSIGN_OP
+ // $ANTLR end "ASSIGN_OP"
- // $ANTLR start COLON
+ // $ANTLR start "COLON"
public final void mCOLON() throws RecognitionException {
try {
int _type = COLON;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:928:7: ( ':' )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:928:9: ':'
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:930:7: ( ':' )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:930:9: ':'
{
- match(':'); if (failed) return ;
+ match(':'); if (state.failed) return ;
}
- this.type = _type;
+ state.type = _type;
+ state.channel = _channel;
}
finally {
}
}
- // $ANTLR end COLON
+ // $ANTLR end "COLON"
- // $ANTLR start EQUALS
+ // $ANTLR start "EQUALS"
public final void mEQUALS() throws RecognitionException {
try {
int _type = EQUALS;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:930:8: ( '=' )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:930:10: '='
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:932:8: ( '=' )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:932:10: '='
{
- match('='); if (failed) return ;
+ match('='); if (state.failed) return ;
}
- this.type = _type;
+ state.type = _type;
+ state.channel = _channel;
}
finally {
}
}
- // $ANTLR end EQUALS
+ // $ANTLR end "EQUALS"
- // $ANTLR start MULTI_LINE_COMMENT
+ // $ANTLR start "MULTI_LINE_COMMENT"
public final void mMULTI_LINE_COMMENT() throws RecognitionException {
try {
int _type = MULTI_LINE_COMMENT;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:933:2: ( '/*' ( options {greedy=false; } : . )* '*/' )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:933:4: '/*' ( options {greedy=false; } : . )* '*/'
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:935:2: ( '/*' ( options {greedy=false; } : . )* '*/' )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:935:4: '/*' ( options {greedy=false; } : . )* '*/'
{
- match("/*"); if (failed) return ;
+ match("/*"); if (state.failed) return ;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:933:9: ( options {greedy=false; } : . )*
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:935:9: ( options {greedy=false; } : . )*
loop17:
do {
int alt17=2;
@@ -1485,22 +1550,22 @@
if ( (LA17_1=='/') ) {
alt17=2;
}
- else if ( ((LA17_1>='\u0000' && LA17_1<='.')||(LA17_1>='0' && LA17_1<='\uFFFE')) ) {
+ else if ( ((LA17_1>='\u0000' && LA17_1<='.')||(LA17_1>='0' && LA17_1<='\uFFFF')) ) {
alt17=1;
}
}
- else if ( ((LA17_0>='\u0000' && LA17_0<=')')||(LA17_0>='+' && LA17_0<='\uFFFE')) ) {
+ else if ( ((LA17_0>='\u0000' && LA17_0<=')')||(LA17_0>='+' && LA17_0<='\uFFFF')) ) {
alt17=1;
}
switch (alt17) {
case 1 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:933:35: .
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:935:35: .
{
- matchAny(); if (failed) return ;
+ matchAny(); if (state.failed) return ;
}
break;
@@ -1510,47 +1575,50 @@
}
} while (true);
- match("*/"); if (failed) return ;
+ match("*/"); if (state.failed) return ;
- if ( backtracking==0 ) {
- channel=HIDDEN;
+ if ( state.backtracking==0 ) {
+ _channel=HIDDEN;
}
}
- this.type = _type;
+ state.type = _type;
+ state.channel = _channel;
}
finally {
}
}
- // $ANTLR end MULTI_LINE_COMMENT
+ // $ANTLR end "MULTI_LINE_COMMENT"
- // $ANTLR start NAME
+ // $ANTLR start "NAME"
public final void mNAME() throws RecognitionException {
try {
int _type = NAME;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:937:6: ( SYMBOL )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:937:8: SYMBOL
+ int _channel = DEFAULT_TOKEN_CHANNEL;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:939:6: ( SYMBOL )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:939:8: SYMBOL
{
- mSYMBOL(); if (failed) return ;
+ mSYMBOL(); if (state.failed) return ;
}
- this.type = _type;
+ state.type = _type;
+ state.channel = _channel;
}
finally {
}
}
- // $ANTLR end NAME
+ // $ANTLR end "NAME"
- // $ANTLR start SYMBOL
+ // $ANTLR start "SYMBOL"
public final void mSYMBOL() throws RecognitionException {
try {
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:940:8: ( FIRST_SYMBOL_CHAR ( SYMBOL_CHAR )* )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:940:10: FIRST_SYMBOL_CHAR ( SYMBOL_CHAR )*
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:942:8: ( FIRST_SYMBOL_CHAR ( SYMBOL_CHAR )* )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:942:10: FIRST_SYMBOL_CHAR ( SYMBOL_CHAR )*
{
- mFIRST_SYMBOL_CHAR(); if (failed) return ;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:940:28: ( SYMBOL_CHAR )*
+ mFIRST_SYMBOL_CHAR(); if (state.failed) return ;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:942:28: ( SYMBOL_CHAR )*
loop18:
do {
int alt18=2;
@@ -1563,9 +1631,9 @@
switch (alt18) {
case 1 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:940:28: SYMBOL_CHAR
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:942:28: SYMBOL_CHAR
{
- mSYMBOL_CHAR(); if (failed) return ;
+ mSYMBOL_CHAR(); if (state.failed) return ;
}
break;
@@ -1582,24 +1650,23 @@
finally {
}
}
- // $ANTLR end SYMBOL
+ // $ANTLR end "SYMBOL"
- // $ANTLR start FIRST_SYMBOL_CHAR
+ // $ANTLR start "FIRST_SYMBOL_CHAR"
public final void mFIRST_SYMBOL_CHAR() throws RecognitionException {
try {
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:945:19: ( ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '!' | '$' | '%' | '^' | '*' | '_' | '-' | '+' | '=' | '\\\\' | '/' | '@' | '#' | ':' | '>' | '<' | ',' | '.' | '[' | ']' | '{' | '}' ) )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:945:21: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '!' | '$' | '%' | '^' | '*' | '_' | '-' | '+' | '=' | '\\\\' | '/' | '@' | '#' | ':' | '>' | '<' | ',' | '.' | '[' | ']' | '{' | '}' )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:947:19: ( ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '!' | '$' | '%' | '^' | '*' | '_' | '-' | '+' | '=' | '\\\\' | '/' | '@' | '#' | ':' | '>' | '<' | ',' | '.' | '[' | ']' | '{' | '}' ) )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:947:21: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '!' | '$' | '%' | '^' | '*' | '_' | '-' | '+' | '=' | '\\\\' | '/' | '@' | '#' | ':' | '>' | '<' | ',' | '.' | '[' | ']' | '{' | '}' )
{
if ( input.LA(1)=='!'||(input.LA(1)>='#' && input.LA(1)<='%')||(input.LA(1)>='*' && input.LA(1)<=':')||(input.LA(1)>='<' && input.LA(1)<='>')||(input.LA(1)>='@' && input.LA(1)<='_')||(input.LA(1)>='a' && input.LA(1)<='{')||input.LA(1)=='}' ) {
input.consume();
- failed=false;
+ state.failed=false;
}
else {
- if (backtracking>0) {failed=true; return ;}
- MismatchedSetException mse =
- new MismatchedSetException(null,input);
- recover(mse); throw mse;
- }
+ if (state.backtracking>0) {state.failed=true; return ;}
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
}
@@ -1608,24 +1675,23 @@
finally {
}
}
- // $ANTLR end FIRST_SYMBOL_CHAR
+ // $ANTLR end "FIRST_SYMBOL_CHAR"
- // $ANTLR start SYMBOL_CHAR
+ // $ANTLR start "SYMBOL_CHAR"
public final void mSYMBOL_CHAR() throws RecognitionException {
try {
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:950:13: ( ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '!' | '$' | '%' | '^' | '*' | '_' | '-' | '+' | '=' | '\\\\' | '/' | '@' | '#' | ':' | '>' | ',' | '.' | '[' | ']' | '{' | '}' | '?' ) )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:950:15: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '!' | '$' | '%' | '^' | '*' | '_' | '-' | '+' | '=' | '\\\\' | '/' | '@' | '#' | ':' | '>' | ',' | '.' | '[' | ']' | '{' | '}' | '?' )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:952:13: ( ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '!' | '$' | '%' | '^' | '*' | '_' | '-' | '+' | '=' | '\\\\' | '/' | '@' | '#' | ':' | '>' | ',' | '.' | '[' | ']' | '{' | '}' | '?' ) )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:952:15: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '!' | '$' | '%' | '^' | '*' | '_' | '-' | '+' | '=' | '\\\\' | '/' | '@' | '#' | ':' | '>' | ',' | '.' | '[' | ']' | '{' | '}' | '?' )
{
if ( input.LA(1)=='!'||(input.LA(1)>='#' && input.LA(1)<='%')||(input.LA(1)>='*' && input.LA(1)<=':')||(input.LA(1)>='=' && input.LA(1)<='_')||(input.LA(1)>='a' && input.LA(1)<='{')||input.LA(1)=='}' ) {
input.consume();
- failed=false;
+ state.failed=false;
}
else {
- if (backtracking>0) {failed=true; return ;}
- MismatchedSetException mse =
- new MismatchedSetException(null,input);
- recover(mse); throw mse;
- }
+ if (state.backtracking>0) {state.failed=true; return ;}
+ MismatchedSetException mse = new MismatchedSetException(null,input);
+ recover(mse);
+ throw mse;}
}
@@ -1634,255 +1700,255 @@
finally {
}
}
- // $ANTLR end SYMBOL_CHAR
+ // $ANTLR end "SYMBOL_CHAR"
public void mTokens() throws RecognitionException {
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:1:8: ( T45 | T46 | WS | DEFTEMPLATE | 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 )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:1:8: ( T__45 | T__46 | WS | DEFTEMPLATE | 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=35;
alt19 = dfa19.predict(input);
switch (alt19) {
case 1 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:1:10: T45
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:1:10: T__45
{
- mT45(); if (failed) return ;
+ mT__45(); if (state.failed) return ;
}
break;
case 2 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:1:14: T46
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:1:16: T__46
{
- mT46(); if (failed) return ;
+ mT__46(); if (state.failed) return ;
}
break;
case 3 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:1:18: WS
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:1:22: WS
{
- mWS(); if (failed) return ;
+ mWS(); if (state.failed) return ;
}
break;
case 4 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:1:21: DEFTEMPLATE
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:1:25: DEFTEMPLATE
{
- mDEFTEMPLATE(); if (failed) return ;
+ mDEFTEMPLATE(); if (state.failed) return ;
}
break;
case 5 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:1:33: DEFRULE
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:1:37: DEFRULE
{
- mDEFRULE(); if (failed) return ;
+ mDEFRULE(); if (state.failed) return ;
}
break;
case 6 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:1:41: DEFFUNCTION
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:1:45: DEFFUNCTION
{
- mDEFFUNCTION(); if (failed) return ;
+ mDEFFUNCTION(); if (state.failed) return ;
}
break;
case 7 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:1:53: OR
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:1:57: OR
{
- mOR(); if (failed) return ;
+ mOR(); if (state.failed) return ;
}
break;
case 8 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:1:56: AND
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:1:60: AND
{
- mAND(); if (failed) return ;
+ mAND(); if (state.failed) return ;
}
break;
case 9 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:1:60: NOT
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:1:64: NOT
{
- mNOT(); if (failed) return ;
+ mNOT(); if (state.failed) return ;
}
break;
case 10 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:1:64: EXISTS
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:1:68: EXISTS
{
- mEXISTS(); if (failed) return ;
+ mEXISTS(); if (state.failed) return ;
}
break;
case 11 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:1:71: TEST
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:1:75: TEST
{
- mTEST(); if (failed) return ;
+ mTEST(); if (state.failed) return ;
}
break;
case 12 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:1:76: NULL
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:1:80: NULL
{
- mNULL(); if (failed) return ;
+ mNULL(); if (state.failed) return ;
}
break;
case 13 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:1:81: DECLARE
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:1:85: DECLARE
{
- mDECLARE(); if (failed) return ;
+ mDECLARE(); if (state.failed) return ;
}
break;
case 14 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:1:89: SALIENCE
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:1:93: SALIENCE
{
- mSALIENCE(); if (failed) return ;
+ mSALIENCE(); if (state.failed) return ;
}
break;
case 15 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:1:98: INT
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:1:102: INT
{
- mINT(); if (failed) return ;
+ mINT(); if (state.failed) return ;
}
break;
case 16 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:1:102: FLOAT
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:1:106: FLOAT
{
- mFLOAT(); if (failed) return ;
+ mFLOAT(); if (state.failed) return ;
}
break;
case 17 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:1:108: STRING
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:1:112: STRING
{
- mSTRING(); if (failed) return ;
+ mSTRING(); if (state.failed) return ;
}
break;
case 18 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:1:115: BOOL
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:1:119: BOOL
{
- mBOOL(); if (failed) return ;
+ mBOOL(); if (state.failed) return ;
}
break;
case 19 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:1:120: VAR
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:1:124: VAR
{
- mVAR(); if (failed) return ;
+ mVAR(); if (state.failed) return ;
}
break;
case 20 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:1:124: SH_STYLE_SINGLE_LINE_COMMENT
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:1:128: SH_STYLE_SINGLE_LINE_COMMENT
{
- mSH_STYLE_SINGLE_LINE_COMMENT(); if (failed) return ;
+ mSH_STYLE_SINGLE_LINE_COMMENT(); if (state.failed) return ;
}
break;
case 21 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:1:153: C_STYLE_SINGLE_LINE_COMMENT
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:1:157: C_STYLE_SINGLE_LINE_COMMENT
{
- mC_STYLE_SINGLE_LINE_COMMENT(); if (failed) return ;
+ mC_STYLE_SINGLE_LINE_COMMENT(); if (state.failed) return ;
}
break;
case 22 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:1:181: LEFT_PAREN
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:1:185: LEFT_PAREN
{
- mLEFT_PAREN(); if (failed) return ;
+ mLEFT_PAREN(); if (state.failed) return ;
}
break;
case 23 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:1:192: RIGHT_PAREN
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:1:196: RIGHT_PAREN
{
- mRIGHT_PAREN(); if (failed) return ;
+ mRIGHT_PAREN(); if (state.failed) return ;
}
break;
case 24 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:1:204: LEFT_SQUARE
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:1:208: LEFT_SQUARE
{
- mLEFT_SQUARE(); if (failed) return ;
+ mLEFT_SQUARE(); if (state.failed) return ;
}
break;
case 25 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:1:216: RIGHT_SQUARE
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:1:220: RIGHT_SQUARE
{
- mRIGHT_SQUARE(); if (failed) return ;
+ mRIGHT_SQUARE(); if (state.failed) return ;
}
break;
case 26 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:1:229: LEFT_CURLY
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:1:233: LEFT_CURLY
{
- mLEFT_CURLY(); if (failed) return ;
+ mLEFT_CURLY(); if (state.failed) return ;
}
break;
case 27 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:1:240: RIGHT_CURLY
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:1:244: RIGHT_CURLY
{
- mRIGHT_CURLY(); if (failed) return ;
+ mRIGHT_CURLY(); if (state.failed) return ;
}
break;
case 28 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:1:252: TILDE
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:1:256: TILDE
{
- mTILDE(); if (failed) return ;
+ mTILDE(); if (state.failed) return ;
}
break;
case 29 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:1:258: AMPERSAND
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:1:262: AMPERSAND
{
- mAMPERSAND(); if (failed) return ;
+ mAMPERSAND(); if (state.failed) return ;
}
break;
case 30 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:1:268: PIPE
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:1:272: PIPE
{
- mPIPE(); if (failed) return ;
+ mPIPE(); if (state.failed) return ;
}
break;
case 31 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:1:273: ASSIGN_OP
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:1:277: ASSIGN_OP
{
- mASSIGN_OP(); if (failed) return ;
+ mASSIGN_OP(); if (state.failed) return ;
}
break;
case 32 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:1:283: COLON
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:1:287: COLON
{
- mCOLON(); if (failed) return ;
+ mCOLON(); if (state.failed) return ;
}
break;
case 33 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:1:289: EQUALS
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:1:293: EQUALS
{
- mEQUALS(); if (failed) return ;
+ mEQUALS(); if (state.failed) return ;
}
break;
case 34 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:1:296: MULTI_LINE_COMMENT
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:1:300: MULTI_LINE_COMMENT
{
- mMULTI_LINE_COMMENT(); if (failed) return ;
+ mMULTI_LINE_COMMENT(); if (state.failed) return ;
}
break;
case 35 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:1:315: NAME
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:1:319: NAME
{
- mNAME(); if (failed) return ;
+ mNAME(); if (state.failed) return ;
}
break;
@@ -1891,80 +1957,82 @@
}
- // $ANTLR start synpred1
- public final void synpred1_fragment() throws RecognitionException {
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:829:14: ( '\\r\\n' )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:829:16: '\\r\\n'
+ // $ANTLR start synpred1_Clips
+ public final void synpred1_Clips_fragment() throws RecognitionException {
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:831:14: ( '\\r\\n' )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:831:16: '\\r\\n'
{
- match("\r\n"); if (failed) return ;
+ match("\r\n"); if (state.failed) return ;
}
}
- // $ANTLR end synpred1
+ // $ANTLR end synpred1_Clips
- public final boolean synpred1() {
- backtracking++;
+ public final boolean synpred1_Clips() {
+ state.backtracking++;
int start = input.mark();
try {
- synpred1_fragment(); // can never throw exception
+ synpred1_Clips_fragment(); // can never throw exception
} catch (RecognitionException re) {
System.err.println("impossible: "+re);
}
- boolean success = !failed;
+ boolean success = !state.failed;
input.rewind(start);
- backtracking--;
- failed=false;
+ state.backtracking--;
+ state.failed=false;
return success;
}
protected DFA19 dfa19 = new DFA19(this);
static final String DFA19_eotS =
- "\1\uffff\1\35\1\40\1\uffff\10\35\1\53\1\uffff\1\35\1\uffff\2\35"+
+ "\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\53\1\uffff\3\35\1\uffff\2\35\4\uffff\1"+
- "\113\1\uffff\1\35\1\uffff\2\35\1\uffff\1\121\1\122\5\35\1\130\2"+
- "\35\1\uffff\1\35\1\uffff\1\35\1\uffff\5\35\2\uffff\1\140\1\35\1"+
- "\142\1\143\1\35\1\uffff\1\35\1\111\5\35\1\uffff\1\35\2\uffff\1\35"+
- "\1\142\1\155\4\35\1\162\1\35\1\uffff\2\35\1\166\1\167\1\uffff\3"+
- "\35\2\uffff\1\173\2\35\1\uffff\2\35\1\u0080\1\u0081\2\uffff";
+ "\1\uffff\1\35\1\74\7\35\1\54\1\35\1\uffff\1\35\1\uffff\3\35\4\uffff"+
+ "\1\113\1\uffff\1\35\1\uffff\2\35\1\uffff\1\121\1\122\5\35\1\130"+
+ "\2\35\1\uffff\1\35\1\uffff\1\35\1\uffff\5\35\2\uffff\1\140\1\35"+
+ "\1\142\1\143\1\35\1\uffff\1\35\1\111\5\35\1\uffff\1\35\2\uffff\1"+
+ "\35\1\143\1\155\4\35\1\162\1\35\1\uffff\1\35\1\165\1\35\1\167\1"+
+ "\uffff\2\35\1\uffff\1\35\1\uffff\1\173\2\35\1\uffff\2\35\1\u0080"+
+ "\1\u0081\2\uffff";
static final String DFA19_eofS =
"\u0082\uffff";
static final String DFA19_minS =
"\1\11\1\155\1\41\1\uffff\1\145\1\162\1\156\1\157\1\170\1\145\1\141"+
"\1\60\1\41\1\uffff\1\141\1\uffff\1\0\1\52\2\uffff\4\41\3\uffff\1"+
"\55\1\41\1\uffff\1\160\1\41\1\uffff\1\143\1\41\1\144\1\164\1\154"+
- "\1\151\1\165\1\163\1\154\1\41\1\uffff\1\60\1\154\1\0\1\uffff\2\0"+
- "\4\uffff\1\41\1\uffff\1\157\1\uffff\1\146\1\154\1\uffff\2\41\1\154"+
- "\1\163\1\145\1\164\1\151\1\41\1\163\1\0\1\uffff\1\0\1\uffff\1\0"+
- "\1\uffff\1\162\1\165\1\145\1\165\1\141\2\uffff\1\41\1\164\2\41\1"+
- "\145\1\uffff\1\145\1\41\1\164\1\156\1\155\1\154\1\162\1\uffff\1"+
- "\163\2\uffff\1\156\2\41\1\143\1\160\2\145\1\41\1\143\1\uffff\1\164"+
- "\1\154\2\41\1\uffff\1\145\1\151\1\141\2\uffff\1\41\1\157\1\164\1"+
- "\uffff\1\156\1\145\2\41\2\uffff";
+ "\1\151\1\163\1\165\1\154\1\41\1\60\1\uffff\1\154\1\uffff\3\0\4\uffff"+
+ "\1\41\1\uffff\1\157\1\uffff\1\146\1\154\1\uffff\2\41\1\154\1\163"+
+ "\1\164\1\145\1\151\1\41\1\163\1\0\1\uffff\1\0\1\uffff\1\0\1\uffff"+
+ "\1\162\1\145\2\165\1\141\2\uffff\1\41\1\164\2\41\1\145\1\uffff\1"+
+ "\145\1\41\1\164\1\155\1\154\1\156\1\162\1\uffff\1\163\2\uffff\1"+
+ "\156\2\41\1\160\1\145\1\143\1\145\1\41\1\143\1\uffff\1\154\1\41"+
+ "\1\164\1\41\1\uffff\1\145\1\141\1\uffff\1\151\1\uffff\1\41\1\164"+
+ "\1\157\1\uffff\1\145\1\156\2\41\2\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"+
+ "\141\1\71\1\175\1\uffff\1\141\1\uffff\1\uffff\1\57\2\uffff\4\175"+
"\3\uffff\1\55\1\175\1\uffff\1\160\1\175\1\uffff\1\146\1\175\1\144"+
- "\1\164\1\154\1\151\1\165\1\163\1\154\1\175\1\uffff\1\71\1\154\1"+
- "\ufffe\1\uffff\2\ufffe\4\uffff\1\175\1\uffff\1\157\1\uffff\1\164"+
- "\1\154\1\uffff\2\175\1\154\1\163\1\145\1\164\1\151\1\175\1\163\1"+
- "\ufffe\1\uffff\1\ufffe\1\uffff\1\ufffe\1\uffff\1\162\1\165\1\145"+
- "\1\165\1\141\2\uffff\1\175\1\164\2\175\1\145\1\uffff\1\145\1\175"+
- "\1\164\1\156\1\155\1\154\1\162\1\uffff\1\163\2\uffff\1\156\2\175"+
- "\1\143\1\160\2\145\1\175\1\143\1\uffff\1\164\1\154\2\175\1\uffff"+
- "\1\145\1\151\1\141\2\uffff\1\175\1\157\1\164\1\uffff\1\156\1\145"+
- "\2\175\2\uffff";
+ "\1\164\1\154\1\151\1\163\1\165\1\154\1\175\1\71\1\uffff\1\154\1"+
+ "\uffff\3\uffff\4\uffff\1\175\1\uffff\1\157\1\uffff\1\164\1\154\1"+
+ "\uffff\2\175\1\154\1\163\1\164\1\145\1\151\1\175\1\163\1\uffff\1"+
+ "\uffff\1\uffff\1\uffff\1\uffff\1\uffff\1\162\1\145\2\165\1\141\2"+
+ "\uffff\1\175\1\164\2\175\1\145\1\uffff\1\145\1\175\1\164\1\155\1"+
+ "\154\1\156\1\162\1\uffff\1\163\2\uffff\1\156\2\175\1\160\1\145\1"+
+ "\143\1\145\1\175\1\143\1\uffff\1\154\1\175\1\164\1\175\1\uffff\1"+
+ "\145\1\141\1\uffff\1\151\1\uffff\1\175\1\164\1\157\1\uffff\1\145"+
+ "\1\156\2\175\2\uffff";
static final String DFA19_acceptS =
"\3\uffff\1\3\11\uffff\1\21\1\uffff\1\23\2\uffff\1\26\1\27\4\uffff"+
- "\1\34\1\35\1\36\2\uffff\1\43\2\uffff\1\41\12\uffff\1\17\3\uffff"+
- "\1\24\2\uffff\1\30\1\31\1\32\1\33\1\uffff\1\40\1\uffff\1\2\2\uffff"+
+ "\1\34\1\35\1\36\2\uffff\1\43\2\uffff\1\41\13\uffff\1\17\1\uffff"+
+ "\1\24\3\uffff\1\30\1\31\1\32\1\33\1\uffff\1\40\1\uffff\1\2\2\uffff"+
"\1\7\12\uffff\1\25\1\uffff\1\42\1\uffff\1\37\5\uffff\1\10\1\11\5"+
- "\uffff\1\20\7\uffff\1\14\1\uffff\1\22\1\13\11\uffff\1\1\4\uffff"+
- "\1\12\3\uffff\1\5\1\15\3\uffff\1\16\4\uffff\1\6\1\4";
+ "\uffff\1\20\7\uffff\1\14\1\uffff\1\13\1\22\11\uffff\1\1\4\uffff"+
+ "\1\12\2\uffff\1\5\1\uffff\1\15\3\uffff\1\16\4\uffff\1\4\1\6";
static final String DFA19_specialS =
- "\u0082\uffff}>";
+ "\20\uffff\1\5\36\uffff\1\0\1\4\1\1\24\uffff\1\2\1\uffff\1\3\1\uffff"+
+ "\1\6\67\uffff}>";
static final String[] DFA19_transitionS = {
"\2\3\1\uffff\2\3\22\uffff\1\3\1\35\1\15\1\20\2\35\1\31\1\15"+
"\1\22\1\23\3\35\1\13\1\35\1\21\12\14\1\34\1\uffff\1\33\1\2\1"+
@@ -1972,24 +2040,24 @@
"\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\41\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\44\5\uffff\1\45",
"\1\46",
- "\1\50\14\uffff\1\47",
+ "\1\47\14\uffff\1\50",
"\1\51",
"\12\52",
- "\1\35\1\uffff\3\35\4\uffff\4\35\1\54\1\35\12\52\1\35\2\uffff"+
+ "\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\55",
"",
- "\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\56\1\57\1\56\3\57\4\56\21\57\2\56\43\57\1\56\33\57\1\56"+
+ "\1\57\uff82\56",
"\1\61\4\uffff\1\60",
"",
"",
@@ -2022,18 +2090,18 @@
"\1\101",
"\1\102",
"\1\103",
- "\1\35\1\uffff\3\35\4\uffff\4\35\1\54\1\35\12\52\1\35\2\uffff"+
+ "\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",
"",
- "\12\104",
"\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\56\1\57\1\56\3\57\4\56\21\57\2\56\43\57\1\56\33\57\1\56"+
+ "\1\57\uff82\56",
"\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",
+ "\106\1\107\1\106\uff82\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",
+ "\111\33\112\1\111\1\112\uff82\111",
"",
"",
"",
@@ -2043,7 +2111,7 @@
"",
"\1\114",
"",
- "\1\115\13\uffff\1\117\1\uffff\1\116",
+ "\1\117\13\uffff\1\116\1\uffff\1\115",
"\1\120",
"",
"\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
@@ -2059,13 +2127,13 @@
"\uffff\33\35\1\uffff\1\35",
"\1\131",
"\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",
+ "\106\1\107\1\106\uff82\107",
"",
- "\41\111\1\112\1\111\3\112\4\111\1\110\4\112\1\132\13\112\2\111"+
- "\43\112\1\111\33\112\1\111\1\112\uff81\111",
+ "\41\111\1\112\1\111\3\112\4\111\1\110\4\112\1\132\13\112\2"+
+ "\111\43\112\1\111\33\112\1\111\1\112\uff82\111",
"",
"\41\111\1\112\1\111\3\112\4\111\1\110\20\112\2\111\43\112\1"+
- "\111\33\112\1\111\1\112\uff81\111",
+ "\111\33\112\1\111\1\112\uff82\111",
"",
"\1\133",
"\1\134",
@@ -2084,8 +2152,8 @@
"\1\144",
"",
"\1\145",
- "\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\112\1\uffff\3\112\4\uffff\1\110\20\112\2\uffff\43\112\1"+
+ "\uffff\33\112\1\uffff\1\112",
"\1\146",
"\1\147",
"\1\150",
@@ -2109,17 +2177,17 @@
"\1\163",
"",
"\1\164",
- "\1\165",
"\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\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
"\1\uffff\1\35",
"",
"\1\170",
"\1\171",
+ "",
"\1\172",
"",
- "",
"\1\35\1\uffff\3\35\4\uffff\21\35\2\uffff\43\35\1\uffff\33\35"+
"\1\uffff\1\35",
"\1\174",
@@ -2165,8 +2233,111 @@
this.transition = DFA19_transition;
}
public String getDescription() {
- return "1:1: Tokens : ( T45 | T46 | WS | DEFTEMPLATE | 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 : ( T__45 | T__46 | WS | DEFTEMPLATE | 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 );";
}
+ public int specialStateTransition(int s, IntStream _input) throws NoViableAltException {
+ IntStream input = _input;
+ int _s = s;
+ switch ( s ) {
+ case 0 :
+ int LA19_47 = input.LA(1);
+
+ s = -1;
+ if ( ((LA19_47>='\u0000' && LA19_47<=' ')||LA19_47=='\"'||(LA19_47>='&' && LA19_47<=')')||(LA19_47>=';' && LA19_47<='<')||LA19_47=='`'||LA19_47=='|'||(LA19_47>='~' && LA19_47<='\uFFFF')) ) {s = 46;}
+
+ else if ( (LA19_47=='!'||(LA19_47>='#' && LA19_47<='%')||(LA19_47>='*' && LA19_47<=':')||(LA19_47>='=' && LA19_47<='_')||(LA19_47>='a' && LA19_47<='{')||LA19_47=='}') ) {s = 47;}
+
+ else s = 29;
+
+ if ( s>=0 ) return s;
+ break;
+ case 1 :
+ int LA19_49 = input.LA(1);
+
+ s = -1;
+ if ( (LA19_49=='*') ) {s = 72;}
+
+ else if ( ((LA19_49>='\u0000' && LA19_49<=' ')||LA19_49=='\"'||(LA19_49>='&' && LA19_49<=')')||(LA19_49>=';' && LA19_49<='<')||LA19_49=='`'||LA19_49=='|'||(LA19_49>='~' && LA19_49<='\uFFFF')) ) {s = 73;}
+
+ else if ( (LA19_49=='!'||(LA19_49>='#' && LA19_49<='%')||(LA19_49>='+' && LA19_49<=':')||(LA19_49>='=' && LA19_49<='_')||(LA19_49>='a' && LA19_49<='{')||LA19_49=='}') ) {s = 74;}
+
+ else s = 29;
+
+ if ( s>=0 ) return s;
+ break;
+ case 2 :
+ int LA19_70 = input.LA(1);
+
+ s = -1;
+ if ( (LA19_70=='!'||(LA19_70>='#' && LA19_70<='%')||(LA19_70>='*' && LA19_70<=':')||(LA19_70>='=' && LA19_70<='_')||(LA19_70>='a' && LA19_70<='{')||LA19_70=='}') ) {s = 70;}
+
+ else if ( ((LA19_70>='\u0000' && LA19_70<=' ')||LA19_70=='\"'||(LA19_70>='&' && LA19_70<=')')||(LA19_70>=';' && LA19_70<='<')||LA19_70=='`'||LA19_70=='|'||(LA19_70>='~' && LA19_70<='\uFFFF')) ) {s = 71;}
+
+ else s = 29;
+
+ if ( s>=0 ) return s;
+ break;
+ case 3 :
+ int LA19_72 = input.LA(1);
+
+ s = -1;
+ if ( (LA19_72=='/') ) {s = 90;}
+
+ else if ( (LA19_72=='*') ) {s = 72;}
+
+ else if ( (LA19_72=='!'||(LA19_72>='#' && LA19_72<='%')||(LA19_72>='+' && LA19_72<='.')||(LA19_72>='0' && LA19_72<=':')||(LA19_72>='=' && LA19_72<='_')||(LA19_72>='a' && LA19_72<='{')||LA19_72=='}') ) {s = 74;}
+
+ else if ( ((LA19_72>='\u0000' && LA19_72<=' ')||LA19_72=='\"'||(LA19_72>='&' && LA19_72<=')')||(LA19_72>=';' && LA19_72<='<')||LA19_72=='`'||LA19_72=='|'||(LA19_72>='~' && LA19_72<='\uFFFF')) ) {s = 73;}
+
+ else s = 29;
+
+ if ( s>=0 ) return s;
+ break;
+ case 4 :
+ int LA19_48 = input.LA(1);
+
+ s = -1;
+ if ( (LA19_48=='!'||(LA19_48>='#' && LA19_48<='%')||(LA19_48>='*' && LA19_48<=':')||(LA19_48>='=' && LA19_48<='_')||(LA19_48>='a' && LA19_48<='{')||LA19_48=='}') ) {s = 70;}
+
+ else if ( ((LA19_48>='\u0000' && LA19_48<=' ')||LA19_48=='\"'||(LA19_48>='&' && LA19_48<=')')||(LA19_48>=';' && LA19_48<='<')||LA19_48=='`'||LA19_48=='|'||(LA19_48>='~' && LA19_48<='\uFFFF')) ) {s = 71;}
+
+ else s = 29;
+
+ if ( s>=0 ) return s;
+ break;
+ case 5 :
+ int LA19_16 = input.LA(1);
+
+ s = -1;
+ if ( ((LA19_16>='\u0000' && LA19_16<=' ')||LA19_16=='\"'||(LA19_16>='&' && LA19_16<=')')||(LA19_16>=';' && LA19_16<='<')||LA19_16=='`'||LA19_16=='|'||(LA19_16>='~' && LA19_16<='\uFFFF')) ) {s = 46;}
+
+ else if ( (LA19_16=='!'||(LA19_16>='#' && LA19_16<='%')||(LA19_16>='*' && LA19_16<=':')||(LA19_16>='=' && LA19_16<='_')||(LA19_16>='a' && LA19_16<='{')||LA19_16=='}') ) {s = 47;}
+
+ else s = 29;
+
+ if ( s>=0 ) return s;
+ break;
+ case 6 :
+ int LA19_74 = input.LA(1);
+
+ s = -1;
+ if ( (LA19_74=='*') ) {s = 72;}
+
+ else if ( (LA19_74=='!'||(LA19_74>='#' && LA19_74<='%')||(LA19_74>='+' && LA19_74<=':')||(LA19_74>='=' && LA19_74<='_')||(LA19_74>='a' && LA19_74<='{')||LA19_74=='}') ) {s = 74;}
+
+ else if ( ((LA19_74>='\u0000' && LA19_74<=' ')||LA19_74=='\"'||(LA19_74>='&' && LA19_74<=')')||(LA19_74>=';' && LA19_74<='<')||LA19_74=='`'||LA19_74=='|'||(LA19_74>='~' && LA19_74<='\uFFFF')) ) {s = 73;}
+
+ else s = 29;
+
+ if ( s>=0 ) return s;
+ break;
+ }
+ if (state.backtracking>0) {state.failed=true; return -1;}
+ NoViableAltException nvae =
+ new NoViableAltException(getDescription(), 19, _s, input);
+ error(nvae);
+ throw nvae;
+ }
}
Modified: labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clips/ClipsParser.java
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clips/ClipsParser.java 2008-11-25 21:30:40 UTC (rev 24100)
+++ labs/jbossrules/trunk/drools-clips/src/main/java/org/drools/clips/ClipsParser.java 2008-11-25 21:35:43 UTC (rev 24101)
@@ -1,298 +1,284 @@
-// $ANTLR 3.0.1 C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g 2008-06-26 02:09:38
-
- package org.drools.clips;
-
- import java.util.ArrayList;
+// $ANTLR 3.1.1 /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g 2008-11-24 17:53:58
+
+ package org.drools.clips;
+
+ import org.drools.clips.*;
+
+ 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;
+import java.util.ArrayList;
+import java.util.Map;
import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.antlr.runtime.BitSet;
-import org.antlr.runtime.CommonToken;
-import org.antlr.runtime.EarlyExitException;
-import org.antlr.runtime.FailedPredicateException;
-import org.antlr.runtime.MismatchedNotSetException;
-import org.antlr.runtime.MismatchedSetException;
-import org.antlr.runtime.MismatchedTokenException;
-import org.antlr.runtime.MismatchedTreeNodeException;
-import org.antlr.runtime.NoViableAltException;
-import org.antlr.runtime.Parser;
-import org.antlr.runtime.RecognitionException;
-import org.antlr.runtime.Token;
-import org.antlr.runtime.TokenStream;
-import org.drools.lang.Location;
-import org.drools.lang.descr.AndDescr;
-import org.drools.lang.descr.AttributeDescr;
-import org.drools.lang.descr.ConditionalElementDescr;
-import org.drools.lang.descr.DescrFactory;
-import org.drools.lang.descr.EvalDescr;
-import org.drools.lang.descr.ExistsDescr;
-import org.drools.lang.descr.FieldBindingDescr;
-import org.drools.lang.descr.FieldConstraintDescr;
-import org.drools.lang.descr.FunctionDescr;
-import org.drools.lang.descr.ImportDescr;
-import org.drools.lang.descr.LiteralRestrictionDescr;
-import org.drools.lang.descr.NotDescr;
-import org.drools.lang.descr.OrDescr;
-import org.drools.lang.descr.PackageDescr;
-import org.drools.lang.descr.PatternDescr;
-import org.drools.lang.descr.PredicateDescr;
-import org.drools.lang.descr.RestrictionConnectiveDescr;
-import org.drools.lang.descr.RestrictionDescr;
-import org.drools.lang.descr.ReturnValueRestrictionDescr;
-import org.drools.lang.descr.RuleDescr;
-import org.drools.lang.descr.TypeDeclarationDescr;
-import org.drools.lang.descr.TypeFieldDescr;
-import org.drools.lang.descr.VariableRestrictionDescr;
public class ClipsParser extends Parser {
public static final String[] tokenNames = new String[] {
"<invalid>", "<EOR>", "<DOWN>", "<UP>", "LEFT_PAREN", "NAME", "RIGHT_PAREN", "DEFFUNCTION", "DEFRULE", "STRING", "SALIENCE", "INT", "AND", "OR", "NOT", "EXISTS", "TEST", "VAR", "ASSIGN_OP", "PIPE", "AMPERSAND", "TILDE", "COLON", "EQUALS", "FLOAT", "BOOL", "NULL", "DEFTEMPLATE", "EOL", "WS", "DECLARE", "EscapeSequence", "HexDigit", "UnicodeEscape", "OctalEscape", "SYMBOL_CHAR", "SH_STYLE_SINGLE_LINE_COMMENT", "C_STYLE_SINGLE_LINE_COMMENT", "LEFT_SQUARE", "RIGHT_SQUARE", "LEFT_CURLY", "RIGHT_CURLY", "MULTI_LINE_COMMENT", "SYMBOL", "FIRST_SYMBOL_CHAR", "'import'", "'=>'"
};
- public static final int RIGHT_SQUARE=39;
- public static final int RIGHT_CURLY=41;
- public static final int EQUALS=23;
+ public static final int EXISTS=15;
+ public static final int DEFRULE=8;
+ public static final int SYMBOL_CHAR=35;
+ public static final int HexDigit=32;
public static final int FLOAT=24;
- public static final int NOT=14;
- public static final int SYMBOL_CHAR=35;
- public static final int SH_STYLE_SINGLE_LINE_COMMENT=36;
+ public static final int TILDE=21;
+ public static final int OR=13;
+ public static final int PIPE=19;
+ public static final int ASSIGN_OP=18;
public static final int AND=12;
+ public static final int T__46=46;
public static final int FIRST_SYMBOL_CHAR=44;
- public static final int EOF=-1;
- public static final int HexDigit=32;
+ public static final int DEFTEMPLATE=27;
+ public static final int EscapeSequence=31;
+ public static final int INT=11;
+ public static final int SYMBOL=43;
+ public static final int LEFT_SQUARE=38;
+ public static final int SH_STYLE_SINGLE_LINE_COMMENT=36;
+ public static final int AMPERSAND=20;
+ public static final int DECLARE=30;
+ public static final int LEFT_CURLY=40;
+ public static final int LEFT_PAREN=4;
+ public static final int RIGHT_CURLY=41;
+ public static final int BOOL=25;
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=28;
- public static final int DEFRULE=8;
- public static final int TILDE=21;
- public static final int PIPE=19;
+ public static final int WS=29;
+ public static final int STRING=9;
+ public static final int T__45=45;
public static final int VAR=17;
- public static final int EXISTS=15;
- public static final int SYMBOL=43;
+ public static final int EQUALS=23;
+ public static final int UnicodeEscape=33;
+ public static final int EOF=-1;
public static final int NULL=26;
- public static final int BOOL=25;
+ public static final int EOL=28;
+ public static final int COLON=22;
public static final int SALIENCE=10;
- public static final int AMPERSAND=20;
- public static final int INT=11;
+ public static final int OctalEscape=34;
public static final int MULTI_LINE_COMMENT=42;
- public static final int COLON=22;
- public static final int WS=29;
- public static final int UnicodeEscape=33;
- public static final int LEFT_CURLY=40;
- public static final int OR=13;
public static final int TEST=16;
- public static final int LEFT_PAREN=4;
- public static final int DECLARE=30;
- public static final int DEFTEMPLATE=27;
- public static final int LEFT_SQUARE=38;
- public static final int EscapeSequence=31;
- public static final int OctalEscape=34;
+ public static final int NAME=5;
+ public static final int NOT=14;
+ public static final int RIGHT_PAREN=6;
+ public static final int RIGHT_SQUARE=39;
public static final int C_STYLE_SINGLE_LINE_COMMENT=37;
- public static final int STRING=9;
+ // delegates
+ // delegators
+
+
public ClipsParser(TokenStream input) {
- super(input);
- ruleMemo = new HashMap[28+1];
- }
+ this(input, new RecognizerSharedState());
+ }
+ public ClipsParser(TokenStream input, RecognizerSharedState state) {
+ super(input, state);
+
+ }
- public String[] getTokenNames() { return tokenNames; }
- public String getGrammarFileName() { return "C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g"; }
+ public String[] getTokenNames() { return ClipsParser.tokenNames; }
+ public String getGrammarFileName() { return "/Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.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 Location location = new Location( Location.LOCATION_UNKNOWN );
-
- 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) ) );
- }
- }
-
- void addTypeFieldDescr(LispForm lispForm, TypeDeclarationDescr typeDescr) {
- if ( !(lispForm.getSExpressions()[0] instanceof SymbolLispAtom) ) {
- throw new RuntimeException("should specify a slot");
- }
-
- SymbolLispAtom slot = (SymbolLispAtom) lispForm.getSExpressions()[0];
- if ( !"slot".equals( slot.getValue().trim() )) {
- throw new RuntimeException("should specify a slot");
- }
-
- if ( !(lispForm.getSExpressions()[1] instanceof SymbolLispAtom) ) {
- throw new RuntimeException("should specify a slot name");
- }
- SymbolLispAtom slotName = (SymbolLispAtom) lispForm.getSExpressions()[1];
-
- if ( !(lispForm.getSExpressions()[2] instanceof LispForm) ) {
- throw new RuntimeException("should specify a type");
- }
-
- LispForm typeForm = (LispForm) lispForm.getSExpressions()[2];
- if ( !(typeForm.getSExpressions()[0] instanceof SymbolLispAtom) ) {
- throw new RuntimeException("should specify a type");
- }
- SymbolLispAtom type = (SymbolLispAtom) typeForm.getSExpressions()[0];
- if ( !"type".equals( type.getValue().trim() )) {
- throw new RuntimeException("should specify a type");
- }
-
- if ( !(typeForm.getSExpressions()[1] instanceof SymbolLispAtom) ) {
- throw new RuntimeException("should specify a slot name");
- }
- SymbolLispAtom typeName = (SymbolLispAtom) typeForm.getSExpressions()[1];
-
- TypeFieldDescr fieldDescr = new TypeFieldDescr(removeQuotes(slotName.getValue()), new PatternDescr(removeQuotes(typeName.getValue())));
- typeDescr.addField( fieldDescr );
- }
-
- String removeQuotes(String string) {
- return string.substring( 1, string.length() -1 );
- }
-
+ 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 Location location = new Location( Location.LOCATION_UNKNOWN );
+
+ 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 ( state.errorRecovery ) {
+ //System.err.print("[SPURIOUS] ");
+ return;
+ }
+ state.syntaxErrors++; // don't count spurious
+ state.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) ) );
+ }
+ }
+
+ void addTypeFieldDescr(LispForm lispForm, TypeDeclarationDescr typeDescr) {
+ if ( !(lispForm.getSExpressions()[0] instanceof SymbolLispAtom) ) {
+ throw new RuntimeException("should specify a slot");
+ }
+
+ SymbolLispAtom slot = (SymbolLispAtom) lispForm.getSExpressions()[0];
+ if ( !"slot".equals( slot.getValue().trim() )) {
+ throw new RuntimeException("should specify a slot");
+ }
+
+ if ( !(lispForm.getSExpressions()[1] instanceof SymbolLispAtom) ) {
+ throw new RuntimeException("should specify a slot name");
+ }
+ SymbolLispAtom slotName = (SymbolLispAtom) lispForm.getSExpressions()[1];
+
+ if ( !(lispForm.getSExpressions()[2] instanceof LispForm) ) {
+ throw new RuntimeException("should specify a type");
+ }
+
+ LispForm typeForm = (LispForm) lispForm.getSExpressions()[2];
+ if ( !(typeForm.getSExpressions()[0] instanceof SymbolLispAtom) ) {
+ throw new RuntimeException("should specify a type");
+ }
+ SymbolLispAtom type = (SymbolLispAtom) typeForm.getSExpressions()[0];
+ if ( !"type".equals( type.getValue().trim() )) {
+ throw new RuntimeException("should specify a type");
+ }
+
+ if ( !(typeForm.getSExpressions()[1] instanceof SymbolLispAtom) ) {
+ throw new RuntimeException("should specify a slot name");
+ }
+ SymbolLispAtom typeName = (SymbolLispAtom) typeForm.getSExpressions()[1];
+
+ TypeFieldDescr fieldDescr = new TypeFieldDescr(removeQuotes(slotName.getValue()), new PatternDescr(removeQuotes(typeName.getValue())));
+ typeDescr.addField( fieldDescr );
+ }
+
+ String removeQuotes(String string) {
+ return string.substring( 1, string.length() -1 );
+ }
+
- // $ANTLR start eval
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:263:1: eval[ParserHandler handler] : (i= importDescr | f= deffunction | t= deftemplate | r= defrule | form= lisp_form )* ;
+
+
+ // $ANTLR start "eval"
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:265:1: eval[ParserHandler handler] : (i= importDescr | f= deffunction | t= deftemplate | r= defrule | form= lisp_form )* ;
public final void eval(ParserHandler handler) throws RecognitionException {
ImportDescr i = null;
@@ -306,10 +292,10 @@
try {
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:264:2: ( (i= importDescr | f= deffunction | t= deftemplate | r= defrule | form= lisp_form )* )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:265:5: (i= importDescr | f= deffunction | t= deftemplate | r= defrule | form= lisp_form )*
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:266:2: ( (i= importDescr | f= deffunction | t= deftemplate | r= defrule | form= lisp_form )* )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:267:5: (i= importDescr | f= deffunction | t= deftemplate | r= defrule | form= lisp_form )*
{
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:265:5: (i= importDescr | f= deffunction | t= deftemplate | r= defrule | form= lisp_form )*
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:267:5: (i= importDescr | f= deffunction | t= deftemplate | r= defrule | form= lisp_form )*
loop1:
do {
int alt1=6;
@@ -317,11 +303,6 @@
if ( (LA1_0==LEFT_PAREN) ) {
switch ( input.LA(2) ) {
- case DEFRULE:
- {
- alt1=4;
- }
- break;
case 45:
{
alt1=1;
@@ -337,6 +318,11 @@
alt1=3;
}
break;
+ case DEFRULE:
+ {
+ alt1=4;
+ }
+ break;
case NAME:
case VAR:
{
@@ -351,65 +337,70 @@
switch (alt1) {
case 1 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:265:10: i= importDescr
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:267:10: i= importDescr
{
pushFollow(FOLLOW_importDescr_in_eval60);
i=importDescr();
- _fsp--;
- if (failed) return ;
- if ( backtracking==0 ) {
+
+ state._fsp--;
+ if (state.failed) return ;
+ if ( state.backtracking==0 ) {
handler.importHandler( i );
}
}
break;
case 2 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:266:7: f= deffunction
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:268:7: f= deffunction
{
pushFollow(FOLLOW_deffunction_in_eval71);
f=deffunction();
- _fsp--;
- if (failed) return ;
- if ( backtracking==0 ) {
+
+ state._fsp--;
+ if (state.failed) return ;
+ if ( state.backtracking==0 ) {
handler.functionHandler( f );
}
}
break;
case 3 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:267:7: t= deftemplate
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:269:7: t= deftemplate
{
pushFollow(FOLLOW_deftemplate_in_eval84);
t=deftemplate();
- _fsp--;
- if (failed) return ;
- if ( backtracking==0 ) {
+
+ state._fsp--;
+ if (state.failed) return ;
+ if ( state.backtracking==0 ) {
handler.templateHandler( t );
}
}
break;
case 4 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:268:7: r= defrule
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:270:7: r= defrule
{
pushFollow(FOLLOW_defrule_in_eval100);
r=defrule();
- _fsp--;
- if (failed) return ;
- if ( backtracking==0 ) {
+
+ state._fsp--;
+ if (state.failed) return ;
+ if ( state.backtracking==0 ) {
handler.ruleHandler( r );
}
}
break;
case 5 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:269:7: form= lisp_form
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:271:7: form= lisp_form
{
pushFollow(FOLLOW_lisp_form_in_eval112);
form=lisp_form();
- _fsp--;
- if (failed) return ;
- if ( backtracking==0 ) {
+
+ state._fsp--;
+ if (state.failed) return ;
+ if ( state.backtracking==0 ) {
handler.lispFormHandler( form );
}
@@ -433,28 +424,27 @@
}
return ;
}
- // $ANTLR end eval
+ // $ANTLR end "eval"
- // $ANTLR start importDescr
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:286:1: importDescr returns [ImportDescr importDescr] : LEFT_PAREN 'import' importName= NAME RIGHT_PAREN ;
+ // $ANTLR start "importDescr"
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:288:1: importDescr returns [ImportDescr importDescr] : LEFT_PAREN 'import' importName= NAME RIGHT_PAREN ;
public final ImportDescr importDescr() throws RecognitionException {
ImportDescr importDescr = null;
Token importName=null;
try {
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:287:2: ( LEFT_PAREN 'import' importName= NAME RIGHT_PAREN )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:287:4: LEFT_PAREN 'import' importName= NAME RIGHT_PAREN
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:289:2: ( LEFT_PAREN 'import' importName= NAME RIGHT_PAREN )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:289:4: LEFT_PAREN 'import' importName= NAME RIGHT_PAREN
{
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_importDescr140); if (failed) return importDescr;
- match(input,45,FOLLOW_45_in_importDescr142); if (failed) return importDescr;
- importName=(Token)input.LT(1);
- match(input,NAME,FOLLOW_NAME_in_importDescr146); if (failed) return importDescr;
- if ( backtracking==0 ) {
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_importDescr140); if (state.failed) return importDescr;
+ match(input,45,FOLLOW_45_in_importDescr142); if (state.failed) return importDescr;
+ importName=(Token)match(input,NAME,FOLLOW_NAME_in_importDescr146); if (state.failed) return importDescr;
+ if ( state.backtracking==0 ) {
importDescr = new ImportDescr( importName.getText() );
}
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_importDescr150); if (failed) return importDescr;
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_importDescr150); if (state.failed) return importDescr;
}
@@ -467,11 +457,11 @@
}
return importDescr;
}
- // $ANTLR end importDescr
+ // $ANTLR end "importDescr"
- // $ANTLR start deffunction
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:336:1: deffunction returns [FunctionDescr functionDescr] : LEFT_PAREN t= DEFFUNCTION name= lisp_atom params= lisp_form (form= lisp_form )+ RIGHT_PAREN ;
+ // $ANTLR start "deffunction"
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:338:1: deffunction returns [FunctionDescr functionDescr] : LEFT_PAREN t= DEFFUNCTION name= lisp_atom params= lisp_form (form= lisp_form )+ RIGHT_PAREN ;
public final FunctionDescr deffunction() throws RecognitionException {
FunctionDescr functionDescr = null;
@@ -483,26 +473,27 @@
LispForm form = null;
-
- List content = null;
- functionDescr = null;
+
+ List content = null;
+ functionDescr = null;
try {
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:341:2: ( LEFT_PAREN t= DEFFUNCTION name= lisp_atom params= lisp_form (form= lisp_form )+ RIGHT_PAREN )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:341:4: LEFT_PAREN t= DEFFUNCTION name= lisp_atom params= lisp_form (form= lisp_form )+ RIGHT_PAREN
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:343:2: ( LEFT_PAREN t= DEFFUNCTION name= lisp_atom params= lisp_form (form= lisp_form )+ RIGHT_PAREN )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:343:4: LEFT_PAREN t= DEFFUNCTION name= lisp_atom params= lisp_form (form= lisp_form )+ RIGHT_PAREN
{
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_deffunction185); if (failed) return functionDescr;
- t=(Token)input.LT(1);
- match(input,DEFFUNCTION,FOLLOW_DEFFUNCTION_in_deffunction195); if (failed) return functionDescr;
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_deffunction185); if (state.failed) return functionDescr;
+ t=(Token)match(input,DEFFUNCTION,FOLLOW_DEFFUNCTION_in_deffunction195); if (state.failed) return functionDescr;
pushFollow(FOLLOW_lisp_atom_in_deffunction205);
name=lisp_atom();
- _fsp--;
- if (failed) return functionDescr;
+
+ state._fsp--;
+ if (state.failed) return functionDescr;
pushFollow(FOLLOW_lisp_form_in_deffunction215);
params=lisp_form();
- _fsp--;
- if (failed) return functionDescr;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:345:3: (form= lisp_form )+
+
+ state._fsp--;
+ if (state.failed) return functionDescr;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:347:3: (form= lisp_form )+
int cnt2=0;
loop2:
do {
@@ -516,13 +507,14 @@
switch (alt2) {
case 1 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:345:4: form= lisp_form
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:347:4: form= lisp_form
{
pushFollow(FOLLOW_lisp_form_in_deffunction224);
form=lisp_form();
- _fsp--;
- if (failed) return functionDescr;
- if ( backtracking==0 ) {
+
+ state._fsp--;
+ if (state.failed) return functionDescr;
+ if ( state.backtracking==0 ) {
if ( content == null ) content = new ArrayList(); content.add( form );
}
@@ -531,7 +523,7 @@
default :
if ( cnt2 >= 1 ) break loop2;
- if (backtracking>0) {failed=true; return functionDescr;}
+ if (state.backtracking>0) {state.failed=true; return functionDescr;}
EarlyExitException eee =
new EarlyExitException(2, input);
throw eee;
@@ -539,8 +531,8 @@
cnt2++;
} while (true);
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_deffunction246); if (failed) return functionDescr;
- if ( backtracking==0 ) {
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_deffunction246); if (state.failed) return functionDescr;
+ if ( state.backtracking==0 ) {
functionDescr = FunctionHandlers.createFunctionDescr( name, params, content );
}
@@ -555,11 +547,11 @@
}
return functionDescr;
}
- // $ANTLR end deffunction
+ // $ANTLR end "deffunction"
- // $ANTLR start defrule
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:351:1: defrule returns [RuleDescr rule] : loc= LEFT_PAREN DEFRULE ruleName= NAME documentation= STRING ruleAttribute[rule] ( ce[lhs, declarations] )* '=>' list= rule_consequence RIGHT_PAREN ;
+ // $ANTLR start "defrule"
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:353:1: defrule returns [RuleDescr rule] : loc= LEFT_PAREN DEFRULE ruleName= NAME documentation= STRING ruleAttribute[rule] ( ce[lhs, declarations] )* '=>' list= rule_consequence RIGHT_PAREN ;
public final RuleDescr defrule() throws RecognitionException {
RuleDescr rule = null;
@@ -569,68 +561,66 @@
List list = null;
-
- rule = null;
- AndDescr lhs = null;
- PatternDescr colum = null;
- Set declarations = null;
+
+ rule = null;
+ AndDescr lhs = null;
+ PatternDescr colum = null;
+ Set declarations = null;
try {
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:358:2: (loc= LEFT_PAREN DEFRULE ruleName= NAME documentation= STRING ruleAttribute[rule] ( ce[lhs, declarations] )* '=>' list= rule_consequence RIGHT_PAREN )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:358:4: loc= LEFT_PAREN DEFRULE ruleName= NAME documentation= STRING ruleAttribute[rule] ( ce[lhs, declarations] )* '=>' list= rule_consequence RIGHT_PAREN
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:360:2: (loc= LEFT_PAREN DEFRULE ruleName= NAME documentation= STRING ruleAttribute[rule] ( ce[lhs, declarations] )* '=>' list= rule_consequence RIGHT_PAREN )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:360:4: loc= LEFT_PAREN DEFRULE ruleName= NAME documentation= STRING ruleAttribute[rule] ( ce[lhs, declarations] )* '=>' list= rule_consequence RIGHT_PAREN
{
- loc=(Token)input.LT(1);
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_defrule283); if (failed) return rule;
- match(input,DEFRULE,FOLLOW_DEFRULE_in_defrule291); if (failed) return rule;
- ruleName=(Token)input.LT(1);
- match(input,NAME,FOLLOW_NAME_in_defrule295); if (failed) return rule;
- if ( backtracking==0 ) {
-
- debug( "start rule: " + ruleName.getText() );
- String ruleStr = ruleName.getText();
- AttributeDescr module = null;
-
- 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.setNamespace( module.getValue() );
- 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();
+ loc=(Token)match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_defrule283); if (state.failed) return rule;
+ match(input,DEFRULE,FOLLOW_DEFRULE_in_defrule291); if (state.failed) return rule;
+ ruleName=(Token)match(input,NAME,FOLLOW_NAME_in_defrule295); if (state.failed) return rule;
+ if ( state.backtracking==0 ) {
+
+ debug( "start rule: " + ruleName.getText() );
+ String ruleStr = ruleName.getText();
+ AttributeDescr module = null;
+
+ 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.setNamespace( module.getValue() );
+ rule.addAttribute( module );
+ }
+
+ rule.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+ rule.setStartCharacter( ((CommonToken)loc).getStartIndex() );
+ // not sure how you define where a LHS starts in clips, so just putting it here for now
+ lhs = new AndDescr();
+ rule.setLhs( lhs );
+ lhs.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+ lhs.setStartCharacter( ((CommonToken)loc).getStartIndex() );
+
+ rule.addAttribute( new AttributeDescr( "dialect", "clips") );
+
+ declarations = new HashSet();
+
}
- documentation=(Token)input.LT(1);
- match(input,STRING,FOLLOW_STRING_in_defrule307); if (failed) return rule;
- if ( backtracking==0 ) {
-
- // do nothing here for now
+ documentation=(Token)match(input,STRING,FOLLOW_STRING_in_defrule307); if (state.failed) return rule;
+ if ( state.backtracking==0 ) {
+
+ // do nothing here for now
}
pushFollow(FOLLOW_ruleAttribute_in_defrule313);
ruleAttribute(rule);
- _fsp--;
- if (failed) return rule;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:399:3: ( ce[lhs, declarations] )*
+
+ state._fsp--;
+ if (state.failed) return rule;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:401:3: ( ce[lhs, declarations] )*
loop3:
do {
int alt3=2;
@@ -643,13 +633,14 @@
switch (alt3) {
case 1 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:399:3: ce[lhs, declarations]
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:401:3: ce[lhs, declarations]
{
pushFollow(FOLLOW_ce_in_defrule321);
- ce(lhs, declarations);
- _fsp--;
- if (failed) return rule;
+ ce(lhs, declarations);
+ state._fsp--;
+ if (state.failed) return rule;
+
}
break;
@@ -658,15 +649,16 @@
}
} while (true);
- match(input,46,FOLLOW_46_in_defrule330); if (failed) return rule;
+ match(input,46,FOLLOW_46_in_defrule330); if (state.failed) return rule;
pushFollow(FOLLOW_rule_consequence_in_defrule339);
list=rule_consequence();
- _fsp--;
- if (failed) return rule;
- if ( backtracking==0 ) {
+
+ state._fsp--;
+ if (state.failed) return rule;
+ if ( state.backtracking==0 ) {
rule.setConsequence( list );
}
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_defrule347); if (failed) return rule;
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_defrule347); if (state.failed) return rule;
}
@@ -679,25 +671,25 @@
}
return rule;
}
- // $ANTLR end defrule
+ // $ANTLR end "defrule"
- // $ANTLR start rule_consequence
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:408:1: rule_consequence returns [List list] : (l= lisp_form )* ;
+ // $ANTLR start "rule_consequence"
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:410:1: rule_consequence returns [List list] : (l= lisp_form )* ;
public final List rule_consequence() throws RecognitionException {
List list = null;
LispForm l = null;
-
- list = null;
+
+ list = null;
try {
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:412:5: ( (l= lisp_form )* )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:413:3: (l= lisp_form )*
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:414:5: ( (l= lisp_form )* )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:415:3: (l= lisp_form )*
{
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:413:3: (l= lisp_form )*
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:415:3: (l= lisp_form )*
loop4:
do {
int alt4=2;
@@ -710,13 +702,14 @@
switch (alt4) {
case 1 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:413:4: l= lisp_form
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:415:4: l= lisp_form
{
pushFollow(FOLLOW_lisp_form_in_rule_consequence379);
l=lisp_form();
- _fsp--;
- if (failed) return list;
- if ( backtracking==0 ) {
+
+ state._fsp--;
+ if (state.failed) return list;
+ if ( state.backtracking==0 ) {
if ( list == null ) list = new ArrayList(); list.add( l );
}
@@ -740,20 +733,20 @@
}
return list;
}
- // $ANTLR end rule_consequence
+ // $ANTLR end "rule_consequence"
- // $ANTLR start ruleAttribute
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:416:1: ruleAttribute[RuleDescr rule] : ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )? ;
+ // $ANTLR start "ruleAttribute"
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:418:1: ruleAttribute[RuleDescr rule] : ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )? ;
public final void ruleAttribute(RuleDescr rule) throws RecognitionException {
AttributeDescr d = null;
try {
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:417:2: ( ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )? )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:418:3: ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )?
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:419:2: ( ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )? )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:420:3: ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )?
{
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:418:3: ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )?
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:420:3: ( LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN )?
int alt6=2;
int LA6_0 = input.LA(1);
@@ -766,11 +759,11 @@
}
switch (alt6) {
case 1 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:418:5: LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:420:5: LEFT_PAREN 'declare' ( LEFT_PAREN d= salience RIGHT_PAREN )? RIGHT_PAREN
{
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_ruleAttribute412); if (failed) return ;
- match(input,DECLARE,FOLLOW_DECLARE_in_ruleAttribute414); if (failed) return ;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:419:4: ( LEFT_PAREN d= salience RIGHT_PAREN )?
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_ruleAttribute412); if (state.failed) return ;
+ match(input,DECLARE,FOLLOW_DECLARE_in_ruleAttribute414); if (state.failed) return ;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:421:4: ( LEFT_PAREN d= salience RIGHT_PAREN )?
int alt5=2;
int LA5_0 = input.LA(1);
@@ -779,24 +772,25 @@
}
switch (alt5) {
case 1 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:419:6: LEFT_PAREN d= salience RIGHT_PAREN
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:421:6: LEFT_PAREN d= salience RIGHT_PAREN
{
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_ruleAttribute421); if (failed) return ;
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_ruleAttribute421); if (state.failed) return ;
pushFollow(FOLLOW_salience_in_ruleAttribute425);
d=salience();
- _fsp--;
- if (failed) return ;
- if ( backtracking==0 ) {
+
+ state._fsp--;
+ if (state.failed) return ;
+ if ( state.backtracking==0 ) {
rule.addAttribute( d );
}
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_ruleAttribute429); if (failed) return ;
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_ruleAttribute429); if (state.failed) return ;
}
break;
}
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_ruleAttribute436); if (failed) return ;
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_ruleAttribute436); if (state.failed) return ;
}
break;
@@ -815,34 +809,32 @@
}
return ;
}
- // $ANTLR end ruleAttribute
+ // $ANTLR end "ruleAttribute"
- // $ANTLR start salience
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:423:1: salience returns [AttributeDescr d ] : loc= SALIENCE i= INT ;
+ // $ANTLR start "salience"
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:425:1: salience returns [AttributeDescr d ] : loc= SALIENCE i= INT ;
public final AttributeDescr salience() throws RecognitionException {
AttributeDescr d = null;
Token loc=null;
Token i=null;
-
- d = null;
+
+ d = null;
try {
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:427:2: (loc= SALIENCE i= INT )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:428:3: loc= SALIENCE i= INT
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:429:2: (loc= SALIENCE i= INT )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:430:3: loc= SALIENCE i= INT
{
- loc=(Token)input.LT(1);
- match(input,SALIENCE,FOLLOW_SALIENCE_in_salience466); if (failed) return d;
- i=(Token)input.LT(1);
- match(input,INT,FOLLOW_INT_in_salience470); 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() );
+ loc=(Token)match(input,SALIENCE,FOLLOW_SALIENCE_in_salience466); if (state.failed) return d;
+ i=(Token)match(input,INT,FOLLOW_INT_in_salience470); if (state.failed) return d;
+ if ( state.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() );
}
@@ -857,35 +849,35 @@
}
return d;
}
- // $ANTLR end salience
+ // $ANTLR end "salience"
- // $ANTLR start ce
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:438: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] ) ;
+ // $ANTLR start "ce"
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:440:1: ce[ConditionalElementDescr in_ce, Set declarations] : ( and_ce[in_ce, declarations] | or_ce[in_ce, declarations] | not_ce[in_ce, declarations] | exists_ce[in_ce, declarations] | eval_ce[in_ce, declarations] | normal_pattern[in_ce, declarations] | bound_pattern[in_ce, declarations] ) ;
public final void ce(ConditionalElementDescr in_ce, Set declarations) throws RecognitionException {
try {
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:439: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\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:439: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] )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:441: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] ) )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:441: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\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:439: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] )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:441: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);
if ( (LA7_0==LEFT_PAREN) ) {
switch ( input.LA(2) ) {
- case NAME:
+ case AND:
{
- alt7=6;
+ alt7=1;
}
break;
- case AND:
+ case OR:
{
- alt7=1;
+ alt7=2;
}
break;
- case TEST:
+ case NOT:
{
- alt7=5;
+ alt7=3;
}
break;
case EXISTS:
@@ -893,20 +885,20 @@
alt7=4;
}
break;
- case NOT:
+ case TEST:
{
- alt7=3;
+ alt7=5;
}
break;
- case OR:
+ case NAME:
{
- alt7=2;
+ alt7=6;
}
break;
default:
- if (backtracking>0) {failed=true; return ;}
+ if (state.backtracking>0) {state.failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("439:4: ( and_ce[in_ce, declarations] | or_ce[in_ce, declarations] | not_ce[in_ce, declarations] | exists_ce[in_ce, declarations] | eval_ce[in_ce, declarations] | normal_pattern[in_ce, declarations] | bound_pattern[in_ce, declarations] )", 7, 1, input);
+ new NoViableAltException("", 7, 1, input);
throw nvae;
}
@@ -916,81 +908,88 @@
alt7=7;
}
else {
- if (backtracking>0) {failed=true; return ;}
+ if (state.backtracking>0) {state.failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("439:4: ( and_ce[in_ce, declarations] | or_ce[in_ce, declarations] | not_ce[in_ce, declarations] | exists_ce[in_ce, declarations] | eval_ce[in_ce, declarations] | normal_pattern[in_ce, declarations] | bound_pattern[in_ce, declarations] )", 7, 0, input);
+ new NoViableAltException("", 7, 0, input);
throw nvae;
}
switch (alt7) {
case 1 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:439:8: and_ce[in_ce, declarations]
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:441:8: and_ce[in_ce, declarations]
{
pushFollow(FOLLOW_and_ce_in_ce496);
- and_ce(in_ce, declarations);
- _fsp--;
- if (failed) return ;
+ and_ce(in_ce, declarations);
+ state._fsp--;
+ if (state.failed) return ;
+
}
break;
case 2 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:440:7: or_ce[in_ce, declarations]
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:442:7: or_ce[in_ce, declarations]
{
pushFollow(FOLLOW_or_ce_in_ce506);
- or_ce(in_ce, declarations);
- _fsp--;
- if (failed) return ;
+ or_ce(in_ce, declarations);
+ state._fsp--;
+ if (state.failed) return ;
+
}
break;
case 3 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:441:7: not_ce[in_ce, declarations]
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:443:7: not_ce[in_ce, declarations]
{
pushFollow(FOLLOW_not_ce_in_ce515);
- not_ce(in_ce, declarations);
- _fsp--;
- if (failed) return ;
+ not_ce(in_ce, declarations);
+ state._fsp--;
+ if (state.failed) return ;
+
}
break;
case 4 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:442:7: exists_ce[in_ce, declarations]
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:444:7: exists_ce[in_ce, declarations]
{
pushFollow(FOLLOW_exists_ce_in_ce524);
- exists_ce(in_ce, declarations);
- _fsp--;
- if (failed) return ;
+ exists_ce(in_ce, declarations);
+ state._fsp--;
+ if (state.failed) return ;
+
}
break;
case 5 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:443:8: eval_ce[in_ce, declarations]
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:445:8: eval_ce[in_ce, declarations]
{
pushFollow(FOLLOW_eval_ce_in_ce538);
- eval_ce(in_ce, declarations);
- _fsp--;
- if (failed) return ;
+ eval_ce(in_ce, declarations);
+ state._fsp--;
+ if (state.failed) return ;
+
}
break;
case 6 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:444:7: normal_pattern[in_ce, declarations]
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:446:7: normal_pattern[in_ce, declarations]
{
pushFollow(FOLLOW_normal_pattern_in_ce552);
- normal_pattern(in_ce, declarations);
- _fsp--;
- if (failed) return ;
+ normal_pattern(in_ce, declarations);
+ state._fsp--;
+ if (state.failed) return ;
+
}
break;
case 7 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:445:7: bound_pattern[in_ce, declarations]
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:447:7: bound_pattern[in_ce, declarations]
{
pushFollow(FOLLOW_bound_pattern_in_ce561);
- bound_pattern(in_ce, declarations);
- _fsp--;
- if (failed) return ;
+ bound_pattern(in_ce, declarations);
+ state._fsp--;
+ if (state.failed) return ;
+
}
break;
@@ -1008,28 +1007,28 @@
}
return ;
}
- // $ANTLR end ce
+ // $ANTLR end "ce"
- // $ANTLR start and_ce
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:449:1: and_ce[ConditionalElementDescr in_ce, Set declarations] : LEFT_PAREN AND ( ce[andDescr, declarations] )+ RIGHT_PAREN ;
+ // $ANTLR start "and_ce"
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:451:1: and_ce[ConditionalElementDescr in_ce, Set declarations] : LEFT_PAREN AND ( ce[andDescr, declarations] )+ RIGHT_PAREN ;
public final void and_ce(ConditionalElementDescr in_ce, Set declarations) throws RecognitionException {
-
- AndDescr andDescr= null;
+
+ AndDescr andDescr= null;
try {
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:453:2: ( LEFT_PAREN AND ( ce[andDescr, declarations] )+ RIGHT_PAREN )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:453:4: LEFT_PAREN AND ( ce[andDescr, declarations] )+ RIGHT_PAREN
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:455:2: ( LEFT_PAREN AND ( ce[andDescr, declarations] )+ RIGHT_PAREN )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:455:4: LEFT_PAREN AND ( ce[andDescr, declarations] )+ RIGHT_PAREN
{
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_and_ce588); if (failed) return ;
- match(input,AND,FOLLOW_AND_in_and_ce593); if (failed) return ;
- if ( backtracking==0 ) {
-
- andDescr = new AndDescr();
- in_ce.addDescr( andDescr );
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_and_ce588); if (state.failed) return ;
+ match(input,AND,FOLLOW_AND_in_and_ce593); if (state.failed) return ;
+ if ( state.backtracking==0 ) {
+
+ andDescr = new AndDescr();
+ in_ce.addDescr( andDescr );
}
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:458:3: ( ce[andDescr, declarations] )+
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:460:3: ( ce[andDescr, declarations] )+
int cnt8=0;
loop8:
do {
@@ -1043,19 +1042,20 @@
switch (alt8) {
case 1 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:458:3: ce[andDescr, declarations]
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:460:3: ce[andDescr, declarations]
{
pushFollow(FOLLOW_ce_in_and_ce599);
- ce(andDescr, declarations);
- _fsp--;
- if (failed) return ;
+ ce(andDescr, declarations);
+ state._fsp--;
+ if (state.failed) return ;
+
}
break;
default :
if ( cnt8 >= 1 ) break loop8;
- if (backtracking>0) {failed=true; return ;}
+ if (state.backtracking>0) {state.failed=true; return ;}
EarlyExitException eee =
new EarlyExitException(8, input);
throw eee;
@@ -1063,7 +1063,7 @@
cnt8++;
} while (true);
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_and_ce608); if (failed) return ;
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_and_ce608); if (state.failed) return ;
}
@@ -1076,28 +1076,28 @@
}
return ;
}
- // $ANTLR end and_ce
+ // $ANTLR end "and_ce"
- // $ANTLR start or_ce
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:462:1: or_ce[ConditionalElementDescr in_ce, Set declarations] : LEFT_PAREN OR ( ce[orDescr, declarations] )+ RIGHT_PAREN ;
+ // $ANTLR start "or_ce"
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:464:1: or_ce[ConditionalElementDescr in_ce, Set declarations] : LEFT_PAREN OR ( ce[orDescr, declarations] )+ RIGHT_PAREN ;
public final void or_ce(ConditionalElementDescr in_ce, Set declarations) throws RecognitionException {
-
- OrDescr orDescr= null;
+
+ OrDescr orDescr= null;
try {
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:466:2: ( LEFT_PAREN OR ( ce[orDescr, declarations] )+ RIGHT_PAREN )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:466:4: LEFT_PAREN OR ( ce[orDescr, declarations] )+ RIGHT_PAREN
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:468:2: ( LEFT_PAREN OR ( ce[orDescr, declarations] )+ RIGHT_PAREN )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:468:4: LEFT_PAREN OR ( ce[orDescr, declarations] )+ RIGHT_PAREN
{
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_or_ce636); if (failed) return ;
- match(input,OR,FOLLOW_OR_in_or_ce641); if (failed) return ;
- if ( backtracking==0 ) {
-
- orDescr = new OrDescr();
- in_ce.addDescr( orDescr );
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_or_ce636); if (state.failed) return ;
+ match(input,OR,FOLLOW_OR_in_or_ce641); if (state.failed) return ;
+ if ( state.backtracking==0 ) {
+
+ orDescr = new OrDescr();
+ in_ce.addDescr( orDescr );
}
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:471:3: ( ce[orDescr, declarations] )+
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:473:3: ( ce[orDescr, declarations] )+
int cnt9=0;
loop9:
do {
@@ -1111,19 +1111,20 @@
switch (alt9) {
case 1 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:471:3: ce[orDescr, declarations]
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:473:3: ce[orDescr, declarations]
{
pushFollow(FOLLOW_ce_in_or_ce647);
- ce(orDescr, declarations);
- _fsp--;
- if (failed) return ;
+ ce(orDescr, declarations);
+ state._fsp--;
+ if (state.failed) return ;
+
}
break;
default :
if ( cnt9 >= 1 ) break loop9;
- if (backtracking>0) {failed=true; return ;}
+ if (state.backtracking>0) {state.failed=true; return ;}
EarlyExitException eee =
new EarlyExitException(9, input);
throw eee;
@@ -1131,7 +1132,7 @@
cnt9++;
} while (true);
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_or_ce656); if (failed) return ;
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_or_ce656); if (state.failed) return ;
}
@@ -1144,33 +1145,34 @@
}
return ;
}
- // $ANTLR end or_ce
+ // $ANTLR end "or_ce"
- // $ANTLR start not_ce
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:475:1: not_ce[ConditionalElementDescr in_ce, Set declarations] : LEFT_PAREN NOT ce[notDescr, declarations] RIGHT_PAREN ;
+ // $ANTLR start "not_ce"
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:477:1: not_ce[ConditionalElementDescr in_ce, Set declarations] : LEFT_PAREN NOT ce[notDescr, declarations] RIGHT_PAREN ;
public final void not_ce(ConditionalElementDescr in_ce, Set declarations) throws RecognitionException {
-
- NotDescr notDescr= null;
+
+ NotDescr notDescr= null;
try {
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:479:2: ( LEFT_PAREN NOT ce[notDescr, declarations] RIGHT_PAREN )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:479:4: LEFT_PAREN NOT ce[notDescr, declarations] RIGHT_PAREN
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:481:2: ( LEFT_PAREN NOT ce[notDescr, declarations] RIGHT_PAREN )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:481:4: LEFT_PAREN NOT ce[notDescr, declarations] RIGHT_PAREN
{
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_not_ce684); if (failed) return ;
- match(input,NOT,FOLLOW_NOT_in_not_ce689); if (failed) return ;
- if ( backtracking==0 ) {
-
- notDescr = new NotDescr();
- in_ce.addDescr( notDescr );
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_not_ce684); if (state.failed) return ;
+ match(input,NOT,FOLLOW_NOT_in_not_ce689); if (state.failed) return ;
+ if ( state.backtracking==0 ) {
+
+ notDescr = new NotDescr();
+ in_ce.addDescr( notDescr );
}
pushFollow(FOLLOW_ce_in_not_ce695);
- ce(notDescr, declarations);
- _fsp--;
- if (failed) return ;
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_not_ce703); if (failed) return ;
+ ce(notDescr, declarations);
+ state._fsp--;
+ if (state.failed) return ;
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_not_ce703); if (state.failed) return ;
+
}
}
@@ -1182,33 +1184,34 @@
}
return ;
}
- // $ANTLR end not_ce
+ // $ANTLR end "not_ce"
- // $ANTLR start exists_ce
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:488:1: exists_ce[ConditionalElementDescr in_ce, Set declarations] : LEFT_PAREN EXISTS ce[existsDescr, declarations] RIGHT_PAREN ;
+ // $ANTLR start "exists_ce"
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:490:1: exists_ce[ConditionalElementDescr in_ce, Set declarations] : LEFT_PAREN EXISTS ce[existsDescr, declarations] RIGHT_PAREN ;
public final void exists_ce(ConditionalElementDescr in_ce, Set declarations) throws RecognitionException {
-
- ExistsDescr existsDescr= null;
+
+ ExistsDescr existsDescr= null;
try {
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:492:2: ( LEFT_PAREN EXISTS ce[existsDescr, declarations] RIGHT_PAREN )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:492:4: LEFT_PAREN EXISTS ce[existsDescr, declarations] RIGHT_PAREN
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:494:2: ( LEFT_PAREN EXISTS ce[existsDescr, declarations] RIGHT_PAREN )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:494:4: LEFT_PAREN EXISTS ce[existsDescr, declarations] RIGHT_PAREN
{
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_exists_ce732); if (failed) return ;
- match(input,EXISTS,FOLLOW_EXISTS_in_exists_ce737); if (failed) return ;
- if ( backtracking==0 ) {
-
- existsDescr = new ExistsDescr();
- in_ce.addDescr( existsDescr );
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_exists_ce732); if (state.failed) return ;
+ match(input,EXISTS,FOLLOW_EXISTS_in_exists_ce737); if (state.failed) return ;
+ if ( state.backtracking==0 ) {
+
+ existsDescr = new ExistsDescr();
+ in_ce.addDescr( existsDescr );
}
pushFollow(FOLLOW_ce_in_exists_ce743);
- ce(existsDescr, declarations);
- _fsp--;
- if (failed) return ;
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_exists_ce751); if (failed) return ;
+ ce(existsDescr, declarations);
+ state._fsp--;
+ if (state.failed) return ;
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_exists_ce751); if (state.failed) return ;
+
}
}
@@ -1220,29 +1223,30 @@
}
return ;
}
- // $ANTLR end exists_ce
+ // $ANTLR end "exists_ce"
- // $ANTLR start eval_ce
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:501:1: eval_ce[ConditionalElementDescr in_ce, Set declarations] : LEFT_PAREN TEST t= lisp_form RIGHT_PAREN ;
+ // $ANTLR start "eval_ce"
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:503:1: eval_ce[ConditionalElementDescr in_ce, Set declarations] : LEFT_PAREN TEST t= lisp_form RIGHT_PAREN ;
public final void eval_ce(ConditionalElementDescr in_ce, Set declarations) throws RecognitionException {
LispForm t = null;
try {
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:502:2: ( LEFT_PAREN TEST t= lisp_form RIGHT_PAREN )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:502:4: LEFT_PAREN TEST t= lisp_form RIGHT_PAREN
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:504:2: ( LEFT_PAREN TEST t= lisp_form RIGHT_PAREN )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:504:4: LEFT_PAREN TEST t= lisp_form RIGHT_PAREN
{
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_eval_ce770); if (failed) return ;
- match(input,TEST,FOLLOW_TEST_in_eval_ce775); if (failed) return ;
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_eval_ce770); if (state.failed) return ;
+ match(input,TEST,FOLLOW_TEST_in_eval_ce775); if (state.failed) return ;
pushFollow(FOLLOW_lisp_form_in_eval_ce782);
t=lisp_form();
- _fsp--;
- if (failed) return ;
- if ( backtracking==0 ) {
+
+ state._fsp--;
+ if (state.failed) return ;
+ if ( state.backtracking==0 ) {
EvalDescr evalDescr = new EvalDescr(); evalDescr.setContent( t ); in_ce.addDescr( evalDescr );
}
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_eval_ce792); if (failed) return ;
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_eval_ce792); if (state.failed) return ;
}
@@ -1255,34 +1259,33 @@
}
return ;
}
- // $ANTLR end eval_ce
+ // $ANTLR end "eval_ce"
- // $ANTLR start normal_pattern
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:508:1: normal_pattern[ConditionalElementDescr in_ce, Set declarations] : LEFT_PAREN name= NAME ( field_constriant[top, declarations] )* RIGHT_PAREN ;
+ // $ANTLR start "normal_pattern"
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:510:1: normal_pattern[ConditionalElementDescr in_ce, Set declarations] : LEFT_PAREN name= NAME ( field_constriant[top, declarations] )* RIGHT_PAREN ;
public final void normal_pattern(ConditionalElementDescr in_ce, Set declarations) throws RecognitionException {
Token name=null;
-
- PatternDescr pattern = null;
- ConditionalElementDescr top = null;
+
+ PatternDescr pattern = null;
+ ConditionalElementDescr top = null;
try {
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:513:2: ( LEFT_PAREN name= NAME ( field_constriant[top, declarations] )* RIGHT_PAREN )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:513:4: LEFT_PAREN name= NAME ( field_constriant[top, declarations] )* RIGHT_PAREN
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:515:2: ( LEFT_PAREN name= NAME ( field_constriant[top, declarations] )* RIGHT_PAREN )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:515:4: LEFT_PAREN name= NAME ( field_constriant[top, declarations] )* RIGHT_PAREN
{
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_normal_pattern820); if (failed) return ;
- name=(Token)input.LT(1);
- match(input,NAME,FOLLOW_NAME_in_normal_pattern827); if (failed) return ;
- if ( backtracking==0 ) {
-
- pattern = new PatternDescr(name.getText());
- in_ce.addDescr( pattern );
- top = pattern.getConstraint();
-
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_normal_pattern820); if (state.failed) return ;
+ name=(Token)match(input,NAME,FOLLOW_NAME_in_normal_pattern827); if (state.failed) return ;
+ if ( state.backtracking==0 ) {
+
+ pattern = new PatternDescr(name.getText());
+ in_ce.addDescr( pattern );
+ top = pattern.getConstraint();
+
}
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:520:3: ( field_constriant[top, declarations] )*
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:522:3: ( field_constriant[top, declarations] )*
loop10:
do {
int alt10=2;
@@ -1295,13 +1298,14 @@
switch (alt10) {
case 1 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:520:3: field_constriant[top, declarations]
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:522:3: field_constriant[top, declarations]
{
pushFollow(FOLLOW_field_constriant_in_normal_pattern833);
- field_constriant(top, declarations);
- _fsp--;
- if (failed) return ;
+ field_constriant(top, declarations);
+ state._fsp--;
+ if (state.failed) return ;
+
}
break;
@@ -1310,7 +1314,7 @@
}
} while (true);
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_normal_pattern843); if (failed) return ;
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_normal_pattern843); if (state.failed) return ;
}
@@ -1323,44 +1327,42 @@
}
return ;
}
- // $ANTLR end normal_pattern
+ // $ANTLR end "normal_pattern"
- // $ANTLR start bound_pattern
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:526:1: bound_pattern[ConditionalElementDescr in_ce, Set declarations] : var= VAR ASSIGN_OP LEFT_PAREN name= NAME ( field_constriant[top, declarations] )* RIGHT_PAREN ;
+ // $ANTLR start "bound_pattern"
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:528:1: bound_pattern[ConditionalElementDescr in_ce, Set declarations] : var= VAR ASSIGN_OP LEFT_PAREN name= NAME ( field_constriant[top, declarations] )* RIGHT_PAREN ;
public final void bound_pattern(ConditionalElementDescr in_ce, Set declarations) throws RecognitionException {
Token var=null;
Token name=null;
-
- PatternDescr pattern = null;
- String identifier = null;
- ConditionalElementDescr top = null;
+
+ PatternDescr pattern = null;
+ String identifier = null;
+ ConditionalElementDescr top = null;
try {
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:532:2: (var= VAR ASSIGN_OP LEFT_PAREN name= NAME ( field_constriant[top, declarations] )* RIGHT_PAREN )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:532:4: var= VAR ASSIGN_OP LEFT_PAREN name= NAME ( field_constriant[top, declarations] )* RIGHT_PAREN
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:534:2: (var= VAR ASSIGN_OP LEFT_PAREN name= NAME ( field_constriant[top, declarations] )* RIGHT_PAREN )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:534: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_pattern871); if (failed) return ;
- if ( backtracking==0 ) {
-
- identifier = var.getText();
+ var=(Token)match(input,VAR,FOLLOW_VAR_in_bound_pattern871); if (state.failed) return ;
+ if ( state.backtracking==0 ) {
+
+ identifier = var.getText();
}
- match(input,ASSIGN_OP,FOLLOW_ASSIGN_OP_in_bound_pattern877); if (failed) return ;
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_bound_pattern879); if (failed) return ;
- name=(Token)input.LT(1);
- match(input,NAME,FOLLOW_NAME_in_bound_pattern883); if (failed) return ;
- if ( backtracking==0 ) {
-
- pattern = new PatternDescr(name.getText());
- pattern.setIdentifier( identifier.replace( '?', '$') );
- in_ce.addDescr( pattern );
- top = pattern.getConstraint();
+ match(input,ASSIGN_OP,FOLLOW_ASSIGN_OP_in_bound_pattern877); if (state.failed) return ;
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_bound_pattern879); if (state.failed) return ;
+ name=(Token)match(input,NAME,FOLLOW_NAME_in_bound_pattern883); if (state.failed) return ;
+ if ( state.backtracking==0 ) {
+
+ pattern = new PatternDescr(name.getText());
+ pattern.setIdentifier( identifier.replace( '?', '$') );
+ in_ce.addDescr( pattern );
+ top = pattern.getConstraint();
}
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:542:3: ( field_constriant[top, declarations] )*
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:544:3: ( field_constriant[top, declarations] )*
loop11:
do {
int alt11=2;
@@ -1373,13 +1375,14 @@
switch (alt11) {
case 1 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:542:3: field_constriant[top, declarations]
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:544:3: field_constriant[top, declarations]
{
pushFollow(FOLLOW_field_constriant_in_bound_pattern892);
- field_constriant(top, declarations);
- _fsp--;
- if (failed) return ;
+ field_constriant(top, declarations);
+ state._fsp--;
+ if (state.failed) return ;
+
}
break;
@@ -1388,7 +1391,7 @@
}
} while (true);
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_bound_pattern899); if (failed) return ;
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_bound_pattern899); if (state.failed) return ;
}
@@ -1401,48 +1404,48 @@
}
return ;
}
- // $ANTLR end bound_pattern
+ // $ANTLR end "bound_pattern"
- // $ANTLR start field_constriant
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:546:1: field_constriant[ConditionalElementDescr base, Set declarations] : LEFT_PAREN f= NAME or_restr_connective[top, base, fc, declarations] RIGHT_PAREN ;
+ // $ANTLR start "field_constriant"
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:548:1: field_constriant[ConditionalElementDescr base, Set declarations] : LEFT_PAREN f= NAME or_restr_connective[top, base, fc, declarations] RIGHT_PAREN ;
public final void field_constriant(ConditionalElementDescr base, Set declarations) throws RecognitionException {
Token f=null;
-
- List list = new ArrayList();
- FieldBindingDescr fbd = null;
- FieldConstraintDescr fc = null;
- RestrictionConnectiveDescr top = null;
- String op = "==";
+
+ List list = new ArrayList();
+ FieldBindingDescr fbd = null;
+ FieldConstraintDescr fc = null;
+ RestrictionConnectiveDescr top = null;
+ String op = "==";
try {
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:554:2: ( LEFT_PAREN f= NAME or_restr_connective[top, base, fc, declarations] RIGHT_PAREN )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:555:3: LEFT_PAREN f= NAME or_restr_connective[top, base, fc, declarations] RIGHT_PAREN
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:556:2: ( LEFT_PAREN f= NAME or_restr_connective[top, base, fc, declarations] RIGHT_PAREN )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:557:3: LEFT_PAREN f= NAME or_restr_connective[top, base, fc, declarations] RIGHT_PAREN
{
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_field_constriant930); if (failed) return ;
- f=(Token)input.LT(1);
- match(input,NAME,FOLLOW_NAME_in_field_constriant934); 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();
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_field_constriant930); if (state.failed) return ;
+ f=(Token)match(input,NAME,FOLLOW_NAME_in_field_constriant934); if (state.failed) return ;
+ if ( state.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();
}
pushFollow(FOLLOW_or_restr_connective_in_field_constriant949);
- or_restr_connective(top, base, fc, declarations);
- _fsp--;
- if (failed) return ;
- if ( backtracking==0 ) {
- if ( top.getRestrictions().size() != 0 ) {
- base.insertBeforeLast( PredicateDescr.class, fc );
- }
+ or_restr_connective(top, base, fc, declarations);
+
+ state._fsp--;
+ if (state.failed) return ;
+ if ( state.backtracking==0 ) {
+ if ( top.getRestrictions().size() != 0 ) {
+ base.insertBeforeLast( PredicateDescr.class, fc );
+ }
}
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_field_constriant959); if (failed) return ;
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_field_constriant959); if (state.failed) return ;
}
@@ -1455,24 +1458,25 @@
}
return ;
}
- // $ANTLR end field_constriant
+ // $ANTLR end "field_constriant"
- // $ANTLR start or_restr_connective
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:586: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] )* ;
+ // $ANTLR start "or_restr_connective"
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:588:1: or_restr_connective[ RestrictionConnectiveDescr rcBase, ConditionalElementDescr ceBase, FieldConstraintDescr fcBase, Set declarations ] options {backtrack=true; } : and_restr_connective[or, ceBase, fcBase, declarations] ( options {backtrack=true; } : PIPE and_restr_connective[or, ceBase, fcBase, declarations] )* ;
public final void or_restr_connective(RestrictionConnectiveDescr rcBase, ConditionalElementDescr ceBase, FieldConstraintDescr fcBase, Set declarations) throws RecognitionException {
-
- RestrictionConnectiveDescr or = new RestrictionConnectiveDescr(RestrictionConnectiveDescr.OR);
+
+ RestrictionConnectiveDescr or = new RestrictionConnectiveDescr(RestrictionConnectiveDescr.OR);
try {
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:593:2: ( and_restr_connective[or, ceBase, fcBase, declarations] ( options {backtrack=true; } : PIPE and_restr_connective[or, ceBase, fcBase, declarations] )* )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:594:3: and_restr_connective[or, ceBase, fcBase, declarations] ( options {backtrack=true; } : PIPE and_restr_connective[or, ceBase, fcBase, declarations] )*
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:595:2: ( and_restr_connective[or, ceBase, fcBase, declarations] ( options {backtrack=true; } : PIPE and_restr_connective[or, ceBase, fcBase, declarations] )* )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:596: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_connective998);
- and_restr_connective(or, ceBase, fcBase, declarations);
- _fsp--;
- if (failed) return ;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:595:3: ( options {backtrack=true; } : PIPE and_restr_connective[or, ceBase, fcBase, declarations] )*
+ and_restr_connective(or, ceBase, fcBase, declarations);
+
+ state._fsp--;
+ if (state.failed) return ;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:597:3: ( options {backtrack=true; } : PIPE and_restr_connective[or, ceBase, fcBase, declarations] )*
loop12:
do {
int alt12=2;
@@ -1485,19 +1489,20 @@
switch (alt12) {
case 1 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:597:6: PIPE and_restr_connective[or, ceBase, fcBase, declarations]
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:599:6: PIPE and_restr_connective[or, ceBase, fcBase, declarations]
{
- match(input,PIPE,FOLLOW_PIPE_in_or_restr_connective1022); if (failed) return ;
- if ( backtracking==0 ) {
-
- location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_OPERATOR);
+ match(input,PIPE,FOLLOW_PIPE_in_or_restr_connective1022); if (state.failed) return ;
+ if ( state.backtracking==0 ) {
+
+ location.setType(Location.LOCATION_LHS_INSIDE_CONDITION_OPERATOR);
}
pushFollow(FOLLOW_and_restr_connective_in_or_restr_connective1032);
- and_restr_connective(or, ceBase, fcBase, declarations);
- _fsp--;
- if (failed) return ;
+ and_restr_connective(or, ceBase, fcBase, declarations);
+ state._fsp--;
+ if (state.failed) return ;
+
}
break;
@@ -1515,34 +1520,35 @@
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 ;
}
- // $ANTLR end or_restr_connective
+ // $ANTLR end "or_restr_connective"
- // $ANTLR start and_restr_connective
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:612:1: and_restr_connective[ RestrictionConnectiveDescr rcBase, ConditionalElementDescr ceBase, FieldConstraintDescr fcBase, Set declarations ] : restriction[and, ceBase, fcBase, declarations] ( AMPERSAND restriction[and, ceBase, fcBase, declarations] )* ;
+ // $ANTLR start "and_restr_connective"
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:614:1: and_restr_connective[ RestrictionConnectiveDescr rcBase, ConditionalElementDescr ceBase, FieldConstraintDescr fcBase, Set declarations ] : restriction[and, ceBase, fcBase, declarations] ( AMPERSAND restriction[and, ceBase, fcBase, declarations] )* ;
public final void and_restr_connective(RestrictionConnectiveDescr rcBase, ConditionalElementDescr ceBase, FieldConstraintDescr fcBase, Set declarations) throws RecognitionException {
-
- RestrictionConnectiveDescr and = new RestrictionConnectiveDescr(RestrictionConnectiveDescr.AND);
+
+ RestrictionConnectiveDescr and = new RestrictionConnectiveDescr(RestrictionConnectiveDescr.AND);
try {
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:616:2: ( restriction[and, ceBase, fcBase, declarations] ( AMPERSAND restriction[and, ceBase, fcBase, declarations] )* )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:617:3: restriction[and, ceBase, fcBase, declarations] ( AMPERSAND restriction[and, ceBase, fcBase, declarations] )*
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:618:2: ( restriction[and, ceBase, fcBase, declarations] ( AMPERSAND restriction[and, ceBase, fcBase, declarations] )* )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:619:3: restriction[and, ceBase, fcBase, declarations] ( AMPERSAND restriction[and, ceBase, fcBase, declarations] )*
{
pushFollow(FOLLOW_restriction_in_and_restr_connective1064);
- restriction(and, ceBase, fcBase, declarations);
- _fsp--;
- if (failed) return ;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:618:3: ( AMPERSAND restriction[and, ceBase, fcBase, declarations] )*
+ restriction(and, ceBase, fcBase, declarations);
+
+ state._fsp--;
+ if (state.failed) return ;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:620:3: ( AMPERSAND restriction[and, ceBase, fcBase, declarations] )*
loop13:
do {
int alt13=2;
@@ -1555,14 +1561,15 @@
switch (alt13) {
case 1 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:618:5: AMPERSAND restriction[and, ceBase, fcBase, declarations]
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:620:5: AMPERSAND restriction[and, ceBase, fcBase, declarations]
{
- match(input,AMPERSAND,FOLLOW_AMPERSAND_in_and_restr_connective1072); if (failed) return ;
+ match(input,AMPERSAND,FOLLOW_AMPERSAND_in_and_restr_connective1072); if (state.failed) return ;
pushFollow(FOLLOW_restriction_in_and_restr_connective1074);
- restriction(and, ceBase, fcBase, declarations);
- _fsp--;
- if (failed) return ;
+ restriction(and, ceBase, fcBase, declarations);
+ state._fsp--;
+ if (state.failed) return ;
+
}
break;
@@ -1580,33 +1587,33 @@
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 ;
}
- // $ANTLR end and_restr_connective
+ // $ANTLR end "and_restr_connective"
- // $ANTLR start restriction
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:637: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 ) ;
+ // $ANTLR start "restriction"
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:639:1: restriction[RestrictionConnectiveDescr rc, ConditionalElementDescr base, FieldConstraintDescr fcBase, Set declarations ] : ( TILDE )? ( predicate_constraint[rc, op, base] | return_value_restriction[op, rc] | variable_restriction[op, rc, base, fcBase, declarations] | lc= literal_restriction ) ;
public final void restriction(RestrictionConnectiveDescr rc, ConditionalElementDescr base, FieldConstraintDescr fcBase, Set declarations) throws RecognitionException {
String lc = null;
-
- String op = "==";
+
+ String op = "==";
try {
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:641: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\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:641:4: ( TILDE )? ( predicate_constraint[rc, op, base] | return_value_restriction[op, rc] | variable_restriction[op, rc, base, fcBase, declarations] | lc= literal_restriction )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:643:2: ( ( TILDE )? ( predicate_constraint[rc, op, base] | return_value_restriction[op, rc] | variable_restriction[op, rc, base, fcBase, declarations] | lc= literal_restriction ) )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:643: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\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:641:4: ( TILDE )?
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:643:4: ( TILDE )?
int alt14=2;
int LA14_0 = input.LA(1);
@@ -1615,10 +1622,10 @@
}
switch (alt14) {
case 1 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:641:5: TILDE
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:643:5: TILDE
{
- match(input,TILDE,FOLLOW_TILDE_in_restriction1107); if (failed) return ;
- if ( backtracking==0 ) {
+ match(input,TILDE,FOLLOW_TILDE_in_restriction1107); if (state.failed) return ;
+ if ( state.backtracking==0 ) {
op = "!=";
}
@@ -1627,7 +1634,7 @@
}
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:642:3: ( predicate_constraint[rc, op, base] | return_value_restriction[op, rc] | variable_restriction[op, rc, base, fcBase, declarations] | lc= literal_restriction )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:644:3: ( predicate_constraint[rc, op, base] | return_value_restriction[op, rc] | variable_restriction[op, rc, base, fcBase, declarations] | lc= literal_restriction )
int alt15=4;
switch ( input.LA(1) ) {
case COLON:
@@ -1656,55 +1663,59 @@
}
break;
default:
- if (backtracking>0) {failed=true; return ;}
+ if (state.backtracking>0) {state.failed=true; return ;}
NoViableAltException nvae =
- new NoViableAltException("642:3: ( predicate_constraint[rc, op, base] | return_value_restriction[op, rc] | variable_restriction[op, rc, base, fcBase, declarations] | lc= literal_restriction )", 15, 0, input);
+ new NoViableAltException("", 15, 0, input);
throw nvae;
}
switch (alt15) {
case 1 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:642:5: predicate_constraint[rc, op, base]
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:644:5: predicate_constraint[rc, op, base]
{
pushFollow(FOLLOW_predicate_constraint_in_restriction1123);
- predicate_constraint(rc, op, base);
- _fsp--;
- if (failed) return ;
+ predicate_constraint(rc, op, base);
+ state._fsp--;
+ if (state.failed) return ;
+
}
break;
case 2 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:643:7: return_value_restriction[op, rc]
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:645:7: return_value_restriction[op, rc]
{
pushFollow(FOLLOW_return_value_restriction_in_restriction1139);
- return_value_restriction(op, rc);
- _fsp--;
- if (failed) return ;
+ return_value_restriction(op, rc);
+ state._fsp--;
+ if (state.failed) return ;
+
}
break;
case 3 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:644:7: variable_restriction[op, rc, base, fcBase, declarations]
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:646:7: variable_restriction[op, rc, base, fcBase, declarations]
{
pushFollow(FOLLOW_variable_restriction_in_restriction1148);
- variable_restriction(op, rc, base, fcBase, declarations);
- _fsp--;
- if (failed) return ;
+ variable_restriction(op, rc, base, fcBase, declarations);
+ state._fsp--;
+ if (state.failed) return ;
+
}
break;
case 4 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:645:8: lc= literal_restriction
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:647:8: lc= literal_restriction
{
pushFollow(FOLLOW_literal_restriction_in_restriction1160);
lc=literal_restriction();
- _fsp--;
- if (failed) return ;
- if ( backtracking==0 ) {
-
- rc.addRestriction( new LiteralRestrictionDescr(op, lc) );
- op = "==";
+
+ state._fsp--;
+ if (state.failed) return ;
+ if ( state.backtracking==0 ) {
+
+ rc.addRestriction( new LiteralRestrictionDescr(op, lc) );
+ op = "==";
}
@@ -1725,25 +1736,26 @@
}
return ;
}
- // $ANTLR end restriction
+ // $ANTLR end "restriction"
- // $ANTLR start predicate_constraint
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:652:1: predicate_constraint[RestrictionConnectiveDescr rc, String op, ConditionalElementDescr base] : COLON t= lisp_form ;
+ // $ANTLR start "predicate_constraint"
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:654:1: predicate_constraint[RestrictionConnectiveDescr rc, String op, ConditionalElementDescr base] : COLON t= lisp_form ;
public final void predicate_constraint(RestrictionConnectiveDescr rc, String op, ConditionalElementDescr base) throws RecognitionException {
LispForm t = null;
try {
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:653:2: ( COLON t= lisp_form )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:653:4: COLON t= lisp_form
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:655:2: ( COLON t= lisp_form )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:655:4: COLON t= lisp_form
{
- match(input,COLON,FOLLOW_COLON_in_predicate_constraint1193); if (failed) return ;
+ match(input,COLON,FOLLOW_COLON_in_predicate_constraint1193); if (state.failed) return ;
pushFollow(FOLLOW_lisp_form_in_predicate_constraint1199);
t=lisp_form();
- _fsp--;
- if (failed) return ;
- if ( backtracking==0 ) {
+
+ state._fsp--;
+ if (state.failed) return ;
+ if ( state.backtracking==0 ) {
base.addDescr( new PredicateDescr( t ) );
}
@@ -1758,25 +1770,26 @@
}
return ;
}
- // $ANTLR end predicate_constraint
+ // $ANTLR end "predicate_constraint"
- // $ANTLR start return_value_restriction
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:659:1: return_value_restriction[String op, RestrictionConnectiveDescr rc] : EQUALS t= lisp_form ;
+ // $ANTLR start "return_value_restriction"
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:661:1: return_value_restriction[String op, RestrictionConnectiveDescr rc] : EQUALS t= lisp_form ;
public final void return_value_restriction(String op, RestrictionConnectiveDescr rc) throws RecognitionException {
LispForm t = null;
try {
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:660:2: ( EQUALS t= lisp_form )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:660:4: EQUALS t= lisp_form
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:662:2: ( EQUALS t= lisp_form )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:662:4: EQUALS t= lisp_form
{
- match(input,EQUALS,FOLLOW_EQUALS_in_return_value_restriction1218); if (failed) return ;
+ match(input,EQUALS,FOLLOW_EQUALS_in_return_value_restriction1218); if (state.failed) return ;
pushFollow(FOLLOW_lisp_form_in_return_value_restriction1225);
t=lisp_form();
- _fsp--;
- if (failed) return ;
- if ( backtracking==0 ) {
+
+ state._fsp--;
+ if (state.failed) return ;
+ if ( state.backtracking==0 ) {
rc.addRestriction( new ReturnValueRestrictionDescr (op, t ) );
}
@@ -1791,33 +1804,32 @@
}
return ;
}
- // $ANTLR end return_value_restriction
+ // $ANTLR end "return_value_restriction"
- // $ANTLR start variable_restriction
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:665:1: variable_restriction[String op, RestrictionConnectiveDescr rc, ConditionalElementDescr ceBase, FieldConstraintDescr fcBase, Set declarations ] : VAR ;
+ // $ANTLR start "variable_restriction"
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:667: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;
String identifier = null;
try {
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:667:2: ( VAR )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:667:4: VAR
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:669:2: ( VAR )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:669:4: VAR
{
- VAR1=(Token)input.LT(1);
- match(input,VAR,FOLLOW_VAR_in_variable_restriction1253); if (failed) return ;
- if ( backtracking==0 ) {
-
- identifier = VAR1.getText().replace( '?', '$');
- if ( declarations.contains( identifier) ) {
- rc.addRestriction( new VariableRestrictionDescr(op, identifier ) );
- } else {
- FieldBindingDescr fbd = new FieldBindingDescr();
- fbd.setIdentifier( identifier );
- fbd.setFieldName( fcBase.getFieldName() );
- ceBase.addDescr( fbd );
- declarations.add( identifier );
- }
+ VAR1=(Token)match(input,VAR,FOLLOW_VAR_in_variable_restriction1253); if (state.failed) return ;
+ if ( state.backtracking==0 ) {
+
+ identifier = (VAR1!=null?VAR1.getText():null).replace( '?', '$');
+ if ( declarations.contains( identifier) ) {
+ rc.addRestriction( new VariableRestrictionDescr(op, identifier ) );
+ } else {
+ FieldBindingDescr fbd = new FieldBindingDescr();
+ fbd.setIdentifier( identifier );
+ fbd.setFieldName( fcBase.getFieldName() );
+ ceBase.addDescr( fbd );
+ declarations.add( identifier );
+ }
}
@@ -1832,31 +1844,32 @@
}
return ;
}
- // $ANTLR end variable_restriction
+ // $ANTLR end "variable_restriction"
- // $ANTLR start literal_restriction
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:682:1: literal_restriction returns [String text] : t= literal ;
+ // $ANTLR start "literal_restriction"
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:684:1: literal_restriction returns [String text] : t= literal ;
public final String literal_restriction() throws RecognitionException {
String text = null;
String t = null;
-
- text = null;
+
+ text = null;
try {
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:686:2: (t= literal )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:687:6: t= literal
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:688:2: (t= literal )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:689:6: t= literal
{
pushFollow(FOLLOW_literal_in_literal_restriction1286);
t=literal();
- _fsp--;
- if (failed) return text;
- if ( backtracking==0 ) {
-
- text = t;
+
+ state._fsp--;
+ if (state.failed) return text;
+ if ( state.backtracking==0 ) {
+
+ text = t;
}
@@ -1871,11 +1884,11 @@
}
return text;
}
- // $ANTLR end literal_restriction
+ // $ANTLR end "literal_restriction"
- // $ANTLR start lisp_form
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:704:1: lisp_form returns [LispForm lispForm] : LEFT_PAREN (t= NAME | t= VAR ) (a= lisp_atom | l= lisp_form )* RIGHT_PAREN ;
+ // $ANTLR start "lisp_form"
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:706:1: lisp_form returns [LispForm lispForm] : LEFT_PAREN (t= NAME | t= VAR ) (a= lisp_atom | l= lisp_form )* RIGHT_PAREN ;
public final LispForm lisp_form() throws RecognitionException {
LispForm lispForm = null;
@@ -1885,16 +1898,16 @@
LispForm l = null;
-
- List list = new ArrayList();
- lispForm = null;
+
+ List list = new ArrayList();
+ lispForm = null;
try {
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:709:2: ( LEFT_PAREN (t= NAME | t= VAR ) (a= lisp_atom | l= lisp_form )* RIGHT_PAREN )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:709:4: LEFT_PAREN (t= NAME | t= VAR ) (a= lisp_atom | l= lisp_form )* RIGHT_PAREN
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:711:2: ( LEFT_PAREN (t= NAME | t= VAR ) (a= lisp_atom | l= lisp_form )* RIGHT_PAREN )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:711:4: LEFT_PAREN (t= NAME | t= VAR ) (a= lisp_atom | l= lisp_form )* RIGHT_PAREN
{
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_lisp_form1314); if (failed) return lispForm;
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:711:3: (t= NAME | t= VAR )
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_lisp_form1314); if (state.failed) return lispForm;
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:713:3: (t= NAME | t= VAR )
int alt16=2;
int LA16_0 = input.LA(1);
@@ -1905,30 +1918,28 @@
alt16=2;
}
else {
- if (backtracking>0) {failed=true; return lispForm;}
+ if (state.backtracking>0) {state.failed=true; return lispForm;}
NoViableAltException nvae =
- new NoViableAltException("711:3: (t= NAME | t= VAR )", 16, 0, input);
+ new NoViableAltException("", 16, 0, input);
throw nvae;
}
switch (alt16) {
case 1 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:712:7: t= NAME
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:714:7: t= NAME
{
- t=(Token)input.LT(1);
- match(input,NAME,FOLLOW_NAME_in_lisp_form1331); if (failed) return lispForm;
- if ( backtracking==0 ) {
+ t=(Token)match(input,NAME,FOLLOW_NAME_in_lisp_form1331); if (state.failed) return lispForm;
+ if ( state.backtracking==0 ) {
list.add( new SymbolLispAtom( t.getText() ) );
}
}
break;
case 2 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:714:7: t= VAR
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:716:7: t= VAR
{
- t=(Token)input.LT(1);
- match(input,VAR,FOLLOW_VAR_in_lisp_form1351); if (failed) return lispForm;
- if ( backtracking==0 ) {
+ t=(Token)match(input,VAR,FOLLOW_VAR_in_lisp_form1351); if (state.failed) return lispForm;
+ if ( state.backtracking==0 ) {
list.add( new VariableLispAtom( t.getText() ) );
}
@@ -1937,7 +1948,7 @@
}
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:716:3: (a= lisp_atom | l= lisp_form )*
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:718:3: (a= lisp_atom | l= lisp_form )*
loop17:
do {
int alt17=3;
@@ -1953,26 +1964,28 @@
switch (alt17) {
case 1 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:716:6: a= lisp_atom
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:718:6: a= lisp_atom
{
pushFollow(FOLLOW_lisp_atom_in_lisp_form1374);
a=lisp_atom();
- _fsp--;
- if (failed) return lispForm;
- if ( backtracking==0 ) {
+
+ state._fsp--;
+ if (state.failed) return lispForm;
+ if ( state.backtracking==0 ) {
list.add( a );
}
}
break;
case 2 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:717:6: l= lisp_form
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:719:6: l= lisp_form
{
pushFollow(FOLLOW_lisp_form_in_lisp_form1385);
l=lisp_form();
- _fsp--;
- if (failed) return lispForm;
- if ( backtracking==0 ) {
+
+ state._fsp--;
+ if (state.failed) return lispForm;
+ if ( state.backtracking==0 ) {
list.add( l );
}
@@ -1984,8 +1997,8 @@
}
} while (true);
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_lisp_form1412); if (failed) return lispForm;
- if ( backtracking==0 ) {
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_lisp_form1412); if (state.failed) return lispForm;
+ if ( state.backtracking==0 ) {
lispForm = new LispForm( ( SExpression[] ) list.toArray( new SExpression[ list.size () ] ) );
}
@@ -2000,24 +2013,24 @@
}
return lispForm;
}
- // $ANTLR end lisp_form
+ // $ANTLR end "lisp_form"
- // $ANTLR start lisp_atom
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:723:1: lisp_atom returns [SExpression sExpression] : (t= VAR | t= STRING | t= FLOAT | t= INT | t= BOOL | t= NULL | t= NAME ) ;
+ // $ANTLR start "lisp_atom"
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:725:1: lisp_atom returns [SExpression sExpression] : (t= VAR | t= STRING | t= FLOAT | t= INT | t= BOOL | t= NULL | t= NAME ) ;
public final SExpression lisp_atom() throws RecognitionException {
SExpression sExpression = null;
Token t=null;
-
- sExpression = null;
+
+ sExpression = null;
try {
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:727:2: ( (t= VAR | t= STRING | t= FLOAT | t= INT | t= BOOL | t= NULL | t= NAME ) )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:728:3: (t= VAR | t= STRING | t= FLOAT | t= INT | t= BOOL | t= NULL | t= NAME )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:729:2: ( (t= VAR | t= STRING | t= FLOAT | t= INT | t= BOOL | t= NULL | t= NAME ) )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:730:3: (t= VAR | t= STRING | t= FLOAT | t= INT | t= BOOL | t= NULL | t= NAME )
{
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:728:3: (t= VAR | t= STRING | t= FLOAT | t= INT | t= BOOL | t= NULL | t= NAME )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:730:3: (t= VAR | t= STRING | t= FLOAT | t= INT | t= BOOL | t= NULL | t= NAME )
int alt18=7;
switch ( input.LA(1) ) {
case VAR:
@@ -2056,86 +2069,79 @@
}
break;
default:
- if (backtracking>0) {failed=true; return sExpression;}
+ if (state.backtracking>0) {state.failed=true; return sExpression;}
NoViableAltException nvae =
- new NoViableAltException("728:3: (t= VAR | t= STRING | t= FLOAT | t= INT | t= BOOL | t= NULL | t= NAME )", 18, 0, input);
+ new NoViableAltException("", 18, 0, input);
throw nvae;
}
switch (alt18) {
case 1 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:729:6: t= VAR
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:731:6: t= VAR
{
- t=(Token)input.LT(1);
- match(input,VAR,FOLLOW_VAR_in_lisp_atom1456); if (failed) return sExpression;
- if ( backtracking==0 ) {
+ t=(Token)match(input,VAR,FOLLOW_VAR_in_lisp_atom1456); if (state.failed) return sExpression;
+ if ( state.backtracking==0 ) {
sExpression = new VariableLispAtom( t.getText() );
}
}
break;
case 2 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:730:6: t= STRING
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:732:6: t= STRING
{
- t=(Token)input.LT(1);
- match(input,STRING,FOLLOW_STRING_in_lisp_atom1468); if (failed) return sExpression;
- if ( backtracking==0 ) {
+ t=(Token)match(input,STRING,FOLLOW_STRING_in_lisp_atom1468); if (state.failed) return sExpression;
+ if ( state.backtracking==0 ) {
sExpression = new StringLispAtom( getString( t ) );
}
}
break;
case 3 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:731:6: t= FLOAT
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:733:6: t= FLOAT
{
- t=(Token)input.LT(1);
- match(input,FLOAT,FOLLOW_FLOAT_in_lisp_atom1490); if (failed) return sExpression;
- if ( backtracking==0 ) {
+ t=(Token)match(input,FLOAT,FOLLOW_FLOAT_in_lisp_atom1490); if (state.failed) return sExpression;
+ if ( state.backtracking==0 ) {
sExpression = new FloatLispAtom( t.getText() );
}
}
break;
case 4 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:732:6: t= INT
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:734:6: t= INT
{
- t=(Token)input.LT(1);
- match(input,INT,FOLLOW_INT_in_lisp_atom1502); if (failed) return sExpression;
- if ( backtracking==0 ) {
+ t=(Token)match(input,INT,FOLLOW_INT_in_lisp_atom1502); if (state.failed) return sExpression;
+ if ( state.backtracking==0 ) {
sExpression = new IntLispAtom( t.getText() );
}
}
break;
case 5 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:733:7: t= BOOL
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:735:7: t= BOOL
{
- t=(Token)input.LT(1);
- match(input,BOOL,FOLLOW_BOOL_in_lisp_atom1515); if (failed) return sExpression;
- if ( backtracking==0 ) {
+ t=(Token)match(input,BOOL,FOLLOW_BOOL_in_lisp_atom1515); if (state.failed) return sExpression;
+ if ( state.backtracking==0 ) {
sExpression = new BoolLispAtom( t.getText() );
}
}
break;
case 6 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:734:7: t= NULL
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:736:7: t= NULL
{
- t=(Token)input.LT(1);
- match(input,NULL,FOLLOW_NULL_in_lisp_atom1531); if (failed) return sExpression;
- if ( backtracking==0 ) {
+ t=(Token)match(input,NULL,FOLLOW_NULL_in_lisp_atom1531); if (state.failed) return sExpression;
+ if ( state.backtracking==0 ) {
sExpression = new NullLispAtom( null );
}
}
break;
case 7 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:735:14: t= NAME
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:737:14: t= NAME
{
- t=(Token)input.LT(1);
- match(input,NAME,FOLLOW_NAME_in_lisp_atom1557); if (failed) return sExpression;
- if ( backtracking==0 ) {
+ t=(Token)match(input,NAME,FOLLOW_NAME_in_lisp_atom1557); if (state.failed) return sExpression;
+ if ( state.backtracking==0 ) {
sExpression = new SymbolLispAtom( "\"" +t.getText() + "\"");
}
@@ -2156,11 +2162,11 @@
}
return sExpression;
}
- // $ANTLR end lisp_atom
+ // $ANTLR end "lisp_atom"
- // $ANTLR start deftemplate
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:741:1: deftemplate returns [TypeDeclarationDescr typeDescr] : loc= LEFT_PAREN DEFTEMPLATE deftemplateName= NAME documentation= STRING (list= lisp_form )* RIGHT_PAREN ;
+ // $ANTLR start "deftemplate"
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:743:1: deftemplate returns [TypeDeclarationDescr typeDescr] : loc= LEFT_PAREN DEFTEMPLATE deftemplateName= NAME documentation= STRING (list= lisp_form )* RIGHT_PAREN ;
public final TypeDeclarationDescr deftemplate() throws RecognitionException {
TypeDeclarationDescr typeDescr = null;
@@ -2171,44 +2177,41 @@
try {
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:742:5: (loc= LEFT_PAREN DEFTEMPLATE deftemplateName= NAME documentation= STRING (list= lisp_form )* RIGHT_PAREN )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:743:5: loc= LEFT_PAREN DEFTEMPLATE deftemplateName= NAME documentation= STRING (list= lisp_form )* RIGHT_PAREN
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:744:5: (loc= LEFT_PAREN DEFTEMPLATE deftemplateName= NAME documentation= STRING (list= lisp_form )* RIGHT_PAREN )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:745:5: loc= LEFT_PAREN DEFTEMPLATE deftemplateName= NAME documentation= STRING (list= lisp_form )* RIGHT_PAREN
{
- loc=(Token)input.LT(1);
- match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_deftemplate1598); if (failed) return typeDescr;
- match(input,DEFTEMPLATE,FOLLOW_DEFTEMPLATE_in_deftemplate1605); if (failed) return typeDescr;
- deftemplateName=(Token)input.LT(1);
- match(input,NAME,FOLLOW_NAME_in_deftemplate1609); if (failed) return typeDescr;
- if ( backtracking==0 ) {
-
- debug( "start rule: " + deftemplateName.getText() );
- String templateStr = deftemplateName.getText();
-
- String mod = null;
- if ( templateStr.indexOf("::") >= 0 ) {
- mod = templateStr.substring(0, templateStr.indexOf("::"));
- templateStr = templateStr.substring(templateStr.indexOf("::")+2);
- }
-
- typeDescr = new TypeDeclarationDescr( templateStr );
- if( mod != null ) {
- typeDescr.setNamespace( mod );
- }
-
- typeDescr.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
- typeDescr.setStartCharacter( ((CommonToken)loc).getStartIndex() );
-
-
+ loc=(Token)match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_deftemplate1598); if (state.failed) return typeDescr;
+ match(input,DEFTEMPLATE,FOLLOW_DEFTEMPLATE_in_deftemplate1605); if (state.failed) return typeDescr;
+ deftemplateName=(Token)match(input,NAME,FOLLOW_NAME_in_deftemplate1609); if (state.failed) return typeDescr;
+ if ( state.backtracking==0 ) {
+
+ debug( "start rule: " + deftemplateName.getText() );
+ String templateStr = deftemplateName.getText();
+
+ String mod = null;
+ if ( templateStr.indexOf("::") >= 0 ) {
+ mod = templateStr.substring(0, templateStr.indexOf("::"));
+ templateStr = templateStr.substring(templateStr.indexOf("::")+2);
+ }
+
+ typeDescr = new TypeDeclarationDescr( templateStr );
+ if( mod != null ) {
+ typeDescr.setNamespace( mod );
+ }
+
+ typeDescr.setLocation( offset(loc.getLine()), loc.getCharPositionInLine() );
+ typeDescr.setStartCharacter( ((CommonToken)loc).getStartIndex() );
+
+
}
- documentation=(Token)input.LT(1);
- match(input,STRING,FOLLOW_STRING_in_deftemplate1623); if (failed) return typeDescr;
- if ( backtracking==0 ) {
-
- // do nothing here for now
+ documentation=(Token)match(input,STRING,FOLLOW_STRING_in_deftemplate1623); if (state.failed) return typeDescr;
+ if ( state.backtracking==0 ) {
+
+ // do nothing here for now
}
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:781:2: (list= lisp_form )*
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:783:2: (list= lisp_form )*
loop19:
do {
int alt19=2;
@@ -2221,13 +2224,14 @@
switch (alt19) {
case 1 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:781:3: list= lisp_form
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:783:3: list= lisp_form
{
pushFollow(FOLLOW_lisp_form_in_deftemplate1645);
list=lisp_form();
- _fsp--;
- if (failed) return typeDescr;
- if ( backtracking==0 ) {
+
+ state._fsp--;
+ if (state.failed) return typeDescr;
+ if ( state.backtracking==0 ) {
addTypeFieldDescr(list, typeDescr);
}
@@ -2239,7 +2243,7 @@
}
} while (true);
- match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_deftemplate1656); if (failed) return typeDescr;
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_deftemplate1656); if (state.failed) return typeDescr;
}
@@ -2252,24 +2256,24 @@
}
return typeDescr;
}
- // $ANTLR end deftemplate
+ // $ANTLR end "deftemplate"
- // $ANTLR start literal
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:787:1: literal returns [String text] : (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL ) ;
+ // $ANTLR start "literal"
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:789:1: literal returns [String text] : (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL ) ;
public final String literal() throws RecognitionException {
String text = null;
Token t=null;
-
- text = null;
+
+ text = null;
try {
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:791:2: ( (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL ) )
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:791:4: (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:793:2: ( (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL ) )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:793:4: (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL )
{
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:791:4: (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL )
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:793:4: (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL )
int alt20=6;
switch ( input.LA(1) ) {
case STRING:
@@ -2303,75 +2307,69 @@
}
break;
default:
- if (backtracking>0) {failed=true; return text;}
+ if (state.backtracking>0) {state.failed=true; return text;}
NoViableAltException nvae =
- new NoViableAltException("791:4: (t= STRING | t= NAME | t= INT | t= FLOAT | t= BOOL | t= NULL )", 20, 0, input);
+ new NoViableAltException("", 20, 0, input);
throw nvae;
}
switch (alt20) {
case 1 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:791:8: t= STRING
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:793:8: t= STRING
{
- t=(Token)input.LT(1);
- match(input,STRING,FOLLOW_STRING_in_literal1692); if (failed) return text;
- if ( backtracking==0 ) {
+ t=(Token)match(input,STRING,FOLLOW_STRING_in_literal1692); if (state.failed) return text;
+ if ( state.backtracking==0 ) {
text = getString( t );
}
}
break;
case 2 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:792:7: t= NAME
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:794:7: t= NAME
{
- t=(Token)input.LT(1);
- match(input,NAME,FOLLOW_NAME_in_literal1705); if (failed) return text;
- if ( backtracking==0 ) {
+ t=(Token)match(input,NAME,FOLLOW_NAME_in_literal1705); if (state.failed) return text;
+ if ( state.backtracking==0 ) {
text = t.getText();
}
}
break;
case 3 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:793:7: t= INT
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:795:7: t= INT
{
- t=(Token)input.LT(1);
- match(input,INT,FOLLOW_INT_in_literal1721); if (failed) return text;
- if ( backtracking==0 ) {
+ t=(Token)match(input,INT,FOLLOW_INT_in_literal1721); if (state.failed) return text;
+ if ( state.backtracking==0 ) {
text = t.getText();
}
}
break;
case 4 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:794:7: t= FLOAT
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:796:7: t= FLOAT
{
- t=(Token)input.LT(1);
- match(input,FLOAT,FOLLOW_FLOAT_in_literal1736); if (failed) return text;
- if ( backtracking==0 ) {
+ t=(Token)match(input,FLOAT,FOLLOW_FLOAT_in_literal1736); if (state.failed) return text;
+ if ( state.backtracking==0 ) {
text = t.getText();
}
}
break;
case 5 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:795:7: t= BOOL
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:797:7: t= BOOL
{
- t=(Token)input.LT(1);
- match(input,BOOL,FOLLOW_BOOL_in_literal1749); if (failed) return text;
- if ( backtracking==0 ) {
+ t=(Token)match(input,BOOL,FOLLOW_BOOL_in_literal1749); if (state.failed) return text;
+ if ( state.backtracking==0 ) {
text = t.getText();
}
}
break;
case 6 :
- // C:\\dev\\drools\\trunk6\\drools-clips\\src\\main\\resources\\org\\drools\\clips\\Clips.g:796:7: t= NULL
+ // /Users/porcelli/Documents/dev/drools-trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g:798:7: t= NULL
{
- t=(Token)input.LT(1);
- match(input,NULL,FOLLOW_NULL_in_literal1763); if (failed) return text;
- if ( backtracking==0 ) {
+ t=(Token)match(input,NULL,FOLLOW_NULL_in_literal1763); if (state.failed) return text;
+ if ( state.backtracking==0 ) {
text = null;
}
@@ -2392,9 +2390,11 @@
}
return text;
}
- // $ANTLR end literal
+ // $ANTLR end "literal"
+ // Delegated rules
+
public static final BitSet FOLLOW_importDescr_in_eval60 = new BitSet(new long[]{0x0000000000000012L});
@@ -2408,8 +2408,8 @@
public static final BitSet FOLLOW_RIGHT_PAREN_in_importDescr150 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_LEFT_PAREN_in_deffunction185 = new BitSet(new long[]{0x0000000000000080L});
public static final BitSet FOLLOW_DEFFUNCTION_in_deffunction195 = new BitSet(new long[]{0x0000000007020A20L});
- public static final BitSet FOLLOW_lisp_atom_in_deffunction205 = new BitSet(new long[]{0x0000000000000010L});
- public static final BitSet FOLLOW_lisp_form_in_deffunction215 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_lisp_atom_in_deffunction205 = new BitSet(new long[]{0x0000000000000050L});
+ public static final BitSet FOLLOW_lisp_form_in_deffunction215 = new BitSet(new long[]{0x0000000000000050L});
public static final BitSet FOLLOW_lisp_form_in_deffunction224 = new BitSet(new long[]{0x0000000000000050L});
public static final BitSet FOLLOW_RIGHT_PAREN_in_deffunction246 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_LEFT_PAREN_in_defrule283 = new BitSet(new long[]{0x0000000000000100L});
@@ -2418,7 +2418,7 @@
public static final BitSet FOLLOW_STRING_in_defrule307 = new BitSet(new long[]{0x0000400000020010L});
public static final BitSet FOLLOW_ruleAttribute_in_defrule313 = new BitSet(new long[]{0x0000400000020010L});
public static final BitSet FOLLOW_ce_in_defrule321 = new BitSet(new long[]{0x0000400000020010L});
- public static final BitSet FOLLOW_46_in_defrule330 = new BitSet(new long[]{0x0000000000000050L});
+ public static final BitSet FOLLOW_46_in_defrule330 = new BitSet(new long[]{0x0000000000000010L});
public static final BitSet FOLLOW_rule_consequence_in_defrule339 = new BitSet(new long[]{0x0000000000000040L});
public static final BitSet FOLLOW_RIGHT_PAREN_in_defrule347 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_lisp_form_in_rule_consequence379 = new BitSet(new long[]{0x0000000000000012L});
@@ -2454,7 +2454,7 @@
public static final BitSet FOLLOW_ce_in_exists_ce743 = new BitSet(new long[]{0x0000000000000040L});
public static final BitSet FOLLOW_RIGHT_PAREN_in_exists_ce751 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_LEFT_PAREN_in_eval_ce770 = new BitSet(new long[]{0x0000000000010000L});
- public static final BitSet FOLLOW_TEST_in_eval_ce775 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_TEST_in_eval_ce775 = new BitSet(new long[]{0x0000000000000050L});
public static final BitSet FOLLOW_lisp_form_in_eval_ce782 = new BitSet(new long[]{0x0000000000000040L});
public static final BitSet FOLLOW_RIGHT_PAREN_in_eval_ce792 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_LEFT_PAREN_in_normal_pattern820 = new BitSet(new long[]{0x0000000000000020L});
@@ -2477,7 +2477,7 @@
public static final BitSet FOLLOW_restriction_in_and_restr_connective1064 = new BitSet(new long[]{0x0000000000100002L});
public static final BitSet FOLLOW_AMPERSAND_in_and_restr_connective1072 = new BitSet(new long[]{0x0000000007E20A20L});
public static final BitSet FOLLOW_restriction_in_and_restr_connective1074 = new BitSet(new long[]{0x0000000000100002L});
- public static final BitSet FOLLOW_TILDE_in_restriction1107 = new BitSet(new long[]{0x0000000007C20A20L});
+ public static final BitSet FOLLOW_TILDE_in_restriction1107 = new BitSet(new long[]{0x0000000007E20A20L});
public static final BitSet FOLLOW_predicate_constraint_in_restriction1123 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_return_value_restriction_in_restriction1139 = new BitSet(new long[]{0x0000000000000002L});
public static final BitSet FOLLOW_variable_restriction_in_restriction1148 = new BitSet(new long[]{0x0000000000000002L});
Modified: labs/jbossrules/trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g
===================================================================
--- labs/jbossrules/trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g 2008-11-25 21:30:40 UTC (rev 24100)
+++ labs/jbossrules/trunk/drools-clips/src/main/resources/org/drools/clips/Clips.g 2008-11-25 21:35:43 UTC (rev 24101)
@@ -66,13 +66,15 @@
}
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;
-
+ // if we've already reported an error and have not matched a token
+ // yet successfully, don't report any errors.
+ if ( state.errorRecovery ) {
+ //System.err.print("[SPURIOUS] ");
+ return;
+ }
+ state.syntaxErrors++; // don't count spurious
+ state.errorRecovery = true;
+
ex.line = offset(ex.line); //add the offset if there is one
errors.add( ex );
}
More information about the jboss-svn-commits
mailing list