0:if {0} print X, right_to 1; /* mark a 0 with X */
if {Y} right_to 3; /* marking 0s complete */
otherwise reject /* reject if no leading 0 */1:while {0, Y} right; /* search right for 1 */
if {1} print Y, left_to 2; /* mark corresponding 1 with Y */
otherwise reject /* reject if it's missing */2:while {0, Y} left; /* rewind to last X */
if {X} right_to 0; /* loop for more 0s & 1s */
otherwise reject /* other options impossible */3:while {Y} right; /* skip over marked '1's */
if {b} accept; /* check for no extra '0's or */
otherwise reject /* '1's else, reject */
Example 8.1.1. (continued)
Previous slide | Next slide | Back to first slide | View graphic version |