Author: rgodfrey
Date: Wed Apr 23 05:48:19 2008
New Revision: 650850
URL: http://svn.apache.org/viewvc?rev=650850&view=rev
Log:
QPID-832 : Quoted identifiers grammar fix for client side selectors
Modified:
incubator/qpid/branches/thegreatmerge/qpid/java/client/src/main/grammar/SelectorParser.jj
Modified:
incubator/qpid/branches/thegreatmerge/qpid/java/client/src/main/grammar/SelectorParser.jj
URL:
http://svn.apache.org/viewvc/incubator/qpid/branches/thegreatmerge/qpid/java/client/src/main/grammar/SelectorParser.jj?rev=650850&r1=650849&r2=650850&view=diff
==============================================================================
---
incubator/qpid/branches/thegreatmerge/qpid/java/client/src/main/grammar/SelectorParser.jj
(original)
+++
incubator/qpid/branches/thegreatmerge/qpid/java/client/src/main/grammar/SelectorParser.jj
Wed Apr 23 05:48:19 2008
@@ -170,6 +170,8 @@
TOKEN [IGNORE_CASE] :
{
< ID : ["a"-"z", "_", "$"] (["a"-"z","0"-"9","_", "$"])* >
+ | < QUOTED_ID : "\"" ( ("\"\"") | ~["\""] )* "\"" >
+
}
// ----------------------------------------------------------------------------
@@ -577,6 +579,7 @@
PropertyExpression variable() :
{
Token t;
+ StringBuffer rc = new StringBuffer();
PropertyExpression left=null;
}
{
@@ -585,6 +588,20 @@
{
left = new PropertyExpression(t.image);
}
+ |
+ t = <QUOTED_ID>
+ {
+ // Decode the sting value.
+ String image = t.image;
+ for( int i=1; i < image.length()-1; i++ ) {
+ char c = image.charAt(i);
+ if( c == '"' )
+ i++;
+ rc.append(c);
+ }
+ return new PropertyExpression(rc.toString());
+ }
+
)
{
return left;