. /** 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
.
. @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);
. @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
. 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:
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);
. 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.