Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[AS7-4286] Fix JavaCC grammars for version 5.

The JBossQL en EJBQL grammars used for CMP use some tokens with
empty regular expressions. This worked with JavaCC 4 but doesn't
with version 5.

This patch creates a DUMMY lexical state that will never be
reached and puts those tokens inside with a non empty regular
expression (that will never be matched).
  • Loading branch information...
commit 606a92b49c2133ecc7670eb9dffd6f7044f551e8 1 parent efdeda7
@jhernand jhernand authored bstansberry committed
View
37 cmp/src/main/jjtree/org/jboss/as/cmp/ejbql/EJBQLParser.jjt
@@ -1067,10 +1067,6 @@ TOKEN_MGR_DECLS :
}
}
|
- < ABSTRACT_SCHEMA: [] >
-|
- < IDENTIFICATION_VARIABLE: [] >
-|
< #NAME: <LETTER> (<LETTER>|<DIGIT>)* >
|
< #LETTER:
@@ -1149,12 +1145,6 @@ TOKEN_MGR_DECLS :
}
}
}
-| < NUMERIC_VALUED_PARAMETER: [] >
-| < STRING_VALUED_PARAMETER: [] >
-| < DATETIME_VALUED_PARAMETER: [] >
-| < BOOLEAN_VALUED_PARAMETER: [] >
-| < ENTITY_VALUED_PARAMETER: [] >
-| < VALUE_CLASS_VALUED_PARAMETER: [] >
}
/**
@@ -1222,14 +1212,25 @@ TOKEN_MGR_DECLS :
idManager.registerPath(matchedToken.image, pathList, fieldList);
resetPath();
} : DEFAULT
-| < NUMERIC_VALUED_PATH: [] >
-| < STRING_VALUED_PATH: [] >
-| < DATETIME_VALUED_PATH: [] >
-| < BOOLEAN_VALUED_PATH: [] >
-| < ENTITY_VALUED_PATH: [] >
-| < VALUE_CLASS_VALUED_PATH: [] >
-| < UNKNOWN_PATH: [] >
-| < COLLECTION_VALUED_PATH: [] >
}
+<DUMMY> TOKEN:
+{
+ < ABSTRACT_SCHEMA: "ABSTRACT_SCHEMA" >
+| < IDENTIFICATION_VARIABLE: "IDENTIFICATION_VARIABLE" >
+| < NUMERIC_VALUED_PARAMETER: "NUMERIC_VALUED_PARAMETER" >
+| < STRING_VALUED_PARAMETER: "STRING_VALUED_PARAMETER" >
+| < DATETIME_VALUED_PARAMETER: "DATETIME_VALUED_PARAMETER" >
+| < BOOLEAN_VALUED_PARAMETER: "BOOLEAN_VALUED_PARAMETER" >
+| < ENTITY_VALUED_PARAMETER: "ENTITY_VALUED_PARAMETER" >
+| < VALUE_CLASS_VALUED_PARAMETER: "VALUE_CLASS_VALUED_PARAMETER" >
+| < NUMERIC_VALUED_PATH: "NUMERIC_VALUED_PATH" >
+| < STRING_VALUED_PATH: "STRING_VALUED_PATH" >
+| < DATETIME_VALUED_PATH: "DATETIME_VALUED_PATH" >
+| < BOOLEAN_VALUED_PATH: "BOOLEAN_VALUED_PATH" >
+| < ENTITY_VALUED_PATH: "ENTITY_VALUED_PATH" >
+| < VALUE_CLASS_VALUED_PATH: "VALUE_CLASS_VALUED_PATH" >
+| < UNKNOWN_PATH: "UNKNOWN_PATH" >
+| < COLLECTION_VALUED_PATH: "COLLECTION_VALUED_PATH" >
+}
View
38 cmp/src/main/jjtree/org/jboss/as/cmp/ejbql/JBossQLParser.jjt
@@ -1163,10 +1163,6 @@ TOKEN_MGR_DECLS :
}
}
|
- < ABSTRACT_SCHEMA: [] >
-|
- < IDENTIFICATION_VARIABLE: [] >
-|
< #NAME: <LETTER> (<LETTER>|<DIGIT>)* >
|
< #LETTER:
@@ -1245,12 +1241,6 @@ TOKEN_MGR_DECLS :
}
}
}
-| < NUMERIC_VALUED_PARAMETER: [] >
-| < STRING_VALUED_PARAMETER: [] >
-| < DATETIME_VALUED_PARAMETER: [] >
-| < BOOLEAN_VALUED_PARAMETER: [] >
-| < ENTITY_VALUED_PARAMETER: [] >
-| < VALUE_CLASS_VALUED_PARAMETER: [] >
}
/**
@@ -1318,14 +1308,24 @@ TOKEN_MGR_DECLS :
idManager.registerPath(matchedToken.image, pathList, fieldList);
resetPath();
} : DEFAULT
-| < NUMERIC_VALUED_PATH: [] >
-| < STRING_VALUED_PATH: [] >
-| < DATETIME_VALUED_PATH: [] >
-| < BOOLEAN_VALUED_PATH: [] >
-| < ENTITY_VALUED_PATH: [] >
-| < VALUE_CLASS_VALUED_PATH: [] >
-| < UNKNOWN_PATH: [] >
-| < COLLECTION_VALUED_PATH: [] >
}
-
+<DUMMY> TOKEN :
+{
+ < ABSTRACT_SCHEMA: "ABSTRACT_SCHEMA:" >
+| < IDENTIFICATION_VARIABLE: "IDENTIFICATION_VARIABLE" >
+| < NUMERIC_VALUED_PARAMETER: "NUMERIC_VALUED_PARAMETER" >
+| < STRING_VALUED_PARAMETER: "STRING_VALUED_PARAMETER" >
+| < DATETIME_VALUED_PARAMETER: "DATETIME_VALUED_PARAMETER" >
+| < BOOLEAN_VALUED_PARAMETER: "BOOLEAN_VALUED_PARAMETER" >
+| < ENTITY_VALUED_PARAMETER: "ENTITY_VALUED_PARAMETER" >
+| < VALUE_CLASS_VALUED_PARAMETER: "VALUE_CLASS_VALUED_PARAMETER" >
+| < NUMERIC_VALUED_PATH: "NUMERIC_VALUED_PATH" >
+| < STRING_VALUED_PATH: "STRING_VALUED_PATH" >
+| < DATETIME_VALUED_PATH: "DATETIME_VALUED_PATH" >
+| < BOOLEAN_VALUED_PATH: "BOOLEAN_VALUED_PATH" >
+| < ENTITY_VALUED_PATH: "ENTITY_VALUED_PATH" >
+| < VALUE_CLASS_VALUED_PATH: "VALUE_CLASS_VALUED_PATH" >
+| < UNKNOWN_PATH: "UNKNOWN_PATH" >
+| < COLLECTION_VALUED_PATH: "COLLECTION_VALUED_PATH" >
+}
Please sign in to comment.
Something went wrong with that request. Please try again.