Changeset 38718 in project for release


Ignore:
Timestamp:
05/30/20 21:59:29 (2 months ago)
Author:
Kon Lovett
Message:

remove unused, tighten prefix

Location:
release/5/slib-prec/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • release/5/slib-prec/trunk/slib-prec-parse.scm

    r38717 r38718  
    3131  prec:prefix
    3232  prec:infix
    33   prec:infixr
    3433  prec:nary
    3534  prec:postfix
     
    118117;;
    119118
    120 (define (prec:infixr tk sop lbp . binds)
    121   (let* (
    122     (bp (and (not (null? binds)) (number? (car binds)) (car binds)))
    123     (binds (if bp (cdr binds) binds))
    124     (bp (or bp (max 0 (- lbp 1)))) )
    125     (apply prec:infix tk sop lbp bp binds) ) )
    126 
    127 ;;
    128 
    129119(define (make-grammar src #!optional (base '()))
    130120  (let* (
  • release/5/slib-prec/trunk/slib-standard-grammar.scm

    r38716 r38718  
    7979
    8080;;;prefix operators
    81 (prec:define-grammar (prec:prefix '+ #f 100))
    82 (prec:define-grammar (prec:prefix '- 'negate 100))
    83 (prec:define-grammar (prec:prefix "+/-" 'u+/- 100))
    84 (prec:define-grammar (prec:prefix "-/+" 'u-/+ 100))
     81(prec:define-grammar (prec:prefix '+ #f 150))
     82(prec:define-grammar (prec:prefix '- 'negate 150))
     83(prec:define-grammar (prec:prefix "+/-" 'u+/- 150))
     84(prec:define-grammar (prec:prefix "-/+" 'u-/+ 150))
     85
    8586(prec:define-grammar (prec:prefix '(not ~) 'impl:not 70))
     87
    8688(prec:define-grammar (prec:prefix ":" 'settemplate! 20))
    8789
    8890;;;nary operators
    8991(prec:define-grammar (prec:nary '* '* 120))
     92(prec:define-grammar (prec:nary '/ '/ 120))
    9093(prec:define-grammar (prec:nary '+ '+ 100))
    9194(prec:define-grammar (prec:nary '- '- 100))
    9295(prec:define-grammar (prec:nary "+/-" 'b+/- 100))
    9396(prec:define-grammar (prec:nary "-/+" 'b-/+ 100))
    94 (prec:define-grammar (prec:nary '/ '/ 120))
     97
    9598(prec:define-grammar (prec:nary '(and #\&) '& 60))
    9699(prec:define-grammar (prec:nary 'or 'or 50))
     
    101104(prec:define-grammar (prec:infix #\. 'ncmult 110 109))
    102105(prec:define-grammar (prec:infix '(^ **) '^ 140 139))
    103 ;(prec:define-grammar (prec:infixr #\. 'ncmult 110))
    104 ;(prec:define-grammar (prec:infix '(^ **) '^ 140))
     106
    105107(prec:define-grammar (prec:infix '^^ '^^ 210 210))
     108
    106109(prec:define-grammar (prec:infix '(":=" ":") 'define 180 20))
     110
    107111(prec:define-grammar (prec:infix '= '= 80 80))
    108112;(prec:define-grammar (prec:infix '(~= <>) 'make-not-equal 80 80))
     113
    109114(prec:define-grammar (prec:infix 'mod 'mod 70 70))
     115
    110116(prec:define-grammar (prec:infix ':: 'suchthat 190 40))
    111117(prec:define-grammar (prec:infix "|" 'suchthat 190 40))
Note: See TracChangeset for help on using the changeset viewer.