[il-antlr-interest: 32208] [antlr-interest] v2-v3 Skip chars in Lexer?

2011-04-16 Thread Ruslan Zasukhin
Hi All, In our old v2 grammar in Lexer we did have DELIMITED// delimited_identifier : (DQUOTE! ( ~(DQUOTE) | DQUOTE DQUOTE! )+ DQUOTE! |BQUOTE! ( ~(BQUOTE) | BQUOTE BQUOTE! )+ BQUOTE! ) { $type = IDENT; } ; I.e. We have skip

[il-antlr-interest: 32209] Re: [antlr-interest] v2-v3 Skip chars in Lexer?

2011-04-16 Thread Bart Kiers
On Sat, Apr 16, 2011 at 12:06 PM, Ruslan Zasukhin ruslan_zasuk...@valentina-db.com wrote: ... How to remove that quotes in v3? :-) Here's a way: DELIMITED @init { String q = null; } @after { String text = getText(); // remove the first and last quote, replace all 2

[il-antlr-interest: 32210] Re: [antlr-interest] v2-v3 Skip chars in Lexer? Terrence?

2011-04-16 Thread Ruslan Zasukhin
On 4/16/11 1:18 PM, Bart Kiers bki...@gmail.com wrote: Thank you, Bart. And I have forget to mention that we using C-target. So there is no nice string classes ... And even with string classes, don't you think guys, that this NEW WAY Of dealing of wrap-quotes do not looks best of the best?

[il-antlr-interest: 32211] Re: [antlr-interest] v2-v3 Skip chars in Lexer? // FAQ only for Java. What about C? :-)

2011-04-16 Thread Ruslan Zasukhin
On 4/16/11 1:18 PM, Bart Kiers bki...@gmail.com wrote: I have found this FAQ http://www.antlr.org/wiki/pages/viewpage.action?pageId=1461 But only Java here ... {setText(getText().substring(1, getText().length()-1));} ; Now I struggling to find any API of C analogs of getText() /

[il-antlr-interest: 32212] Re: [antlr-interest] v2-v3 Skip chars in Lexer? For C-target [SOLVED]

2011-04-16 Thread Ruslan Zasukhin
On 4/16/11 1:18 PM, Bart Kiers bki...@gmail.com wrote: Hi All, Just for archive I will show solution I was able built so far for our Valentina SQL couple of LEXER rules. The only not clear yet to me is: if I must destroy temporary strings to avoid leaks? Also I still wonder, if exists