- Timestamp:
- 04/07/20 05:52:30 (10 months ago)
- Location:
- release/5/slib-prec/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
release/5/slib-prec/trunk/slib-grammar.scm
r38563 r38598 28 28 ;;from jacal unparse.scm 29 29 (define (print-using-grammar sexp grm) 30 (print "[" (grammar-name grm) "] " sexp) 31 #; 32 (template-print sexp (grammar-write-tab grm))) 30 ;(print "[" (grammar-name grm) "] " sexp) 31 (pretty-print sexp) 32 #; ;needs most of jacal! 33 (template-print sexp (grammar-write-tab grm)) ) 33 34 34 ;#|35 35 ; supplies module based struct tag & other identifiers 36 36 (define-record grammar name reader read-tab writer write-tab) … … 84 84 col) 85 85 (read-char port))) 86 ;|#87 86 88 87 ;; … … 106 105 (grammar-reader-set! grm tmp) 107 106 res ) ) ) 108 109 ;from jacal toploads.scm110 (define *input-grammar* (get-grammar 'scheme))111 (define *output-grammar* (get-grammar 'scheme))112 (define *echo-grammar* (get-grammar 'null))113 (define tran:translations '())114 ;(define Language #f)115 (define math:debug #f)116 (define math:phases #f)117 (define math:trace #f)118 ;(define linkradicals #f)119 (define horner #f)120 (define page-height #f)121 (define page-width #f)122 ;(define newextstr #f)123 ;(define newlabelstr #f)124 ;(define newlabelsym #f)125 ;(define % #f)126 ;(define *modulus* 0)127 128 ;129 (define (math:error . args) (apply slib:error 'math: args))130 (define (math:warn . args) (apply slib:warn 'math: args))131 (define (math:exit b) #;(cleanup-handlers!) (slib:error "error in math system")) -
release/5/slib-prec/trunk/slib-prec-grammar.scm
r38563 r38598 7 7 (;export 8 8 ; 9 *input-grammar* 10 *output-grammar* 11 *echo-grammar* 9 active-grammar 12 10 active-grammar-set! 13 11 read-syntax-setup! … … 50 48 51 49 (include "slib-compat") 50 51 (define (math:error . args) (apply slib:error 'math: args)) 52 (define (math:warn . args) (apply slib:warn 'math: args)) 53 (define (math:exit b) #;(cleanup-handlers!) (slib:error "error in math system")) 54 52 55 (include "slib-grammar") 56 57 (define *input-grammar*) 58 (define *output-grammar*) 59 (define *echo-grammar*) 60 53 61 (include "output-grammars") 54 62 (include "input-grammars") … … 88 96 (set! *echo-grammar* echo) ) 89 97 98 (define (active-grammar) (values *input-grammar* *output-grammar* *echo-grammar*)) 99 90 100 ;; 91 101 -
release/5/slib-prec/trunk/tests/slib-prec-test.scm
r38563 r38598 19 19 (define ^ expt) 20 20 21 (define (active-input-grammar) (receive (i o e) (active-grammar) i)) 22 21 23 ;; 22 24 … … 29 31 ;; 30 32 31 (define (read-sexp/string str #!optional (grm *input-grammar*) (icol 0))33 (define (read-sexp/string str #!optional (grm (active-input-grammar)) (icol 0)) 32 34 (import (only (chicken port) with-input-from-string)) 33 35 (with-input-from-string str (lambda () (read-sexp grm icol))) )
Note: See TracChangeset
for help on using the changeset viewer.