klisp

an open source interpreter for the Kernel Programming Language.
git clone http://git.hanabi.in/repos/klisp.git
Log | Files | Refs | README

commit 72589a79004b454674a363369351c681b6e0e4f3
parent 99f6d8eadaaefaba9c56f02a4b15f22675431a0e
Author: Andres Navarro <canavarro82@gmail.com>
Date:   Fri,  2 Dec 2011 16:23:02 -0300

Added two new (still unimplemented) options to the manual: -l to load a file and -r to require a file.

Diffstat:
Mdoc/klisp.1 | 46+++++++++++++++++++++++++++-------------------
Msrc/kgnumbers.c | 3+++
2 files changed, 30 insertions(+), 19 deletions(-)

diff --git a/doc/klisp.1 b/doc/klisp.1 @@ -28,30 +28,29 @@ are evaluated and then the klisp program in file .I script is loaded and evaluated. -All evaluations, including the initialization +All evaluations mentioned, including the initialization that is described below, take place in the same (initially) standard environment. All values that result from these evaluation are discarded, but if the root continuation or error continuation -are passed value, the interpretation of arguments +are passed a value, the evaluation of options is interrupted and the EXIT_STATUS is as described in the corresponding section. -The given -.I args -are available to +The string .I script -as a list of strings via the applicative +together with all +.I args +are available as a list of strings +via the applicative .RI ' get-script-arguments '. If these arguments contain spaces or other characters special to the shell, then they should be quoted (but note that the quotes will be removed by the shell). -The arguments in the returned string start with the string -.RI ' script '. -All the arguments given in the command line -.IR script , +The complete command line including the name of the interpreter, options, -, the script, and its arguments -are available via the applicative +the script, and its arguments +are available as a list of strings +via the applicative .RI ' get-interpreter-arguments '. .LP At the very beginning, @@ -108,13 +107,22 @@ enter interactive mode after .I script is executed. .TP -.\" .BI \-l " name" -.\" call -.\" .BI require(' name ') -.\" before executing -.\" .IR script . -.\" Typically used to load libraries. -.\" .TP +.BI \-l " name" +evaluate +.BI (load " name") +before +.I script +is executed. +Typically used to do environment initialization. +.TP +.BI \-r " name" +evaluate +.BI (require " name") +before +.I script +is executed. +Typically used to load libraries. +.TP .B \-v show version information. .SH EXIT STATUS diff --git a/src/kgnumbers.c b/src/kgnumbers.c @@ -2393,6 +2393,9 @@ struct kspecial_number { { "#undefined", KUNDEF_ } }; +/* N.B. If case insignificance is removed, check here too! + This will happily accept exactness and radix arguments in both cases + (but not the names of special numbers) */ void string_to_number(klisp_State *K) { /* MAYBE try to unify with ktoken */