add reader option for parsing [] as ().
authorAndy Wingo <wingo@pobox.com>
Fri, 15 Jan 2010 21:24:31 +0000 (22:24 +0100)
committerAndy Wingo <wingo@pobox.com>
Fri, 15 Jan 2010 21:31:23 +0000 (22:31 +0100)
commit5afa815c9cd4550bf93181bc0ed0134aa83dfc5d
treec5b5eef9dbf40ff943c31e748310633cbbbbc1ce
parente1138ba1995f970083ad752f1ff8f71876483194
add reader option for parsing [] as ().

* libguile/private-options.h:
* libguile/read.c (scm_read_opts, SCM_SQUARE_BRACKETS_P): Add an option
  for treating [ and ] as parentheses, on by default. Note that this
  makes them delimiters also, so [ and ] cannot appear in a symbol name,
  with this read option on.
  (scm_read_sexp): If we start with [, we end with ].
  (scm_read_expression): Add case for [.
libguile/private-options.h
libguile/read.c