1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-05 03:30:24 +02:00
guile/module/ice-9
Mark H Weaver bf9eb54aab Implement SRFI-105 curly infix expressions.
* libguile/private-options.h: Add SCM_CURLY_INFIX_P macro, and increment
  SCM_N_READ_OPTIONS.

* libguile/read.c (sym_nfx, sym_bracket_list, sym_bracket_apply): New
  variables.
  (scm_read_opts): Add curly-infix reader option.  Reformat to comply
  with GNU coding standards.
  (scm_t_read_opts): Add curly_infix_p and neoteric_p fields.
  (init_read_options): Initialize new fields.
  (CHAR_IS_DELIMITER): Add '{', '}', '[', and ']' as delimiters if
  curly_infix_p is set.

  (set_port_square_brackets_p, set_port_curly_infix_p): New functions.

  (read_inner_expression): New function which contains the code that was
  previously in 'scm_read_expression'.  Handle curly braces when
  curly_infix_p is set.  If curly_infix_p is set and square_brackets_p
  is unset, follow the Kawa convention: [...] => ($bracket-list$ ...)

  (scm_read_expression): New function body to handle neoteric
  expressions where appropriate.

  (scm_read_shebang): Handle the new reader directives: '#!curly-infix'
  and the non-standard '#!curly-infix-and-bracket-lists'.

  (scm_read_sexp): Handle curly infix lists.

* module/ice-9/boot-9.scm (%cond-expand-features): Add srfi-105 feature
  identifier.

* doc/ref/srfi-modules.texi (SRFI-105): Add stub doc for SRFI-105.

* doc/ref/api-evaluation.texi (Scheme Read): Add documentation for the
  'curly-infix' read option, and the '#!curly-infix' and
  '#!curly-infix-and-bracket-lists' reader directives.

* doc/ref/api-options.texi (Runtime Options): Add 'curly-infix' to the
  list of read options.

* test-suite/Makefile.am: Add tests/srfi-105.test.

* test-suite/tests/srfi-105.test: New file.
2012-10-26 19:52:32 -04:00
..
and-let-star.scm
arrays.scm
binary-ports.scm Add get-string-n' and get-string-n!' for R6RS ports 2011-03-13 22:39:14 +01:00
boot-9.scm Implement SRFI-105 curly infix expressions. 2012-10-26 19:52:32 -04:00
buffered-input.scm bugfixes and simplifications to ice-9 buffered-input. 2010-10-05 19:55:37 +02:00
calling.scm
ChangeLog-2008
channel.scm deprecate arity access via (procedure-properties proc 'arity) 2010-04-17 16:28:52 +02:00
command-line.scm Fix @@ usage in --listen option 2012-10-18 00:08:13 -04:00
common-list.scm
compile-psyntax.scm Minimize size of embedded syntax objects in psyntax-pp.scm 2012-03-03 18:06:59 -05:00
control.scm more define-syntax-rule usage 2011-09-02 11:36:14 +02:00
curried-definitions.scm `define-public' is no a longer curried definition by default. 2012-09-06 13:08:33 +01:00
debug.scm gut ice-9 debug 2010-07-16 17:35:43 +02:00
deprecated.scm finish deprecating eval closures 2012-05-23 12:29:15 +02:00
documentation.scm remove program-name, program-documentation 2010-04-17 15:21:08 +02:00
eval-string.scm add ice-9 eval-string 2011-03-05 23:16:11 +01:00
eval.scm better procedure-arguments for interpreted procs with opt, rest, kwargs 2012-07-06 12:19:12 +02:00
expect.scm
format.scm Micro-optimize (ice-9 format). 2012-08-21 00:36:50 +02:00
ftw.scm scandir: select? takes basenames, operates on (sub)dirs also 2012-06-22 12:33:20 +02:00
futures.scm more define-syntax-rule usage 2011-09-02 11:36:14 +02:00
gap-buffer.scm
getopt-long.scm Use default value for make-fluid in Scheme files 2011-11-23 12:54:09 +01:00
hcons.scm
history.scm Use `define-module*' in (ice-9 history). 2010-11-20 00:47:12 +01:00
i18n.scm i18n: Provide default values for when Gnulib has no replacement. 2012-02-03 20:11:00 +01:00
lineio.scm
list.scm
local-eval.scm Fix 'local-eval' when the specified environment is a module 2012-01-30 03:02:32 -05:00
ls.scm nested module fixen to (ice-9 ls) 2010-04-24 17:42:00 +02:00
mapping.scm
match.scm Update (ice-9 match) from Chibi-Scheme. 2012-06-08 12:42:08 +02:00
match.upstream.scm Update (ice-9 match) from Chibi-Scheme. 2012-06-08 12:42:08 +02:00
networking.scm Add `getaddrinfo' and related procedures. 2010-02-14 20:56:47 +01:00
null.scm
occam-channel.scm
optargs.scm more define-syntax-rule usage 2011-09-02 11:36:14 +02:00
poe.scm (ice-9 poe) does not get handles from weak hash tables 2011-05-01 23:01:13 +02:00
poll.scm ice-9/poll: verify sizeof(struct pollfd) 2011-12-04 22:45:03 +01:00
popen.scm rewrite open-process in C, for robustness 2012-02-23 13:56:54 +01:00
posix.scm nanosecond timestamp support in stat and utime 2010-01-17 16:56:34 +01:00
pretty-print.scm Have string ports honor `%default-port-conversion-strategy'. 2012-05-31 00:54:21 +02:00
psyntax-pp.scm Revert "Preserve keyword identifier in 'syntax-rules' and 'define-syntax-rule'" 2012-10-10 13:13:19 -04:00
psyntax.scm Revert "Preserve keyword identifier in 'syntax-rules' and 'define-syntax-rule'" 2012-10-10 13:13:19 -04:00
q.scm
quasisyntax.scm
r4rs.scm deprecate close-io-port 2012-03-05 23:52:28 +01:00
r5rs.scm fix some uses of %module-public-interface 2010-04-24 17:43:52 +02:00
r6rs-libraries.scm Fix @ and @@ to not capture lexicals; new @@ @@ form for R6RS libraries 2012-07-06 20:12:50 +02:00
rdelim.scm read-delimited is clearer and conses less 2010-12-03 18:04:09 +01:00
README
receive.scm more define-syntax-rule usage 2011-09-02 11:36:14 +02:00
regex.scm In fold-matches, set regexp/notbol unless matching string start. 2012-09-26 23:46:05 +02:00
runq.scm Remove unused top-level variables. 2010-01-11 01:21:14 +01:00
rw.scm
safe-r5rs.scm fix some uses of %module-public-interface 2010-04-24 17:43:52 +02:00
safe.scm
save-stack.scm deprecate the-last-stack 2010-06-19 13:43:33 +02:00
scm-style-repl.scm remove evaluator-traps-interface 2010-09-24 18:44:21 +02:00
serialize.scm
session.scm better procedure-arguments for interpreted procs with opt, rest, kwargs 2012-07-06 12:19:12 +02:00
slib.scm
stack-catch.scm deprecate save-stack, stack-saved? 2010-06-19 12:57:31 +02:00
streams.scm
string-fun.scm
syncase.scm deprecated sc-expand in deprecated (ice-9 syncase) 2010-04-07 00:05:34 +02:00
test.scm Placate a number of `syntax-check' verifications. 2012-01-05 23:38:10 +01:00
threads.scm more define-syntax-rule usage 2011-09-02 11:36:14 +02:00
time.scm
top-repl.scm Gracefully handle `setlocale' errors at the REPL. 2011-04-27 00:57:53 +02:00
vlist.scm vlist performance improvements; allocate vhash data inline 2012-04-23 21:52:25 +02:00
weak-vector.scm

This directory contains various bits of Guile Scheme code.
Most of these are packaged as modules, with foo.scm implementing
the module `(ice-9 foo)'.

The non-module files are:

boot-9.scm	-- loaded on guile startup
		   implements module system + lots of other stuff
arrays.scm	-- loaded by boot-9.scm
networking.scm	-- loaded by boot-9.scm
posix.scm	-- loaded by boot-9.scm
r4rs.scm	-- loaded by boot-9.scm