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

Петров Александр gmdidro at gmail.com
Wed May 28 10:29:35 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
------------------------------------------------------------------------------------------------------------------------
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}}
;


More information about the antlr-interest mailing list