2251 |
case '?': |
case '?': |
2252 |
{ |
{ |
2253 |
int discard; |
int discard; |
2254 |
int nextc; |
int next_char; |
2255 |
|
int ok; |
2256 |
|
|
2257 |
c = READCHAR; |
c = READCHAR; |
2258 |
if (c < 0) |
if (c < 0) |
2263 |
else if (BASE_LEADING_CODE_P (c)) |
else if (BASE_LEADING_CODE_P (c)) |
2264 |
c = read_multibyte (c, readcharfun); |
c = read_multibyte (c, readcharfun); |
2265 |
|
|
2266 |
nextc = READCHAR; |
next_char = READCHAR; |
2267 |
UNREAD (nextc); |
if (next_char == '.') |
2268 |
if (nextc > 040 |
{ |
2269 |
&& !(nextc == '?' |
/* Only a dotted-pair dot is valid after a char constant. */ |
2270 |
|| nextc == '\"' || nextc == '\'' || nextc == ';' |
int next_next_char = READCHAR; |
2271 |
|| nextc == '(' || nextc == ')' |
UNREAD (next_next_char); |
2272 |
|| nextc == '[' || nextc == ']' || nextc == '#')) |
|
2273 |
|
ok = (next_next_char <= 040 |
2274 |
|
|| index ("\"'`;([#?", next_next_char) |
2275 |
|
|| (new_backquote_flag && next_next_char == ',')); |
2276 |
|
} |
2277 |
|
else |
2278 |
|
{ |
2279 |
|
ok = (next_char <= 040 |
2280 |
|
|| index ("\"'`;()[]#", next_char) |
2281 |
|
|| (new_backquote_flag && next_char == ',')); |
2282 |
|
} |
2283 |
|
UNREAD (next_char); |
2284 |
|
if (!ok) |
2285 |
Fsignal (Qinvalid_read_syntax, Fcons (make_string ("?", 1), Qnil)); |
Fsignal (Qinvalid_read_syntax, Fcons (make_string ("?", 1), Qnil)); |
2286 |
|
|
2287 |
return make_number (c); |
return make_number (c); |
2436 |
UNREAD (next_char); |
UNREAD (next_char); |
2437 |
|
|
2438 |
if (next_char <= 040 |
if (next_char <= 040 |
2439 |
|| index ("\"'`,(", next_char)) |
|| index ("\"'`;([#?", next_char) |
2440 |
|
|| (new_backquote_flag && next_char == ',')) |
2441 |
{ |
{ |
2442 |
*pch = c; |
*pch = c; |
2443 |
return Qnil; |
return Qnil; |
2458 |
char *end = read_buffer + read_buffer_size; |
char *end = read_buffer + read_buffer_size; |
2459 |
|
|
2460 |
while (c > 040 |
while (c > 040 |
2461 |
&& !(c == '\"' || c == '\'' || c == ';' |
&& !index ("\"'`;()[]#", c) |
2462 |
|| c == '(' || c == ')' |
&& !(new_backquote_flag && c == ',')) |
|
|| c == '[' || c == ']' || c == '#')) |
|
2463 |
{ |
{ |
2464 |
if (end - p < MAX_MULTIBYTE_LENGTH) |
if (end - p < MAX_MULTIBYTE_LENGTH) |
2465 |
{ |
{ |