Please see many past discussions of this in the group archives. It is not
a simple as adding 8 to the count as tabs usually mean "advance to the
next tab position", which is traditionally a multiple of 8 but does not
have to be.

Jim

> -----Original Message-----
> From: [email protected] [mailto:antlr-interest-
> [email protected]] On Behalf Of Dejas Ninethousand
> Sent: Thursday, September 08, 2011 9:59 AM
> To: [email protected]
> Subject: [antlr-interest] For getCharPositionInLine(), is there a way
> to make tab count for 8 chars instead of 1?
>
> I want to ensure that line and cols reported by my parser line up with
> what the user would see in a program like Textpad.  In Textpad if you
> move the cursor across a tab character the column counter and cursor
> advance by 8 and not 1 even though only one char in the stream has been
> traversed.  Can I configure some setting in ANTRL such that tab chars
> are treated the same way for column reporting?
>
> Thanks.
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-
> email-address

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 [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.

Reply via email to