[antlr-interest] 2 questions

Alexey Demakov demakov at ispras.ru
Wed Sep 14 00:11:54 PDT 2005


b. You can check current column position in lexer rule:

START_LINE_TOKEN : { getColumn() == 1 }? "M43blah" ;

Regards,
Alexey

-----
Alexey Demakov
TreeDL: Tree Description Language: http://treedl.sourceforge.net
RedVerst Group: http://www.unitesk.com

----- Original Message ----- 
From: "Harsh Deshmane" <hdeshmane at montalvosystems.com>
To: <antlr-interest at antlr.org>
Sent: Wednesday, September 14, 2005 2:11 AM
Subject: [antlr-interest] 2 questions


> Hi,
> 
> I have two questions:
> a. How do you search the archives of the mailing list ?
> b. for the grammar, I need to specifically capture patterns that start from 
> the first character of the line, how do I do that ?
> 
> for example, 
> 
> M43blah  xx yy zz
> 
> Here, the letter "M" in the first location is important.
> Similarly for other key"letters" 
> In regular expressions, it would be "^M" that I am looking for..
> 
> thanks for any help.
> -harsh
> 


More information about the antlr-interest mailing list