[antlr-interest] The filter option
Jim Idle
jimi at temporal-wave.com
Thu Aug 2 11:20:41 PDT 2007
Marcos,
The C parser in the downloadable examples does something almost exactly like this. Why don't you start there as you will have a much more complete grammar that way too?
Jim
From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-bounces at antlr.org] On Behalf Of Marcos Marín
Sent: Thursday, August 02, 2007 10:48 AM
To: antlr-interest at antlr.org
Subject: [antlr-interest] The filter option
Hello, I'm new to ANTLR, what I'm trying to do is a very simple parser to keep track of variables in a C/C++ source file and what function they are declared in (if any).
This is my grammar so far (I'm mostly just testing, it's not complete):
grammar cvartracker;
options {
language = CSharp;
filter = true;
Nothing happens (ie, the System.Console.WriteLine() that is supposed to be called when there is a function or variable declaration is not called). If I turn the filter option off it does work, but then it complains about other things I'm not interested in. Anyone have any ideas on what I can do?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070802/231eca3a/attachment.html
More information about the antlr-interest
mailing list