From 5852b522a6637ecde8dbc53204b3cd00c565fae9 Mon Sep 17 00:00:00 2001 From: dos-reis Date: Tue, 8 May 2012 10:10:34 +0000 Subject: * boot/tokens.boot: Export char. Do not rename maxIndex. * lisp/core.lisp.in (maxIndex): Define and export. * interp/bootlex.lisp: Adjust. * interp/parsing.lisp: Likewise. * interp/macros.lisp: Likewise. (DROPTRAILINGBLANKS): Remove. (BLANKP): Likewise. (NONBLANKLOC): Likewise. * interp/io.boot (trimTrailingBlank): New. (firstNonblankCharPosition): Likewise. * interp/preparse.lisp: Use them. Adjust. * interp/sys-macros.lisp (char): Remove. * interp/vmlisp.lisp (MAXINDEX): Likewise. * interp/br-search.boot (pmTransFilter): Fix bogus uses of char. * interp/debug.lisp: Likewise. * interp/g-util.boot: Likewise. * interp/ht-root.boot: Likewise. * interp/i-output.boot: Likewise. * interp/i-syscmd.boot: Likewise. --- src/ChangeLog | 22 ++++++++++++++++++++++ src/boot/strap/tokens.clisp | 13 +++++++------ src/boot/tokens.boot | 6 +++--- src/interp/bootlex.lisp | 2 +- src/interp/br-search.boot | 4 ++-- src/interp/database.boot | 2 +- src/interp/debug.lisp | 8 ++++---- src/interp/g-util.boot | 2 +- src/interp/ht-root.boot | 4 ++-- src/interp/i-output.boot | 2 +- src/interp/i-syscmd.boot | 3 +-- src/interp/io.boot | 13 +++++++++++++ src/interp/macros.lisp | 12 +++--------- src/interp/parsing.lisp | 2 +- src/interp/preparse.lisp | 12 ++++++------ src/interp/sys-macros.lisp | 11 ----------- src/interp/vmlisp.lisp | 3 --- src/lisp/core.lisp.in | 5 +++++ 18 files changed, 73 insertions(+), 53 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 9124b020..8e1bee19 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,25 @@ +2012-05-08 Gabriel Dos Reis + + * boot/tokens.boot: Export char. Do not rename maxIndex. + * lisp/core.lisp.in (maxIndex): Define and export. + * interp/bootlex.lisp: Adjust. + * interp/parsing.lisp: Likewise. + * interp/macros.lisp: Likewise. + (DROPTRAILINGBLANKS): Remove. + (BLANKP): Likewise. + (NONBLANKLOC): Likewise. + * interp/io.boot (trimTrailingBlank): New. + (firstNonblankCharPosition): Likewise. + * interp/preparse.lisp: Use them. Adjust. + * interp/sys-macros.lisp (char): Remove. + * interp/vmlisp.lisp (MAXINDEX): Likewise. + * interp/br-search.boot (pmTransFilter): Fix bogus uses of char. + * interp/debug.lisp: Likewise. + * interp/g-util.boot: Likewise. + * interp/ht-root.boot: Likewise. + * interp/i-output.boot: Likewise. + * interp/i-syscmd.boot: Likewise. + 2012-05-07 Gabriel Dos Reis * interp/spad.lisp (INIT-BOOT/SPAD-READER): Don't set FILE-CLOSED. diff --git a/src/boot/strap/tokens.clisp b/src/boot/strap/tokens.clisp index 7b16a885..8dd98d44 100644 --- a/src/boot/strap/tokens.clisp +++ b/src/boot/strap/tokens.clisp @@ -6,7 +6,9 @@ (PROVIDE "tokens") (EVAL-WHEN (:COMPILE-TOPLEVEL :LOAD-TOPLEVEL :EXECUTE) - (EXPORT '|$InteractiveMode|)) + (EXPORT '(|$InteractiveMode| |char|))) + +(DECLAIM (FTYPE (FUNCTION (|%Symbol|) |%Char|) |char|)) (DEFPARAMETER |$InteractiveMode| NIL) @@ -211,11 +213,10 @@ (LIST '|genvar| 'GENVAR) (LIST '|integer?| 'INTEGERP) (LIST 'LAST '|last|) (LIST '|list| 'LIST) (LIST '|listEq?| 'EQUAL) (LIST '|lowerCase?| 'LOWER-CASE-P) (LIST '|makeSymbol| 'INTERN) - (LIST '|maxIndex| 'MAXINDEX) (LIST '|mkpf| 'MKPF) - (LIST '|newVector| 'MAKE-ARRAY) (LIST '|nil| NIL) - (LIST '|not| 'NOT) (LIST '|null| 'NULL) (LIST '|odd?| 'ODDP) - (LIST '|or| 'OR) (LIST '|otherwise| 'T) (LIST '|property| 'GET) - (LIST '|readInteger| 'PARSE-INTEGER) + (LIST '|mkpf| 'MKPF) (LIST '|newVector| 'MAKE-ARRAY) + (LIST '|nil| NIL) (LIST '|not| 'NOT) (LIST '|null| 'NULL) + (LIST '|odd?| 'ODDP) (LIST '|or| 'OR) (LIST '|otherwise| 'T) + (LIST '|property| 'GET) (LIST '|readInteger| 'PARSE-INTEGER) (LIST '|readLispFromString| 'READ-FROM-STRING) (LIST '|readOnly?| 'CONSTANTP) (LIST '|removeDuplicates| 'REMDUP) (LIST '|rest| 'CDR) (LIST '|sameObject?| 'EQ) diff --git a/src/boot/tokens.boot b/src/boot/tokens.boot index b9a2e2a8..bcfa8e52 100644 --- a/src/boot/tokens.boot +++ b/src/boot/tokens.boot @@ -1,6 +1,6 @@ -- Copyright (c) 1991-2002, The Numerical Algorithms Group Ltd. -- All rights reserved. --- Copyright (C) 2007-2011, Gabriel Dos Reis. +-- Copyright (C) 2007-2012, Gabriel Dos Reis. -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -34,7 +34,8 @@ import utility namespace BOOTTRAN -module tokens ($InteractiveMode) +module tokens ($InteractiveMode, char) where + char: %Symbol -> %Char ++ If true, means the system is in interactive mode. $InteractiveMode := false @@ -279,7 +280,6 @@ for i in [ _ ["listEq?", "EQUAL"] , _ ["lowerCase?", "LOWER-CASE-P"], _ ["makeSymbol", "INTERN"] , _ - ["maxIndex", "MAXINDEX"] , _ ["mkpf", "MKPF"] , _ ["newVector", "MAKE-ARRAY"], _ ["nil" ,NIL ] , _ diff --git a/src/interp/bootlex.lisp b/src/interp/bootlex.lisp index 77147e7a..ec75471d 100644 --- a/src/interp/bootlex.lisp +++ b/src/interp/bootlex.lisp @@ -122,7 +122,7 @@ "Transforms X according to AL = ((