[antlr-interest] Lexer - Counting from zero

Sohail Somani sohail at taggedtype.net
Wed Nov 23 22:44:18 PST 2005


On Wed, 2005-23-11 at 23:24 -0400, Thiago Arrais wrote:
> I am writing a lexer with Antlr and I need it to keep track of the
> line and column information. The standard way didn't suffice my needs,
> because I needed to start the count at 0, not at 1. So, I overrid the
> makeToken() method on my Lexer to reduce the coordinates by one.

Dude, nothing wrong with this. Thats why java makes every function
virtual :)



More information about the antlr-interest mailing list