On Thu, 2006-06-15 at 14:25 +0200, Juraj Skripsky wrote:
> Hi,
> 
> Could you please review and approve the attached patch?
> It fixes bug http://bugzilla.ximian.com/show_bug.cgi?id=78643
> 
> I don't know how the tokenizer is supposed to pass errors to the parser.
> For the quoting error I've made it throw an exception.

Try this one and let me know if everything works as it should.
Thanks.

-Gonzalo

Index: AspTokenizer.cs
===================================================================
--- AspTokenizer.cs	(revision 61724)
+++ AspTokenizer.cs	(working copy)
@@ -44,6 +44,7 @@
 		public const int TEXT	    	= 0x0200004;
 		public const int DOUBLEDASH 	= 0x0200005;
 		public const int CLOSING 	= 0x0200006;
+		public const int NOTWELLFORMED 	= 0x0200007;
 	}
 
 	class AspTokenizer
@@ -188,6 +189,8 @@
 						read_char ();
 						break;
 					}
+				} else if (quoted && c == quoteChar) {
+					return Token.NOTWELLFORMED;
 				}
 
 				sb.Append ((char) c);
Index: AspParser.cs
===================================================================
--- AspParser.cs	(revision 61724)
+++ AspParser.cs	(working copy)
@@ -332,6 +332,11 @@
 
 				id = tokenizer.Value;
 				if (Eat ('=')){
+					if (Eat (Token.NOTWELLFORMED)){
+						OnError ("The server tag is not well formed.");
+						return null;
+					}
+
 					if (Eat (Token.ATTVALUE)){
 						attributes.Add (id, tokenizer.Value);
 					} else if (Eat ('<') && Eat ('%')) {
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list

Reply via email to