From 9d71472ce9d0b0fe0f8ff927b1ecb653d9b9a850 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Mon, 21 May 2012 05:39:08 +0000 Subject: * interp/spad.lisp (S-PROCESS): Rename to translateSpad and move to spad-parser.boot. * interp/parsing.lisp (MATCH-ADVANCE-SPECIAL): Remove. (MATCH-SPECIAL): Likewise. (MATCH-KEYWORD-NEXT): Likewise. (INITIAL-SUBSTRING-P): Likewise. (TERMCHR): Likewise. (dollarTran): Simplify and move to spad-parser.boot. --- src/interp/parsing.lisp | 34 ---------------------------------- 1 file changed, 34 deletions(-) (limited to 'src/interp/parsing.lisp') diff --git a/src/interp/parsing.lisp b/src/interp/parsing.lisp index 828de1db..a6a321e7 100644 --- a/src/interp/parsing.lisp +++ b/src/interp/parsing.lisp @@ -243,38 +243,10 @@ the stack, then stack a NIL. Return the value of prod." (defun action (dothis) (or dothis t)) -; 3A. Manipulating the token stack and reading tokens - -; This section is broken up into 3 levels: -; -; (0) String grabbing: Match String, Match Advance String -; (1) Token handling: Current Token, Next Token, Advance Token -; (2) Character handling: Current Char, Next Char, Advance Char -; (3) Line handling: Next Line, Print Next Line -; (X) Random Stuff - -(defun match-advance-special (str) - (and (|matchToken| (|currentToken|) 'special-char (character str)) - (action (|advanceToken|)))) - -(defun match-special (str) - (|matchToken| (|currentToken|) 'special-char (character str))) - -(defun match-keyword-next (str) - (|matchToken| (|nextToken|) 'keyword (intern str))) - -(defun initial-substring-p (part whole) - "Returns length of part if part matches initial segment of whole." - (let ((x (string<= part whole))) - (and x (= x (length part)) x))) - ; 3B. Error handling (defparameter line nil) -(defun termchr () "Is CHR a terminating character?" - (|findChar| (|currentChar|) " *,;<>()[]/\\")) - ; 5. Routines for inspecting and resetting total I/O system state ; ; The package largely assumes that: @@ -310,9 +282,3 @@ the stack, then stack a NIL. Return the value of prod." (DIGITP (ELT S I))))) (READ-FROM-STRING S t nil :start 1) NIL)) - -(defun |dollarTran| (dom rand) - (let ((eltWord (if |$InteractiveMode| '|$elt| '|elt|))) - (if (and (not (atom rand)) (cdr rand)) - (cons (list eltWord dom (car rand)) (cdr rand)) - (list eltWord dom rand)))) -- cgit v1.2.3