diff --git a/CSharpTranslator/antlr3/cs2jTest/TestDLLs/Various.cs b/CSharpTranslator/antlr3/cs2jTest/TestDLLs/Various.cs index dcd8cbf..7f90b54 100644 --- a/CSharpTranslator/antlr3/cs2jTest/TestDLLs/Various.cs +++ b/CSharpTranslator/antlr3/cs2jTest/TestDLLs/Various.cs @@ -1,5 +1,5 @@ using System; -namespace cs2jTest.Various.Features +namespace cs2jTest.Various.Features.join.yield { // delegate declaration diff --git a/CSharpTranslator/antlr3/src/cs2j/CLR/cs2j.cs b/CSharpTranslator/antlr3/src/cs2j/CLR/cs2j.cs index eceb6fb..b29cf77 100644 --- a/CSharpTranslator/antlr3/src/cs2j/CLR/cs2j.cs +++ b/CSharpTranslator/antlr3/src/cs2j/CLR/cs2j.cs @@ -190,22 +190,18 @@ namespace RusticiSoftware.Translator.CSharp public static CommonTreeNodeStream parseFile(string fullName) { - - CommonTokenStream tokens = null; - + if (cfg.Verbosity > 2) Console.WriteLine("Parsing " + Path.GetFileName(fullName)); - PreProcessor lex = new PreProcessor();; - lex.AddDefine(cfg.MacroDefines); ICharStream input = new ANTLRFileStream(fullName); + + PreProcessor lex = new PreProcessor();; + lex.AddDefine(cfg.MacroDefines); lex.CharStream = input; - tokens = new CommonTokenStream(lex); + CommonTokenStream tokens = new CommonTokenStream(lex); csParser p = new csParser(tokens); - csParser.compilation_unit_return parser_rt; - - parser_rt = p.compilation_unit(); - + csParser.compilation_unit_return parser_rt = p.compilation_unit(); if (parser_rt == null || parser_rt.Tree == null) { @@ -220,12 +216,12 @@ namespace RusticiSoftware.Translator.CSharp } CommonTreeNodeStream nodes = new CommonTreeNodeStream(parser_rt.Tree); - + nodes.TokenStream = tokens; + return nodes; } - - // Here's where we do the real work... + // Here's where we do the real work... public static void addNetTranslation(string fullName) { Stream s = new FileStream(fullName, FileMode.Open, FileAccess.Read); diff --git a/CSharpTranslator/antlr3/src/cs2j/cs2j.csproj b/CSharpTranslator/antlr3/src/cs2j/cs2j.csproj index 034f5c7..330be4a 100644 --- a/CSharpTranslator/antlr3/src/cs2j/cs2j.csproj +++ b/CSharpTranslator/antlr3/src/cs2j/cs2j.csproj @@ -39,7 +39,7 @@ DEBUG;TRACE prompt 4 - -dumpcsharp /Users/keving/gitrepos/cs2j/CSharpTranslator/antlr3/cs2jTest/TestDLLs/Various.cs + -v -v -v -dumpcsharp -debug 10 /Users/keving/gitrepos/cs2j/CSharpTranslator/antlr3/cs2jTest/TestDLLs/Various.cs pdbonly