2003-12-16 Atsushi Enomoto <atsushi@ximian.com>
authorAtsushi Eno <atsushieno@gmail.com>
Tue, 16 Dec 2003 05:30:18 +0000 (05:30 -0000)
committerAtsushi Eno <atsushieno@gmail.com>
Tue, 16 Dec 2003 05:30:18 +0000 (05:30 -0000)
* skelton.cs : Added ErrorOutput text writer.

svn path=/trunk/mcs/; revision=21226

mcs/jay/ChangeLog
mcs/jay/skeleton.cs

index 3dd94231aba8325bc9b50ae0aa6f5d3c926c0c98..dc1dbcf72177b3cc8e9056c4d80769ba68ef697a 100755 (executable)
@@ -1,3 +1,7 @@
+2003-12-16  Atsushi Enomoto <atsushi@ximian.com>
+
+       * skelton.cs : Added ErrorOutput text writer.
+
 2003-10-08  Atsushi Enomoto <ginga@kit.hi-ho.ne.jp>
 
        * output.c, skelton, skelton.cs : Renamed yyName[] to yyNames[]
index 79553fc39ead4c2c9c7a1e5e8741eb7926fd33d9..d999dae6b4bcac1d089f96e0879a91a612fea228 100644 (file)
 .
  prolog                ## %{ ... %} prior to the first %%
 
+.
+.  /** error output stream.
+.      It should be changeable.
+.    */
+.  public System.IO.TextWriter ErrorOutput = System.Console.Out;
 .
 .  /** simplified error message.
 .      @see <a href="#yyerror(java.lang.String, java.lang.String[])">yyerror</a>
 .    */
 .  public void yyerror (string message, string[] expected) {
 .    if ((expected != null) && (expected.Length  > 0)) {
-.      System.Console.Write (message+", expecting");
+.      ErrorOutput.Write (message+", expecting");
 .      for (int n = 0; n < expected.Length; ++ n)
-.        System.Console.Write (" "+expected[n]);
-.        System.Console.WriteLine ();
+.        ErrorOutput.Write (" "+expected[n]);
+.        ErrorOutput.WriteLine ();
 .    } else
-.      System.Console.WriteLine (message);
+.      ErrorOutput.WriteLine (message);
 .  }
 .
 .  /** debugging support, requires the package jay.yydebug.
@@ -261,7 +266,7 @@ t        if (debug != null) debug.shift(yyStates[yyTop], yyState);
 .       
 .       class yyDebugSimple : yyDebug {
 .               void println (string s){
-.                       Console.WriteLine (s);
+.                       Console.Error.WriteLine (s);
 .               }
 .               
 .               public void push (int state, Object value) {