> This is specific to the C# *3* target but shows how I'm currently
> working to address this issue.
>
> Delegate grammars currently don't work quite right in the C# 3 target.
> Since each grammar type is declared as a 'partial class', I'm
> implementing the delegator classes within the grammar they are delegated
> to.
>
> GrammarParser.cs:
>
> namespace GrammarNamespace {
> public partial class Grammar1 : Parser { ... }
> }
>
> GrammarParser.IncludedGrammarParser.cs:
>
> namespace GrammarNamespace {
> partial class Grammar1 {
> partial class IncludedGrammarParser : Parser { ... }
> }
> }
I take it that doing so is to prevent the combination of different inclusions
of the same grammar? In any case, I've never used import myself for CSharp2 and
never heard of problems before, so you must be the first to try. Unfortunately,
I've got display problems with my development notebook, so I can't investigate
it myself. :( Hopefully it's not some kind of hardware defect requiring to
exchange the entire display, because then I can basically buy a new notebook...
Johannes
>
> -----Original Message-----
> From: [email protected] [mailto:[email protected]]
> On Behalf Of Jim Idle
> Sent: Friday, April 10, 2009 10:35 AM
> To: ANTLR-dev Dev
> Subject: [antlr-dev] C# 2 target and import grammars
>
> Anyone know how to specify or otherwise make work, import grammars in C#
>
> 2 target 3.1.3?
>
> If I specify a @namespace in the base grammars then it can't find the
> delegators in the generated code for the imports. If I don't specify any
>
> namespaces at all then it seems to try to use the name of my grammar for
>
> a type, which it cannot then find . If I add the @namespace option to
> all the grammars including the import grammars, then the main code
> cannot find the delegates.
>
> I can't seem to work out what the correct combination is. Anyone got any
>
> docs or can give me a hint here?
>
> Jim
> _______________________________________________
> antlr-dev mailing list
> [email protected]
> http://www.antlr.org/mailman/listinfo/antlr-dev
> _______________________________________________
> antlr-dev mailing list
> [email protected]
> http://www.antlr.org/mailman/listinfo/antlr-dev
--
Neu: GMX FreeDSL Komplettanschluss mit DSL 6.000 Flatrate + Telefonanschluss
für nur 17,95 Euro/mtl.!*
http://dslspecial.gmx.de/freedsl-surfflat/?ac=OM.AD.PD003K11308T4569a
_______________________________________________
antlr-dev mailing list
[email protected]
http://www.antlr.org/mailman/listinfo/antlr-dev