[antlr-interest] ISSUE: Global comments lost with grammar inheritance
micheal_jor <open.zone at virgin.net>
open.zone at virgin.net
Sun Feb 9 07:48:50 PST 2003
DESCRIPTION:
When using the grammar inheritance feature of ANTLR, "global"
comments (i.e. comment blocks that immediately preceed the grammar
class definition) do not appear in the generated file.
These comments would normally appear in the generated file just
before the class definition.
TO REPRODUCE THIS ISSUE:
Given the grammar files at the end of this message, when the ANTLR
tool is invoked on both file (using the -glib option as appropriate):
1. the generated BaseLexer.cs files has the C# XML comment included
in it's source grammar file base.g. Cool.
2. the C# XML comment is missing from the generated DerivedLexer.cs
file (and also from the generated temp-ish file
expandedDerivedLexer.g). Uncool.
ATTACHED FILES:
------ BEGIN base.g ----
options
{
language = "CSharp";
}
///<summary>
/// Base Lexer summary description.
///</summary>
class BaseLexer extends Lexer;
BASERULE
: "base"
;
------ END base.g ----
------ BEGIN derived.g ----
options
{
language = "CSharp";
}
///<summary>
/// Derived Lexer summary description.
///</summary>
class DerivedLexer extends BaseLexer;
NEWRULE
: "derived"
;
------ END derived.g ----
==========================================================
OK, we *need* a bug/feature/issue/reqmt tracking app.
Micheal
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list