1
0
mirror of https://github.com/twiglet/cs2j.git synced 2025-01-18 13:15:17 +01:00

remove QID token, so that cs.g stays close to upstream

This commit is contained in:
Kevin Glynn 2010-11-06 15:15:24 +01:00
parent 690a5af383
commit e4bd86900b
2 changed files with 6 additions and 12 deletions

View File

@ -115,10 +115,10 @@ scope NSContext;
}
:
'namespace' qi=qualified_identifier
{ Debug("namespace: " + $qi.text);
$NSContext::nss.Add(new UseRepTemplate($qi.text));
{ Debug("namespace: " + $qi.thetext);
$NSContext::nss.Add(new UseRepTemplate($qi.thetext));
// extend parent namespace
$NSContext::currentNS = this.ParentNameSpace + $qi.text;
$NSContext::currentNS = this.ParentNameSpace + $qi.thetext;
}
namespace_block ';'? ;
namespace_block:
@ -157,8 +157,8 @@ type_declaration:
| enum_declaration
| delegate_declaration ;
// Identifiers
qualified_identifier:
^(QID identifier+) ;
qualified_identifier returns [string thetext]:
i1=identifier { $thetext = $i1.text; } ('.' ip=identifier { $thetext += "." + $ip.text; } )*;
namespace_name
: namespace_or_type_name ;

View File

@ -6,11 +6,6 @@ options {
language=CSharp2;
}
tokens {
QID;
}
@namespace { RusticiSoftware.Translator.CSharp }
@lexer::header
@ -74,8 +69,7 @@ type_declaration:
| delegate_declaration ;
// Identifiers
qualified_identifier:
identifier ('.' identifier)*
-> ^(QID identifier+) ;
identifier ('.' identifier)*;
namespace_name
: namespace_or_type_name ;