aboutsummaryrefslogtreecommitdiff
path: root/src/interp/bootlex.lisp
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2007-09-19 15:30:04 +0000
committerdos-reis <gdr@axiomatics.org>2007-09-19 15:30:04 +0000
commit1d71a43cca77e1576cc1568298d5886a60c9b884 (patch)
tree270a5e091dc621fd0023f2261938cea235b0cbe9 /src/interp/bootlex.lisp
parent1ee7a0030053e2447302d8157b9d3356a54e9b3a (diff)
downloadopen-axiom-1d71a43cca77e1576cc1568298d5886a60c9b884.tar.gz
2007-09-19 Gabriel Dos Reis <gdr@cs.tamu.edu>
* Makefile.pamphlet (all-interpsys): Now depend on all-depsys. src/interp/ 2007-09-19 Gabriel Dos Reis <gdr@cs.tamu.edu> * util.lisp.pamphlet ($directory-list): Move to sys-globals.boot. ($library-directory-list): Likewise. * spad.lisp.pamphlet: Import "bootlex". * preparse.lisp.pamphlet: Import "fnewmeta". * postprop.lisp: Import "macros". * postpar.boot.pamphlet: Import "postprop". * nlib.lisp.pamphlet (rdefiostream): Define unconditionally. (get-io-index-stream): Likewise. (makedir): Likewise. (get-directory-list): Don't use $current-diretory. ($filetype-table): Move to sys-constants.boot. * patches.lisp.pamphlet ($current-directory): Remove. (|cd|): Simplify implementation. * newaux.lisp.pamphlet: Import "macros". (|PARSE-NewKEY|): Define. * metalex.lisp: Move various file, line, stack, character utilities to here. * macros.lisp.pamphlet (NREVERSE0): Move to sys-macros.lisp. Tidy. * fnewmeta.lisp.pamphlet: Import "parsing". * comp.lisp: Import "macros". * def.lisp: Likewise. (B-MDEF): Fix thinko. * bootlex.lisp: Import "preparse", "def", and "nlib". (BOOT-LINE-STACK): Move to metalex.lisp. (NEXT-LINES-CLEAR): Likewise. (NEXT-LINES-SHOW): Likewise. (XCAPE): Likewise. (KEYWORDS): Likewise. * Makefile.pamphlet (${DEPSYS}): Now have all Lisp in compiled form and load them. * bookvol5.pamphlet ($current-directory): Remove.
Diffstat (limited to 'src/interp/bootlex.lisp')
-rw-r--r--src/interp/bootlex.lisp34
1 files changed, 4 insertions, 30 deletions
diff --git a/src/interp/bootlex.lisp b/src/interp/bootlex.lisp
index 6b1d67ad..35be2eaa 100644
--- a/src/interp/bootlex.lisp
+++ b/src/interp/bootlex.lisp
@@ -41,20 +41,13 @@
; 4. BOOT Token Parsing Actions
; 5. BOOT Error Handling
+(IMPORT-MODULE "preparse")
+(IMPORT-MODULE "def")
+(IMPORT-MODULE "nlib")
(in-package "BOOT")
; *** 0. Global parameters
-(defparameter Boot-Line-Stack nil "List of lines returned from PREPARSE.")
-
-(defun Next-Lines-Clear () (setq Boot-Line-Stack nil))
-
-(defun Next-Lines-Show ()
- (and Boot-Line-Stack (format t "Currently preparsed lines are:~%~%"))
- (mapcar #'(lambda (line)
- (format t "~&~5D> ~A~%" (car line) (cdr Line)))
- Boot-Line-Stack))
-
; *** 1. BOOT file handling
(defun init-boot/spad-reader ()
@@ -165,7 +158,6 @@
(OPTIONLIST nil)
(*EOF* NIL)
(File-Closed NIL)
- ;; ($current-directory "/spad/libraries/")
(/editfile *spad-input-file*)
(|$noSubsumption| |$noSubsumption|)
in-stream out-stream)
@@ -233,6 +225,7 @@
'|%l| '|%b| (ELT $SPAD_ERRORS 2) '|%d| '|semantic errors| '|%l|)))
(+ (ELT $SPAD_ERRORS 0) (ELT $SPAD_ERRORS 1) (ELT $SPAD_ERRORS 2))))
+
(defun READBOOT ()
(let (form expr ($BOOT 'T))
(declare (special $BOOT))
@@ -265,8 +258,6 @@ if it gets a non-blank line, and NIL at end of stream."
; *** 3. BOOT Token Handling ***
-(defparameter xcape #\_ "Escape character for Boot code.")
-
(defun get-BOOT-token (token)
"If you have an _, go to the next line.
@@ -318,18 +309,6 @@ Otherwise, get a .. identifier."
(token-install (intern (strconc "#" (format nil "~D" (token-symbol token))))
'argument-designator token nonblank))
-(defvar Keywords '(|or| |and| |isnt| |is| |otherwise| |when| |where|
- |has| |with| |add| |case| |in| |by| |pretend| |mod|
- |exquo| |div| |quo| |else| |rem| |then| |suchthat|
- |if| |yield| |iterate| |from| |exit| |leave| |return|
- |not| |unless| |repeat| |until| |while| |for| |import|)
-
-
-
-"Alphabetic literal strings occurring in the New Meta code constitute
-keywords. These are recognized specifically by the AnyId production,
-GET-BOOT-IDENTIFIER will recognize keywords but flag them
-as keywords.")
(defun get-boot-identifier-token (token &optional (escaped? nil))
"An identifier consists of an escape followed by any character, a %, ?,
@@ -405,11 +384,6 @@ or the chracters ?, !, ' or %"
; **** 4. BOOT token parsing actions
-; Parsing of operator tokens depends on tables initialized by BOTTOMUP.LISP
-
-(defun-parse-token SPADSTRING)
-(defun-parse-token KEYWORD)
-(defun-parse-token ARGUMENT-DESIGNATOR)
(defun TRANSLABEL (X AL) (TRANSLABEL1 X AL) X)