Changeset 27313 in project


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.

Location:
release/4/genturfahi/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • release/4/genturfahi/trunk/chicken-cmd.scm

    r25672 r27313  
    2121
    2222(use utf8)
    23 (use srfi-28)    ; Basic Format Strings
    24 (use srfi-37)    ; args-fold
    25 (use extras)     ; pretty-print
     23(use srfi-28)      ; Basic Format Strings
     24(use srfi-37)      ; args-fold
     25(use extras)       ; pretty-print
     26(use moremacros)   ; for type-case
    2627(use genturfahi)
    2728(use genturfahi-peg)
  • release/4/genturfahi/trunk/chicken-csi.scm

    r25672 r27313  
    2828(use srfi-69)      ; hash tables
    2929(use extras)       ; format, pretty-print
     30(use moremacros)   ; for type-case
    3031(use matchable)
    3132(use ports)
  • release/4/genturfahi/trunk/chicken-ext-peg.scm

    r25672 r27313  
    134134(require-extension ports)
    135135;(require-library extras)
     136(require-library moremacros)
    136137(require-library matchable)
    137138(require-library sandbox)
     
    145146(import ports)           ; Chicken Scheme srfi-6 and port extensions
    146147;(import extras)         ; pretty-print, for debugging
     148(import moremacros)      ; type-case
    147149(import matchable)
    148150(import sandbox)
  • release/4/genturfahi/trunk/chicken-ext.scm

    r25738 r27313  
    180180(require-extension data-structures)
    181181(require-extension extras)
     182(require-extension moremacros)
    182183(require-extension matchable)
    183184(require-extension ports)
     
    196197(import data-structures) ; should be srfi-95
    197198(import extras)          ; format, pretty-print
     199(import moremacros)      ; type-case
    198200(import matchable)
    199201(import ports)           ; Chicken Scheme srfi-6 and port extensions
  • release/4/genturfahi/trunk/genturfahi.meta

    r25982 r27313  
    33 (doc-from-wiki)
    44 (license "ISC")
    5  (depends make matchable sandbox srfi-37 utf8)
     5 (depends make matchable moremacros sandbox srfi-37 utf8)
    66 (test-depends test utils)
    77 (synopsis "lo ke pe'a jajgau ratcu ke'e genturfa'i"))
  • 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.