[antlr-interest] lexer: display all rules matched
Edwards, Waverly
Waverly.Edwards at genesys.com
Tue Aug 28 06:58:43 PDT 2007
Is there a way to inspect what lexer rules have been matched or inspect
the token buffer?
What I'm trying to do is to setup test(s) to ensure that every keyword
is matched and that no rule conflicts with another.
I have just short of 550 lexical rules just for keywords alone
(originally I thought it was just a couple hundred).
I've been reading TDAR and the web, looking for hints as to how this
might be done but to date I haven't found anything.
Thank you for your time,
W.
________________________________
From: antlr-interest-bounces at antlr.org
[mailto:antlr-interest-bounces at antlr.org] On Behalf Of Edwards, Waverly
Sent: Friday, August 24, 2007 6:45 PM
To: antlr
Subject: [antlr-interest] lexer: display all rules matched
Is there a way to display all rules or tokens matched without making one
big chain and assigning an action to it?
I have a couple hundred keywords and in experimenting I would like to
output every time a rule/token is matched
so I can compare it to a text file. I can then figure out what I'm
missing or what doesn't work.
Thank you,
W.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070828/4b61507c/attachment.html
More information about the antlr-interest
mailing list