Go nuts. I have only used bison and flex and I have some pressing other 
stuff to do now. The current problem with the message selectors is that 
text is returned with the ' . So app_id='my app' turns into

EQUAL(
Start  Identifier@app_id
Start  'my app'

Now it looks like the STRING token should not return the '

| < STRING:
       "'"
       (   (~["'","\n","\r"])
         | ("''")
       )*
       "'"
     >

????

Go ahead and make the stuff case insensitive.

Dain Sundstrom wrote:
> According to the JMS spec the reserved words are case insensitive. A 
> part of the TOKEN spec I use in the new EJB-QL parser follows:
> 
> TOKEN [IGNORE_CASE] : /* RESERVED WORDS */
> {
>    < FALSE: "FALSE" >
> |  < NOT: "NOT" >
> |  < NULL: "NULL" >
> |  < TRUE: "TRUE" >
> }
> 
> The boolean declaration won't work because you have the same regular 
> expression in two sections.  Remember that token is part of the lexing 
> step where the input stream is broken into logical token.  Then the 
> syntax part happens.  If you need a production later in the grammar 
> which can be true or false, you would add the following bnf_prduction:
> 
> void Boolean() :
> {}
> {
>    (<TRUE> | <FALSE>)
> }
> 
> I'm by no means a JavaCC expert (I'm still learning it my self), but if 
> you want, I'll look over your jj file when you finish.
> 
> -dain
> 
> Dave Smith wrote:
> 
>> OK. it looks like it does not like the BOOLEAN token as a combo fo the 
>> TRUE and FALSE tokens. Inlining them works. Patch inclosed.
>>
>> Now the selector will parse but still does not deliver it properly. 
>> Going to bed , have a look in the morning...
>>
>>
>> Dave Smith wrote:
>>
>>> Ok. First problem solved. We have to call the SelectorParser 
>>> constructor with at least a string reader. The problem is when you go 
>>> to run ReInit with the actual selector it throws a NPE. So in 
>>> SelectorParser.jj add the following to the no-args constructor
>>> this(new StringReader(""));
>>>
>>> Boolean slector still does not work ... looking ....
>>>
>>>
>>>
>>> Jason Dillon wrote:
>>>
>>>> Can you please verify that things are still broken with the latest CVS
>>>> (with the changes I just commited).  Please submit a testcase, if you
>>>> are in there and finding problems just throw something together and
>>>> submit it.
>>>>
>>>> --jason
>>>>
>>>>
>>>> On Wed, 2002-02-13 at 17:52, Dave Smith wrote:
>>>>
>>>>> Actually it's worse than that. If you change the default parser to 
>>>>> SelectorParser, nothing works! So a simple slector like 
>>>>> type='cadex' bombs.
>>>>>
>>>>>
>>>>> Jason Dillon wrote:
>>>>>
>>>>>> I did not think we were using the old parser anymore... Is there a
>>>>>> reason this is still around after Scott reimplemented in JavaCC?
>>>>>>
>>>>>> --jason
>>>>>>
>>>>>>
>>>>>> On Wed, 2002-02-13 at 16:53, Dave Smith wrote:
>>>>>>
>>>>>>
>>>>>>> After having a bad day trying to get a message selector working 
>>>>>>> for a topic listener I came across a few bugs.
>>>>>>>
>>>>>>> 1) If the message selector is invalid but the connection is not 
>>>>>>> started but no error is thrown. So if you createTopicSession  
>>>>>>> then createSubscriber and then start the connection the 
>>>>>>> connection looks good but there are no messages delivered. (I 
>>>>>>> spent most of the day trying to sort this one out)
>>>>>>>
>>>>>>> 2) The message selectors do not seem to like boolean types. My 
>>>>>>> query is
>>>>>>> app_id='AK' and production=TRUE
>>>>>>>
>>>>>>> 3) What parser are we using for the message selectors. I thought 
>>>>>>> we were using javacc and jms.jj. But in Selector the default is 
>>>>>>> set to parser which is from jms.y. I don't even think this thing 
>>>>>>> is getting re-processed. I did swicth the default to 
>>>>>>> SelectorParser but that did not work as well.
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Jboss-development mailing list
>>>>>>> [EMAIL PROTECTED]
>>>>>>> https://lists.sourceforge.net/lists/listinfo/jboss-development
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Jboss-development mailing list
>>>>> [EMAIL PROTECTED]
>>>>> https://lists.sourceforge.net/lists/listinfo/jboss-development
>>>>>
>>>>
>>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Jboss-development mailing list
>>> [EMAIL PROTECTED]
>>> https://lists.sourceforge.net/lists/listinfo/jboss-development
>>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> --- SelectorParser.jj    Wed Feb 13 23:59:07 2002
>> +++ SelectorParser.jj.new    Wed Feb 13 23:58:48 2002
>> @@ -55,6 +55,7 @@
>>  
>>     public SelectorParser()
>>     {
>> +    this(new StringReader(""));
>>     }
>>  }
>>  PARSER_END(SelectorParser)
>> @@ -72,9 +73,7 @@
>>  
>>  TOKEN :
>>  {
>> -  < TRUE: "TRUE" | "true" >
>> -  | < FALSE: "FALSE" | "false" >
>> -  | < BOOLEAN: <TRUE> | <FALSE> >
>> +  < BOOLEAN: "TRUE" | "true" | "FALSE" | "false"  >
>>    | < NULL: "NULL" | "null" >
>>    | < AND: "AND" | "and" >
>>    | < NOT: "NOT" >
>>
> 
> 
> 
> _______________________________________________
> Jboss-development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development
> 



_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to