Last active
March 9, 2016 15:54
-
-
Save jonpryor/ac1ae3064f05aa89ec74 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/mcs/class/monodoc/Makefile b/mcs/class/monodoc/Makefile | |
index 3ebba80..8e550e1 100644 | |
--- a/mcs/class/monodoc/Makefile | |
+++ b/mcs/class/monodoc/Makefile | |
@@ -141,7 +141,7 @@ Monodoc.Ecma/EcmaUrlParser.cs: Monodoc.Ecma/EcmaUrlParser.jay $(topdir)/jay/skel | |
$(topdir)/$(thisdir)/jay.sh $(topdir) $< $@ $(JAY_FLAGS) | |
parser.exe: Monodoc.Ecma/EcmaUrlParser.cs Monodoc.Ecma/EcmaUrlTokenizer.cs Monodoc.Ecma/EcmaUrlParserDriver.cs Monodoc.Ecma/EcmaDesc.cs | |
- mcs /out:$@ /debug $^ | |
+ mcs /out:$@ /unsafe /debug $^ | |
setup-doc-sources: $(DOC_SOURCES) | |
mkdir -p ./Test/monodoc_test/sources/ | |
diff --git a/mcs/class/monodoc/Monodoc.Ecma/EcmaUrlParserDriver.cs b/mcs/class/monodoc/Monodoc.Ecma/EcmaUrlParserDriver.cs | |
index 8a93825..9bd8d26 100644 | |
--- a/mcs/class/monodoc/Monodoc.Ecma/EcmaUrlParserDriver.cs | |
+++ b/mcs/class/monodoc/Monodoc.Ecma/EcmaUrlParserDriver.cs | |
@@ -7,11 +7,20 @@ namespace Monodoc.Ecma | |
{ | |
public static void Main (string[] args) | |
{ | |
- var input = new StringReader (args[0]); | |
- var lexer = new EcmaUrlTokenizer (input); | |
var parser = new EcmaUrlParser (); | |
- | |
- Console.WriteLine (parser.yyparse (lexer)); | |
+ foreach (var cref in args) { | |
+ Console.WriteLine ("CREF: {0}", cref); | |
+ try { | |
+ Console.Write ("\tIsValid? "); | |
+ parser.IsValid (cref); | |
+ Console.WriteLine ("True"); | |
+ var lexer = new EcmaUrlTokenizer (cref); | |
+ Console.WriteLine ("\tyyparse: {0}", parser.yyparse (lexer)); | |
+ } | |
+ catch (Exception e) { | |
+ Console.WriteLine ("\tERROR: {0}", e); | |
+ } | |
+ } | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment