Penningroth, Mark wrote:

I have the following in my grammar:

 

sqcon

            : '\'' ( options {greedy=false;} : .)* '\''

;

 

The intent is to get a single text node with everything between the sing quotes.

 

When I parse ‘Los Angeles’  I lose the space .

 

I have been struggling quite a bit with quoted strings…

 

You don't say what target you are using, but the issue is you have used a lower case parser rule name, when you meant to code a LEXER rule here. IN the parser, . wildcard means any token, and you are probably hiding WS tokens.

Rather than specifying a SQLCONNECTION, just look for single quoted literals and expect that in the parser. The parser does not direct the lexer in any way, so you cannot apply context like this.

Jim

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "il-antlr-interest" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

Reply via email to