[jboss-svn-commits] JBL Code SVN: r9953 - in labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools: clp and 1 other directory.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Sun Mar 4 14:51:24 EST 2007
Author: mark.proctor at jboss.com
Date: 2007-03-04 14:51:23 -0500 (Sun, 04 Mar 2007)
New Revision: 9953
Added:
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/CLPLexer.java
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/CLPParser.java
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/GeneralParseException.java
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/clp.tokens
labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/clp__.g
Log:
JBRULES-720 Clips Parser
Added: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/CLPLexer.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/CLPLexer.java (rev 0)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/CLPLexer.java 2007-03-04 19:51:23 UTC (rev 9953)
@@ -0,0 +1,1937 @@
+// $ANTLR 3.0b7 C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g 2007-03-04 18:04:41
+
+ package org.drools.clp;
+
+
+import org.antlr.runtime.*;
+import java.util.Stack;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+public class CLPLexer extends Lexer {
+ public static final int LEFT_PAREN=4;
+ public static final int RIGHT_CURLY=24;
+ public static final int T29=29;
+ public static final int BOOL=11;
+ public static final int HexDigit=16;
+ public static final int WS=14;
+ public static final int MISC=26;
+ public static final int STRING=8;
+ public static final int FLOAT=10;
+ public static final int T28=28;
+ public static final int VAR=7;
+ public static final int UnicodeEscape=17;
+ public static final int EscapeSequence=15;
+ public static final int INT=9;
+ public static final int EOF=-1;
+ public static final int T32=32;
+ public static final int NULL=12;
+ public static final int EOL=13;
+ public static final int LEFT_SQUARE=21;
+ public static final int Tokens=33;
+ public static final int T31=31;
+ public static final int SH_STYLE_SINGLE_LINE_COMMENT=19;
+ public static final int OctalEscape=18;
+ public static final int MULTI_LINE_COMMENT=25;
+ public static final int T27=27;
+ public static final int RIGHT_PAREN=6;
+ public static final int T30=30;
+ public static final int LEFT_CURLY=23;
+ public static final int RIGHT_SQUARE=22;
+ public static final int ID=5;
+ public static final int C_STYLE_SINGLE_LINE_COMMENT=20;
+ public CLPLexer() {;}
+ public CLPLexer(CharStream input) {
+ super(input);
+ ruleMemo = new HashMap[31+1];
+ }
+ public String getGrammarFileName() { return "C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g"; }
+
+ // $ANTLR start T27
+ public void mT27() throws RecognitionException {
+ try {
+ ruleNestingLevel++;
+ int _type = T27;
+ int _start = getCharIndex();
+ int _line = getLine();
+ int _charPosition = getCharPositionInLine();
+ int _channel = Token.DEFAULT_CHANNEL;
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:6:7: ( ';' )
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:6:7: ';'
+ {
+ match(';'); if (failed) return ;
+
+ }
+
+
+ if ( backtracking==0 ) {
+
+ if ( token==null && ruleNestingLevel==1 ) {
+ emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+ }
+
+
+ }
+ }
+ finally {
+ ruleNestingLevel--;
+ }
+ }
+ // $ANTLR end T27
+
+ // $ANTLR start T28
+ public void mT28() throws RecognitionException {
+ try {
+ ruleNestingLevel++;
+ int _type = T28;
+ int _start = getCharIndex();
+ int _line = getLine();
+ int _charPosition = getCharPositionInLine();
+ int _channel = Token.DEFAULT_CHANNEL;
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:7:7: ( 'defrule' )
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:7:7: 'defrule'
+ {
+ match("defrule"); if (failed) return ;
+
+
+ }
+
+
+ if ( backtracking==0 ) {
+
+ if ( token==null && ruleNestingLevel==1 ) {
+ emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+ }
+
+
+ }
+ }
+ finally {
+ ruleNestingLevel--;
+ }
+ }
+ // $ANTLR end T28
+
+ // $ANTLR start T29
+ public void mT29() throws RecognitionException {
+ try {
+ ruleNestingLevel++;
+ int _type = T29;
+ int _start = getCharIndex();
+ int _line = getLine();
+ int _charPosition = getCharPositionInLine();
+ int _channel = Token.DEFAULT_CHANNEL;
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:8:7: ( '~' )
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:8:7: '~'
+ {
+ match('~'); if (failed) return ;
+
+ }
+
+
+ if ( backtracking==0 ) {
+
+ if ( token==null && ruleNestingLevel==1 ) {
+ emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+ }
+
+
+ }
+ }
+ finally {
+ ruleNestingLevel--;
+ }
+ }
+ // $ANTLR end T29
+
+ // $ANTLR start T30
+ public void mT30() throws RecognitionException {
+ try {
+ ruleNestingLevel++;
+ int _type = T30;
+ int _start = getCharIndex();
+ int _line = getLine();
+ int _charPosition = getCharPositionInLine();
+ int _channel = Token.DEFAULT_CHANNEL;
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:9:7: ( '&' )
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:9:7: '&'
+ {
+ match('&'); if (failed) return ;
+
+ }
+
+
+ if ( backtracking==0 ) {
+
+ if ( token==null && ruleNestingLevel==1 ) {
+ emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+ }
+
+
+ }
+ }
+ finally {
+ ruleNestingLevel--;
+ }
+ }
+ // $ANTLR end T30
+
+ // $ANTLR start T31
+ public void mT31() throws RecognitionException {
+ try {
+ ruleNestingLevel++;
+ int _type = T31;
+ int _start = getCharIndex();
+ int _line = getLine();
+ int _charPosition = getCharPositionInLine();
+ int _channel = Token.DEFAULT_CHANNEL;
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:10:7: ( '|' )
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:10:7: '|'
+ {
+ match('|'); if (failed) return ;
+
+ }
+
+
+ if ( backtracking==0 ) {
+
+ if ( token==null && ruleNestingLevel==1 ) {
+ emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+ }
+
+
+ }
+ }
+ finally {
+ ruleNestingLevel--;
+ }
+ }
+ // $ANTLR end T31
+
+ // $ANTLR start T32
+ public void mT32() throws RecognitionException {
+ try {
+ ruleNestingLevel++;
+ int _type = T32;
+ int _start = getCharIndex();
+ int _line = getLine();
+ int _charPosition = getCharPositionInLine();
+ int _channel = Token.DEFAULT_CHANNEL;
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:11:7: ( '=' )
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:11:7: '='
+ {
+ match('='); if (failed) return ;
+
+ }
+
+
+ if ( backtracking==0 ) {
+
+ if ( token==null && ruleNestingLevel==1 ) {
+ emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+ }
+
+
+ }
+ }
+ finally {
+ ruleNestingLevel--;
+ }
+ }
+ // $ANTLR end T32
+
+ // $ANTLR start VAR
+ public void mVAR() throws RecognitionException {
+ try {
+ ruleNestingLevel++;
+ int _type = VAR;
+ int _start = getCharIndex();
+ int _line = getLine();
+ int _charPosition = getCharPositionInLine();
+ int _channel = Token.DEFAULT_CHANNEL;
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:368:8: ( '?' ID )
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:368:8: '?' ID
+ {
+ match('?'); if (failed) return ;
+ mID(); if (failed) return ;
+
+ }
+
+
+ if ( backtracking==0 ) {
+
+ if ( token==null && ruleNestingLevel==1 ) {
+ emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+ }
+
+
+ }
+ }
+ finally {
+ ruleNestingLevel--;
+ }
+ }
+ // $ANTLR end VAR
+
+ // $ANTLR start ID
+ public void mID() throws RecognitionException {
+ try {
+ ruleNestingLevel++;
+ int _type = ID;
+ int _start = getCharIndex();
+ int _line = getLine();
+ int _charPosition = getCharPositionInLine();
+ int _channel = Token.DEFAULT_CHANNEL;
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:372:4: ( ('a'..'z'|'A'..'Z'|'_'|'$'|'\\u00c0'..'\\u00ff') ( ('a'..'z'|'A'..'Z'|'_'|'0'..'9'|'\\u00c0'..'\\u00ff'))* )
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:372:4: ('a'..'z'|'A'..'Z'|'_'|'$'|'\\u00c0'..'\\u00ff') ( ('a'..'z'|'A'..'Z'|'_'|'0'..'9'|'\\u00c0'..'\\u00ff'))*
+ {
+ if ( input.LA(1)=='$'||(input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z')||(input.LA(1)>='\u00C0' && input.LA(1)<='\u00FF') ) {
+ input.consume();
+ failed=false;
+ }
+ else {
+ if (backtracking>0) {failed=true; return ;}
+ MismatchedSetException mse =
+ new MismatchedSetException(null,input);
+ recover(mse); throw mse;
+ }
+
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:372:50: ( ('a'..'z'|'A'..'Z'|'_'|'0'..'9'|'\\u00c0'..'\\u00ff'))*
+ loop1:
+ do {
+ int alt1=2;
+ int LA1_0 = input.LA(1);
+ if ( ((LA1_0>='0' && LA1_0<='9')||(LA1_0>='A' && LA1_0<='Z')||LA1_0=='_'||(LA1_0>='a' && LA1_0<='z')||(LA1_0>='\u00C0' && LA1_0<='\u00FF')) ) {
+ alt1=1;
+ }
+
+
+ switch (alt1) {
+ case 1 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:372:51: ('a'..'z'|'A'..'Z'|'_'|'0'..'9'|'\\u00c0'..'\\u00ff')
+ {
+ if ( (input.LA(1)>='0' && input.LA(1)<='9')||(input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z')||(input.LA(1)>='\u00C0' && input.LA(1)<='\u00FF') ) {
+ input.consume();
+ failed=false;
+ }
+ else {
+ if (backtracking>0) {failed=true; return ;}
+ MismatchedSetException mse =
+ new MismatchedSetException(null,input);
+ recover(mse); throw mse;
+ }
+
+
+ }
+ break;
+
+ default :
+ break loop1;
+ }
+ } while (true);
+
+
+ }
+
+
+ if ( backtracking==0 ) {
+
+ if ( token==null && ruleNestingLevel==1 ) {
+ emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+ }
+
+
+ }
+ }
+ finally {
+ ruleNestingLevel--;
+ }
+ }
+ // $ANTLR end ID
+
+ // $ANTLR start NULL
+ public void mNULL() throws RecognitionException {
+ try {
+ ruleNestingLevel++;
+ int _type = NULL;
+ int _start = getCharIndex();
+ int _line = getLine();
+ int _charPosition = getCharPositionInLine();
+ int _channel = Token.DEFAULT_CHANNEL;
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:375:8: ( 'null' )
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:375:8: 'null'
+ {
+ match("null"); if (failed) return ;
+
+
+ }
+
+
+ if ( backtracking==0 ) {
+
+ if ( token==null && ruleNestingLevel==1 ) {
+ emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+ }
+
+
+ }
+ }
+ finally {
+ ruleNestingLevel--;
+ }
+ }
+ // $ANTLR end NULL
+
+ // $ANTLR start WS
+ public void mWS() throws RecognitionException {
+ try {
+ ruleNestingLevel++;
+ int _type = WS;
+ int _start = getCharIndex();
+ int _line = getLine();
+ int _charPosition = getCharPositionInLine();
+ int _channel = Token.DEFAULT_CHANNEL;
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:377:17: ( ( ' ' | '\\t' | '\\f' | EOL ) )
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:377:17: ( ' ' | '\\t' | '\\f' | EOL )
+ {
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:377:17: ( ' ' | '\\t' | '\\f' | EOL )
+ int alt2=4;
+ switch ( input.LA(1) ) {
+ case ' ':
+ alt2=1;
+ break;
+ case '\t':
+ alt2=2;
+ break;
+ case '\f':
+ alt2=3;
+ break;
+ case '\n':
+ case '\r':
+ alt2=4;
+ break;
+ default:
+ if (backtracking>0) {failed=true; return ;}
+ NoViableAltException nvae =
+ new NoViableAltException("377:17: ( ' ' | '\\t' | '\\f' | EOL )", 2, 0, input);
+
+ throw nvae;
+ }
+
+ switch (alt2) {
+ case 1 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:377:19: ' '
+ {
+ match(' '); if (failed) return ;
+
+ }
+ break;
+ case 2 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:378:19: '\\t'
+ {
+ match('\t'); if (failed) return ;
+
+ }
+ break;
+ case 3 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:379:19: '\\f'
+ {
+ match('\f'); if (failed) return ;
+
+ }
+ break;
+ case 4 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:380:19: EOL
+ {
+ mEOL(); if (failed) return ;
+
+ }
+ break;
+
+ }
+
+ if ( backtracking==0 ) {
+ _channel=HIDDEN;
+ }
+
+ }
+
+
+ if ( backtracking==0 ) {
+
+ if ( token==null && ruleNestingLevel==1 ) {
+ emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+ }
+
+
+ }
+ }
+ finally {
+ ruleNestingLevel--;
+ }
+ }
+ // $ANTLR end WS
+
+ // $ANTLR start EOL
+ public void mEOL() throws RecognitionException {
+ try {
+ ruleNestingLevel++;
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:387:6: ( ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' ) )
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:387:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
+ {
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:387:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )
+ int alt3=3;
+ int LA3_0 = input.LA(1);
+ if ( (LA3_0=='\r') ) {
+ int LA3_1 = input.LA(2);
+ if ( (LA3_1=='\n') ) {
+ alt3=1;
+ }
+ else {
+ alt3=2;}
+ }
+ else if ( (LA3_0=='\n') ) {
+ alt3=3;
+ }
+ else {
+ if (backtracking>0) {failed=true; return ;}
+ NoViableAltException nvae =
+ new NoViableAltException("387:6: ( ( '\\r\\n' )=> '\\r\\n' | '\\r' | '\\n' )", 3, 0, input);
+
+ throw nvae;
+ }
+ switch (alt3) {
+ case 1 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:387:14: ( '\\r\\n' )=> '\\r\\n'
+ {
+ match("\r\n"); if (failed) return ;
+
+
+ }
+ break;
+ case 2 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:388:25: '\\r'
+ {
+ match('\r'); if (failed) return ;
+
+ }
+ break;
+ case 3 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:389:25: '\\n'
+ {
+ match('\n'); if (failed) return ;
+
+ }
+ break;
+
+ }
+
+
+ }
+
+ }
+ finally {
+ ruleNestingLevel--;
+ }
+ }
+ // $ANTLR end EOL
+
+ // $ANTLR start INT
+ public void mINT() throws RecognitionException {
+ try {
+ ruleNestingLevel++;
+ int _type = INT;
+ int _start = getCharIndex();
+ int _line = getLine();
+ int _charPosition = getCharPositionInLine();
+ int _channel = Token.DEFAULT_CHANNEL;
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:394:4: ( ( '-' )? ( '0' .. '9' )+ )
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:394:4: ( '-' )? ( '0' .. '9' )+
+ {
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:394:4: ( '-' )?
+ int alt4=2;
+ int LA4_0 = input.LA(1);
+ if ( (LA4_0=='-') ) {
+ alt4=1;
+ }
+ switch (alt4) {
+ case 1 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:394:5: '-'
+ {
+ match('-'); if (failed) return ;
+
+ }
+ break;
+
+ }
+
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:394:10: ( '0' .. '9' )+
+ int cnt5=0;
+ loop5:
+ do {
+ int alt5=2;
+ int LA5_0 = input.LA(1);
+ if ( ((LA5_0>='0' && LA5_0<='9')) ) {
+ alt5=1;
+ }
+
+
+ switch (alt5) {
+ case 1 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:394:11: '0' .. '9'
+ {
+ matchRange('0','9'); if (failed) return ;
+
+ }
+ break;
+
+ default :
+ if ( cnt5 >= 1 ) break loop5;
+ if (backtracking>0) {failed=true; return ;}
+ EarlyExitException eee =
+ new EarlyExitException(5, input);
+ throw eee;
+ }
+ cnt5++;
+ } while (true);
+
+
+ }
+
+
+ if ( backtracking==0 ) {
+
+ if ( token==null && ruleNestingLevel==1 ) {
+ emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+ }
+
+
+ }
+ }
+ finally {
+ ruleNestingLevel--;
+ }
+ }
+ // $ANTLR end INT
+
+ // $ANTLR start FLOAT
+ public void mFLOAT() throws RecognitionException {
+ try {
+ ruleNestingLevel++;
+ int _type = FLOAT;
+ int _start = getCharIndex();
+ int _line = getLine();
+ int _charPosition = getCharPositionInLine();
+ int _channel = Token.DEFAULT_CHANNEL;
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:398:4: ( ( '-' )? ( '0' .. '9' )+ '.' ( '0' .. '9' )+ )
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:398:4: ( '-' )? ( '0' .. '9' )+ '.' ( '0' .. '9' )+
+ {
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:398:4: ( '-' )?
+ int alt6=2;
+ int LA6_0 = input.LA(1);
+ if ( (LA6_0=='-') ) {
+ alt6=1;
+ }
+ switch (alt6) {
+ case 1 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:398:5: '-'
+ {
+ match('-'); if (failed) return ;
+
+ }
+ break;
+
+ }
+
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:398:10: ( '0' .. '9' )+
+ int cnt7=0;
+ loop7:
+ do {
+ int alt7=2;
+ int LA7_0 = input.LA(1);
+ if ( ((LA7_0>='0' && LA7_0<='9')) ) {
+ alt7=1;
+ }
+
+
+ switch (alt7) {
+ case 1 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:398:11: '0' .. '9'
+ {
+ matchRange('0','9'); if (failed) return ;
+
+ }
+ break;
+
+ default :
+ if ( cnt7 >= 1 ) break loop7;
+ if (backtracking>0) {failed=true; return ;}
+ EarlyExitException eee =
+ new EarlyExitException(7, input);
+ throw eee;
+ }
+ cnt7++;
+ } while (true);
+
+ match('.'); if (failed) return ;
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:398:26: ( '0' .. '9' )+
+ int cnt8=0;
+ loop8:
+ do {
+ int alt8=2;
+ int LA8_0 = input.LA(1);
+ if ( ((LA8_0>='0' && LA8_0<='9')) ) {
+ alt8=1;
+ }
+
+
+ switch (alt8) {
+ case 1 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:398:27: '0' .. '9'
+ {
+ matchRange('0','9'); if (failed) return ;
+
+ }
+ break;
+
+ default :
+ if ( cnt8 >= 1 ) break loop8;
+ if (backtracking>0) {failed=true; return ;}
+ EarlyExitException eee =
+ new EarlyExitException(8, input);
+ throw eee;
+ }
+ cnt8++;
+ } while (true);
+
+
+ }
+
+
+ if ( backtracking==0 ) {
+
+ if ( token==null && ruleNestingLevel==1 ) {
+ emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+ }
+
+
+ }
+ }
+ finally {
+ ruleNestingLevel--;
+ }
+ }
+ // $ANTLR end FLOAT
+
+ // $ANTLR start STRING
+ public void mSTRING() throws RecognitionException {
+ try {
+ ruleNestingLevel++;
+ int _type = STRING;
+ int _start = getCharIndex();
+ int _line = getLine();
+ int _charPosition = getCharPositionInLine();
+ int _channel = Token.DEFAULT_CHANNEL;
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:402:8: ( ( '\"' ( EscapeSequence | ~ ('\\\\'|'\"'))* '\"' ) | ( '\\'' ( EscapeSequence | ~ ('\\\\'|'\\''))* '\\'' ) )
+ int alt11=2;
+ int LA11_0 = input.LA(1);
+ if ( (LA11_0=='\"') ) {
+ alt11=1;
+ }
+ else if ( (LA11_0=='\'') ) {
+ alt11=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return ;}
+ NoViableAltException nvae =
+ new NoViableAltException("401:1: STRING : ( ( '\"' ( EscapeSequence | ~ ('\\\\'|'\"'))* '\"' ) | ( '\\'' ( EscapeSequence | ~ ('\\\\'|'\\''))* '\\'' ) );", 11, 0, input);
+
+ throw nvae;
+ }
+ switch (alt11) {
+ case 1 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:402:8: ( '\"' ( EscapeSequence | ~ ('\\\\'|'\"'))* '\"' )
+ {
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:402:8: ( '\"' ( EscapeSequence | ~ ('\\\\'|'\"'))* '\"' )
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:402:9: '\"' ( EscapeSequence | ~ ('\\\\'|'\"'))* '\"'
+ {
+ match('\"'); if (failed) return ;
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:402:13: ( EscapeSequence | ~ ('\\\\'|'\"'))*
+ loop9:
+ do {
+ int alt9=3;
+ int LA9_0 = input.LA(1);
+ if ( (LA9_0=='\\') ) {
+ alt9=1;
+ }
+ else if ( ((LA9_0>='\u0000' && LA9_0<='!')||(LA9_0>='#' && LA9_0<='[')||(LA9_0>=']' && LA9_0<='\uFFFE')) ) {
+ alt9=2;
+ }
+
+
+ switch (alt9) {
+ case 1 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:402:15: EscapeSequence
+ {
+ mEscapeSequence(); if (failed) return ;
+
+ }
+ break;
+ case 2 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:402:32: ~ ('\\\\'|'\"')
+ {
+ if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFE') ) {
+ input.consume();
+ failed=false;
+ }
+ else {
+ if (backtracking>0) {failed=true; return ;}
+ MismatchedSetException mse =
+ new MismatchedSetException(null,input);
+ recover(mse); throw mse;
+ }
+
+
+ }
+ break;
+
+ default :
+ break loop9;
+ }
+ } while (true);
+
+ match('\"'); if (failed) return ;
+
+ }
+
+
+ }
+ break;
+ case 2 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:403:8: ( '\\'' ( EscapeSequence | ~ ('\\\\'|'\\''))* '\\'' )
+ {
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:403:8: ( '\\'' ( EscapeSequence | ~ ('\\\\'|'\\''))* '\\'' )
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:403:9: '\\'' ( EscapeSequence | ~ ('\\\\'|'\\''))* '\\''
+ {
+ match('\''); if (failed) return ;
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:403:14: ( EscapeSequence | ~ ('\\\\'|'\\''))*
+ loop10:
+ do {
+ int alt10=3;
+ int LA10_0 = input.LA(1);
+ if ( (LA10_0=='\\') ) {
+ alt10=1;
+ }
+ else if ( ((LA10_0>='\u0000' && LA10_0<='&')||(LA10_0>='(' && LA10_0<='[')||(LA10_0>=']' && LA10_0<='\uFFFE')) ) {
+ alt10=2;
+ }
+
+
+ switch (alt10) {
+ case 1 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:403:16: EscapeSequence
+ {
+ mEscapeSequence(); if (failed) return ;
+
+ }
+ break;
+ case 2 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:403:33: ~ ('\\\\'|'\\'')
+ {
+ if ( (input.LA(1)>='\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFE') ) {
+ input.consume();
+ failed=false;
+ }
+ else {
+ if (backtracking>0) {failed=true; return ;}
+ MismatchedSetException mse =
+ new MismatchedSetException(null,input);
+ recover(mse); throw mse;
+ }
+
+
+ }
+ break;
+
+ default :
+ break loop10;
+ }
+ } while (true);
+
+ match('\''); if (failed) return ;
+
+ }
+
+
+ }
+ break;
+
+ }
+
+ if ( backtracking==0 ) {
+
+ if ( token==null && ruleNestingLevel==1 ) {
+ emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+ }
+
+
+ }
+ }
+ finally {
+ ruleNestingLevel--;
+ }
+ }
+ // $ANTLR end STRING
+
+ // $ANTLR start HexDigit
+ public void mHexDigit() throws RecognitionException {
+ try {
+ ruleNestingLevel++;
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:407:12: ( ('0'..'9'|'a'..'f'|'A'..'F'))
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:407: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;
+ }
+ else {
+ if (backtracking>0) {failed=true; return ;}
+ MismatchedSetException mse =
+ new MismatchedSetException(null,input);
+ recover(mse); throw mse;
+ }
+
+
+ }
+
+ }
+ finally {
+ ruleNestingLevel--;
+ }
+ }
+ // $ANTLR end HexDigit
+
+ // $ANTLR start EscapeSequence
+ public void mEscapeSequence() throws RecognitionException {
+ try {
+ ruleNestingLevel++;
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:411:9: ( '\\\\' ('b'|'t'|'n'|'f'|'r'|'\\\"'|'\\''|'\\\\') | UnicodeEscape | OctalEscape )
+ int alt12=3;
+ int LA12_0 = input.LA(1);
+ if ( (LA12_0=='\\') ) {
+ switch ( input.LA(2) ) {
+ case '\"':
+ case '\'':
+ case '\\':
+ case 'b':
+ case 'f':
+ case 'n':
+ case 'r':
+ case 't':
+ alt12=1;
+ break;
+ case 'u':
+ alt12=2;
+ break;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ alt12=3;
+ break;
+ default:
+ if (backtracking>0) {failed=true; return ;}
+ NoViableAltException nvae =
+ new NoViableAltException("409:1: fragment EscapeSequence : ( '\\\\' ('b'|'t'|'n'|'f'|'r'|'\\\"'|'\\''|'\\\\') | UnicodeEscape | OctalEscape );", 12, 1, input);
+
+ throw nvae;
+ }
+
+ }
+ else {
+ if (backtracking>0) {failed=true; return ;}
+ NoViableAltException nvae =
+ new NoViableAltException("409:1: fragment EscapeSequence : ( '\\\\' ('b'|'t'|'n'|'f'|'r'|'\\\"'|'\\''|'\\\\') | UnicodeEscape | OctalEscape );", 12, 0, input);
+
+ throw nvae;
+ }
+ switch (alt12) {
+ case 1 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:411:9: '\\\\' ('b'|'t'|'n'|'f'|'r'|'\\\"'|'\\''|'\\\\')
+ {
+ match('\\'); if (failed) return ;
+ if ( input.LA(1)=='\"'||input.LA(1)=='\''||input.LA(1)=='\\'||input.LA(1)=='b'||input.LA(1)=='f'||input.LA(1)=='n'||input.LA(1)=='r'||input.LA(1)=='t' ) {
+ input.consume();
+ failed=false;
+ }
+ else {
+ if (backtracking>0) {failed=true; return ;}
+ MismatchedSetException mse =
+ new MismatchedSetException(null,input);
+ recover(mse); throw mse;
+ }
+
+
+ }
+ break;
+ case 2 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:412:9: UnicodeEscape
+ {
+ mUnicodeEscape(); if (failed) return ;
+
+ }
+ break;
+ case 3 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:413:9: OctalEscape
+ {
+ mOctalEscape(); if (failed) return ;
+
+ }
+ break;
+
+ }
+ }
+ finally {
+ ruleNestingLevel--;
+ }
+ }
+ // $ANTLR end EscapeSequence
+
+ // $ANTLR start OctalEscape
+ public void mOctalEscape() throws RecognitionException {
+ try {
+ ruleNestingLevel++;
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:418:9: ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) )
+ int alt13=3;
+ int LA13_0 = input.LA(1);
+ if ( (LA13_0=='\\') ) {
+ int LA13_1 = input.LA(2);
+ if ( ((LA13_1>='0' && LA13_1<='3')) ) {
+ int LA13_2 = input.LA(3);
+ if ( ((LA13_2>='0' && LA13_2<='7')) ) {
+ int LA13_4 = input.LA(4);
+ if ( ((LA13_4>='0' && LA13_4<='7')) ) {
+ alt13=1;
+ }
+ else {
+ alt13=2;}
+ }
+ else {
+ alt13=3;}
+ }
+ else if ( ((LA13_1>='4' && LA13_1<='7')) ) {
+ int LA13_3 = input.LA(3);
+ if ( ((LA13_3>='0' && LA13_3<='7')) ) {
+ alt13=2;
+ }
+ else {
+ alt13=3;}
+ }
+ else {
+ if (backtracking>0) {failed=true; return ;}
+ NoViableAltException nvae =
+ new NoViableAltException("416:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 13, 1, input);
+
+ throw nvae;
+ }
+ }
+ else {
+ if (backtracking>0) {failed=true; return ;}
+ NoViableAltException nvae =
+ new NoViableAltException("416:1: fragment OctalEscape : ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) );", 13, 0, input);
+
+ throw nvae;
+ }
+ switch (alt13) {
+ case 1 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:418:9: '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' )
+ {
+ match('\\'); if (failed) return ;
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:418:14: ( '0' .. '3' )
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:418:15: '0' .. '3'
+ {
+ matchRange('0','3'); if (failed) return ;
+
+ }
+
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:418:25: ( '0' .. '7' )
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:418:26: '0' .. '7'
+ {
+ matchRange('0','7'); if (failed) return ;
+
+ }
+
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:418:36: ( '0' .. '7' )
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:418:37: '0' .. '7'
+ {
+ matchRange('0','7'); if (failed) return ;
+
+ }
+
+
+ }
+ break;
+ case 2 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:419:9: '\\\\' ( '0' .. '7' ) ( '0' .. '7' )
+ {
+ match('\\'); if (failed) return ;
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:419:14: ( '0' .. '7' )
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:419:15: '0' .. '7'
+ {
+ matchRange('0','7'); if (failed) return ;
+
+ }
+
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:419:25: ( '0' .. '7' )
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:419:26: '0' .. '7'
+ {
+ matchRange('0','7'); if (failed) return ;
+
+ }
+
+
+ }
+ break;
+ case 3 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:420:9: '\\\\' ( '0' .. '7' )
+ {
+ match('\\'); if (failed) return ;
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:420:14: ( '0' .. '7' )
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:420:15: '0' .. '7'
+ {
+ matchRange('0','7'); if (failed) return ;
+
+ }
+
+
+ }
+ break;
+
+ }
+ }
+ finally {
+ ruleNestingLevel--;
+ }
+ }
+ // $ANTLR end OctalEscape
+
+ // $ANTLR start UnicodeEscape
+ public void mUnicodeEscape() throws RecognitionException {
+ try {
+ ruleNestingLevel++;
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:425:9: ( '\\\\' 'u' HexDigit HexDigit HexDigit HexDigit )
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:425: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 ;
+
+ }
+
+ }
+ finally {
+ ruleNestingLevel--;
+ }
+ }
+ // $ANTLR end UnicodeEscape
+
+ // $ANTLR start BOOL
+ public void mBOOL() throws RecognitionException {
+ try {
+ ruleNestingLevel++;
+ int _type = BOOL;
+ int _start = getCharIndex();
+ int _line = getLine();
+ int _charPosition = getCharPositionInLine();
+ int _channel = Token.DEFAULT_CHANNEL;
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:429:4: ( ( 'true' | 'false' ) )
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:429:4: ( 'true' | 'false' )
+ {
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:429:4: ( 'true' | 'false' )
+ int alt14=2;
+ int LA14_0 = input.LA(1);
+ if ( (LA14_0=='t') ) {
+ alt14=1;
+ }
+ else if ( (LA14_0=='f') ) {
+ alt14=2;
+ }
+ else {
+ if (backtracking>0) {failed=true; return ;}
+ NoViableAltException nvae =
+ new NoViableAltException("429:4: ( 'true' | 'false' )", 14, 0, input);
+
+ throw nvae;
+ }
+ switch (alt14) {
+ case 1 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:429:5: 'true'
+ {
+ match("true"); if (failed) return ;
+
+
+ }
+ break;
+ case 2 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:429:12: 'false'
+ {
+ match("false"); if (failed) return ;
+
+
+ }
+ break;
+
+ }
+
+
+ }
+
+
+ if ( backtracking==0 ) {
+
+ if ( token==null && ruleNestingLevel==1 ) {
+ emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+ }
+
+
+ }
+ }
+ finally {
+ ruleNestingLevel--;
+ }
+ }
+ // $ANTLR end BOOL
+
+ // $ANTLR start SH_STYLE_SINGLE_LINE_COMMENT
+ public void mSH_STYLE_SINGLE_LINE_COMMENT() throws RecognitionException {
+ try {
+ ruleNestingLevel++;
+ int _type = SH_STYLE_SINGLE_LINE_COMMENT;
+ int _start = getCharIndex();
+ int _line = getLine();
+ int _charPosition = getCharPositionInLine();
+ int _channel = Token.DEFAULT_CHANNEL;
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:433:4: ( '#' ( options {greedy=false; } : . )* EOL )
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:433:4: '#' ( options {greedy=false; } : . )* EOL
+ {
+ match('#'); if (failed) return ;
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:433:8: ( options {greedy=false; } : . )*
+ loop15:
+ do {
+ int alt15=2;
+ int LA15_0 = input.LA(1);
+ if ( (LA15_0=='\r') ) {
+ alt15=2;
+ }
+ 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')) ) {
+ alt15=1;
+ }
+
+
+ switch (alt15) {
+ case 1 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:433:35: .
+ {
+ matchAny(); if (failed) return ;
+
+ }
+ break;
+
+ default :
+ break loop15;
+ }
+ } while (true);
+
+ mEOL(); if (failed) return ;
+ if ( backtracking==0 ) {
+ _channel=HIDDEN;
+ }
+
+ }
+
+
+ if ( backtracking==0 ) {
+
+ if ( token==null && ruleNestingLevel==1 ) {
+ emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+ }
+
+
+ }
+ }
+ finally {
+ ruleNestingLevel--;
+ }
+ }
+ // $ANTLR end SH_STYLE_SINGLE_LINE_COMMENT
+
+ // $ANTLR start C_STYLE_SINGLE_LINE_COMMENT
+ public void mC_STYLE_SINGLE_LINE_COMMENT() throws RecognitionException {
+ try {
+ ruleNestingLevel++;
+ int _type = C_STYLE_SINGLE_LINE_COMMENT;
+ int _start = getCharIndex();
+ int _line = getLine();
+ int _charPosition = getCharPositionInLine();
+ int _channel = Token.DEFAULT_CHANNEL;
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:439:4: ( '//' ( options {greedy=false; } : . )* EOL )
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:439:4: '//' ( options {greedy=false; } : . )* EOL
+ {
+ match("//"); if (failed) return ;
+
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:439:9: ( options {greedy=false; } : . )*
+ loop16:
+ do {
+ int alt16=2;
+ int LA16_0 = input.LA(1);
+ if ( (LA16_0=='\r') ) {
+ alt16=2;
+ }
+ 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')) ) {
+ alt16=1;
+ }
+
+
+ switch (alt16) {
+ case 1 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:439:36: .
+ {
+ matchAny(); if (failed) return ;
+
+ }
+ break;
+
+ default :
+ break loop16;
+ }
+ } while (true);
+
+ mEOL(); if (failed) return ;
+ if ( backtracking==0 ) {
+ _channel=HIDDEN;
+ }
+
+ }
+
+
+ if ( backtracking==0 ) {
+
+ if ( token==null && ruleNestingLevel==1 ) {
+ emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+ }
+
+
+ }
+ }
+ finally {
+ ruleNestingLevel--;
+ }
+ }
+ // $ANTLR end C_STYLE_SINGLE_LINE_COMMENT
+
+ // $ANTLR start LEFT_PAREN
+ public void mLEFT_PAREN() throws RecognitionException {
+ try {
+ ruleNestingLevel++;
+ int _type = LEFT_PAREN;
+ int _start = getCharIndex();
+ int _line = getLine();
+ int _charPosition = getCharPositionInLine();
+ int _channel = Token.DEFAULT_CHANNEL;
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:445:4: ( '(' )
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:445:4: '('
+ {
+ match('('); if (failed) return ;
+
+ }
+
+
+ if ( backtracking==0 ) {
+
+ if ( token==null && ruleNestingLevel==1 ) {
+ emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+ }
+
+
+ }
+ }
+ finally {
+ ruleNestingLevel--;
+ }
+ }
+ // $ANTLR end LEFT_PAREN
+
+ // $ANTLR start RIGHT_PAREN
+ public void mRIGHT_PAREN() throws RecognitionException {
+ try {
+ ruleNestingLevel++;
+ int _type = RIGHT_PAREN;
+ int _start = getCharIndex();
+ int _line = getLine();
+ int _charPosition = getCharPositionInLine();
+ int _channel = Token.DEFAULT_CHANNEL;
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:449:4: ( ')' )
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:449:4: ')'
+ {
+ match(')'); if (failed) return ;
+
+ }
+
+
+ if ( backtracking==0 ) {
+
+ if ( token==null && ruleNestingLevel==1 ) {
+ emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+ }
+
+
+ }
+ }
+ finally {
+ ruleNestingLevel--;
+ }
+ }
+ // $ANTLR end RIGHT_PAREN
+
+ // $ANTLR start LEFT_SQUARE
+ public void mLEFT_SQUARE() throws RecognitionException {
+ try {
+ ruleNestingLevel++;
+ int _type = LEFT_SQUARE;
+ int _start = getCharIndex();
+ int _line = getLine();
+ int _charPosition = getCharPositionInLine();
+ int _channel = Token.DEFAULT_CHANNEL;
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:453:4: ( '[' )
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:453:4: '['
+ {
+ match('['); if (failed) return ;
+
+ }
+
+
+ if ( backtracking==0 ) {
+
+ if ( token==null && ruleNestingLevel==1 ) {
+ emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+ }
+
+
+ }
+ }
+ finally {
+ ruleNestingLevel--;
+ }
+ }
+ // $ANTLR end LEFT_SQUARE
+
+ // $ANTLR start RIGHT_SQUARE
+ public void mRIGHT_SQUARE() throws RecognitionException {
+ try {
+ ruleNestingLevel++;
+ int _type = RIGHT_SQUARE;
+ int _start = getCharIndex();
+ int _line = getLine();
+ int _charPosition = getCharPositionInLine();
+ int _channel = Token.DEFAULT_CHANNEL;
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:457:4: ( ']' )
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:457:4: ']'
+ {
+ match(']'); if (failed) return ;
+
+ }
+
+
+ if ( backtracking==0 ) {
+
+ if ( token==null && ruleNestingLevel==1 ) {
+ emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+ }
+
+
+ }
+ }
+ finally {
+ ruleNestingLevel--;
+ }
+ }
+ // $ANTLR end RIGHT_SQUARE
+
+ // $ANTLR start LEFT_CURLY
+ public void mLEFT_CURLY() throws RecognitionException {
+ try {
+ ruleNestingLevel++;
+ int _type = LEFT_CURLY;
+ int _start = getCharIndex();
+ int _line = getLine();
+ int _charPosition = getCharPositionInLine();
+ int _channel = Token.DEFAULT_CHANNEL;
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:461:4: ( '{' )
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:461:4: '{'
+ {
+ match('{'); if (failed) return ;
+
+ }
+
+
+ if ( backtracking==0 ) {
+
+ if ( token==null && ruleNestingLevel==1 ) {
+ emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+ }
+
+
+ }
+ }
+ finally {
+ ruleNestingLevel--;
+ }
+ }
+ // $ANTLR end LEFT_CURLY
+
+ // $ANTLR start RIGHT_CURLY
+ public void mRIGHT_CURLY() throws RecognitionException {
+ try {
+ ruleNestingLevel++;
+ int _type = RIGHT_CURLY;
+ int _start = getCharIndex();
+ int _line = getLine();
+ int _charPosition = getCharPositionInLine();
+ int _channel = Token.DEFAULT_CHANNEL;
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:465:4: ( '}' )
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:465:4: '}'
+ {
+ match('}'); if (failed) return ;
+
+ }
+
+
+ if ( backtracking==0 ) {
+
+ if ( token==null && ruleNestingLevel==1 ) {
+ emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+ }
+
+
+ }
+ }
+ finally {
+ ruleNestingLevel--;
+ }
+ }
+ // $ANTLR end RIGHT_CURLY
+
+ // $ANTLR start MULTI_LINE_COMMENT
+ public void mMULTI_LINE_COMMENT() throws RecognitionException {
+ try {
+ ruleNestingLevel++;
+ int _type = MULTI_LINE_COMMENT;
+ int _start = getCharIndex();
+ int _line = getLine();
+ int _charPosition = getCharPositionInLine();
+ int _channel = Token.DEFAULT_CHANNEL;
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:469:4: ( '/*' ( options {greedy=false; } : . )* '*/' )
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:469:4: '/*' ( options {greedy=false; } : . )* '*/'
+ {
+ match("/*"); if (failed) return ;
+
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:469:9: ( options {greedy=false; } : . )*
+ loop17:
+ do {
+ int alt17=2;
+ int LA17_0 = input.LA(1);
+ if ( (LA17_0=='*') ) {
+ int LA17_1 = input.LA(2);
+ if ( (LA17_1=='/') ) {
+ alt17=2;
+ }
+ else if ( ((LA17_1>='\u0000' && LA17_1<='.')||(LA17_1>='0' && LA17_1<='\uFFFE')) ) {
+ alt17=1;
+ }
+
+
+ }
+ else if ( ((LA17_0>='\u0000' && LA17_0<=')')||(LA17_0>='+' && LA17_0<='\uFFFE')) ) {
+ alt17=1;
+ }
+
+
+ switch (alt17) {
+ case 1 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:469:35: .
+ {
+ matchAny(); if (failed) return ;
+
+ }
+ break;
+
+ default :
+ break loop17;
+ }
+ } while (true);
+
+ match("*/"); if (failed) return ;
+
+ if ( backtracking==0 ) {
+ _channel=HIDDEN;
+ }
+
+ }
+
+
+ if ( backtracking==0 ) {
+
+ if ( token==null && ruleNestingLevel==1 ) {
+ emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+ }
+
+
+ }
+ }
+ finally {
+ ruleNestingLevel--;
+ }
+ }
+ // $ANTLR end MULTI_LINE_COMMENT
+
+ // $ANTLR start MISC
+ public void mMISC() throws RecognitionException {
+ try {
+ ruleNestingLevel++;
+ int _type = MISC;
+ int _start = getCharIndex();
+ int _line = getLine();
+ int _charPosition = getCharPositionInLine();
+ int _channel = Token.DEFAULT_CHANNEL;
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:473:7: ( ('!'|'@'|'$'|'%'|'^'|'&'|'*'|'_'|'-'|'+'|'?'|'|'|','|'='|'/'|'\\''|'\\\\'))
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:474:3: ('!'|'@'|'$'|'%'|'^'|'&'|'*'|'_'|'-'|'+'|'?'|'|'|','|'='|'/'|'\\''|'\\\\')
+ {
+ if ( input.LA(1)=='!'||(input.LA(1)>='$' && input.LA(1)<='\'')||(input.LA(1)>='*' && input.LA(1)<='-')||input.LA(1)=='/'||input.LA(1)=='='||(input.LA(1)>='?' && input.LA(1)<='@')||input.LA(1)=='\\'||(input.LA(1)>='^' && input.LA(1)<='_')||input.LA(1)=='|' ) {
+ input.consume();
+ failed=false;
+ }
+ else {
+ if (backtracking>0) {failed=true; return ;}
+ MismatchedSetException mse =
+ new MismatchedSetException(null,input);
+ recover(mse); throw mse;
+ }
+
+
+ }
+
+
+ if ( backtracking==0 ) {
+
+ if ( token==null && ruleNestingLevel==1 ) {
+ emit(_type,_line,_charPosition,_channel,_start,getCharIndex()-1);
+ }
+
+
+ }
+ }
+ finally {
+ ruleNestingLevel--;
+ }
+ }
+ // $ANTLR end MISC
+
+ public void mTokens() throws RecognitionException {
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:10: ( T27 | T28 | T29 | T30 | T31 | T32 | VAR | ID | NULL | WS | INT | FLOAT | STRING | BOOL | SH_STYLE_SINGLE_LINE_COMMENT | C_STYLE_SINGLE_LINE_COMMENT | LEFT_PAREN | RIGHT_PAREN | LEFT_SQUARE | RIGHT_SQUARE | LEFT_CURLY | RIGHT_CURLY | MULTI_LINE_COMMENT | MISC )
+ int alt18=24;
+ alt18 = dfa18.predict(input);
+ switch (alt18) {
+ case 1 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:10: T27
+ {
+ mT27(); if (failed) return ;
+
+ }
+ break;
+ case 2 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:14: T28
+ {
+ mT28(); if (failed) return ;
+
+ }
+ break;
+ case 3 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:18: T29
+ {
+ mT29(); if (failed) return ;
+
+ }
+ break;
+ case 4 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:22: T30
+ {
+ mT30(); if (failed) return ;
+
+ }
+ break;
+ case 5 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:26: T31
+ {
+ mT31(); if (failed) return ;
+
+ }
+ break;
+ case 6 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:30: T32
+ {
+ mT32(); if (failed) return ;
+
+ }
+ break;
+ case 7 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:34: VAR
+ {
+ mVAR(); if (failed) return ;
+
+ }
+ break;
+ case 8 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:38: ID
+ {
+ mID(); if (failed) return ;
+
+ }
+ break;
+ case 9 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:41: NULL
+ {
+ mNULL(); if (failed) return ;
+
+ }
+ break;
+ case 10 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:46: WS
+ {
+ mWS(); if (failed) return ;
+
+ }
+ break;
+ case 11 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:49: INT
+ {
+ mINT(); if (failed) return ;
+
+ }
+ break;
+ case 12 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:53: FLOAT
+ {
+ mFLOAT(); if (failed) return ;
+
+ }
+ break;
+ case 13 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:59: STRING
+ {
+ mSTRING(); if (failed) return ;
+
+ }
+ break;
+ case 14 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:66: BOOL
+ {
+ mBOOL(); if (failed) return ;
+
+ }
+ break;
+ case 15 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:71: SH_STYLE_SINGLE_LINE_COMMENT
+ {
+ mSH_STYLE_SINGLE_LINE_COMMENT(); if (failed) return ;
+
+ }
+ break;
+ case 16 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:100: C_STYLE_SINGLE_LINE_COMMENT
+ {
+ mC_STYLE_SINGLE_LINE_COMMENT(); if (failed) return ;
+
+ }
+ break;
+ case 17 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:128: LEFT_PAREN
+ {
+ mLEFT_PAREN(); if (failed) return ;
+
+ }
+ break;
+ case 18 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:139: RIGHT_PAREN
+ {
+ mRIGHT_PAREN(); if (failed) return ;
+
+ }
+ break;
+ case 19 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:151: LEFT_SQUARE
+ {
+ mLEFT_SQUARE(); if (failed) return ;
+
+ }
+ break;
+ case 20 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:163: RIGHT_SQUARE
+ {
+ mRIGHT_SQUARE(); if (failed) return ;
+
+ }
+ break;
+ case 21 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:176: LEFT_CURLY
+ {
+ mLEFT_CURLY(); if (failed) return ;
+
+ }
+ break;
+ case 22 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:187: RIGHT_CURLY
+ {
+ mRIGHT_CURLY(); if (failed) return ;
+
+ }
+ break;
+ case 23 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:199: MULTI_LINE_COMMENT
+ {
+ mMULTI_LINE_COMMENT(); if (failed) return ;
+
+ }
+ break;
+ case 24 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:1:218: MISC
+ {
+ mMISC(); if (failed) return ;
+
+ }
+ break;
+
+ }
+
+ }
+
+
+ protected DFA18 dfa18 = new DFA18(this);
+ public static final String DFA18_eotS =
+ "\2\uffff\1\31\4\uffff\1\32\2\31\1\uffff\1\32\1\43\1\uffff\1\32\1"+
+ "\31\2\uffff\1\32\10\uffff\1\31\4\uffff\2\31\2\uffff\1\31\2\uffff"+
+ "\5\31\2\uffff\2\31\1\uffff\1\31\1\63\1\uffff";
+ public static final String DFA18_eofS =
+ "\64\uffff";
+ public static final String DFA18_minS =
+ "\1\11\1\uffff\1\145\4\uffff\1\44\1\165\1\162\1\uffff\1\60\1\56\1"+
+ "\uffff\1\0\1\141\2\uffff\1\52\10\uffff\1\146\4\uffff\1\154\1\165"+
+ "\2\uffff\1\154\2\uffff\1\162\1\154\1\145\1\163\1\165\2\uffff\1\145"+
+ "\1\154\1\uffff\1\145\1\60\1\uffff";
+ public static final String DFA18_maxS =
+ "\1\u00ff\1\uffff\1\145\4\uffff\1\u00ff\1\165\1\162\1\uffff\2\71"+
+ "\1\uffff\1\ufffe\1\141\2\uffff\1\57\10\uffff\1\146\4\uffff\1\154"+
+ "\1\165\2\uffff\1\154\2\uffff\1\162\1\154\1\145\1\163\1\165\2\uffff"+
+ "\1\145\1\154\1\uffff\1\145\1\u00ff\1\uffff";
+ public static final String DFA18_acceptS =
+ "\1\uffff\1\1\1\uffff\1\3\1\4\1\5\1\6\3\uffff\1\12\2\uffff\1\15\2"+
+ "\uffff\1\10\1\17\1\uffff\1\21\1\22\1\23\1\24\1\25\1\26\1\10\1\30"+
+ "\1\uffff\1\4\1\5\1\6\1\7\2\uffff\1\14\1\13\1\uffff\1\27\1\20\5\uffff"+
+ "\2\10\2\uffff\1\10\2\uffff\1\2";
+ public static final String DFA18_specialS =
+ "\64\uffff}>";
+ public static final String[] DFA18_transition = {
+ "\2\12\1\uffff\2\12\22\uffff\1\12\1\32\1\15\1\21\1\20\1\32\1\4\1"+
+ "\16\1\23\1\24\3\32\1\13\1\uffff\1\22\12\14\1\uffff\1\1\1\uffff\1"+
+ "\6\1\uffff\1\7\1\32\32\31\1\25\1\32\1\26\1\32\1\20\1\uffff\3\31"+
+ "\1\2\1\31\1\17\7\31\1\10\5\31\1\11\6\31\1\27\1\5\1\30\1\3\101\uffff"+
+ "\100\31",
+ "",
+ "\1\33",
+ "",
+ "",
+ "",
+ "",
+ "\1\37\34\uffff\32\37\4\uffff\1\37\1\uffff\32\37\105\uffff\100\37",
+ "\1\40",
+ "\1\41",
+ "",
+ "\12\14",
+ "\1\42\1\uffff\12\14",
+ "",
+ "\uffff\15",
+ "\1\44",
+ "",
+ "",
+ "\1\45\4\uffff\1\46",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
+ "\1\47",
+ "",
+ "",
+ "",
+ "",
+ "\1\50",
+ "\1\51",
+ "",
+ "",
+ "\1\52",
+ "",
+ "",
+ "\1\53",
+ "\1\54",
+ "\1\55",
+ "\1\56",
+ "\1\57",
+ "",
+ "",
+ "\1\60",
+ "\1\61",
+ "",
+ "\1\62",
+ "\12\31\7\uffff\32\31\4\uffff\1\31\1\uffff\32\31\105\uffff\100\31",
+ ""
+ };
+
+ class DFA18 extends DFA {
+ public DFA18(BaseRecognizer recognizer) {
+ this.recognizer = recognizer;
+ this.decisionNumber = 18;
+ this.eot = DFA.unpackEncodedString(DFA18_eotS);
+ this.eof = DFA.unpackEncodedString(DFA18_eofS);
+ this.min = DFA.unpackEncodedStringToUnsignedChars(DFA18_minS);
+ this.max = DFA.unpackEncodedStringToUnsignedChars(DFA18_maxS);
+ this.accept = DFA.unpackEncodedString(DFA18_acceptS);
+ this.special = DFA.unpackEncodedString(DFA18_specialS);
+ int numStates = DFA18_transition.length;
+ this.transition = new short[numStates][];
+ for (int i=0; i<numStates; i++) {
+ transition[i] = DFA.unpackEncodedString(DFA18_transition[i]);
+ }
+ }
+ public String getDescription() {
+ return "1:1: Tokens : ( T27 | T28 | T29 | T30 | T31 | T32 | VAR | ID | NULL | WS | INT | FLOAT | STRING | BOOL | SH_STYLE_SINGLE_LINE_COMMENT | C_STYLE_SINGLE_LINE_COMMENT | LEFT_PAREN | RIGHT_PAREN | LEFT_SQUARE | RIGHT_SQUARE | LEFT_CURLY | RIGHT_CURLY | MULTI_LINE_COMMENT | MISC );";
+ }
+ }
+
+
+}
\ No newline at end of file
Added: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/CLPParser.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/CLPParser.java (rev 0)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/CLPParser.java 2007-03-04 19:51:23 UTC (rev 9953)
@@ -0,0 +1,873 @@
+// $ANTLR 3.0b7 C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g 2007-03-04 18:04:41
+
+ package org.drools.clp;
+ import java.util.List;
+ import java.util.ArrayList;
+ import java.util.Iterator;
+ import java.util.HashMap;
+ import java.util.StringTokenizer;
+ import org.drools.lang.descr.*;
+ import org.drools.compiler.SwitchingCommonTokenStream;
+
+
+import org.antlr.runtime.*;
+import java.util.Stack;
+import java.util.List;
+import java.util.ArrayList;
+
+public class CLPParser extends Parser {
+ public static final String[] tokenNames = new String[] {
+ "<invalid>", "<EOR>", "<DOWN>", "<UP>", "LEFT_PAREN", "ID", "RIGHT_PAREN", "VAR", "STRING", "INT", "FLOAT", "BOOL", "NULL", "EOL", "WS", "EscapeSequence", "HexDigit", "UnicodeEscape", "OctalEscape", "SH_STYLE_SINGLE_LINE_COMMENT", "C_STYLE_SINGLE_LINE_COMMENT", "LEFT_SQUARE", "RIGHT_SQUARE", "LEFT_CURLY", "RIGHT_CURLY", "MULTI_LINE_COMMENT", "MISC", "';'", "'defrule'", "'~'", "'&'", "'|'", "'='"
+ };
+ public static final int LEFT_PAREN=4;
+ public static final int RIGHT_CURLY=24;
+ public static final int BOOL=11;
+ public static final int HexDigit=16;
+ public static final int WS=14;
+ public static final int MISC=26;
+ public static final int STRING=8;
+ public static final int FLOAT=10;
+ public static final int VAR=7;
+ public static final int UnicodeEscape=17;
+ public static final int EscapeSequence=15;
+ public static final int INT=9;
+ public static final int EOF=-1;
+ public static final int NULL=12;
+ public static final int EOL=13;
+ public static final int LEFT_SQUARE=21;
+ public static final int OctalEscape=18;
+ public static final int SH_STYLE_SINGLE_LINE_COMMENT=19;
+ public static final int MULTI_LINE_COMMENT=25;
+ public static final int RIGHT_PAREN=6;
+ public static final int LEFT_CURLY=23;
+ public static final int RIGHT_SQUARE=22;
+ public static final int C_STYLE_SINGLE_LINE_COMMENT=20;
+ public static final int ID=5;
+
+ public CLPParser(TokenStream input) {
+ super(input);
+ }
+
+
+ public String[] getTokenNames() { return tokenNames; }
+ public String getGrammarFileName() { return "C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.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;
+
+ // THE FOLLOWING LINE IS A DUMMY ATTRIBUTE TO WORK AROUND AN ANTLR BUG
+ private BaseDescr from = null;
+
+ 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+
+ "; expecting type "+
+ tokenNames[mtne.expecting]);
+ }
+ else if ( e instanceof NoViableAltException ) {
+ NoViableAltException nvae = (NoViableAltException)e;
+ message.append( "Unexpected token '" + e.token.getText() + "'" );
+ /*
+ message.append("decision=<<"+nvae.grammarDecisionDescription+">>"+
+ " state "+nvae.stateNumber+
+ " (decision="+nvae.decisionNumber+
+ ") no viable alt; token="+
+ e.token);
+ */
+ }
+ else if ( e instanceof EarlyExitException ) {
+ EarlyExitException eee = (EarlyExitException)e;
+ message.append("required (...)+ loop (decision="+
+ eee.decisionNumber+
+ ") did not match anything; token="+
+ e.token);
+ }
+ else if ( e instanceof MismatchedSetException ) {
+ MismatchedSetException mse = (MismatchedSetException)e;
+ message.append("mismatched token '"+
+ e.token+
+ "' expecting set "+mse.expecting);
+ }
+ else if ( e instanceof MismatchedNotSetException ) {
+ MismatchedNotSetException mse = (MismatchedNotSetException)e;
+ message.append("mismatched token '"+
+ e.token+
+ "' expecting set "+mse.expecting);
+ }
+ else if ( e instanceof FailedPredicateException ) {
+ FailedPredicateException fpe = (FailedPredicateException)e;
+ message.append("rule "+fpe.ruleName+" failed predicate: {"+
+ fpe.predicateText+"}?");
+ } else if (e instanceof GeneralParseException) {
+ message.append(" " + e.getMessage());
+ }
+ return message.toString();
+ }
+
+ void checkTrailingSemicolon(String text, int line) {
+ if (text.trim().endsWith( ";" ) ) {
+ this.errors.add( new GeneralParseException( "Trailing semi-colon not allowed", offset(line) ) );
+ }
+ }
+
+
+
+
+ // $ANTLR start opt_semicolon
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:167:1: opt_semicolon : ( ';' )? ;
+ public void opt_semicolon() throws RecognitionException {
+ try {
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:168:4: ( ( ';' )? )
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:168:4: ( ';' )?
+ {
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:168:4: ( ';' )?
+ int alt1=2;
+ int LA1_0 = input.LA(1);
+ if ( (LA1_0==27) ) {
+ alt1=1;
+ }
+ switch (alt1) {
+ case 1 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:168:4: ';'
+ {
+ match(input,27,FOLLOW_27_in_opt_semicolon38);
+
+ }
+ break;
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end opt_semicolon
+
+
+ // $ANTLR start rule
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:210:1: rule returns [RuleDescr rule] : loc= LEFT_PAREN 'defrule' ruleName= ID (column= bound_pattern | column= pattern ) RIGHT_PAREN ;
+ public RuleDescr rule() throws RecognitionException {
+ RuleDescr rule = null;
+
+ Token loc=null;
+ Token ruleName=null;
+ ColumnDescr column = null;
+
+
+
+ rule = null;
+ AndDescr lhs = null;
+ ColumnDescr colum = null;
+
+ try {
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:216:4: (loc= LEFT_PAREN 'defrule' ruleName= ID (column= bound_pattern | column= pattern ) RIGHT_PAREN )
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:216:4: loc= LEFT_PAREN 'defrule' ruleName= ID (column= bound_pattern | column= pattern ) RIGHT_PAREN
+ {
+ loc=(Token)input.LT(1);
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_rule64);
+ match(input,28,FOLLOW_28_in_rule66);
+ ruleName=(Token)input.LT(1);
+ match(input,ID,FOLLOW_ID_in_rule74);
+
+ debug( "start rule: " + ruleName.getText() );
+ rule = new RuleDescr( ruleName.getText(), null );
+ 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() );
+
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:230:4: (column= bound_pattern | column= pattern )
+ int alt2=2;
+ int LA2_0 = input.LA(1);
+ if ( (LA2_0==VAR) ) {
+ alt2=1;
+ }
+ else if ( (LA2_0==LEFT_PAREN) ) {
+ alt2=2;
+ }
+ else {
+ NoViableAltException nvae =
+ new NoViableAltException("230:4: (column= bound_pattern | column= pattern )", 2, 0, input);
+
+ throw nvae;
+ }
+ switch (alt2) {
+ case 1 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:230:6: column= bound_pattern
+ {
+ pushFollow(FOLLOW_bound_pattern_in_rule89);
+ column=bound_pattern();
+ _fsp--;
+
+
+ lhs.addDescr( column );
+
+
+ }
+ break;
+ case 2 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:234:6: column= pattern
+ {
+ pushFollow(FOLLOW_pattern_in_rule105);
+ column=pattern();
+ _fsp--;
+
+
+ lhs.addDescr( column );
+
+
+ }
+ break;
+
+ }
+
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_rule130);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return rule;
+ }
+ // $ANTLR end rule
+
+
+ // $ANTLR start bound_pattern
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:243:1: bound_pattern returns [ColumnDescr column] : id= VAR ;
+ public ColumnDescr bound_pattern() throws RecognitionException {
+ ColumnDescr column = null;
+
+ Token id=null;
+
+ try {
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:245:4: (id= VAR )
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:245:4: id= VAR
+ {
+ id=(Token)input.LT(1);
+ match(input,VAR,FOLLOW_VAR_in_bound_pattern148);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return column;
+ }
+ // $ANTLR end bound_pattern
+
+
+ // $ANTLR start pattern
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:254:1: pattern returns [ColumnDescr column] : LEFT_PAREN name= ID ( field_constriant[column] )* RIGHT_PAREN ;
+ public ColumnDescr pattern() throws RecognitionException {
+ ColumnDescr column = null;
+
+ Token name=null;
+
+ try {
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:255:5: ( LEFT_PAREN name= ID ( field_constriant[column] )* RIGHT_PAREN )
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:255:5: LEFT_PAREN name= ID ( field_constriant[column] )* RIGHT_PAREN
+ {
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_pattern167);
+ name=(Token)input.LT(1);
+ match(input,ID,FOLLOW_ID_in_pattern175);
+
+ column = new ColumnDescr(name.getText());
+
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:260:4: ( field_constriant[column] )*
+ loop3:
+ do {
+ int alt3=2;
+ int LA3_0 = input.LA(1);
+ if ( (LA3_0==LEFT_PAREN) ) {
+ alt3=1;
+ }
+
+
+ switch (alt3) {
+ case 1 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:260:4: field_constriant[column]
+ {
+ pushFollow(FOLLOW_field_constriant_in_pattern186);
+ field_constriant(column);
+ _fsp--;
+
+
+ }
+ break;
+
+ default :
+ break loop3;
+ }
+ } while (true);
+
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_pattern194);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return column;
+ }
+ // $ANTLR end pattern
+
+
+ // $ANTLR start field_constriant
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:265:1: field_constriant[ColumnDescr column] : LEFT_PAREN f= ID ( '~' )? ( return_value_constraint[op, fc] | lc= literal_constraint ) ( ( '&' | '|' ) ( '~' )? ( return_value_constraint[op, fc] | lc= literal_constraint ) )* RIGHT_PAREN ;
+ public void field_constriant(ColumnDescr column) throws RecognitionException {
+ Token f=null;
+ String lc = null;
+
+
+
+ List list = new ArrayList();
+ FieldBindingDescr fbd = null;
+ FieldConstraintDescr fc = null;
+ String op = "==";
+
+ try {
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:272:4: ( LEFT_PAREN f= ID ( '~' )? ( return_value_constraint[op, fc] | lc= literal_constraint ) ( ( '&' | '|' ) ( '~' )? ( return_value_constraint[op, fc] | lc= literal_constraint ) )* RIGHT_PAREN )
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:272:4: LEFT_PAREN f= ID ( '~' )? ( return_value_constraint[op, fc] | lc= literal_constraint ) ( ( '&' | '|' ) ( '~' )? ( return_value_constraint[op, fc] | lc= literal_constraint ) )* RIGHT_PAREN
+ {
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_field_constriant222);
+ f=(Token)input.LT(1);
+ match(input,ID,FOLLOW_ID_in_field_constriant230);
+
+ fc = new FieldConstraintDescr(f.getText());
+ fc.setLocation( offset(f.getLine()), f.getCharPositionInLine() );
+ fc.setStartCharacter( ((CommonToken)f).getStartIndex() );
+ column.addDescr( fc );
+
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:281:6: ( '~' )?
+ int alt4=2;
+ int LA4_0 = input.LA(1);
+ if ( (LA4_0==29) ) {
+ alt4=1;
+ }
+ switch (alt4) {
+ case 1 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:281:7: '~'
+ {
+ match(input,29,FOLLOW_29_in_field_constriant252);
+ op = "!=";
+
+ }
+ break;
+
+ }
+
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:282:5: ( return_value_constraint[op, fc] | lc= literal_constraint )
+ int alt5=2;
+ int LA5_0 = input.LA(1);
+ if ( (LA5_0==32) ) {
+ alt5=1;
+ }
+ else if ( ((LA5_0>=STRING && LA5_0<=NULL)) ) {
+ alt5=2;
+ }
+ else {
+ NoViableAltException nvae =
+ new NoViableAltException("282:5: ( return_value_constraint[op, fc] | lc= literal_constraint )", 5, 0, input);
+
+ throw nvae;
+ }
+ switch (alt5) {
+ case 1 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:283:7: return_value_constraint[op, fc]
+ {
+ pushFollow(FOLLOW_return_value_constraint_in_field_constriant271);
+ return_value_constraint(op, fc);
+ _fsp--;
+
+
+ }
+ break;
+ case 2 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:285:4: lc= literal_constraint
+ {
+ pushFollow(FOLLOW_literal_constraint_in_field_constriant286);
+ lc=literal_constraint();
+ _fsp--;
+
+
+ LiteralRestrictionDescr rd = new LiteralRestrictionDescr(op, lc, true);
+ fc.addRestriction( rd );
+ op = "==";
+
+
+ }
+ break;
+
+ }
+
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:293:4: ( ( '&' | '|' ) ( '~' )? ( return_value_constraint[op, fc] | lc= literal_constraint ) )*
+ loop9:
+ do {
+ int alt9=2;
+ int LA9_0 = input.LA(1);
+ if ( ((LA9_0>=30 && LA9_0<=31)) ) {
+ alt9=1;
+ }
+
+
+ switch (alt9) {
+ case 1 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:294:8: ( '&' | '|' ) ( '~' )? ( return_value_constraint[op, fc] | lc= literal_constraint )
+ {
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:294:8: ( '&' | '|' )
+ int alt6=2;
+ int LA6_0 = input.LA(1);
+ if ( (LA6_0==30) ) {
+ alt6=1;
+ }
+ else if ( (LA6_0==31) ) {
+ alt6=2;
+ }
+ else {
+ NoViableAltException nvae =
+ new NoViableAltException("294:8: ( '&' | '|' )", 6, 0, input);
+
+ throw nvae;
+ }
+ switch (alt6) {
+ case 1 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:294:9: '&'
+ {
+ match(input,30,FOLLOW_30_in_field_constriant317);
+
+ fc.addRestriction(new RestrictionConnectiveDescr(RestrictionConnectiveDescr.AND));
+
+
+ }
+ break;
+ case 2 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:299:8: '|'
+ {
+ match(input,31,FOLLOW_31_in_field_constriant345);
+
+ fc.addRestriction(new RestrictionConnectiveDescr(RestrictionConnectiveDescr.OR));
+
+
+ }
+ break;
+
+ }
+
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:305:7: ( '~' )?
+ int alt7=2;
+ int LA7_0 = input.LA(1);
+ if ( (LA7_0==29) ) {
+ alt7=1;
+ }
+ switch (alt7) {
+ case 1 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:305:8: '~'
+ {
+ match(input,29,FOLLOW_29_in_field_constriant394);
+ op = "!=";
+
+ }
+ break;
+
+ }
+
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:306:7: ( return_value_constraint[op, fc] | lc= literal_constraint )
+ int alt8=2;
+ int LA8_0 = input.LA(1);
+ if ( (LA8_0==32) ) {
+ alt8=1;
+ }
+ else if ( ((LA8_0>=STRING && LA8_0<=NULL)) ) {
+ alt8=2;
+ }
+ else {
+ NoViableAltException nvae =
+ new NoViableAltException("306:7: ( return_value_constraint[op, fc] | lc= literal_constraint )", 8, 0, input);
+
+ throw nvae;
+ }
+ switch (alt8) {
+ case 1 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:307:8: return_value_constraint[op, fc]
+ {
+ pushFollow(FOLLOW_return_value_constraint_in_field_constriant422);
+ return_value_constraint(op, fc);
+ _fsp--;
+
+
+ }
+ break;
+ case 2 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:309:5: lc= literal_constraint
+ {
+ pushFollow(FOLLOW_literal_constraint_in_field_constriant439);
+ lc=literal_constraint();
+ _fsp--;
+
+
+ LiteralRestrictionDescr rd = new LiteralRestrictionDescr(op, lc, true);
+ fc.addRestriction( rd );
+ op = "==";
+
+
+ }
+ break;
+
+ }
+
+
+ }
+ break;
+
+ default :
+ break loop9;
+ }
+ } while (true);
+
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_field_constriant480);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end field_constriant
+
+
+ // $ANTLR start constraint
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:333:1: constraint[String op] returns [RestrictionDescr rd] : bvc= ID ;
+ public RestrictionDescr constraint(String op) throws RecognitionException {
+ RestrictionDescr rd = null;
+
+ Token bvc=null;
+
+ try {
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:335:6: (bvc= ID )
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:335:6: bvc= ID
+ {
+ bvc=(Token)input.LT(1);
+ match(input,ID,FOLLOW_ID_in_constraint510);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return rd;
+ }
+ // $ANTLR end constraint
+
+
+ // $ANTLR start return_value_constraint
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:339:1: return_value_constraint[String op, FieldConstraintDescr fc] : '=' LEFT_PAREN id= ID RIGHT_PAREN ;
+ public void return_value_constraint(String op, FieldConstraintDescr fc) throws RecognitionException {
+ Token id=null;
+
+ try {
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:341:3: ( '=' LEFT_PAREN id= ID RIGHT_PAREN )
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:341:3: '=' LEFT_PAREN id= ID RIGHT_PAREN
+ {
+ match(input,32,FOLLOW_32_in_return_value_constraint527);
+ match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_return_value_constraint528);
+ id=(Token)input.LT(1);
+ match(input,ID,FOLLOW_ID_in_return_value_constraint535);
+
+ fc.addRestriction( new ReturnValueRestrictionDescr(op, id.getText() ) );
+
+ match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_return_value_constraint544);
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end return_value_constraint
+
+
+ // $ANTLR start literal_constraint
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:350:1: literal_constraint returns [String text] : (t= STRING | t= INT | t= FLOAT | t= BOOL | t= NULL ) ;
+ public String literal_constraint() throws RecognitionException {
+ String text = null;
+
+ Token t=null;
+
+
+ text = null;
+
+ try {
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:354:4: ( (t= STRING | t= INT | t= FLOAT | t= BOOL | t= NULL ) )
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:354:4: (t= STRING | t= INT | t= FLOAT | t= BOOL | t= NULL )
+ {
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:354:4: (t= STRING | t= INT | t= FLOAT | t= BOOL | t= NULL )
+ int alt10=5;
+ switch ( input.LA(1) ) {
+ case STRING:
+ alt10=1;
+ break;
+ case INT:
+ alt10=2;
+ break;
+ case FLOAT:
+ alt10=3;
+ break;
+ case BOOL:
+ alt10=4;
+ break;
+ case NULL:
+ alt10=5;
+ break;
+ default:
+ NoViableAltException nvae =
+ new NoViableAltException("354:4: (t= STRING | t= INT | t= FLOAT | t= BOOL | t= NULL )", 10, 0, input);
+
+ throw nvae;
+ }
+
+ switch (alt10) {
+ case 1 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:354:6: t= STRING
+ {
+ t=(Token)input.LT(1);
+ match(input,STRING,FOLLOW_STRING_in_literal_constraint571);
+ text = getString( t );
+
+ }
+ break;
+ case 2 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:355:5: t= INT
+ {
+ t=(Token)input.LT(1);
+ match(input,INT,FOLLOW_INT_in_literal_constraint582);
+ text = t.getText();
+
+ }
+ break;
+ case 3 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:356:5: t= FLOAT
+ {
+ t=(Token)input.LT(1);
+ match(input,FLOAT,FOLLOW_FLOAT_in_literal_constraint595);
+ text = t.getText();
+
+ }
+ break;
+ case 4 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:357:5: t= BOOL
+ {
+ t=(Token)input.LT(1);
+ match(input,BOOL,FOLLOW_BOOL_in_literal_constraint606);
+ text = t.getText();
+
+ }
+ break;
+ case 5 :
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:358:5: t= NULL
+ {
+ t=(Token)input.LT(1);
+ match(input,NULL,FOLLOW_NULL_in_literal_constraint618);
+ text = null;
+
+ }
+ break;
+
+ }
+
+
+ }
+
+ }
+ catch (RecognitionException re) {
+ reportError(re);
+ recover(input,re);
+ }
+ finally {
+ }
+ return text;
+ }
+ // $ANTLR end literal_constraint
+
+
+ // $ANTLR start function
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:363:1: function : ;
+ public void function() throws RecognitionException {
+ try {
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:366:2: ()
+ // C:\\dev\\jbossrules\\trunk\\drools-compiler\\src\\main\\resources\\org\\drools\\clp\\CLP.g:366:2:
+ {
+ }
+
+ }
+ finally {
+ }
+ return ;
+ }
+ // $ANTLR end function
+
+
+
+
+ public static final BitSet FOLLOW_27_in_opt_semicolon38 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_rule64 = new BitSet(new long[]{0x0000000010000000L});
+ public static final BitSet FOLLOW_28_in_rule66 = new BitSet(new long[]{0x0000000000000020L});
+ public static final BitSet FOLLOW_ID_in_rule74 = new BitSet(new long[]{0x0000000000000090L});
+ public static final BitSet FOLLOW_bound_pattern_in_rule89 = new BitSet(new long[]{0x0000000000000040L});
+ public static final BitSet FOLLOW_pattern_in_rule105 = new BitSet(new long[]{0x0000000000000040L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_rule130 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_VAR_in_bound_pattern148 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_pattern167 = new BitSet(new long[]{0x0000000000000020L});
+ public static final BitSet FOLLOW_ID_in_pattern175 = new BitSet(new long[]{0x0000000000000050L});
+ public static final BitSet FOLLOW_field_constriant_in_pattern186 = new BitSet(new long[]{0x0000000000000050L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_pattern194 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_field_constriant222 = new BitSet(new long[]{0x0000000000000020L});
+ public static final BitSet FOLLOW_ID_in_field_constriant230 = new BitSet(new long[]{0x0000000120001F00L});
+ public static final BitSet FOLLOW_29_in_field_constriant252 = new BitSet(new long[]{0x0000000100001F00L});
+ public static final BitSet FOLLOW_return_value_constraint_in_field_constriant271 = new BitSet(new long[]{0x00000000C0000040L});
+ public static final BitSet FOLLOW_literal_constraint_in_field_constriant286 = new BitSet(new long[]{0x00000000C0000040L});
+ public static final BitSet FOLLOW_30_in_field_constriant317 = new BitSet(new long[]{0x0000000120001F00L});
+ public static final BitSet FOLLOW_31_in_field_constriant345 = new BitSet(new long[]{0x0000000120001F00L});
+ public static final BitSet FOLLOW_29_in_field_constriant394 = new BitSet(new long[]{0x0000000100001F00L});
+ public static final BitSet FOLLOW_return_value_constraint_in_field_constriant422 = new BitSet(new long[]{0x00000000C0000040L});
+ public static final BitSet FOLLOW_literal_constraint_in_field_constriant439 = new BitSet(new long[]{0x00000000C0000040L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_field_constriant480 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_ID_in_constraint510 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_32_in_return_value_constraint527 = new BitSet(new long[]{0x0000000000000010L});
+ public static final BitSet FOLLOW_LEFT_PAREN_in_return_value_constraint528 = new BitSet(new long[]{0x0000000000000020L});
+ public static final BitSet FOLLOW_ID_in_return_value_constraint535 = new BitSet(new long[]{0x0000000000000040L});
+ public static final BitSet FOLLOW_RIGHT_PAREN_in_return_value_constraint544 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_STRING_in_literal_constraint571 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_INT_in_literal_constraint582 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_FLOAT_in_literal_constraint595 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_BOOL_in_literal_constraint606 = new BitSet(new long[]{0x0000000000000002L});
+ public static final BitSet FOLLOW_NULL_in_literal_constraint618 = new BitSet(new long[]{0x0000000000000002L});
+
+}
\ No newline at end of file
Added: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/GeneralParseException.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/GeneralParseException.java (rev 0)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/GeneralParseException.java 2007-03-04 19:51:23 UTC (rev 9953)
@@ -0,0 +1,39 @@
+package org.drools.clp;
+
+/*
+ * Copyright 2005 JBoss Inc
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.antlr.runtime.RecognitionException;
+
+public class GeneralParseException extends RecognitionException {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -1743929851876940150L;
+ private String message;
+
+ public GeneralParseException(final String message,
+ final int line) {
+ this.message = message;
+ this.line = line;
+ }
+
+ public String getMessage() {
+ return this.message;
+ }
+
+}
\ No newline at end of file
Added: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/clp.tokens
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/clp.tokens (rev 0)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/clp.tokens 2007-03-04 19:51:23 UTC (rev 9953)
@@ -0,0 +1,29 @@
+LEFT_PAREN=4
+RIGHT_CURLY=24
+BOOL=11
+HexDigit=16
+WS=14
+MISC=26
+STRING=8
+FLOAT=10
+VAR=7
+UnicodeEscape=17
+EscapeSequence=15
+INT=9
+NULL=12
+EOL=13
+LEFT_SQUARE=21
+OctalEscape=18
+SH_STYLE_SINGLE_LINE_COMMENT=19
+MULTI_LINE_COMMENT=25
+RIGHT_PAREN=6
+LEFT_CURLY=23
+RIGHT_SQUARE=22
+C_STYLE_SINGLE_LINE_COMMENT=20
+ID=5
+'&'=30
+'|'=31
+'='=32
+'defrule'=28
+';'=27
+'~'=29
Added: labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/clp__.g
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/clp__.g (rev 0)
+++ labs/jbossrules/trunk/drools-compiler/src/main/java/org/drools/clp/clp__.g 2007-03-04 19:51:23 UTC (rev 9953)
@@ -0,0 +1,143 @@
+lexer grammar CLP;
+ at header {
+ package org.drools.clp;
+}
+
+T27 : ';' ;
+T28 : 'defrule' ;
+T29 : '~' ;
+T30 : '&' ;
+T31 : '|' ;
+T32 : '=' ;
+
+// $ANTLR src "C:\dev\jbossrules\trunk\drools-compiler\src\main\resources\org\drools\clp\CLP.g" 368
+VAR : '?'ID
+ ;
+
+// $ANTLR src "C:\dev\jbossrules\trunk\drools-compiler\src\main\resources\org\drools\clp\CLP.g" 371
+ID
+ : ('a'..'z'|'A'..'Z'|'_'|'$'|'\u00c0'..'\u00ff')('a'..'z'|'A'..'Z'|'_'|'0'..'9'|'\u00c0'..'\u00ff')*
+ ;
+
+// $ANTLR src "C:\dev\jbossrules\trunk\drools-compiler\src\main\resources\org\drools\clp\CLP.g" 375
+NULL : 'null';
+
+// $ANTLR src "C:\dev\jbossrules\trunk\drools-compiler\src\main\resources\org\drools\clp\CLP.g" 377
+WS : ( ' '
+ | '\t'
+ | '\f'
+ | EOL
+ )
+ { $channel=HIDDEN; }
+ ;
+
+// $ANTLR src "C:\dev\jbossrules\trunk\drools-compiler\src\main\resources\org\drools\clp\CLP.g" 385
+fragment
+EOL :
+ ( ( '\r\n' )=> '\r\n' // Evil DOS
+ | '\r' // Macintosh
+ | '\n' // Unix (the right way)
+ )
+ ;
+
+// $ANTLR src "C:\dev\jbossrules\trunk\drools-compiler\src\main\resources\org\drools\clp\CLP.g" 393
+INT
+ : ('-')?('0'..'9')+
+ ;
+
+// $ANTLR src "C:\dev\jbossrules\trunk\drools-compiler\src\main\resources\org\drools\clp\CLP.g" 397
+FLOAT
+ : ('-')?('0'..'9')+ '.' ('0'..'9')+
+ ;
+
+// $ANTLR src "C:\dev\jbossrules\trunk\drools-compiler\src\main\resources\org\drools\clp\CLP.g" 401
+STRING
+ : ('"' ( EscapeSequence | ~('\\'|'"') )* '"')
+ | ('\'' ( EscapeSequence | ~('\\'|'\'') )* '\'')
+ ;
+
+// $ANTLR src "C:\dev\jbossrules\trunk\drools-compiler\src\main\resources\org\drools\clp\CLP.g" 406
+fragment
+HexDigit : ('0'..'9'|'a'..'f'|'A'..'F') ;
+
+// $ANTLR src "C:\dev\jbossrules\trunk\drools-compiler\src\main\resources\org\drools\clp\CLP.g" 409
+fragment
+EscapeSequence
+ : '\\' ('b'|'t'|'n'|'f'|'r'|'\"'|'\''|'\\')
+ | UnicodeEscape
+ | OctalEscape
+ ;
+
+// $ANTLR src "C:\dev\jbossrules\trunk\drools-compiler\src\main\resources\org\drools\clp\CLP.g" 416
+fragment
+OctalEscape
+ : '\\' ('0'..'3') ('0'..'7') ('0'..'7')
+ | '\\' ('0'..'7') ('0'..'7')
+ | '\\' ('0'..'7')
+ ;
+
+// $ANTLR src "C:\dev\jbossrules\trunk\drools-compiler\src\main\resources\org\drools\clp\CLP.g" 423
+fragment
+UnicodeEscape
+ : '\\' 'u' HexDigit HexDigit HexDigit HexDigit
+ ;
+
+// $ANTLR src "C:\dev\jbossrules\trunk\drools-compiler\src\main\resources\org\drools\clp\CLP.g" 428
+BOOL
+ : ('true'|'false')
+ ;
+
+// $ANTLR src "C:\dev\jbossrules\trunk\drools-compiler\src\main\resources\org\drools\clp\CLP.g" 432
+SH_STYLE_SINGLE_LINE_COMMENT
+ : '#' ( options{greedy=false;} : .)* EOL /* ('\r')? '\n' */
+ { $channel=HIDDEN; }
+ ;
+
+
+// $ANTLR src "C:\dev\jbossrules\trunk\drools-compiler\src\main\resources\org\drools\clp\CLP.g" 438
+C_STYLE_SINGLE_LINE_COMMENT
+ : '//' ( options{greedy=false;} : .)* EOL // ('\r')? '\n'
+ { $channel=HIDDEN; }
+ ;
+
+
+// $ANTLR src "C:\dev\jbossrules\trunk\drools-compiler\src\main\resources\org\drools\clp\CLP.g" 444
+LEFT_PAREN
+ : '('
+ ;
+
+// $ANTLR src "C:\dev\jbossrules\trunk\drools-compiler\src\main\resources\org\drools\clp\CLP.g" 448
+RIGHT_PAREN
+ : ')'
+ ;
+
+// $ANTLR src "C:\dev\jbossrules\trunk\drools-compiler\src\main\resources\org\drools\clp\CLP.g" 452
+LEFT_SQUARE
+ : '['
+ ;
+
+// $ANTLR src "C:\dev\jbossrules\trunk\drools-compiler\src\main\resources\org\drools\clp\CLP.g" 456
+RIGHT_SQUARE
+ : ']'
+ ;
+
+// $ANTLR src "C:\dev\jbossrules\trunk\drools-compiler\src\main\resources\org\drools\clp\CLP.g" 460
+LEFT_CURLY
+ : '{'
+ ;
+
+// $ANTLR src "C:\dev\jbossrules\trunk\drools-compiler\src\main\resources\org\drools\clp\CLP.g" 464
+RIGHT_CURLY
+ : '}'
+ ;
+
+// $ANTLR src "C:\dev\jbossrules\trunk\drools-compiler\src\main\resources\org\drools\clp\CLP.g" 468
+MULTI_LINE_COMMENT
+ : '/*' (options{greedy=false;} : .)* '*/'
+ { $channel=HIDDEN; }
+ ;
+
+// $ANTLR src "C:\dev\jbossrules\trunk\drools-compiler\src\main\resources\org\drools\clp\CLP.g" 473
+MISC :
+ '!' | '@' | '$' | '%' | '^' | '&' | '*' | '_' | '-' | '+' | '?' | '|' | ',' | '=' | '/' | '\'' | '\\'
+ ;
More information about the jboss-svn-commits
mailing list