From 7419778f059a3a44bd3b0ec23facd7f27a479324 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Thu, 28 May 2009 04:40:50 +0000 Subject: * interp/newaux.lisp: Bot / and /\ are gliphs. * interp/sys-constants.boot ($OperatorFunctionNames): Include /\ and \/. * interp/fnewmeta.lisp (|PARSE-ReductionOp|): Tidy. * interp/metalex.lisp (|PARSE-OperatorFunctionName|): Likewise. * algebra/boolean.spad.pamphlet (PropositionalLogic): Use plain syntax for operators. (Logic): Likewise. (Boolean): Likewise. (KleeneTrivalentLogic): Likewise. --- src/interp/fnewmeta.lisp | 4 ++-- src/interp/metalex.lisp | 5 +++-- src/interp/newaux.lisp | 4 ++-- src/interp/sys-constants.boot | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) (limited to 'src/interp') diff --git a/src/interp/fnewmeta.lisp b/src/interp/fnewmeta.lisp index c819222d..adf96fe8 100644 --- a/src/interp/fnewmeta.lisp +++ b/src/interp/fnewmeta.lisp @@ -168,7 +168,7 @@ ;; Reduction: ReductionOp Expr{1000} +(Reduce #2 #1) ; ;; ReductionOp: ?(AND (GETL (CURRENT-SYMBOL) "Led) -;; (MATCH-NEXT-TOKEN "SPECIAL-CHAR (CODE-CHAR 47))) % Forgive me! +;; (MATCH-NEXT-TOKEN "GLIPH "/)) % Forgive me! ;; +=(CURRENT-SYMBOL) .(ADVANCE-TOKEN) .(ADVANCE-TOKEN) ; ;; Form: 'iterate' < 'from' Label +(#1) >! +(iterate -#1) @@ -695,7 +695,7 @@ (DEFUN |PARSE-ReductionOp| () (AND (GETL (CURRENT-SYMBOL) '|Led|) - (MATCH-NEXT-TOKEN 'SPECIAL-CHAR (CODE-CHAR 47)) + (MATCH-NEXT-TOKEN 'GLIPH '/) (PUSH-REDUCTION '|PARSE-ReductionOp| (CURRENT-SYMBOL)) (ACTION (ADVANCE-TOKEN)) (ACTION (ADVANCE-TOKEN)))) diff --git a/src/interp/metalex.lisp b/src/interp/metalex.lisp index f89ebf6e..18183d0d 100644 --- a/src/interp/metalex.lisp +++ b/src/interp/metalex.lisp @@ -637,9 +637,10 @@ as keywords.") (defun-parse-token ARGUMENT-DESIGNATOR) (defun |PARSE-OperatorFunctionName| () - (let ((tok (match-current-token 'keyword))) + (let ((tok (or (match-current-token 'keyword) + (match-current-token 'gliph)))) (when (and tok (member (token-symbol tok) |$OperatorFunctionNames|)) - (Push-Reduction 'IDENTIFIER-TOKEN + (Push-Reduction '|PARSE-OperatorFunctionName| (copy-tree (token-symbol tok))) (action (advance-token))))) diff --git a/src/interp/newaux.lisp b/src/interp/newaux.lisp index d8ac603e..182e6135 100644 --- a/src/interp/newaux.lisp +++ b/src/interp/newaux.lisp @@ -1,6 +1,6 @@ ;; Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd. ;; All rights reserved. -;; Copyright (C) 2007, Gabriel Dos Reis. +;; Copyright (C) 2007-2009, Gabriel Dos Reis. ;; All rights reserved. ;; ;; Redistribution and use in source and binary forms, with or without @@ -179,7 +179,7 @@ ( + (- (>)) ) ( - (>) ) ( < (=) (<) ) - ;; ( / (\\) ) breaks */xxx + ( / (\\) ) ( \\ (/) ) ( > (=) (>) (\))) ( = (= (>)) (>) ) diff --git a/src/interp/sys-constants.boot b/src/interp/sys-constants.boot index b50e1d56..d8521b88 100644 --- a/src/interp/sys-constants.boot +++ b/src/interp/sys-constants.boot @@ -738,5 +738,5 @@ $SpadReaderTag == $OperatorFunctionNames == ["**", "^", "*", "/", "rem", "quo", "mod", "div", "exquo", "+", "-", ">", ">=", "=", "~=", "<", "<=", "~", "not", - "case", "and", "or", "<<", ">>" ] + "case", "and", "or", "<<", ">>", "/\", "\/" ] -- cgit v1.2.3