Ignore:
Timestamp:
08/28/12 17:49:46 (9 years ago)
Author:
Alan Post
Message:

genturfahi: false-failured in {}-expressions.

{} expressions can appear at the top of a .peg file, and are
executed before the main grammar to set global parsing options.

For the set of tokens not to memoize, the return value was not
properly set resulting in parse failure.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/genturfahi/trunk/samselpla.scm

    r25738 r27313  
    147147    ;
    148148    (let ((no-memoize (secuxna-no-memoize)))
    149       (if (string? no-memoize)
    150           (begin
    151             (hash-table-set! samselpla-namorji no-memoize #t)
    152             (secuxna-no-memoize #f)))
    153       (if (list? no-memoize)
    154           (begin
    155             (for-each (lambda (naselci)
    156                         (hash-table-set! samselpla-namorji naselci #t))
    157                       no-memoize)
    158             ; since we've registered all of the rules not to
    159             ; memoize, make sure we do memoize the rest of them.
    160             ;
    161             (secuxna-no-memoize #f))))))
     149      ; since we've registered all of the rules not to
     150      ; memoize, make sure we do memoize the rest of them.
     151      ;
     152      (secuxna-no-memoize #f)
     153
     154      (type-case no-memoize
     155        (string (hash-table-set! samselpla-namorji no-memoize #t)
     156                ; success
     157                #t)
     158        (list   (for-each (lambda (naselci)
     159                            (hash-table-set! samselpla-namorji naselci #t))
     160                          no-memoize)
     161                ; success
     162                #t)
     163        ;;
     164        ;; this should be an error case, but I haven't built an
     165        ;; error handling framework for this system yet.
     166        ;;
     167        (else   #f)))))
    162168
    163169;; emit the non-terminal with it's rule.
Note: See TracChangeset for help on using the changeset viewer.