On 3/22/11 8:59 PM, "Jim Idle" <j...@temporal-wave.com> wrote:
Hi Jim, Thank you for answer. > That is telling you that err, you can't use rewrite syntax AND an operator > ;). Which one is it supposed to use? > > So, remove any ^ and ! operators from the rule and use rewrite rules only. Yes, this is clear now :) > However, is that what you want to rewrite it as. I think you are using > query_expression as that was what it looked like in v2. You might be > better off abstracting in to two rules: > > queryExpression > : unionExpressions -> ^(QUERY_EXPRESSION unionExpressions) ; > > unionExpressions > : query_term (( "union"^ | "except"^ ) "all"? query_term)* ; So really 2 rules should be used as was in my first letter. Okay, then we will make such changes in our grammar from v2 > However, using lower case literals in your parser directly is not a good > idea. Use real tokens so that you error messages are better Simple example, please? > and remember > that SQL is generally case insensitive so you will need a [trivial] custom > input stream. Of course we do remember this :) And after grammar start to breath, we will yet work on * case-insensitive of SQL text * UTF-16 for input -- clarify .. -- Best regards, Ruslan Zasukhin VP Engineering and New Technology Paradigma Software, Inc Valentina - Joining Worlds of Information http://www.paradigmasoft.com [I feel the need: the need for speed] List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to il-antlr-inter...@googlegroups.com. To unsubscribe from this group, send email to il-antlr-interest+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en.