mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-02 21:10:27 +02:00
Changes from arch/CVS synchronization
This commit is contained in:
parent
8369648a2f
commit
dbb47af4a6
4 changed files with 31 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2007-09-03 Ludovic Courtès <ludo@gnu.org>
|
||||||
|
|
||||||
|
* read.c (flush_ws): Handle SCSH block comments.
|
||||||
|
|
||||||
2007-09-03 Ludovic Courtès <ludo@gnu.org>
|
2007-09-03 Ludovic Courtès <ludo@gnu.org>
|
||||||
|
|
||||||
Fix alignment issues which showed up at least on SPARC.
|
Fix alignment issues which showed up at least on SPARC.
|
||||||
|
|
|
@ -205,6 +205,9 @@ strncasecmp (const char *s1, const char *s2, size_t len2)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* Read an SCSH block comment. */
|
||||||
|
static inline SCM scm_read_scsh_block_comment (int chr, SCM port);
|
||||||
|
|
||||||
/* Helper function similar to `scm_read_token ()'. Read from PORT until a
|
/* Helper function similar to `scm_read_token ()'. Read from PORT until a
|
||||||
whitespace is read. Return zero if the whole token could fit in BUF,
|
whitespace is read. Return zero if the whole token could fit in BUF,
|
||||||
non-zero otherwise. */
|
non-zero otherwise. */
|
||||||
|
@ -271,6 +274,21 @@ flush_ws (SCM port, const char *eoferr)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case '#':
|
||||||
|
switch (c = scm_getc (port))
|
||||||
|
{
|
||||||
|
case EOF:
|
||||||
|
eoferr = "read_sharp";
|
||||||
|
goto goteof;
|
||||||
|
case '!':
|
||||||
|
scm_read_scsh_block_comment (c, port);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
scm_ungetc (c, port);
|
||||||
|
return '#';
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case SCM_LINE_INCREMENTORS:
|
case SCM_LINE_INCREMENTORS:
|
||||||
case SCM_SINGLE_SPACES:
|
case SCM_SINGLE_SPACES:
|
||||||
case '\t':
|
case '\t':
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2007-09-03 Ludovic Courtès <ludo@gnu.org>
|
||||||
|
|
||||||
|
* tests/reader.test (reading)[block comment finishing sexp]: New
|
||||||
|
test.
|
||||||
|
|
||||||
2007-08-23 Ludovic Courtès <ludo@gnu.org>
|
2007-08-23 Ludovic Courtès <ludo@gnu.org>
|
||||||
|
|
||||||
* tests/reader.test (read-options)[positions on quote]: New
|
* tests/reader.test (read-options)[positions on quote]: New
|
||||||
|
|
|
@ -77,6 +77,10 @@
|
||||||
(equal? '(+ 1 2 3)
|
(equal? '(+ 1 2 3)
|
||||||
(read-string "(+ 1 #! this is a\ncomment !# 2 3)")))
|
(read-string "(+ 1 #! this is a\ncomment !# 2 3)")))
|
||||||
|
|
||||||
|
(pass-if "block comment finishing s-exp"
|
||||||
|
(equal? '(+ 2)
|
||||||
|
(read-string "(+ 2 #! a comment\n!#\n) ")))
|
||||||
|
|
||||||
(pass-if "unprintable symbol"
|
(pass-if "unprintable symbol"
|
||||||
;; The reader tolerates unprintable characters for symbols.
|
;; The reader tolerates unprintable characters for symbols.
|
||||||
(equal? (string->symbol "\001\002\003")
|
(equal? (string->symbol "\001\002\003")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue