This commit was manufactured by cvs2svn to create branch 'mono-1-0'.
[mono.git] / mcs / jay / skeleton.cs
index d999dae6b4bcac1d089f96e0879a91a612fea228..eb38daaec46167acd6c538d8ae7afe4a65d51856 100644 (file)
@@ -41,7 +41,7 @@
 .  /** debugging support, requires the package jay.yydebug.
 .      Set to null to suppress debugging messages.
 .    */
-t  protected yydebug.yyDebug debug;
+t  internal yydebug.yyDebug debug;
 .
  debug                 ## tables for debugging support
 .
@@ -92,7 +92,7 @@ t  }
 .      @return result of the last reduction, if any.
 .      @throws yyException on irrecoverable parse error.
 .    */
-.  public Object yyparse (yyParser.yyInput yyLex, Object yyd)
+.  internal Object yyparse (yyParser.yyInput yyLex, Object yyd)
 .                               {
 t    this.debug = (yydebug.yyDebug)yyd;
 .    return yyparse(yyLex);
@@ -120,7 +120,7 @@ t    this.debug = (yydebug.yyDebug)yyd;
 .      @return result of the last reduction, if any.
 .      @throws yyException on irrecoverable parse error.
 .    */
-.  public Object yyparse (yyParser.yyInput yyLex)
+.  internal Object yyparse (yyParser.yyInput yyLex)
 .                              {
 .    if (yyMax <= 0) yyMax = 256;                      // initial size
 .    int yyState = 0;                                   // state stack ptr
@@ -176,7 +176,7 @@ t              debug.shift(yyState, yyTable[yyN], yyErrorFlag-1);
 .            switch (yyErrorFlag) {
 .  
 .            case 0:
-.              yyerror("syntax error", yyExpecting(yyState));
+.              yyerror(String.Format ("syntax error, got token `{0}'", yyname (yyToken)), yyExpecting(yyState));
 t              if (debug != null) debug.error("syntax error");
 .              goto case 1;
 .            case 1: case 2:
@@ -251,7 +251,7 @@ t        if (debug != null) debug.shift(yyStates[yyTop], yyState);
  epilog                        ## text following second %%
 .namespace yydebug {
 .        using System;
-.       public interface yyDebug {
+.       internal interface yyDebug {
 .               void push (int state, Object value);
 .               void lex (int state, int token, string name, Object value);
 .               void shift (int from, int to, int errorFlag);
@@ -331,14 +331,14 @@ t        if (debug != null) debug.shift(yyStates[yyTop], yyState);
 .  using System;
 .  /** thrown for irrecoverable syntax errors and stack overflow.
 .    */
-.  public class yyException : System.Exception {
+.  internal class yyException : System.Exception {
 .    public yyException (string message) : base (message) {
 .    }
 .  }
 .
 .  /** must be implemented by a scanner object to supply input to the parser.
 .    */
-.  public interface yyInput {
+.  internal interface yyInput {
 .    /** move on to next token.
 .        @return false if positioned beyond tokens.
 .        @throws IOException on input error.