Beispiel #1
0
        // rest is emitted after yyParse()

        /// <summary>
        ///   start with any argument to trace.
        /// </summary>
        public static void Main(string[] args)
        {
            yyDebug.yyDebug debug =
                args.Length > 0 ? new yyDebug.yyDebugAdapter() : null;
            yyInput scanner = new Scanner(System.Console.In);

            try {
                new Arith().yyParse(scanner, debug);
            } catch (yyException ye) { System.Console.WriteLine(ye); }
        }
Beispiel #2
0
 /// <summary>
 ///   the generated parser, with debugging messages.
 ///   Maintains a dynamic state and value stack.
 /// </summary>
 /// <param name='yyLex'>scanner</param>
 /// <param name='yyDebug'>debug message writer implementing <c>yyDebug</c>,
 ///   or <c>null</c></param>
 /// <returns>result of the last reduction, if any</returns>
 /// <exceptions><c>yyException</c> on irrecoverable parse error</exceptions>
 public object yyParse(yyInput yyLex, object yyDebug)
 {
     this.yyDebug = (yyDebug.yyDebug)yyDebug;
     return(yyParse(yyLex));
 }
 /// <summary>
 ///   the generated parser, with debugging messages.
 ///   Maintains a dynamic state and value stack.
 /// </summary>
 /// <param name='yyLex'>scanner</param>
 /// <param name='yyDebug'>debug message writer implementing <c>yyDebug</c>,
 ///   or <c>null</c></param>
 /// <returns>result of the last reduction, if any</returns>
 /// <exceptions><c>yyException</c> on irrecoverable parse error</exceptions>
 public object yyParse (yyInput yyLex, object yyDebug) {
   this.yyDebug = (yyDebug.yyDebug)yyDebug;
   return yyParse(yyLex);
 }