Take the 2-minute tour ×  I'm currently in the process of
writing a programming language which extends C# mainly by adding
custom operators and keywords.  I have found the grammar file
for c# 4 in http://antlrcsharp.codeplex.com/ but cannot find any
examples on how to import this file in my own grammar file.  Can
anyone provide some examples or point me to other projects which
archive the same thing?  share|improve this question add comment
2 Answers  up vote 4 down vote accepted  If you want to extend
c# that means you're doing a DSL?  Check this one out Irony from
codeplex, Hanselman explains it better  share|improve this
answer +1 Wow!! Really!! Wow!! –  xanatos Oct 19 '11 at 11:24
This looks amazing thanks! –  joeyborg Oct 19 '11 at 11:39 add
comment  Starting with ANTLR 3.1 there is a grammar composition
feature. You can import other grammars to yours and then use
and/or override rules from the imported ones.  Another approach
would be to modify the existing C# grammar to your needs.
share|improve this