summaryrefslogtreecommitdiff
path: root/java/broker/src
diff options
context:
space:
mode:
authorRobert Godfrey <rgodfrey@apache.org>2008-02-12 16:44:59 +0000
committerRobert Godfrey <rgodfrey@apache.org>2008-02-12 16:44:59 +0000
commit1df04df23ddda53cda350ddaeec692cb2f7cbed8 (patch)
treeadc914af4a7416b3dd83342c08fe43029cd30f1e /java/broker/src
parentd203e3c2b52e59b8b5faed91b57be4603840b9a7 (diff)
downloadqpid-python-1df04df23ddda53cda350ddaeec692cb2f7cbed8.tar.gz
QPID-787 : Allow for quoting of identifiers in selectors
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/M2.1@620858 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/broker/src')
-rw-r--r--java/broker/src/main/grammar/SelectorParser.jj17
1 files changed, 17 insertions, 0 deletions
diff --git a/java/broker/src/main/grammar/SelectorParser.jj b/java/broker/src/main/grammar/SelectorParser.jj
index adec1b348d..f6a843e080 100644
--- a/java/broker/src/main/grammar/SelectorParser.jj
+++ b/java/broker/src/main/grammar/SelectorParser.jj
@@ -172,6 +172,7 @@ TOKEN [IGNORE_CASE] :
TOKEN [IGNORE_CASE] :
{
< ID : ["a"-"z", "_", "$"] (["a"-"z","0"-"9","_", "$"])* >
+ | < QUOTED_ID : "\"" ( ("\"\"") | ~["\""] )* "\"" >
}
// ----------------------------------------------------------------------------
@@ -589,6 +590,7 @@ String stringLitteral() :
PropertyExpression variable() :
{
Token t;
+ StringBuffer rc = new StringBuffer();
PropertyExpression left=null;
}
{
@@ -597,6 +599,21 @@ PropertyExpression variable() :
{
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;