From f96579805cb0c483c261612352e31d633f23a668 Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Mon, 26 Jan 2015 12:29:29 +0900 Subject: [PATCH] reserve square brackets --- extlib/benz/read.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/extlib/benz/read.c b/extlib/benz/read.c index 95f5011f..eeef81f2 100644 --- a/extlib/benz/read.c +++ b/extlib/benz/read.c @@ -534,8 +534,7 @@ read_blob(pic_state *pic, struct pic_port *port, int c) static pic_value read_pair(pic_state *pic, struct pic_port *port, int c) { - const int tOPEN = c; - const int tCLOSE = (c == '(') ? ')' : ']'; + static const int tCLOSE = ')'; pic_value car, cdr; retry: @@ -564,7 +563,7 @@ read_pair(pic_state *pic, struct pic_port *port, int c) goto retry; } - cdr = read_pair(pic, port, tOPEN); + cdr = read_pair(pic, port, '('); return pic_cons(pic, car, cdr); } } @@ -586,7 +585,7 @@ read_label_set(pic_state *pic, struct pic_port *port, int i) int c; switch ((c = skip(port, ' '))) { - case '(': case '[': + case '(': { pic_value tmp; @@ -749,7 +748,6 @@ reader_table_init(struct pic_reader *reader) reader->table['+'] = read_plus; reader->table['-'] = read_minus; reader->table['('] = read_pair; - reader->table['['] = read_pair; reader->table['#'] = read_dispatch; /* read number */