[antlr-interest] C# Target Poll

Johannes Luber JALuber at gmx.de
Sun May 18 15:19:08 PDT 2008


> >> What I'd suggest for the C# target is:
> >>
> >> - distribute .xml files, .pdb files and .chm files with the assembly
> >
> > I get the .xml file, but why the .pdb one? And how should I generate
> .chm, not to mention what to include there?
> 
...
> 
> The .chm will have all the documentation for ANTLR classes in a MSDN
> style format. You can use docproject (www.codeplex.com/DocProject) to
> generate it. docproject is just another kind of project, that depends
> on other projects and generates the chm for all dependent projects, so
> having the chm updated is just a matter to enable the docproject
> project.

DocProject requires VS and I require that ANTLR can be built on Linux, too (I do my development there after all :). You can contribute a .chm file yourself as the target won't change much within minor releases.
> 
> >> - make consistent CR/LF line endings (visual studio is always
> >> complaining about that in the generated files)
> >
> > Looking through the files, I see that ASTParser.stg uses Windows line
> endings, and the others don't. Does this problem occur for non-AST parsers,
> too? In that case the reason is StringTemplate and changing the templates
> would result in a mixture for Linux users, as ST uses different line endings
> for the platforms.
> 
> I haven't tried non AST parsers. I don't care if the line endings are
> LF, CR or CR/LF, but it would be nice if they are all the same always.
> Anyway, if that can't be done for some technical reason, I can live
> with it.

I will unify all line endings, but if that doesn't help, you have to petition Ter for a ST change, as the problem must be then there.
> 
> Another thing that I forgot to mention is to add a pragma to disable
> the warnings that generate ANTLR for the lexer, parser and tree
> parser. It is really annoying to have those warnings reported and
> ceirtainly nobody wants them to be reported for those files.

Incidentally I discovered today that #pragmas have been introduced in C# 2. This change can be done only for CSharp2. I suppose with the use of partial classes the warnings (all of them, I suppose) in the generated code can be ignored. Or does someone object?

Johannes
> 
> Thanks,
> Manu

-- 
249 Spiele für nur 1 Preis. Die GMX Spieleflatrate schon ab 9,90 Euro.
Neu: Asterix bei den Olympischen Spielen: http://flat.games.gmx.de


More information about the antlr-interest mailing list