[Monodevelop-patches-list] r434 - in trunk/MonoDevelop/src/Libraries/SharpRefactory: . src
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Sat Jan 10 22:29:05 EST 2004
Author: benm
Date: 2004-01-10 22:29:05 -0500 (Sat, 10 Jan 2004)
New Revision: 434
Modified:
trunk/MonoDevelop/src/Libraries/SharpRefactory/Makefile
trunk/MonoDevelop/src/Libraries/SharpRefactory/src/Main.cs
Log:
make a parser test driver
Modified: trunk/MonoDevelop/src/Libraries/SharpRefactory/Makefile
===================================================================
--- trunk/MonoDevelop/src/Libraries/SharpRefactory/Makefile 2004-01-11 02:24:37 UTC (rev 433)
+++ trunk/MonoDevelop/src/Libraries/SharpRefactory/Makefile 2004-01-11 03:29:05 UTC (rev 434)
@@ -112,3 +112,9 @@
$(DLL): $(SOURCES)
mcs /debug /out:$(DLL) /target:library /r:System.Drawing.dll $(SOURCES)
+
+test-parser.exe : $(DLL) src/Main.cs
+ mcs /debug /out:$@ /r:$(DLL) src/Main.cs
+
+run : test-parser.exe
+ MONO_PATH=`dirname $(DLL)` mono --debug test-parser.exe $(TEST_SOURCE)
Modified: trunk/MonoDevelop/src/Libraries/SharpRefactory/src/Main.cs
===================================================================
--- trunk/MonoDevelop/src/Libraries/SharpRefactory/src/Main.cs 2004-01-11 02:24:37 UTC (rev 433)
+++ trunk/MonoDevelop/src/Libraries/SharpRefactory/src/Main.cs 2004-01-11 03:29:05 UTC (rev 434)
@@ -44,15 +44,15 @@
// }
Parser p = new Parser();
- p.Parse(new Lexer(new FileReader("C:\\Main.cs")));
+ p.Parse(new Lexer(new FileReader(args [0])));
if (p.Errors.count == 0) {
LookupTableVisitor lookupTableVisitor = new LookupTableVisitor();
lookupTableVisitor.Visit(p.compilationUnit, null);
-// new DebugASTVisitor().Visit(p.compilationUnit, null);
-// PrettyPrintVisitor ppv = new PrettyPrintVisitor();
-// ppv.Visit(p.compilationUnit, null);
-// Console.WriteLine(ppv.Text.ToString());
+ new DebugASTVisitor().Visit(p.compilationUnit, null);
+ PrettyPrintVisitor ppv = new PrettyPrintVisitor();
+ ppv.Visit(p.compilationUnit, null);
+ Console.WriteLine(ppv.Text.ToString());
} else {
Console.WriteLine("Source code errors:");
Console.WriteLine(p.Errors.ErrorOutput);
More information about the Monodevelop-patches-list
mailing list