Original Parser

version 1 by Ron Newcomb

  • Home page
  • Beginning
  • Previous
  • Next



  • Chapter 12 - Testing

    Section 1 - Debugging Built in to Parser i6t

    [ This may look odd as it can be done with more orthogonal pieces, but it's used so much in here it really is worth it. ]
    To if TRACE (n - a number), (ph - a phrase):
    (- #ifdef DEBUG;
        if ( (+TRACE testing command setting+) >= {n}) {ph}; }
        #endif; !-).


    Use choose objects debugging translates as (- Constant COBJ_DEBUG; -).

    To if the choose objects debugging option is active, (ph - phrase):
    (- #ifdef COBJ_DEBUG;
        if (1) {ph}; }
        #endif; !-).

    [ Since I name many of the unnamed magic numbers, I need this in the TRACE statements to preserve the output. ]
    To decide which number is (v - a value) as a debugging number: (- {v} -).