1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-01 04:10:18 +02:00
guile/module
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
..
ice-9 Implement SRFI-105 curly infix expressions. 2012-10-26 19:52:32 -04:00
language Simplify calls to 'eqv?' when one argument is an immediate constant. 2012-10-08 11:56:10 -04:00
oop fix goops compilation when current language is not scheme 2012-07-05 10:15:02 +02:00
rnrs Improve the usage of variable names in Scheme docstrings. 2012-02-02 12:24:40 +01:00
scripts Fix a couple of warnings. 2012-01-26 00:37:23 +01:00
srfi Rewrite SRFI-31 in terms of `syntax-rules'. 2012-09-11 23:39:32 +02:00
sxml remove duplicate when/unless definitions 2012-01-20 21:16:50 +01:00
system Don't stat(2) and access(2) the .go location before using it. 2012-09-11 23:44:59 +02:00
texinfo docbook->texi fix 2012-05-08 16:03:54 +02:00
web web: Fix possible file descriptor leak in `open-socket-for-uri'. 2012-10-13 21:13:10 +02:00
Makefile.am Fix @ and @@ to not capture lexicals; new @@ @@ form for R6RS libraries 2012-07-06 20:12:50 +02:00
rnrs.scm Enhance transcoder-related functionality of `(rnrs io ports)' 2011-03-13 23:14:43 +01:00
statprof.scm add gcprof 2011-05-05 11:43:12 +02:00
texinfo.scm more robust texinfo alias handling 2012-08-25 14:11:45 +02:00