activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject [46/50] [abbrv] activemq-nms-msmq git commit: Apply patch for AMQNET-556 from Stephane Ramet. Thanks Stephane!
Date Tue, 07 Mar 2017 19:39:26 GMT
http://git-wip-us.apache.org/repos/asf/activemq-nms-msmq/blob/7274a80a/src/main/csharp/Selector/PlusExpression.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/Selector/PlusExpression.cs b/src/main/csharp/Selector/PlusExpression.cs
index 450b653..b966765 100644
--- a/src/main/csharp/Selector/PlusExpression.cs
+++ b/src/main/csharp/Selector/PlusExpression.cs
@@ -1,68 +1,67 @@
-´╗┐using System;
-/**
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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.
- */
-
-namespace Apache.NMS.Selector
-{
-    /// <summary>
-    /// A filter performing an addition of two expressions.
-    /// </summary>
-    public class PlusExpression : ArithmeticExpression
-    {
-        protected override string ExpressionSymbol
-        {
-            get { return "+"; }
-        }
-
-        public PlusExpression(IExpression left, IExpression right)
-            : base(left, right)
-        {
-        }
-
-        public override object Evaluate(MessageEvaluationContext message)
-        {
-            object lvalue = Left.Evaluate(message);
-            if(lvalue == null) return null;
-
-            object rvalue = Right.Evaluate(message);
-            if(lvalue is string) return (string)lvalue + rvalue;
-            if(rvalue == null) return null;
-
-            AlignedNumericValues values = new AlignedNumericValues(lvalue, rvalue);
-
-            object result = null;
-
-            switch(values.TypeEnum)
-            {
-                case AlignedNumericValues.T.SByteType : result = (sbyte )values.Left + (sbyte )values.Right; break;
-                case AlignedNumericValues.T.ByteType  : result = (byte  )values.Left + (byte  )values.Right; break;
-                case AlignedNumericValues.T.CharType  : result = (char  )values.Left + (char  )values.Right; break;
-                case AlignedNumericValues.T.ShortType : result = (short )values.Left + (short )values.Right; break;
-                case AlignedNumericValues.T.UShortType: result = (ushort)values.Left + (ushort)values.Right; break;
-                case AlignedNumericValues.T.IntType   : result = (int   )values.Left + (int   )values.Right; break;
-                case AlignedNumericValues.T.UIntType  : result = (uint  )values.Left + (uint  )values.Right; break;
-                case AlignedNumericValues.T.LongType  : result = (long  )values.Left + (long  )values.Right; break;
-                case AlignedNumericValues.T.ULongType : result = (ulong )values.Left + (ulong )values.Right; break;
-                case AlignedNumericValues.T.FloatType : result = (float )values.Left + (float )values.Right; break;
-                case AlignedNumericValues.T.DoubleType: result = (double)values.Left + (double)values.Right; break;
-            }
-
-            return result;
-        }
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+using System;
+
+namespace Apache.NMS.Selector
+{
+    /// <summary>
+    /// A filter performing an addition of two expressions.
+    /// </summary>
+    public class PlusExpression : ArithmeticExpression
+    {
+        protected override string ExpressionSymbol
+        {
+            get { return "+"; }
+        }
+
+        public PlusExpression(IExpression left, IExpression right)
+            : base(left, right)
+        {
+        }
+
+        public override object Evaluate(MessageEvaluationContext message)
+        {
+            object lvalue = Left.Evaluate(message);
+            if(lvalue == null) return null;
+
+            object rvalue = Right.Evaluate(message);
+            if(lvalue is string) return (string)lvalue + rvalue;
+            if(rvalue == null) return null;
+
+            AlignedNumericValues values = new AlignedNumericValues(lvalue, rvalue);
+
+            object result = null;
+
+            switch(values.TypeEnum)
+            {
+                case AlignedNumericValues.T.SByteType : result = (sbyte )values.Left + (sbyte )values.Right; break;
+                case AlignedNumericValues.T.ByteType  : result = (byte  )values.Left + (byte  )values.Right; break;
+                case AlignedNumericValues.T.CharType  : result = (char  )values.Left + (char  )values.Right; break;
+                case AlignedNumericValues.T.ShortType : result = (short )values.Left + (short )values.Right; break;
+                case AlignedNumericValues.T.UShortType: result = (ushort)values.Left + (ushort)values.Right; break;
+                case AlignedNumericValues.T.IntType   : result = (int   )values.Left + (int   )values.Right; break;
+                case AlignedNumericValues.T.UIntType  : result = (uint  )values.Left + (uint  )values.Right; break;
+                case AlignedNumericValues.T.LongType  : result = (long  )values.Left + (long  )values.Right; break;
+                case AlignedNumericValues.T.ULongType : result = (ulong )values.Left + (ulong )values.Right; break;
+                case AlignedNumericValues.T.FloatType : result = (float )values.Left + (float )values.Right; break;
+                case AlignedNumericValues.T.DoubleType: result = (double)values.Left + (double)values.Right; break;
+            }
+
+            return result;
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/activemq-nms-msmq/blob/7274a80a/src/main/csharp/Selector/PropertyExpression.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/Selector/PropertyExpression.cs b/src/main/csharp/Selector/PropertyExpression.cs
index 8d00757..0cd5c47 100644
--- a/src/main/csharp/Selector/PropertyExpression.cs
+++ b/src/main/csharp/Selector/PropertyExpression.cs
@@ -1,53 +1,52 @@
-´╗┐using System;
-/**
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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.
- */
-
-namespace Apache.NMS.Selector
-{
-    /// <summary>
-    /// Represents a property expression.
-    /// </summary>
-    public class PropertyExpression : IExpression
-    {
-        private string name;
-        public string Name
-        {
-            get { return name; }
-        }
-
-        public PropertyExpression(string name)
-        {
-            this.name = name;
-        }
-
-        public object Evaluate(MessageEvaluationContext message)
-        {
-            return message.GetProperty(name);
-        }
-
-        public override string ToString()
-        {
-            return name;
-        }
-
-        public override int GetHashCode()
-        {
-            return name.GetHashCode();
-        }
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+using System;
+
+namespace Apache.NMS.Selector
+{
+    /// <summary>
+    /// Represents a property expression.
+    /// </summary>
+    public class PropertyExpression : IExpression
+    {
+        private string name;
+        public string Name
+        {
+            get { return name; }
+        }
+
+        public PropertyExpression(string name)
+        {
+            this.name = name;
+        }
+
+        public object Evaluate(MessageEvaluationContext message)
+        {
+            return message.GetProperty(name);
+        }
+
+        public override string ToString()
+        {
+            return name;
+        }
+
+        public override int GetHashCode()
+        {
+            return name.GetHashCode();
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/activemq-nms-msmq/blob/7274a80a/src/main/csharp/Selector/SelectorParser.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/Selector/SelectorParser.cs b/src/main/csharp/Selector/SelectorParser.cs
index 92226ac..efb05f5 100644
--- a/src/main/csharp/Selector/SelectorParser.cs
+++ b/src/main/csharp/Selector/SelectorParser.cs
@@ -1,1172 +1,1171 @@
-/* Generated By:CSharpCC: Do not edit this line. SelectorParser.cs */
-/**
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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.
- */
-using System;
-using System.IO;
-using System.Text;
-using System.Collections;
-
-using Apache.NMS;
-
-namespace Apache.NMS.Selector
-{
-    /// <summary>
-    /// JMS Selector Parser generated by <a href="https://github.com/deveel/csharpcc">CSharpCC</a>
-    /// 
-    /// Do not edit this .cs file directly - it is autogenerated from SelectorParser.csc
-    /// using <c>csharpcc.exe -UNICODE_INPUT=true SelectorParser.csc</c>.
-    /// 
-    /// SelectorParser.csc is adapted from
-    /// <a href="https://raw.githubusercontent.com/apache/activemq/activemq-4.0/activemq-core/src/main/grammar/SelectorParser.jj">
-    /// ActiveMQ 4.0 SelectorParser.jj</a>
-    /// </summary>
-    public class SelectorParser : SelectorParserConstants {
-
-        public SelectorParser()
-            : this(new StringReader(""))
-        {
-        }
-
-        public IBooleanExpression Parse(string selector)
-        {
-            this.ReInit(new StringReader(selector));
-
-            try
-            {
-                return this.JmsSelector();
-            }
-            catch(Exception e)
-            {
-                    throw new InvalidSelectorException(selector, e);
-            }
-        }
-
-        private IBooleanExpression AsBooleanExpression(IExpression value)
-        {
-            if(value is IBooleanExpression)
-            {
-                return (IBooleanExpression)value;
-            }
-            if(value is PropertyExpression)
-            {
-                return UnaryExpression.CreateBooleanCast(value);
-            }
-            throw new ParseException("IExpression will not result in a boolean value: " + value);
-        }
-
-// ----------------------------------------------------------------------------
-// Grammar
-// ----------------------------------------------------------------------------
-  public IBooleanExpression JmsSelector() {
-    IExpression left = null;
-    left = GetOrExpression();
-        {return AsBooleanExpression(left);}
-    throw new Exception("Missing return statement in function");
-  }
-
-  public IExpression GetOrExpression() {
-    IExpression left;
-    IExpression right;
-    left = GetAndExpression();
-    while (true) {
-      switch ((mcc_ntk==-1)?mcc_mntk():mcc_ntk) {
-      case OR:
-        ;
-        break;
-      default:
-        goto label_1;
-      }
-      mcc_consume_token(OR);
-      right = GetAndExpression();
-                left = LogicExpression.CreateOR(AsBooleanExpression(left), AsBooleanExpression(right));
-    }label_1: ;
-    
-        {return left;}
-    throw new Exception("Missing return statement in function");
-  }
-
-  public IExpression GetAndExpression() {
-    IExpression left;
-    IExpression right;
-    left = GetEqualityExpression();
-    while (true) {
-      switch ((mcc_ntk==-1)?mcc_mntk():mcc_ntk) {
-      case AND:
-        ;
-        break;
-      default:
-        goto label_2;
-      }
-      mcc_consume_token(AND);
-      right = GetEqualityExpression();
-                left = LogicExpression.CreateAND(AsBooleanExpression(left), AsBooleanExpression(right));
-    }label_2: ;
-    
-        {return left;}
-    throw new Exception("Missing return statement in function");
-  }
-
-  public IExpression GetEqualityExpression() {
-    IExpression left;
-    IExpression right;
-    left = GetComparisonExpression();
-    while (true) {
-      switch ((mcc_ntk==-1)?mcc_mntk():mcc_ntk) {
-      case IS:
-      case 28:
-      case 29:
-        ;
-        break;
-      default:
-        goto label_3;
-      }
-      switch ((mcc_ntk==-1)?mcc_mntk():mcc_ntk) {
-      case 28:
-        mcc_consume_token(28);
-        right = GetComparisonExpression();
-                left = ComparisonExpression.CreateEqual(left, right);
-        break;
-      case 29:
-        mcc_consume_token(29);
-        right = GetComparisonExpression();
-                left = ComparisonExpression.CreateNotEqual(left, right);
-        break;
-      default:
-        if (mcc_2_1(2)) {
-          mcc_consume_token(IS);
-          mcc_consume_token(NULL);
-                left = ComparisonExpression.CreateIsNull(left);
-        } else {
-          switch ((mcc_ntk==-1)?mcc_mntk():mcc_ntk) {
-          case IS:
-            mcc_consume_token(IS);
-            mcc_consume_token(NOT);
-            mcc_consume_token(NULL);
-                left = ComparisonExpression.CreateIsNotNull(left);
-            break;
-          default:
-            mcc_consume_token(-1);
-            throw new ParseException();
-          }
-        }
-        break;
-      }
-    }label_3: ;
-    
-        {return left;}
-    throw new Exception("Missing return statement in function");
-  }
-
-  public IExpression GetComparisonExpression() {
-    IExpression left;
-    IExpression right;
-    IExpression low;
-    IExpression high;
-    string t;
-    string u;
-        ArrayList list;
-    left = GetAddExpression();
-    while (true) {
-      switch ((mcc_ntk==-1)?mcc_mntk():mcc_ntk) {
-      case NOT:
-      case BETWEEN:
-      case LIKE:
-      case IN:
-      case 30:
-      case 31:
-      case 32:
-      case 33:
-        ;
-        break;
-      default:
-        goto label_4;
-      }
-      switch ((mcc_ntk==-1)?mcc_mntk():mcc_ntk) {
-      case 30:
-        mcc_consume_token(30);
-        right = GetAddExpression();
-                    left = ComparisonExpression.CreateGreaterThan(left, right);
-        break;
-      case 31:
-        mcc_consume_token(31);
-        right = GetAddExpression();
-                    left = ComparisonExpression.CreateGreaterThanOrEqual(left, right);
-        break;
-      case 32:
-        mcc_consume_token(32);
-        right = GetAddExpression();
-                    left = ComparisonExpression.CreateLesserThan(left, right);
-        break;
-      case 33:
-        mcc_consume_token(33);
-        right = GetAddExpression();
-                    left = ComparisonExpression.CreateLesserThanOrEqual(left, right);
-        break;
-      case LIKE:
-                                        u = null;
-        mcc_consume_token(LIKE);
-        t = GetStringLitteral();
-        switch ((mcc_ntk==-1)?mcc_mntk():mcc_ntk) {
-        case ESCAPE:
-          mcc_consume_token(ESCAPE);
-          u = GetStringLitteral();
-          break;
-        default:
-          ;
-          break;
-        }
-                    left = ComparisonExpression.CreateLike(left, t, u);
-        break;
-      default:
-        if (mcc_2_2(2)) {
-                                        u=null;
-          mcc_consume_token(NOT);
-          mcc_consume_token(LIKE);
-          t = GetStringLitteral();
-          switch ((mcc_ntk==-1)?mcc_mntk():mcc_ntk) {
-          case ESCAPE:
-            mcc_consume_token(ESCAPE);
-            u = GetStringLitteral();
-            break;
-          default:
-            ;
-            break;
-          }
-                    left = ComparisonExpression.CreateNotLike(left, t, u);
-        } else {
-          switch ((mcc_ntk==-1)?mcc_mntk():mcc_ntk) {
-          case BETWEEN:
-            mcc_consume_token(BETWEEN);
-            low = GetAddExpression();
-            mcc_consume_token(AND);
-            high = GetAddExpression();
-                                        left = ComparisonExpression.CreateBetween(left, low, high);
-            break;
-          default:
-            if (mcc_2_3(2)) {
-              mcc_consume_token(NOT);
-              mcc_consume_token(BETWEEN);
-              low = GetAddExpression();
-              mcc_consume_token(AND);
-              high = GetAddExpression();
-                                        left = ComparisonExpression.CreateNotBetween(left, low, high);
-            } else {
-              switch ((mcc_ntk==-1)?mcc_mntk():mcc_ntk) {
-              case IN:
-                mcc_consume_token(IN);
-                mcc_consume_token(34);
-                t = GetStringLitteral();
-                                    list = new ArrayList();
-                                    list.Add(t);
-                while (true) {
-                  switch ((mcc_ntk==-1)?mcc_mntk():mcc_ntk) {
-                  case 35:
-                    ;
-                    break;
-                  default:
-                    goto label_5;
-                  }
-                  mcc_consume_token(35);
-                  t = GetStringLitteral();
-                                            list.Add(t);
-                }label_5: ;
-                
-                mcc_consume_token(36);
-                           left = ComparisonExpression.CreateIn(left, list);
-                break;
-              default:
-                if (mcc_2_4(2)) {
-                  mcc_consume_token(NOT);
-                  mcc_consume_token(IN);
-                  mcc_consume_token(34);
-                  t = GetStringLitteral();
-                                    list = new ArrayList();
-                                    list.Add(t);
-                  while (true) {
-                    switch ((mcc_ntk==-1)?mcc_mntk():mcc_ntk) {
-                    case 35:
-                      ;
-                      break;
-                    default:
-                      goto label_6;
-                    }
-                    mcc_consume_token(35);
-                    t = GetStringLitteral();
-                                            list.Add(t);
-                  }label_6: ;
-                  
-                  mcc_consume_token(36);
-                           left = ComparisonExpression.CreateNotIn(left, list);
-                } else {
-                  mcc_consume_token(-1);
-                  throw new ParseException();
-                }
-                break;
-              }
-            }
-            break;
-          }
-        }
-        break;
-      }
-    }label_4: ;
-    
-        {return left;}
-    throw new Exception("Missing return statement in function");
-  }
-
-  public IExpression GetAddExpression() {
-    IExpression left;
-    IExpression right;
-    left = GetMultiplyExpression();
-    while (true) {
-      if (mcc_2_5(2147483647)) {
-        ;
-      } else {
-        goto label_7;
-      }
-      switch ((mcc_ntk==-1)?mcc_mntk():mcc_ntk) {
-      case 37:
-        mcc_consume_token(37);
-        right = GetMultiplyExpression();
-                    left = ArithmeticExpression.CreatePlus(left, right);
-        break;
-      case 38:
-        mcc_consume_token(38);
-        right = GetMultiplyExpression();
-                    left = ArithmeticExpression.CreateMinus(left, right);
-        break;
-      default:
-        mcc_consume_token(-1);
-        throw new ParseException();
-      }
-    }label_7: ;
-    
-        {return left;}
-    throw new Exception("Missing return statement in function");
-  }
-
-  public IExpression GetMultiplyExpression() {
-    IExpression left;
-    IExpression right;
-    left = GetUnaryExpression();
-    while (true) {
-      switch ((mcc_ntk==-1)?mcc_mntk():mcc_ntk) {
-      case 39:
-      case 40:
-      case 41:
-        ;
-        break;
-      default:
-        goto label_8;
-      }
-      switch ((mcc_ntk==-1)?mcc_mntk():mcc_ntk) {
-      case 39:
-        mcc_consume_token(39);
-        right = GetUnaryExpression();
-                left = ArithmeticExpression.CreateMultiply(left, right);
-        break;
-      case 40:
-        mcc_consume_token(40);
-        right = GetUnaryExpression();
-                left = ArithmeticExpression.CreateDivide(left, right);
-        break;
-      case 41:
-        mcc_consume_token(41);
-        right = GetUnaryExpression();
-                left = ArithmeticExpression.CreateMod(left, right);
-        break;
-      default:
-        mcc_consume_token(-1);
-        throw new ParseException();
-      }
-    }label_8: ;
-    
-        {return left;}
-    throw new Exception("Missing return statement in function");
-  }
-
-  public IExpression GetUnaryExpression() {
-    IExpression left = null;
-    if (mcc_2_6(2147483647)) {
-      mcc_consume_token(37);
-      left = GetUnaryExpression();
-    } else {
-      switch ((mcc_ntk==-1)?mcc_mntk():mcc_ntk) {
-      case 38:
-        mcc_consume_token(38);
-        left = GetUnaryExpression();
-                left = UnaryExpression.CreateNegate(left);
-        break;
-      case NOT:
-        mcc_consume_token(NOT);
-        left = GetUnaryExpression();
-                    left = UnaryExpression.CreateNOT(AsBooleanExpression(left));
-        break;
-      case TRUE:
-      case FALSE:
-      case NULL:
-      case DECIMAL_LITERAL:
-      case HEX_LITERAL:
-      case OCTAL_LITERAL:
-      case FLOATING_POINT_LITERAL:
-      case STRING_LITERAL:
-      case ID:
-      case 34:
-        left = GetPrimaryExpression();
-        break;
-      default:
-        mcc_consume_token(-1);
-        throw new ParseException();
-      }
-    }
-        {return left;}
-    throw new Exception("Missing return statement in function");
-  }
-
-  public IExpression GetPrimaryExpression() {
-    IExpression left = null;
-    switch ((mcc_ntk==-1)?mcc_mntk():mcc_ntk) {
-    case TRUE:
-    case FALSE:
-    case NULL:
-    case DECIMAL_LITERAL:
-    case HEX_LITERAL:
-    case OCTAL_LITERAL:
-    case FLOATING_POINT_LITERAL:
-    case STRING_LITERAL:
-      left = GetLiteral();
-      break;
-    case ID:
-      left = GetVariable();
-      break;
-    case 34:
-      mcc_consume_token(34);
-      left = GetOrExpression();
-      mcc_consume_token(36);
-      break;
-    default:
-      mcc_consume_token(-1);
-      throw new ParseException();
-    }
-        {return left;}
-    throw new Exception("Missing return statement in function");
-  }
-
-  public ConstantExpression GetLiteral() {
-    Token t;
-    string s;
-    ConstantExpression left = null;
-    switch ((mcc_ntk==-1)?mcc_mntk():mcc_ntk) {
-    case STRING_LITERAL:
-      s = GetStringLitteral();
-                left = new ConstantExpression(s);
-      break;
-    case DECIMAL_LITERAL:
-      t = mcc_consume_token(DECIMAL_LITERAL);
-                left = ConstantExpression.CreateFromDecimal(t.image);
-      break;
-    case HEX_LITERAL:
-      t = mcc_consume_token(HEX_LITERAL);
-                left = ConstantExpression.CreateFromHex(t.image);
-      break;
-    case OCTAL_LITERAL:
-      t = mcc_consume_token(OCTAL_LITERAL);
-                left = ConstantExpression.CreateFromOctal(t.image);
-      break;
-    case FLOATING_POINT_LITERAL:
-      t = mcc_consume_token(FLOATING_POINT_LITERAL);
-                left = ConstantExpression.CreateFloat(t.image);
-      break;
-    case TRUE:
-      mcc_consume_token(TRUE);
-                left = ConstantExpression.TRUE;
-      break;
-    case FALSE:
-      mcc_consume_token(FALSE);
-                left = ConstantExpression.FALSE;
-      break;
-    case NULL:
-      mcc_consume_token(NULL);
-                left = ConstantExpression.NULL;
-      break;
-    default:
-      mcc_consume_token(-1);
-      throw new ParseException();
-    }
-        {return left;}
-    throw new Exception("Missing return statement in function");
-  }
-
-  public string GetStringLitteral() {
-    Token t;
-    StringBuilder rc = new StringBuilder();
-    t = mcc_consume_token(STRING_LITERAL);
-        // Decode the sting value.
-        String image = t.image;
-        for(int c = 1; c < image.Length - 1; c++)
-        {
-                char ch = image[c];
-                if(ch == '\'')
-            {
-                        c++;
-            }
-                        rc.Append(ch);
-        }
-            {return rc.ToString();}
-    throw new Exception("Missing return statement in function");
-  }
-
-  public PropertyExpression GetVariable() {
-    Token t;
-    PropertyExpression left = null;
-    t = mcc_consume_token(ID);
-            left = new PropertyExpression(t.image);
-        {return left;}
-    throw new Exception("Missing return statement in function");
-  }
-
-  private bool mcc_2_1(int xla) {
-    mcc_la = xla; mcc_lastpos = mcc_scanpos = token;
-    try { return !mcc_3_1(); }
-    catch(LookaheadSuccess) { return true; }
-  }
-
-  private bool mcc_2_2(int xla) {
-    mcc_la = xla; mcc_lastpos = mcc_scanpos = token;
-    try { return !mcc_3_2(); }
-    catch(LookaheadSuccess) { return true; }
-  }
-
-  private bool mcc_2_3(int xla) {
-    mcc_la = xla; mcc_lastpos = mcc_scanpos = token;
-    try { return !mcc_3_3(); }
-    catch(LookaheadSuccess) { return true; }
-  }
-
-  private bool mcc_2_4(int xla) {
-    mcc_la = xla; mcc_lastpos = mcc_scanpos = token;
-    try { return !mcc_3_4(); }
-    catch(LookaheadSuccess) { return true; }
-  }
-
-  private bool mcc_2_5(int xla) {
-    mcc_la = xla; mcc_lastpos = mcc_scanpos = token;
-    try { return !mcc_3_5(); }
-    catch(LookaheadSuccess) { return true; }
-  }
-
-  private bool mcc_2_6(int xla) {
-    mcc_la = xla; mcc_lastpos = mcc_scanpos = token;
-    try { return !mcc_3_6(); }
-    catch(LookaheadSuccess) { return true; }
-  }
-
-  private bool mcc_3R_57() {
-    if (mcc_scan_token(ESCAPE)) return true;
-    if (mcc_3R_36()) return true;
-    return false;
-  }
-
-  private bool mcc_3R_19() {
-    Token xsp;
-    xsp = mcc_scanpos;
-    if (mcc_3R_20()) {
-    mcc_scanpos = xsp;
-    if (mcc_3R_21()) {
-    mcc_scanpos = xsp;
-    if (mcc_3R_22()) return true;
-    }
-    }
-    return false;
-  }
-
-  private bool mcc_3R_39() {
-    if (mcc_3R_41()) return true;
-    Token xsp;
-    while (true) {
-      xsp = mcc_scanpos;
-      if (mcc_3R_42()) { mcc_scanpos = xsp; break; }
-    }
-    return false;
-  }
-
-  private bool mcc_3_4() {
-    if (mcc_scan_token(NOT)) return true;
-    if (mcc_scan_token(IN)) return true;
-    if (mcc_scan_token(34)) return true;
-    if (mcc_3R_36()) return true;
-    Token xsp;
-    while (true) {
-      xsp = mcc_scanpos;
-      if (mcc_3R_59()) { mcc_scanpos = xsp; break; }
-    }
-    if (mcc_scan_token(36)) return true;
-    return false;
-  }
-
-  private bool mcc_3_6() {
-    if (mcc_scan_token(37)) return true;
-    if (mcc_3R_10()) return true;
-    return false;
-  }
-
-  private bool mcc_3R_15() {
-    if (mcc_3R_19()) return true;
-    return false;
-  }
-
-  private bool mcc_3R_36() {
-    if (mcc_scan_token(STRING_LITERAL)) return true;
-    return false;
-  }
-
-  private bool mcc_3R_14() {
-    if (mcc_scan_token(NOT)) return true;
-    if (mcc_3R_10()) return true;
-    return false;
-  }
-
-  private bool mcc_3R_12() {
-    if (mcc_scan_token(37)) return true;
-    if (mcc_3R_10()) return true;
-    return false;
-  }
-
-  private bool mcc_3R_53() {
-    if (mcc_scan_token(IN)) return true;
-    if (mcc_scan_token(34)) return true;
-    if (mcc_3R_36()) return true;
-    Token xsp;
-    while (true) {
-      xsp = mcc_scanpos;
-      if (mcc_3R_58()) { mcc_scanpos = xsp; break; }
-    }
-    if (mcc_scan_token(36)) return true;
-    return false;
-  }
-
-  private bool mcc_3R_45() {
-    if (mcc_scan_token(IS)) return true;
-    if (mcc_scan_token(NOT)) return true;
-    if (mcc_scan_token(NULL)) return true;
-    return false;
-  }
-
-  private bool mcc_3R_13() {
-    if (mcc_scan_token(38)) return true;
-    if (mcc_3R_10()) return true;
-    return false;
-  }
-
-  private bool mcc_3R_33() {
-    if (mcc_scan_token(NULL)) return true;
-    return false;
-  }
-
-  private bool mcc_3_1() {
-    if (mcc_scan_token(IS)) return true;
-    if (mcc_scan_token(NULL)) return true;
-    return false;
-  }
-
-  private bool mcc_3R_10() {
-    Token xsp;
-    xsp = mcc_scanpos;
-    if (mcc_3R_12()) {
-    mcc_scanpos = xsp;
-    if (mcc_3R_13()) {
-    mcc_scanpos = xsp;
-    if (mcc_3R_14()) {
-    mcc_scanpos = xsp;
-    if (mcc_3R_15()) return true;
-    }
-    }
-    }
-    return false;
-  }
-
-  private bool mcc_3R_44() {
-    if (mcc_scan_token(29)) return true;
-    if (mcc_3R_39()) return true;
-    return false;
-  }
-
-  private bool mcc_3R_32() {
-    if (mcc_scan_token(FALSE)) return true;
-    return false;
-  }
-
-  private bool mcc_3_3() {
-    if (mcc_scan_token(NOT)) return true;
-    if (mcc_scan_token(BETWEEN)) return true;
-    if (mcc_3R_41()) return true;
-    if (mcc_scan_token(AND)) return true;
-    if (mcc_3R_41()) return true;
-    return false;
-  }
-
-  private bool mcc_3R_43() {
-    if (mcc_scan_token(28)) return true;
-    if (mcc_3R_39()) return true;
-    return false;
-  }
-
-  private bool mcc_3R_40() {
-    Token xsp;
-    xsp = mcc_scanpos;
-    if (mcc_3R_43()) {
-    mcc_scanpos = xsp;
-    if (mcc_3R_44()) {
-    mcc_scanpos = xsp;
-    if (mcc_3_1()) {
-    mcc_scanpos = xsp;
-    if (mcc_3R_45()) return true;
-    }
-    }
-    }
-    return false;
-  }
-
-  private bool mcc_3R_52() {
-    if (mcc_scan_token(BETWEEN)) return true;
-    if (mcc_3R_41()) return true;
-    if (mcc_scan_token(AND)) return true;
-    if (mcc_3R_41()) return true;
-    return false;
-  }
-
-  private bool mcc_3R_31() {
-    if (mcc_scan_token(TRUE)) return true;
-    return false;
-  }
-
-  private bool mcc_3R_56() {
-    if (mcc_scan_token(ESCAPE)) return true;
-    if (mcc_3R_36()) return true;
-    return false;
-  }
-
-  private bool mcc_3R_18() {
-    if (mcc_scan_token(41)) return true;
-    if (mcc_3R_10()) return true;
-    return false;
-  }
-
-  private bool mcc_3R_30() {
-    if (mcc_scan_token(FLOATING_POINT_LITERAL)) return true;
-    return false;
-  }
-
-  private bool mcc_3R_37() {
-    if (mcc_3R_39()) return true;
-    Token xsp;
-    while (true) {
-      xsp = mcc_scanpos;
-      if (mcc_3R_40()) { mcc_scanpos = xsp; break; }
-    }
-    return false;
-  }
-
-  private bool mcc_3_2() {
-    if (mcc_scan_token(NOT)) return true;
-    if (mcc_scan_token(LIKE)) return true;
-    if (mcc_3R_36()) return true;
-    Token xsp;
-    xsp = mcc_scanpos;
-    if (mcc_3R_57()) mcc_scanpos = xsp;
-    return false;
-  }
-
-  private bool mcc_3R_51() {
-    if (mcc_scan_token(LIKE)) return true;
-    if (mcc_3R_36()) return true;
-    Token xsp;
-    xsp = mcc_scanpos;
-    if (mcc_3R_56()) mcc_scanpos = xsp;
-    return false;
-  }
-
-  private bool mcc_3R_17() {
-    if (mcc_scan_token(40)) return true;
-    if (mcc_3R_10()) return true;
-    return false;
-  }
-
-  private bool mcc_3R_29() {
-    if (mcc_scan_token(OCTAL_LITERAL)) return true;
-    return false;
-  }
-
-  private bool mcc_3R_16() {
-    if (mcc_scan_token(39)) return true;
-    if (mcc_3R_10()) return true;
-    return false;
-  }
-
-  private bool mcc_3R_11() {
-    Token xsp;
-    xsp = mcc_scanpos;
-    if (mcc_3R_16()) {
-    mcc_scanpos = xsp;
-    if (mcc_3R_17()) {
-    mcc_scanpos = xsp;
-    if (mcc_3R_18()) return true;
-    }
-    }
-    return false;
-  }
-
-  private bool mcc_3R_38() {
-    if (mcc_scan_token(AND)) return true;
-    if (mcc_3R_37()) return true;
-    return false;
-  }
-
-  private bool mcc_3R_28() {
-    if (mcc_scan_token(HEX_LITERAL)) return true;
-    return false;
-  }
-
-  private bool mcc_3R_9() {
-    if (mcc_3R_10()) return true;
-    Token xsp;
-    while (true) {
-      xsp = mcc_scanpos;
-      if (mcc_3R_11()) { mcc_scanpos = xsp; break; }
-    }
-    return false;
-  }
-
-  private bool mcc_3R_27() {
-    if (mcc_scan_token(DECIMAL_LITERAL)) return true;
-    return false;
-  }
-
-  private bool mcc_3R_55() {
-    if (mcc_scan_token(38)) return true;
-    if (mcc_3R_9()) return true;
-    return false;
-  }
-
-  private bool mcc_3R_34() {
-    if (mcc_3R_37()) return true;
-    Token xsp;
-    while (true) {
-      xsp = mcc_scanpos;
-      if (mcc_3R_38()) { mcc_scanpos = xsp; break; }
-    }
-    return false;
-  }
-
-  private bool mcc_3_5() {
-    Token xsp;
-    xsp = mcc_scanpos;
-    if (mcc_scan_token(37)) {
-    mcc_scanpos = xsp;
-    if (mcc_scan_token(38)) return true;
-    }
-    if (mcc_3R_9()) return true;
-    return false;
-  }
-
-  private bool mcc_3R_50() {
-    if (mcc_scan_token(33)) return true;
-    if (mcc_3R_41()) return true;
-    return false;
-  }
-
-  private bool mcc_3R_54() {
-    if (mcc_scan_token(37)) return true;
-    if (mcc_3R_9()) return true;
-    return false;
-  }
-
-  private bool mcc_3R_26() {
-    if (mcc_3R_36()) return true;
-    return false;
-  }
-
-  private bool mcc_3R_49() {
-    if (mcc_scan_token(32)) return true;
-    if (mcc_3R_41()) return true;
-    return false;
-  }
-
-  private bool mcc_3R_59() {
-    if (mcc_scan_token(35)) return true;
-    if (mcc_3R_36()) return true;
-    return false;
-  }
-
-  private bool mcc_3R_46() {
-    Token xsp;
-    xsp = mcc_scanpos;
-    if (mcc_3R_54()) {
-    mcc_scanpos = xsp;
-    if (mcc_3R_55()) return true;
-    }
-    return false;
-  }
-
-  private bool mcc_3R_35() {
-    if (mcc_scan_token(OR)) return true;
-    if (mcc_3R_34()) return true;
-    return false;
-  }
-
-  private bool mcc_3R_23() {
-    Token xsp;
-    xsp = mcc_scanpos;
-    if (mcc_3R_26()) {
-    mcc_scanpos = xsp;
-    if (mcc_3R_27()) {
-    mcc_scanpos = xsp;
-    if (mcc_3R_28()) {
-    mcc_scanpos = xsp;
-    if (mcc_3R_29()) {
-    mcc_scanpos = xsp;
-    if (mcc_3R_30()) {
-    mcc_scanpos = xsp;
-    if (mcc_3R_31()) {
-    mcc_scanpos = xsp;
-    if (mcc_3R_32()) {
-    mcc_scanpos = xsp;
-    if (mcc_3R_33()) return true;
-    }
-    }
-    }
-    }
-    }
-    }
-    }
-    return false;
-  }
-
-  private bool mcc_3R_48() {
-    if (mcc_scan_token(31)) return true;
-    if (mcc_3R_41()) return true;
-    return false;
-  }
-
-  private bool mcc_3R_24() {
-    if (mcc_scan_token(ID)) return true;
-    return false;
-  }
-
-  private bool mcc_3R_47() {
-    if (mcc_scan_token(30)) return true;
-    if (mcc_3R_41()) return true;
-    return false;
-  }
-
-  private bool mcc_3R_42() {
-    Token xsp;
-    xsp = mcc_scanpos;
-    if (mcc_3R_47()) {
-    mcc_scanpos = xsp;
-    if (mcc_3R_48()) {
-    mcc_scanpos = xsp;
-    if (mcc_3R_49()) {
-    mcc_scanpos = xsp;
-    if (mcc_3R_50()) {
-    mcc_scanpos = xsp;
-    if (mcc_3R_51()) {
-    mcc_scanpos = xsp;
-    if (mcc_3_2()) {
-    mcc_scanpos = xsp;
-    if (mcc_3R_52()) {
-    mcc_scanpos = xsp;
-    if (mcc_3_3()) {
-    mcc_scanpos = xsp;
-    if (mcc_3R_53()) {
-    mcc_scanpos = xsp;
-    if (mcc_3_4()) return true;
-    }
-    }
-    }
-    }
-    }
-    }
-    }
-    }
-    }
-    return false;
-  }
-
-  private bool mcc_3R_41() {
-    if (mcc_3R_9()) return true;
-    Token xsp;
-    while (true) {
-      xsp = mcc_scanpos;
-      if (mcc_3R_46()) { mcc_scanpos = xsp; break; }
-    }
-    return false;
-  }
-
-  private bool mcc_3R_25() {
-    if (mcc_3R_34()) return true;
-    Token xsp;
-    while (true) {
-      xsp = mcc_scanpos;
-      if (mcc_3R_35()) { mcc_scanpos = xsp; break; }
-    }
-    return false;
-  }
-
-  private bool mcc_3R_22() {
-    if (mcc_scan_token(34)) return true;
-    if (mcc_3R_25()) return true;
-    if (mcc_scan_token(36)) return true;
-    return false;
-  }
-
-  private bool mcc_3R_21() {
-    if (mcc_3R_24()) return true;
-    return false;
-  }
-
-  private bool mcc_3R_20() {
-    if (mcc_3R_23()) return true;
-    return false;
-  }
-
-  private bool mcc_3R_58() {
-    if (mcc_scan_token(35)) return true;
-    if (mcc_3R_36()) return true;
-    return false;
-  }
-
-  public SelectorParserTokenManager token_source;
-  SimpleCharStream mcc_input_stream;
-  public Token token, mcc_nt;
-  private int mcc_ntk;
-  private Token mcc_scanpos, mcc_lastpos;
-  private int mcc_la;
-  public bool lookingAhead = false;
-  //private bool mcc_semLA;
-
-  public SelectorParser(System.IO.Stream stream) {
-    mcc_input_stream = new SimpleCharStream(stream, 1, 1);
-    token_source = new SelectorParserTokenManager(mcc_input_stream);
-    token = new Token();
-    mcc_ntk = -1;
-  }
-
-  public void ReInit(System.IO.Stream stream) {
-    mcc_input_stream.ReInit(stream, 1, 1);
-    token_source.ReInit(mcc_input_stream);
-    token = new Token();
-    mcc_ntk = -1;
-  }
-
-  public SelectorParser(System.IO.TextReader stream) {
-    mcc_input_stream = new SimpleCharStream(stream, 1, 1);
-    token_source = new SelectorParserTokenManager(mcc_input_stream);
-    token = new Token();
-    mcc_ntk = -1;
-  }
-
-  public void ReInit(System.IO.TextReader stream) {
-    mcc_input_stream.ReInit(stream, 1, 1);
-    token_source.ReInit(mcc_input_stream);
-    token = new Token();
-    mcc_ntk = -1;
-  }
-
-  public SelectorParser(SelectorParserTokenManager tm) {
-    token_source = tm;
-    token = new Token();
-    mcc_ntk = -1;
-  }
-
-  public void ReInit(SelectorParserTokenManager tm) {
-    token_source = tm;
-    token = new Token();
-    mcc_ntk = -1;
-  }
-
-   private Token mcc_consume_token(int kind) {
-    Token oldToken = null;
-    if ((oldToken = token).next != null) token = token.next;
-    else token = token.next = token_source.GetNextToken();
-    mcc_ntk = -1;
-    if (token.kind == kind) {
-      return token;
-    }
-    token = oldToken;
-    throw GenerateParseException();
-  }
-
-  private class LookaheadSuccess : System.Exception { }
-  private LookaheadSuccess mcc_ls = new LookaheadSuccess();
-  private bool mcc_scan_token(int kind) {
-    if (mcc_scanpos == mcc_lastpos) {
-      mcc_la--;
-      if (mcc_scanpos.next == null) {
-        mcc_lastpos = mcc_scanpos = mcc_scanpos.next = token_source.GetNextToken();
-      } else {
-        mcc_lastpos = mcc_scanpos = mcc_scanpos.next;
-      }
-    } else {
-      mcc_scanpos = mcc_scanpos.next;
-    }
-    if (mcc_scanpos.kind != kind) return true;
-    if (mcc_la == 0 && mcc_scanpos == mcc_lastpos) throw mcc_ls;
-    return false;
-  }
-
-  public Token GetNextToken() {
-    if (token.next != null) token = token.next;
-    else token = token.next = token_source.GetNextToken();
-    mcc_ntk = -1;
-    return token;
-  }
-
-  public Token GetToken(int index) {
-    Token t = lookingAhead ? mcc_scanpos : token;
-    for (int i = 0; i < index; i++) {
-      if (t.next != null) t = t.next;
-      else t = t.next = token_source.GetNextToken();
-    }
-    return t;
-  }
-
-  private int mcc_mntk() {
-    if ((mcc_nt=token.next) == null)
-      return (mcc_ntk = (token.next=token_source.GetNextToken()).kind);
-    else
-      return (mcc_ntk = mcc_nt.kind);
-  }
-
-  public ParseException GenerateParseException() {
-    Token errortok = token.next;
-    int line = errortok.beginLine, column = errortok.beginColumn;
-    string mess = (errortok.kind == 0) ? tokenImage[0] : errortok.image;
-    return new ParseException("Parse error at line " + line + ", column " + column + ".  Encountered: " + mess);
-  }
-
-  public void enable_tracing() {
-  }
-
-  public void disable_tracing() {
-  }
-
-}
-
+/* Generated By:CSharpCC: Do not edit this line. SelectorParser.cs */
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+using System;
+using System.IO;
+using System.Text;
+using System.Collections;
+
+using Apache.NMS;
+
+namespace Apache.NMS.Selector
+{
+    /// <summary>
+    /// JMS Selector Parser generated by <a href="https://github.com/deveel/csharpcc">CSharpCC</a>
+    /// 
+    /// Do not edit this .cs file directly - it is autogenerated from SelectorParser.csc
+    /// using <c>csharpcc.exe -UNICODE_INPUT=true SelectorParser.csc</c>.
+    /// 
+    /// SelectorParser.csc is adapted from
+    /// <a href="https://raw.githubusercontent.com/apache/activemq/activemq-4.0/activemq-core/src/main/grammar/SelectorParser.jj">
+    /// ActiveMQ 4.0 SelectorParser.jj</a>
+    /// </summary>
+    public class SelectorParser : SelectorParserConstants {
+
+        public SelectorParser()
+            : this(new StringReader(""))
+        {
+        }
+
+        public IBooleanExpression Parse(string selector)
+        {
+            this.ReInit(new StringReader(selector));
+
+            try
+            {
+                return this.JmsSelector();
+            }
+            catch(Exception e)
+            {
+                    throw new InvalidSelectorException(selector, e);
+            }
+        }
+
+        private IBooleanExpression AsBooleanExpression(IExpression value)
+        {
+            if(value is IBooleanExpression)
+            {
+                return (IBooleanExpression)value;
+            }
+            if(value is PropertyExpression)
+            {
+                return UnaryExpression.CreateBooleanCast(value);
+            }
+            throw new ParseException("IExpression will not result in a boolean value: " + value);
+        }
+
+// ----------------------------------------------------------------------------
+// Grammar
+// ----------------------------------------------------------------------------
+  public IBooleanExpression JmsSelector() {
+    IExpression left = null;
+    left = GetOrExpression();
+        {return AsBooleanExpression(left);}
+    throw new Exception("Missing return statement in function");
+  }
+
+  public IExpression GetOrExpression() {
+    IExpression left;
+    IExpression right;
+    left = GetAndExpression();
+    while (true) {
+      switch ((mcc_ntk==-1)?mcc_mntk():mcc_ntk) {
+      case OR:
+        ;
+        break;
+      default:
+        goto label_1;
+      }
+      mcc_consume_token(OR);
+      right = GetAndExpression();
+                left = LogicExpression.CreateOR(AsBooleanExpression(left), AsBooleanExpression(right));
+    }label_1: ;
+    
+        {return left;}
+    throw new Exception("Missing return statement in function");
+  }
+
+  public IExpression GetAndExpression() {
+    IExpression left;
+    IExpression right;
+    left = GetEqualityExpression();
+    while (true) {
+      switch ((mcc_ntk==-1)?mcc_mntk():mcc_ntk) {
+      case AND:
+        ;
+        break;
+      default:
+        goto label_2;
+      }
+      mcc_consume_token(AND);
+      right = GetEqualityExpression();
+                left = LogicExpression.CreateAND(AsBooleanExpression(left), AsBooleanExpression(right));
+    }label_2: ;
+    
+        {return left;}
+    throw new Exception("Missing return statement in function");
+  }
+
+  public IExpression GetEqualityExpression() {
+    IExpression left;
+    IExpression right;
+    left = GetComparisonExpression();
+    while (true) {
+      switch ((mcc_ntk==-1)?mcc_mntk():mcc_ntk) {
+      case IS:
+      case 28:
+      case 29:
+        ;
+        break;
+      default:
+        goto label_3;
+      }
+      switch ((mcc_ntk==-1)?mcc_mntk():mcc_ntk) {
+      case 28:
+        mcc_consume_token(28);
+        right = GetComparisonExpression();
+                left = ComparisonExpression.CreateEqual(left, right);
+        break;
+      case 29:
+        mcc_consume_token(29);
+        right = GetComparisonExpression();
+                left = ComparisonExpression.CreateNotEqual(left, right);
+        break;
+      default:
+        if (mcc_2_1(2)) {
+          mcc_consume_token(IS);
+          mcc_consume_token(NULL);
+                left = ComparisonExpression.CreateIsNull(left);
+        } else {
+          switch ((mcc_ntk==-1)?mcc_mntk():mcc_ntk) {
+          case IS:
+            mcc_consume_token(IS);
+            mcc_consume_token(NOT);
+            mcc_consume_token(NULL);
+                left = ComparisonExpression.CreateIsNotNull(left);
+            break;
+          default:
+            mcc_consume_token(-1);
+            throw new ParseException();
+          }
+        }
+        break;
+      }
+    }label_3: ;
+    
+        {return left;}
+    throw new Exception("Missing return statement in function");
+  }
+
+  public IExpression GetComparisonExpression() {
+    IExpression left;
+    IExpression right;
+    IExpression low;
+    IExpression high;
+    string t;
+    string u;
+        ArrayList list;
+    left = GetAddExpression();
+    while (true) {
+      switch ((mcc_ntk==-1)?mcc_mntk():mcc_ntk) {
+      case NOT:
+      case BETWEEN:
+      case LIKE:
+      case IN:
+      case 30:
+      case 31:
+      case 32:
+      case 33:
+        ;
+        break;
+      default:
+        goto label_4;
+      }
+      switch ((mcc_ntk==-1)?mcc_mntk():mcc_ntk) {
+      case 30:
+        mcc_consume_token(30);
+        right = GetAddExpression();
+                    left = ComparisonExpression.CreateGreaterThan(left, right);
+        break;
+      case 31:
+        mcc_consume_token(31);
+        right = GetAddExpression();
+                    left = ComparisonExpression.CreateGreaterThanOrEqual(left, right);
+        break;
+      case 32:
+        mcc_consume_token(32);
+        right = GetAddExpression();
+                    left = ComparisonExpression.CreateLesserThan(left, right);
+        break;
+      case 33:
+        mcc_consume_token(33);
+        right = GetAddExpression();
+                    left = ComparisonExpression.CreateLesserThanOrEqual(left, right);
+        break;
+      case LIKE:
+                                        u = null;
+        mcc_consume_token(LIKE);
+        t = GetStringLitteral();
+        switch ((mcc_ntk==-1)?mcc_mntk():mcc_ntk) {
+        case ESCAPE:
+          mcc_consume_token(ESCAPE);
+          u = GetStringLitteral();
+          break;
+        default:
+          ;
+          break;
+        }
+                    left = ComparisonExpression.CreateLike(left, t, u);
+        break;
+      default:
+        if (mcc_2_2(2)) {
+                                        u=null;
+          mcc_consume_token(NOT);
+          mcc_consume_token(LIKE);
+          t = GetStringLitteral();
+          switch ((mcc_ntk==-1)?mcc_mntk():mcc_ntk) {
+          case ESCAPE:
+            mcc_consume_token(ESCAPE);
+            u = GetStringLitteral();
+            break;
+          default:
+            ;
+            break;
+          }
+                    left = ComparisonExpression.CreateNotLike(left, t, u);
+        } else {
+          switch ((mcc_ntk==-1)?mcc_mntk():mcc_ntk) {
+          case BETWEEN:
+            mcc_consume_token(BETWEEN);
+            low = GetAddExpression();
+            mcc_consume_token(AND);
+            high = GetAddExpression();
+                                        left = ComparisonExpression.CreateBetween(left, low, high);
+            break;
+          default:
+            if (mcc_2_3(2)) {
+              mcc_consume_token(NOT);
+              mcc_consume_token(BETWEEN);
+              low = GetAddExpression();
+              mcc_consume_token(AND);
+              high = GetAddExpression();
+                                        left = ComparisonExpression.CreateNotBetween(left, low, high);
+            } else {
+              switch ((mcc_ntk==-1)?mcc_mntk():mcc_ntk) {
+              case IN:
+                mcc_consume_token(IN);
+                mcc_consume_token(34);
+                t = GetStringLitteral();
+                                    list = new ArrayList();
+                                    list.Add(t);
+                while (true) {
+                  switch ((mcc_ntk==-1)?mcc_mntk():mcc_ntk) {
+                  case 35:
+                    ;
+                    break;
+                  default:
+                    goto label_5;
+                  }
+                  mcc_consume_token(35);
+                  t = GetStringLitteral();
+                                            list.Add(t);
+                }label_5: ;
+                
+                mcc_consume_token(36);
+                           left = ComparisonExpression.CreateIn(left, list);
+                break;
+              default:
+                if (mcc_2_4(2)) {
+                  mcc_consume_token(NOT);
+                  mcc_consume_token(IN);
+                  mcc_consume_token(34);
+                  t = GetStringLitteral();
+                                    list = new ArrayList();
+                                    list.Add(t);
+                  while (true) {
+                    switch ((mcc_ntk==-1)?mcc_mntk():mcc_ntk) {
+                    case 35:
+                      ;
+                      break;
+                    default:
+                      goto label_6;
+                    }
+                    mcc_consume_token(35);
+                    t = GetStringLitteral();
+                                            list.Add(t);
+                  }label_6: ;
+                  
+                  mcc_consume_token(36);
+                           left = ComparisonExpression.CreateNotIn(left, list);
+                } else {
+                  mcc_consume_token(-1);
+                  throw new ParseException();
+                }
+                break;
+              }
+            }
+            break;
+          }
+        }
+        break;
+      }
+    }label_4: ;
+    
+        {return left;}
+    throw new Exception("Missing return statement in function");
+  }
+
+  public IExpression GetAddExpression() {
+    IExpression left;
+    IExpression right;
+    left = GetMultiplyExpression();
+    while (true) {
+      if (mcc_2_5(2147483647)) {
+        ;
+      } else {
+        goto label_7;
+      }
+      switch ((mcc_ntk==-1)?mcc_mntk():mcc_ntk) {
+      case 37:
+        mcc_consume_token(37);
+        right = GetMultiplyExpression();
+                    left = ArithmeticExpression.CreatePlus(left, right);
+        break;
+      case 38:
+        mcc_consume_token(38);
+        right = GetMultiplyExpression();
+                    left = ArithmeticExpression.CreateMinus(left, right);
+        break;
+      default:
+        mcc_consume_token(-1);
+        throw new ParseException();
+      }
+    }label_7: ;
+    
+        {return left;}
+    throw new Exception("Missing return statement in function");
+  }
+
+  public IExpression GetMultiplyExpression() {
+    IExpression left;
+    IExpression right;
+    left = GetUnaryExpression();
+    while (true) {
+      switch ((mcc_ntk==-1)?mcc_mntk():mcc_ntk) {
+      case 39:
+      case 40:
+      case 41:
+        ;
+        break;
+      default:
+        goto label_8;
+      }
+      switch ((mcc_ntk==-1)?mcc_mntk():mcc_ntk) {
+      case 39:
+        mcc_consume_token(39);
+        right = GetUnaryExpression();
+                left = ArithmeticExpression.CreateMultiply(left, right);
+        break;
+      case 40:
+        mcc_consume_token(40);
+        right = GetUnaryExpression();
+                left = ArithmeticExpression.CreateDivide(left, right);
+        break;
+      case 41:
+        mcc_consume_token(41);
+        right = GetUnaryExpression();
+                left = ArithmeticExpression.CreateMod(left, right);
+        break;
+      default:
+        mcc_consume_token(-1);
+        throw new ParseException();
+      }
+    }label_8: ;
+    
+        {return left;}
+    throw new Exception("Missing return statement in function");
+  }
+
+  public IExpression GetUnaryExpression() {
+    IExpression left = null;
+    if (mcc_2_6(2147483647)) {
+      mcc_consume_token(37);
+      left = GetUnaryExpression();
+    } else {
+      switch ((mcc_ntk==-1)?mcc_mntk():mcc_ntk) {
+      case 38:
+        mcc_consume_token(38);
+        left = GetUnaryExpression();
+                left = UnaryExpression.CreateNegate(left);
+        break;
+      case NOT:
+        mcc_consume_token(NOT);
+        left = GetUnaryExpression();
+                    left = UnaryExpression.CreateNOT(AsBooleanExpression(left));
+        break;
+      case TRUE:
+      case FALSE:
+      case NULL:
+      case DECIMAL_LITERAL:
+      case HEX_LITERAL:
+      case OCTAL_LITERAL:
+      case FLOATING_POINT_LITERAL:
+      case STRING_LITERAL:
+      case ID:
+      case 34:
+        left = GetPrimaryExpression();
+        break;
+      default:
+        mcc_consume_token(-1);
+        throw new ParseException();
+      }
+    }
+        {return left;}
+    throw new Exception("Missing return statement in function");
+  }
+
+  public IExpression GetPrimaryExpression() {
+    IExpression left = null;
+    switch ((mcc_ntk==-1)?mcc_mntk():mcc_ntk) {
+    case TRUE:
+    case FALSE:
+    case NULL:
+    case DECIMAL_LITERAL:
+    case HEX_LITERAL:
+    case OCTAL_LITERAL:
+    case FLOATING_POINT_LITERAL:
+    case STRING_LITERAL:
+      left = GetLiteral();
+      break;
+    case ID:
+      left = GetVariable();
+      break;
+    case 34:
+      mcc_consume_token(34);
+      left = GetOrExpression();
+      mcc_consume_token(36);
+      break;
+    default:
+      mcc_consume_token(-1);
+      throw new ParseException();
+    }
+        {return left;}
+    throw new Exception("Missing return statement in function");
+  }
+
+  public ConstantExpression GetLiteral() {
+    Token t;
+    string s;
+    ConstantExpression left = null;
+    switch ((mcc_ntk==-1)?mcc_mntk():mcc_ntk) {
+    case STRING_LITERAL:
+      s = GetStringLitteral();
+                left = new ConstantExpression(s);
+      break;
+    case DECIMAL_LITERAL:
+      t = mcc_consume_token(DECIMAL_LITERAL);
+                left = ConstantExpression.CreateFromDecimal(t.image);
+      break;
+    case HEX_LITERAL:
+      t = mcc_consume_token(HEX_LITERAL);
+                left = ConstantExpression.CreateFromHex(t.image);
+      break;
+    case OCTAL_LITERAL:
+      t = mcc_consume_token(OCTAL_LITERAL);
+                left = ConstantExpression.CreateFromOctal(t.image);
+      break;
+    case FLOATING_POINT_LITERAL:
+      t = mcc_consume_token(FLOATING_POINT_LITERAL);
+                left = ConstantExpression.CreateFloat(t.image);
+      break;
+    case TRUE:
+      mcc_consume_token(TRUE);
+                left = ConstantExpression.TRUE;
+      break;
+    case FALSE:
+      mcc_consume_token(FALSE);
+                left = ConstantExpression.FALSE;
+      break;
+    case NULL:
+      mcc_consume_token(NULL);
+                left = ConstantExpression.NULL;
+      break;
+    default:
+      mcc_consume_token(-1);
+      throw new ParseException();
+    }
+        {return left;}
+    throw new Exception("Missing return statement in function");
+  }
+
+  public string GetStringLitteral() {
+    Token t;
+    StringBuilder rc = new StringBuilder();
+    t = mcc_consume_token(STRING_LITERAL);
+        // Decode the sting value.
+        String image = t.image;
+        for(int c = 1; c < image.Length - 1; c++)
+        {
+                char ch = image[c];
+                if(ch == '\'')
+            {
+                        c++;
+            }
+                        rc.Append(ch);
+        }
+            {return rc.ToString();}
+    throw new Exception("Missing return statement in function");
+  }
+
+  public PropertyExpression GetVariable() {
+    Token t;
+    PropertyExpression left = null;
+    t = mcc_consume_token(ID);
+            left = new PropertyExpression(t.image);
+        {return left;}
+    throw new Exception("Missing return statement in function");
+  }
+
+  private bool mcc_2_1(int xla) {
+    mcc_la = xla; mcc_lastpos = mcc_scanpos = token;
+    try { return !mcc_3_1(); }
+    catch(LookaheadSuccess) { return true; }
+  }
+
+  private bool mcc_2_2(int xla) {
+    mcc_la = xla; mcc_lastpos = mcc_scanpos = token;
+    try { return !mcc_3_2(); }
+    catch(LookaheadSuccess) { return true; }
+  }
+
+  private bool mcc_2_3(int xla) {
+    mcc_la = xla; mcc_lastpos = mcc_scanpos = token;
+    try { return !mcc_3_3(); }
+    catch(LookaheadSuccess) { return true; }
+  }
+
+  private bool mcc_2_4(int xla) {
+    mcc_la = xla; mcc_lastpos = mcc_scanpos = token;
+    try { return !mcc_3_4(); }
+    catch(LookaheadSuccess) { return true; }
+  }
+
+  private bool mcc_2_5(int xla) {
+    mcc_la = xla; mcc_lastpos = mcc_scanpos = token;
+    try { return !mcc_3_5(); }
+    catch(LookaheadSuccess) { return true; }
+  }
+
+  private bool mcc_2_6(int xla) {
+    mcc_la = xla; mcc_lastpos = mcc_scanpos = token;
+    try { return !mcc_3_6(); }
+    catch(LookaheadSuccess) { return true; }
+  }
+
+  private bool mcc_3R_57() {
+    if (mcc_scan_token(ESCAPE)) return true;
+    if (mcc_3R_36()) return true;
+    return false;
+  }
+
+  private bool mcc_3R_19() {
+    Token xsp;
+    xsp = mcc_scanpos;
+    if (mcc_3R_20()) {
+    mcc_scanpos = xsp;
+    if (mcc_3R_21()) {
+    mcc_scanpos = xsp;
+    if (mcc_3R_22()) return true;
+    }
+    }
+    return false;
+  }
+
+  private bool mcc_3R_39() {
+    if (mcc_3R_41()) return true;
+    Token xsp;
+    while (true) {
+      xsp = mcc_scanpos;
+      if (mcc_3R_42()) { mcc_scanpos = xsp; break; }
+    }
+    return false;
+  }
+
+  private bool mcc_3_4() {
+    if (mcc_scan_token(NOT)) return true;
+    if (mcc_scan_token(IN)) return true;
+    if (mcc_scan_token(34)) return true;
+    if (mcc_3R_36()) return true;
+    Token xsp;
+    while (true) {
+      xsp = mcc_scanpos;
+      if (mcc_3R_59()) { mcc_scanpos = xsp; break; }
+    }
+    if (mcc_scan_token(36)) return true;
+    return false;
+  }
+
+  private bool mcc_3_6() {
+    if (mcc_scan_token(37)) return true;
+    if (mcc_3R_10()) return true;
+    return false;
+  }
+
+  private bool mcc_3R_15() {
+    if (mcc_3R_19()) return true;
+    return false;
+  }
+
+  private bool mcc_3R_36() {
+    if (mcc_scan_token(STRING_LITERAL)) return true;
+    return false;
+  }
+
+  private bool mcc_3R_14() {
+    if (mcc_scan_token(NOT)) return true;
+    if (mcc_3R_10()) return true;
+    return false;
+  }
+
+  private bool mcc_3R_12() {
+    if (mcc_scan_token(37)) return true;
+    if (mcc_3R_10()) return true;
+    return false;
+  }
+
+  private bool mcc_3R_53() {
+    if (mcc_scan_token(IN)) return true;
+    if (mcc_scan_token(34)) return true;
+    if (mcc_3R_36()) return true;
+    Token xsp;
+    while (true) {
+      xsp = mcc_scanpos;
+      if (mcc_3R_58()) { mcc_scanpos = xsp; break; }
+    }
+    if (mcc_scan_token(36)) return true;
+    return false;
+  }
+
+  private bool mcc_3R_45() {
+    if (mcc_scan_token(IS)) return true;
+    if (mcc_scan_token(NOT)) return true;
+    if (mcc_scan_token(NULL)) return true;
+    return false;
+  }
+
+  private bool mcc_3R_13() {
+    if (mcc_scan_token(38)) return true;
+    if (mcc_3R_10()) return true;
+    return false;
+  }
+
+  private bool mcc_3R_33() {
+    if (mcc_scan_token(NULL)) return true;
+    return false;
+  }
+
+  private bool mcc_3_1() {
+    if (mcc_scan_token(IS)) return true;
+    if (mcc_scan_token(NULL)) return true;
+    return false;
+  }
+
+  private bool mcc_3R_10() {
+    Token xsp;
+    xsp = mcc_scanpos;
+    if (mcc_3R_12()) {
+    mcc_scanpos = xsp;
+    if (mcc_3R_13()) {
+    mcc_scanpos = xsp;
+    if (mcc_3R_14()) {
+    mcc_scanpos = xsp;
+    if (mcc_3R_15()) return true;
+    }
+    }
+    }
+    return false;
+  }
+
+  private bool mcc_3R_44() {
+    if (mcc_scan_token(29)) return true;
+    if (mcc_3R_39()) return true;
+    return false;
+  }
+
+  private bool mcc_3R_32() {
+    if (mcc_scan_token(FALSE)) return true;
+    return false;
+  }
+
+  private bool mcc_3_3() {
+    if (mcc_scan_token(NOT)) return true;
+    if (mcc_scan_token(BETWEEN)) return true;
+    if (mcc_3R_41()) return true;
+    if (mcc_scan_token(AND)) return true;
+    if (mcc_3R_41()) return true;
+    return false;
+  }
+
+  private bool mcc_3R_43() {
+    if (mcc_scan_token(28)) return true;
+    if (mcc_3R_39()) return true;
+    return false;
+  }
+
+  private bool mcc_3R_40() {
+    Token xsp;
+    xsp = mcc_scanpos;
+    if (mcc_3R_43()) {
+    mcc_scanpos = xsp;
+    if (mcc_3R_44()) {
+    mcc_scanpos = xsp;
+    if (mcc_3_1()) {
+    mcc_scanpos = xsp;
+    if (mcc_3R_45()) return true;
+    }
+    }
+    }
+    return false;
+  }
+
+  private bool mcc_3R_52() {
+    if (mcc_scan_token(BETWEEN)) return true;
+    if (mcc_3R_41()) return true;
+    if (mcc_scan_token(AND)) return true;
+    if (mcc_3R_41()) return true;
+    return false;
+  }
+
+  private bool mcc_3R_31() {
+    if (mcc_scan_token(TRUE)) return true;
+    return false;
+  }
+
+  private bool mcc_3R_56() {
+    if (mcc_scan_token(ESCAPE)) return true;
+    if (mcc_3R_36()) return true;
+    return false;
+  }
+
+  private bool mcc_3R_18() {
+    if (mcc_scan_token(41)) return true;
+    if (mcc_3R_10()) return true;
+    return false;
+  }
+
+  private bool mcc_3R_30() {
+    if (mcc_scan_token(FLOATING_POINT_LITERAL)) return true;
+    return false;
+  }
+
+  private bool mcc_3R_37() {
+    if (mcc_3R_39()) return true;
+    Token xsp;
+    while (true) {
+      xsp = mcc_scanpos;
+      if (mcc_3R_40()) { mcc_scanpos = xsp; break; }
+    }
+    return false;
+  }
+
+  private bool mcc_3_2() {
+    if (mcc_scan_token(NOT)) return true;
+    if (mcc_scan_token(LIKE)) return true;
+    if (mcc_3R_36()) return true;
+    Token xsp;
+    xsp = mcc_scanpos;
+    if (mcc_3R_57()) mcc_scanpos = xsp;
+    return false;
+  }
+
+  private bool mcc_3R_51() {
+    if (mcc_scan_token(LIKE)) return true;
+    if (mcc_3R_36()) return true;
+    Token xsp;
+    xsp = mcc_scanpos;
+    if (mcc_3R_56()) mcc_scanpos = xsp;
+    return false;
+  }
+
+  private bool mcc_3R_17() {
+    if (mcc_scan_token(40)) return true;
+    if (mcc_3R_10()) return true;
+    return false;
+  }
+
+  private bool mcc_3R_29() {
+    if (mcc_scan_token(OCTAL_LITERAL)) return true;
+    return false;
+  }
+
+  private bool mcc_3R_16() {
+    if (mcc_scan_token(39)) return true;
+    if (mcc_3R_10()) return true;
+    return false;
+  }
+
+  private bool mcc_3R_11() {
+    Token xsp;
+    xsp = mcc_scanpos;
+    if (mcc_3R_16()) {
+    mcc_scanpos = xsp;
+    if (mcc_3R_17()) {
+    mcc_scanpos = xsp;
+    if (mcc_3R_18()) return true;
+    }
+    }
+    return false;
+  }
+
+  private bool mcc_3R_38() {
+    if (mcc_scan_token(AND)) return true;
+    if (mcc_3R_37()) return true;
+    return false;
+  }
+
+  private bool mcc_3R_28() {
+    if (mcc_scan_token(HEX_LITERAL)) return true;
+    return false;
+  }
+
+  private bool mcc_3R_9() {
+    if (mcc_3R_10()) return true;
+    Token xsp;
+    while (true) {
+      xsp = mcc_scanpos;
+      if (mcc_3R_11()) { mcc_scanpos = xsp; break; }
+    }
+    return false;
+  }
+
+  private bool mcc_3R_27() {
+    if (mcc_scan_token(DECIMAL_LITERAL)) return true;
+    return false;
+  }
+
+  private bool mcc_3R_55() {
+    if (mcc_scan_token(38)) return true;
+    if (mcc_3R_9()) return true;
+    return false;
+  }
+
+  private bool mcc_3R_34() {
+    if (mcc_3R_37()) return true;
+    Token xsp;
+    while (true) {
+      xsp = mcc_scanpos;
+      if (mcc_3R_38()) { mcc_scanpos = xsp; break; }
+    }
+    return false;
+  }
+
+  private bool mcc_3_5() {
+    Token xsp;
+    xsp = mcc_scanpos;
+    if (mcc_scan_token(37)) {
+    mcc_scanpos = xsp;
+    if (mcc_scan_token(38)) return true;
+    }
+    if (mcc_3R_9()) return true;
+    return false;
+  }
+
+  private bool mcc_3R_50() {
+    if (mcc_scan_token(33)) return true;
+    if (mcc_3R_41()) return true;
+    return false;
+  }
+
+  private bool mcc_3R_54() {
+    if (mcc_scan_token(37)) return true;
+    if (mcc_3R_9()) return true;
+    return false;
+  }
+
+  private bool mcc_3R_26() {
+    if (mcc_3R_36()) return true;
+    return false;
+  }
+
+  private bool mcc_3R_49() {
+    if (mcc_scan_token(32)) return true;
+    if (mcc_3R_41()) return true;
+    return false;
+  }
+
+  private bool mcc_3R_59() {
+    if (mcc_scan_token(35)) return true;
+    if (mcc_3R_36()) return true;
+    return false;
+  }
+
+  private bool mcc_3R_46() {
+    Token xsp;
+    xsp = mcc_scanpos;
+    if (mcc_3R_54()) {
+    mcc_scanpos = xsp;
+    if (mcc_3R_55()) return true;
+    }
+    return false;
+  }
+
+  private bool mcc_3R_35() {
+    if (mcc_scan_token(OR)) return true;
+    if (mcc_3R_34()) return true;
+    return false;
+  }
+
+  private bool mcc_3R_23() {
+    Token xsp;
+    xsp = mcc_scanpos;
+    if (mcc_3R_26()) {
+    mcc_scanpos = xsp;
+    if (mcc_3R_27()) {
+    mcc_scanpos = xsp;
+    if (mcc_3R_28()) {
+    mcc_scanpos = xsp;
+    if (mcc_3R_29()) {
+    mcc_scanpos = xsp;
+    if (mcc_3R_30()) {
+    mcc_scanpos = xsp;
+    if (mcc_3R_31()) {
+    mcc_scanpos = xsp;
+    if (mcc_3R_32()) {
+    mcc_scanpos = xsp;
+    if (mcc_3R_33()) return true;
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    return false;
+  }
+
+  private bool mcc_3R_48() {
+    if (mcc_scan_token(31)) return true;
+    if (mcc_3R_41()) return true;
+    return false;
+  }
+
+  private bool mcc_3R_24() {
+    if (mcc_scan_token(ID)) return true;
+    return false;
+  }
+
+  private bool mcc_3R_47() {
+    if (mcc_scan_token(30)) return true;
+    if (mcc_3R_41()) return true;
+    return false;
+  }
+
+  private bool mcc_3R_42() {
+    Token xsp;
+    xsp = mcc_scanpos;
+    if (mcc_3R_47()) {
+    mcc_scanpos = xsp;
+    if (mcc_3R_48()) {
+    mcc_scanpos = xsp;
+    if (mcc_3R_49()) {
+    mcc_scanpos = xsp;
+    if (mcc_3R_50()) {
+    mcc_scanpos = xsp;
+    if (mcc_3R_51()) {
+    mcc_scanpos = xsp;
+    if (mcc_3_2()) {
+    mcc_scanpos = xsp;
+    if (mcc_3R_52()) {
+    mcc_scanpos = xsp;
+    if (mcc_3_3()) {
+    mcc_scanpos = xsp;
+    if (mcc_3R_53()) {
+    mcc_scanpos = xsp;
+    if (mcc_3_4()) return true;
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    }
+    return false;
+  }
+
+  private bool mcc_3R_41() {
+    if (mcc_3R_9()) return true;
+    Token xsp;
+    while (true) {
+      xsp = mcc_scanpos;
+      if (mcc_3R_46()) { mcc_scanpos = xsp; break; }
+    }
+    return false;
+  }
+
+  private bool mcc_3R_25() {
+    if (mcc_3R_34()) return true;
+    Token xsp;
+    while (true) {
+      xsp = mcc_scanpos;
+      if (mcc_3R_35()) { mcc_scanpos = xsp; break; }
+    }
+    return false;
+  }
+
+  private bool mcc_3R_22() {
+    if (mcc_scan_token(34)) return true;
+    if (mcc_3R_25()) return true;
+    if (mcc_scan_token(36)) return true;
+    return false;
+  }
+
+  private bool mcc_3R_21() {
+    if (mcc_3R_24()) return true;
+    return false;
+  }
+
+  private bool mcc_3R_20() {
+    if (mcc_3R_23()) return true;
+    return false;
+  }
+
+  private bool mcc_3R_58() {
+    if (mcc_scan_token(35)) return true;
+    if (mcc_3R_36()) return true;
+    return false;
+  }
+
+  public SelectorParserTokenManager token_source;
+  SimpleCharStream mcc_input_stream;
+  public Token token, mcc_nt;
+  private int mcc_ntk;
+  private Token mcc_scanpos, mcc_lastpos;
+  private int mcc_la;
+  public bool lookingAhead = false;
+  //private bool mcc_semLA;
+
+  public SelectorParser(System.IO.Stream stream) {
+    mcc_input_stream = new SimpleCharStream(stream, 1, 1);
+    token_source = new SelectorParserTokenManager(mcc_input_stream);
+    token = new Token();
+    mcc_ntk = -1;
+  }
+
+  public void ReInit(System.IO.Stream stream) {
+    mcc_input_stream.ReInit(stream, 1, 1);
+    token_source.ReInit(mcc_input_stream);
+    token = new Token();
+    mcc_ntk = -1;
+  }
+
+  public SelectorParser(System.IO.TextReader stream) {
+    mcc_input_stream = new SimpleCharStream(stream, 1, 1);
+    token_source = new SelectorParserTokenManager(mcc_input_stream);
+    token = new Token();
+    mcc_ntk = -1;
+  }
+
+  public void ReInit(System.IO.TextReader stream) {
+    mcc_input_stream.ReInit(stream, 1, 1);
+    token_source.ReInit(mcc_input_stream);
+    token = new Token();
+    mcc_ntk = -1;
+  }
+
+  public SelectorParser(SelectorParserTokenManager tm) {
+    token_source = tm;
+    token = new Token();
+    mcc_ntk = -1;
+  }
+
+  public void ReInit(SelectorParserTokenManager tm) {
+    token_source = tm;
+    token = new Token();
+    mcc_ntk = -1;
+  }
+
+   private Token mcc_consume_token(int kind) {
+    Token oldToken = null;
+    if ((oldToken = token).next != null) token = token.next;
+    else token = token.next = token_source.GetNextToken();
+    mcc_ntk = -1;
+    if (token.kind == kind) {
+      return token;
+    }
+    token = oldToken;
+    throw GenerateParseException();
+  }
+
+  private class LookaheadSuccess : System.Exception { }
+  private LookaheadSuccess mcc_ls = new LookaheadSuccess();
+  private bool mcc_scan_token(int kind) {
+    if (mcc_scanpos == mcc_lastpos) {
+      mcc_la--;
+      if (mcc_scanpos.next == null) {
+        mcc_lastpos = mcc_scanpos = mcc_scanpos.next = token_source.GetNextToken();
+      } else {
+        mcc_lastpos = mcc_scanpos = mcc_scanpos.next;
+      }
+    } else {
+      mcc_scanpos = mcc_scanpos.next;
+    }
+    if (mcc_scanpos.kind != kind) return true;
+    if (mcc_la == 0 && mcc_scanpos == mcc_lastpos) throw mcc_ls;
+    return false;
+  }
+
+  public Token GetNextToken() {
+    if (token.next != null) token = token.next;
+    else token = token.next = token_source.GetNextToken();
+    mcc_ntk = -1;
+    return token;
+  }
+
+  public Token GetToken(int index) {
+    Token t = lookingAhead ? mcc_scanpos : token;
+    for (int i = 0; i < index; i++) {
+      if (t.next != null) t = t.next;
+      else t = t.next = token_source.GetNextToken();
+    }
+    return t;
+  }
+
+  private int mcc_mntk() {
+    if ((mcc_nt=token.next) == null)
+      return (mcc_ntk = (token.next=token_source.GetNextToken()).kind);
+    else
+      return (mcc_ntk = mcc_nt.kind);
+  }
+
+  public ParseException GenerateParseException() {
+    Token errortok = token.next;
+    int line = errortok.beginLine, column = errortok.beginColumn;
+    string mess = (errortok.kind == 0) ? tokenImage[0] : errortok.image;
+    return new ParseException("Parse error at line " + line + ", column " + column + ".  Encountered: " + mess);
+  }
+
+  public void enable_tracing() {
+  }
+
+  public void disable_tracing() {
+  }
+
+}
+
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq-nms-msmq/blob/7274a80a/src/main/csharp/Selector/SelectorParser.csc
----------------------------------------------------------------------
diff --git a/src/main/csharp/Selector/SelectorParser.csc b/src/main/csharp/Selector/SelectorParser.csc
index be05ab8..d7fa5c8 100644
--- a/src/main/csharp/Selector/SelectorParser.csc
+++ b/src/main/csharp/Selector/SelectorParser.csc
@@ -1,16 +1,15 @@
-/**
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
  * The ASF licenses this file to You 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,
+ * (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.

http://git-wip-us.apache.org/repos/asf/activemq-nms-msmq/blob/7274a80a/src/main/csharp/Selector/SelectorParserConstants.cs
----------------------------------------------------------------------
diff --git a/src/main/csharp/Selector/SelectorParserConstants.cs b/src/main/csharp/Selector/SelectorParserConstants.cs
index 5f75539..74c5362 100644
--- a/src/main/csharp/Selector/SelectorParserConstants.cs
+++ b/src/main/csharp/Selector/SelectorParserConstants.cs
@@ -1,75 +1,75 @@
-/* Generated By:CSharpCC: Do not edit this line. SelectorParserConstants.cs */
-public  class SelectorParserConstants {
-
-  public const int EOF = 0;
-  public const int LINE_COMMENT = 6;
-  public const int BLOCK_COMMENT = 7;
-  public const int NOT = 8;
-  public const int AND = 9;
-  public const int OR = 10;
-  public const int BETWEEN = 11;
-  public const int LIKE = 12;
-  public const int ESCAPE = 13;
-  public const int IN = 14;
-  public const int IS = 15;
-  public const int TRUE = 16;
-  public const int FALSE = 17;
-  public const int NULL = 18;
-  public const int XPATH = 19;
-  public const int XQUERY = 20;
-  public const int DECIMAL_LITERAL = 21;
-  public const int HEX_LITERAL = 22;
-  public const int OCTAL_LITERAL = 23;
-  public const int FLOATING_POINT_LITERAL = 24;
-  public const int EXPONENT = 25;
-  public const int STRING_LITERAL = 26;
-  public const int ID = 27;
-
-  public const int DEFAULT = 0;
-
-  public readonly string[] tokenImage = {
-    "<EOF>",
-    "\" \"",
-    "\"\\t\"",
-    "\"\\n\"",
-    "\"\\r\"",
-    "\"\\f\"",
-    "<LINE_COMMENT>",
-    "<BLOCK_COMMENT>",
-    "\"NOT\"",
-    "\"AND\"",
-    "\"OR\"",
-    "\"BETWEEN\"",
-    "\"LIKE\"",
-    "\"ESCAPE\"",
-    "\"IN\"",
-    "\"IS\"",
-    "\"TRUE\"",
-    "\"FALSE\"",
-    "\"NULL\"",
-    "\"XPATH\"",
-    "\"XQUERY\"",
-    "<DECIMAL_LITERAL>",
-    "<HEX_LITERAL>",
-    "<OCTAL_LITERAL>",
-    "<FLOATING_POINT_LITERAL>",
-    "<EXPONENT>",
-    "<STRING_LITERAL>",
-    "<ID>",
-    "\"=\"",
-    "\"<>\"",
-    "\">\"",
-    "\">=\"",
-    "\"<\"",
-    "\"<=\"",
-    "\"(\"",
-    "\",\"",
-    "\")\"",
-    "\"+\"",
-    "\"-\"",
-    "\"*\"",
-    "\"/\"",
-    "\"%\"",
-  };
-
-}
+/* Generated By:CSharpCC: Do not edit this line. SelectorParserConstants.cs */
+public  class SelectorParserConstants {
+
+  public const int EOF = 0;
+  public const int LINE_COMMENT = 6;
+  public const int BLOCK_COMMENT = 7;
+  public const int NOT = 8;
+  public const int AND = 9;
+  public const int OR = 10;
+  public const int BETWEEN = 11;
+  public const int LIKE = 12;
+  public const int ESCAPE = 13;
+  public const int IN = 14;
+  public const int IS = 15;
+  public const int TRUE = 16;
+  public const int FALSE = 17;
+  public const int NULL = 18;
+  public const int XPATH = 19;
+  public const int XQUERY = 20;
+  public const int DECIMAL_LITERAL = 21;
+  public const int HEX_LITERAL = 22;
+  public const int OCTAL_LITERAL = 23;
+  public const int FLOATING_POINT_LITERAL = 24;
+  public const int EXPONENT = 25;
+  public const int STRING_LITERAL = 26;
+  public const int ID = 27;
+
+  public const int DEFAULT = 0;
+
+  public readonly string[] tokenImage = {
+    "<EOF>",
+    "\" \"",
+    "\"\\t\"",
+    "\"\\n\"",
+    "\"\\r\"",
+    "\"\\f\"",
+    "<LINE_COMMENT>",
+    "<BLOCK_COMMENT>",
+    "\"NOT\"",
+    "\"AND\"",
+    "\"OR\"",
+    "\"BETWEEN\"",
+    "\"LIKE\"",
+    "\"ESCAPE\"",
+    "\"IN\"",
+    "\"IS\"",
+    "\"TRUE\"",
+    "\"FALSE\"",
+    "\"NULL\"",
+    "\"XPATH\"",
+    "\"XQUERY\"",
+    "<DECIMAL_LITERAL>",
+    "<HEX_LITERAL>",
+    "<OCTAL_LITERAL>",
+    "<FLOATING_POINT_LITERAL>",
+    "<EXPONENT>",
+    "<STRING_LITERAL>",
+    "<ID>",
+    "\"=\"",
+    "\"<>\"",
+    "\">\"",
+    "\">=\"",
+    "\"<\"",
+    "\"<=\"",
+    "\"(\"",
+    "\",\"",
+    "\")\"",
+    "\"+\"",
+    "\"-\"",
+    "\"*\"",
+    "\"/\"",
+    "\"%\"",
+  };
+
+}


Mime
View raw message