[antlr-interest] [bug?] The using alias 'Hashtable' appeared twice in Tree Parser .cs code (3.1b1 C# Target)

Johannes Luber JALuber at gmx.de
Wed May 28 16:27:06 PDT 2008


> Hello,
> 
> When I generate C# code for the following Tree Parser grammar I have
> th error (on the code compilation step)
> 
> //ANTLR Parser Generator  Version 3.1b1 (May 20, 2008)  1989-2008
> "LPMEDLuaCodeGen.cs(15,7): error CS1537: The using alias 'Hashtable'
> appeared previously in this namespace"
> 
> I've found the bug report, that describe such problem with alias
> 'Hashtable' (http://www.antlr.org:8888/browse/ANTLR-157). It's
> considered fixed in 3.1 antlr version, but its seems to me 3.1b1 has
> that bug.
> 
> Should we wait for the 3.1 release or that a "reopened bug" ?
> 
> Thank you

Well, I closed it because my try to recreate the issue failed. Ironically, I was probably the first noting the bug ever... In any case, once I can look into this, I will. Also please send a email with the LPMED.tokens file as otherwise I can't regenerated the grammar below.

Johannes
> ------------------------------------------------------------------------------------------------------------------------
> tree grammar LPMEDLuaCodeGen;
> 
> options {
> tokenVocab=LPMED; // use the vocabulary from the parser
> ASTLabelType=CommonTree; // what kind of trees are we walking?
> output=template; // generate templates
> language = CSharp;
> }
> 
> 
> program
> 
>   :
>     ^(CPROGRAM atom)  -> program(name={$atom.st})
>   ;
> 
> 
> 
> atom
> options
> {
> 	backtrack=true;
> }	
>  :
>    ID -> {%{$ID}}
>  | ^(CINT INT) ->{%{$INT.text}}
> ;

-- 
Ist Ihr Browser Vista-kompatibel? Jetzt die neuesten 
Browser-Versionen downloaden: http://www.gmx.net/de/go/browser


More information about the antlr-interest mailing list