[uim-commit] r2091 - branches/r5rs/sigscheme
yamaken at freedesktop.org
yamaken at freedesktop.org
Tue Nov 8 10:06:00 PST 2005
Author: yamaken
Date: 2005-11-08 10:05:46 -0800 (Tue, 08 Nov 2005)
New Revision: 2091
Modified:
branches/r5rs/sigscheme/eval.c
branches/r5rs/sigscheme/main.c
branches/r5rs/sigscheme/read.c
branches/r5rs/sigscheme/sigscheme.c
branches/r5rs/sigscheme/sigschemeinternal.h
branches/r5rs/sigscheme/sigschemetype-compact.h
branches/r5rs/sigscheme/sigschemetype.h
Log:
* sigscheme/sigschemeinternal.h
- (SYM_QUOTE, SYM_QUASIQUOTE, SYM_UNQUOTE, SYM_UNQUOTE_SPLICING):
New macro
* sigscheme/sigschemetype.h
- (SCM_QUOTE, SCM_QUASIQUOTE, SCM_UNQUOTE, SCM_UNQUOTE_SPLICING):
Rename to SCM_SYM_*
- (SCM_SYM_QUOTE, SCM_SYM_QUASIQUOTE, SCM_SYM_UNQUOTE,
SCM_SYM_UNQUOTE_SPLICING): Renamed from SCM_*
- (SigScm_quote, SigScm_quasiquote, SigScm_unquote,
SigScm_unquote_splicing): Rename to Scm_sym_*
- (Scm_sym_quote, Scm_sym_quasiquote, Scm_sym_unquote,
Scm_sym_unquote_splicing): Renamed from SigScm_*
* sigscheme/sigschemetype-compact.h
- (SCM_QUOTE, SCM_QUASIQUOTE, SCM_UNQUOTE, SCM_UNQUOTE_SPLICING):
Rename to SCM_SYM_*
- (SCM_SYM_QUOTE, SCM_SYM_QUASIQUOTE, SCM_SYM_UNQUOTE,
SCM_SYM_UNQUOTE_SPLICING): Renamed from SCM_*
- (SigScm_quote, SigScm_quasiquote, SigScm_unquote,
SigScm_unquote_splicing): Rename to Scm_sym_*
- (Scm_sym_quote, Scm_sym_quasiquote, Scm_sym_unquote,
Scm_sym_unquote_splicing): Renamed from SigScm_*
* sigscheme/sigscheme.c
- (SigScm_quote, SigScm_quasiquote, SigScm_unquote,
SigScm_unquote_splicing): Rename to Scm_sym_*
- (Scm_sym_quote, Scm_sym_quasiquote, Scm_sym_unquote,
Scm_sym_unquote_splicing): Renamed from SigScm_*
- (SigScm_Initialize_internal): Follow the renamings
* sigscheme/read.c
- (read_sexpression): Follow the renamings
* sigscheme/eval.c
- (qquote_internal, qquote_vector): Follow the renamings
* sigscheme/main.c
- (repl_loop): Follow the renamings
Modified: branches/r5rs/sigscheme/eval.c
===================================================================
--- branches/r5rs/sigscheme/eval.c 2005-11-08 17:32:14 UTC (rev 2090)
+++ branches/r5rs/sigscheme/eval.c 2005-11-08 18:05:46 UTC (rev 2091)
@@ -648,12 +648,12 @@
car = CAR(qexpr);
args = CDR(qexpr);
- if (EQ(car, SCM_UNQUOTE_SPLICING)) {
+ if (EQ(car, SYM_UNQUOTE_SPLICING)) {
if (!IS_LIST_LEN_1(args))
ERR_OBJ("syntax error", qexpr);
if (--nest == 0)
return EVAL(CAR(args), env);
- } else if (EQ(car, SCM_QUASIQUOTE)) {
+ } else if (EQ(car, SYM_QUASIQUOTE)) {
if (!IS_LIST_LEN_1(args))
ERR_OBJ("syntax error", qexpr);
if (++nest <= 0)
@@ -668,14 +668,14 @@
if (CONSP(obj)) {
result = qquote_internal(obj, env, nest);
- if (EQ(CAR(obj), SCM_UNQUOTE_SPLICING) && nest == 1) {
+ if (EQ(CAR(obj), SYM_UNQUOTE_SPLICING) && nest == 1) {
/* , at x */
splice_flag = 1;
}
} else if (VECTORP(obj)) {
/* #(x) */
result = qquote_vector(obj, env, nest);
- } else if (EQ(obj, SCM_UNQUOTE) && IS_LIST_LEN_1(CDR(ls))) {
+ } else if (EQ(obj, SYM_UNQUOTE) && IS_LIST_LEN_1(CDR(ls))) {
/* we're at the comma in (x . ,y) or qexpr was ,z */
if (--nest == 0) {
result = EVAL(CADR(ls), env);
@@ -759,7 +759,7 @@
/* local "functions" */
#define qquote_copy_delayed() (copy_buf == NULL)
#define qquote_is_spliced(o) \
- (CONSP(o) && EQ(CAR(o), SCM_UNQUOTE_SPLICING))
+ (CONSP(o) && EQ(CAR(o), SYM_UNQUOTE_SPLICING))
#define qquote_force_copy_upto(n) \
do { \
int k; \
Modified: branches/r5rs/sigscheme/main.c
===================================================================
--- branches/r5rs/sigscheme/main.c 2005-11-08 17:32:14 UTC (rev 2090)
+++ branches/r5rs/sigscheme/main.c 2005-11-08 18:05:46 UTC (rev 2091)
@@ -111,7 +111,7 @@
result = ScmExp_SRFI34_guard(LIST_2(Scm_Intern("err"),
LIST_2(Scm_Intern("else"), SCM_UNDEF)),
LIST_1(LIST_3(Scm_Intern("eval"),
- LIST_2(SCM_QUOTE, s_exp),
+ LIST_2(SYM_QUOTE, s_exp),
SCM_INTERACTION_ENV)),
SCM_INTERACTION_ENV);
#else /* SCM_USE_SRFI34 */
Modified: branches/r5rs/sigscheme/read.c
===================================================================
--- branches/r5rs/sigscheme/read.c 2005-11-08 17:32:14 UTC (rev 2090)
+++ branches/r5rs/sigscheme/read.c 2005-11-08 18:05:46 UTC (rev 2091)
@@ -190,10 +190,10 @@
return read_number_or_symbol(port);
case '\'':
DISCARD_LOOKAHEAD(port);
- return read_quote(port, SCM_QUOTE);
+ return read_quote(port, SYM_QUOTE);
case '`':
DISCARD_LOOKAHEAD(port);
- return read_quote(port, SCM_QUASIQUOTE);
+ return read_quote(port, SYM_QUASIQUOTE);
case ',':
DISCARD_LOOKAHEAD(port);
c1 = SCM_PORT_PEEK_CHAR(port);
@@ -201,10 +201,10 @@
SigScm_Error("EOF in unquote");
} else if (c1 == '@') {
DISCARD_LOOKAHEAD(port);
- return read_quote(port, SCM_UNQUOTE_SPLICING);
+ return read_quote(port, SYM_UNQUOTE_SPLICING);
} else {
SCM_PORT_UNGETC(port, c1);
- return read_quote(port, SCM_UNQUOTE);
+ return read_quote(port, SYM_UNQUOTE);
}
break;
case '#':
Modified: branches/r5rs/sigscheme/sigscheme.c
===================================================================
--- branches/r5rs/sigscheme/sigscheme.c 2005-11-08 17:32:14 UTC (rev 2090)
+++ branches/r5rs/sigscheme/sigscheme.c 2005-11-08 18:05:46 UTC (rev 2091)
@@ -60,7 +60,9 @@
/*=======================================
Variable Declarations
=======================================*/
-ScmObj SigScm_quote, SigScm_quasiquote, SigScm_unquote, SigScm_unquote_splicing;
+ScmObj Scm_sym_quote, Scm_sym_quasiquote;
+ScmObj Scm_sym_unquote, Scm_sym_unquote_splicing;
+
#if SCM_COMPAT_SIOD
static ScmObj scm_return_value = NULL;
#endif
@@ -136,10 +138,10 @@
/*=======================================================================
Predefined Symbols and Variables
=======================================================================*/
- SigScm_quote = Scm_Intern("quote");
- SigScm_quasiquote = Scm_Intern("quasiquote");
- SigScm_unquote = Scm_Intern("unquote");
- SigScm_unquote_splicing = Scm_Intern("unquote-splicing");
+ Scm_sym_quote = Scm_Intern("quote");
+ Scm_sym_quasiquote = Scm_Intern("quasiquote");
+ Scm_sym_unquote = Scm_Intern("unquote");
+ Scm_sym_unquote_splicing = Scm_Intern("unquote-splicing");
#if 0
/* FIXME: Rewrite ScmExp_cond() and ScmExp_case(), and enable this */
SigScm_else = Scm_Intern("else");
Modified: branches/r5rs/sigscheme/sigschemeinternal.h
===================================================================
--- branches/r5rs/sigscheme/sigschemeinternal.h 2005-11-08 17:32:14 UTC (rev 2090)
+++ branches/r5rs/sigscheme/sigschemeinternal.h 2005-11-08 18:05:46 UTC (rev 2091)
@@ -116,6 +116,11 @@
#endif
/* Prefix-less Abbreviation Names For Convenient Internal Use */
+#define SYM_QUOTE SCM_SYM_QUOTE
+#define SYM_QUASIQUOTE SCM_SYM_QUASIQUOTE
+#define SYM_UNQUOTE SCM_SYM_UNQUOTE
+#define SYM_UNQUOTE_SPLICING SCM_SYM_UNQUOTE_SPLICING
+
#define EQ SCM_EQ
#define NULLP SCM_NULLP
#define FALSEP SCM_FALSEP
@@ -177,10 +182,6 @@
* SCM_TRUE
* SCM_FALSE
* SCM_EOF
- * SCM_QUOTE
- * SCM_QUASIQUOTE
- * SCM_UNQUOTE
- * SCM_UNQUOTE_SPLICING
* SCM_UNBOUND
* SCM_UNDEF
*/
Modified: branches/r5rs/sigscheme/sigschemetype-compact.h
===================================================================
--- branches/r5rs/sigscheme/sigschemetype-compact.h 2005-11-08 17:32:14 UTC (rev 2090)
+++ branches/r5rs/sigscheme/sigschemetype-compact.h 2005-11-08 18:05:46 UTC (rev 2091)
@@ -520,15 +520,10 @@
Predefined Symbols
============================================================================*/
/* for list construction */
-/*
- * TODO:
- * - Rename to SCM_SYM_* to indicate that these macro are not pointing to
- * syntax but symbol
- */
-#define SCM_QUOTE SigScm_quote
-#define SCM_QUASIQUOTE SigScm_quasiquote
-#define SCM_UNQUOTE SigScm_unquote
-#define SCM_UNQUOTE_SPLICING SigScm_unquote_splicing
+#define SCM_SYM_QUOTE Scm_sym_quote
+#define SCM_SYM_QUASIQUOTE Scm_sym_quasiquote
+#define SCM_SYM_UNQUOTE Scm_sym_unquote
+#define SCM_SYM_UNQUOTE_SPLICING Scm_sym_unquote_splicing
/*============================================================================
Internal Declarations For Predefined Symbols
@@ -539,12 +534,12 @@
*
* It may be changed when SigScheme's internal storage model or accessing
* method for the constants has been changed. To avoid suffering code
- * incompatibility from it, use the abstract macro such as SCM_QUOTE defined
- * above. They safely hides the internal model against such change.
+ * incompatibility from it, use the abstract macro such as SCM_SYM_QUOTE
+ * defined above. They safely hides the internal model against such change.
*/
/* sigscheme.c */
-extern ScmObj SigScm_quote, SigScm_quasiquote, SigScm_unquote;
-extern ScmObj SigScm_unquote_splicing;
+extern ScmObj Scm_sym_quote, Scm_sym_quasiquote;
+extern ScmObj Scm_sym_unquote, Scm_sym_unquote_splicing;
/*============================================================================
Environment Specifiers
Modified: branches/r5rs/sigscheme/sigschemetype.h
===================================================================
--- branches/r5rs/sigscheme/sigschemetype.h 2005-11-08 17:32:14 UTC (rev 2090)
+++ branches/r5rs/sigscheme/sigschemetype.h 2005-11-08 18:05:46 UTC (rev 2091)
@@ -423,15 +423,10 @@
Predefined Symbols
============================================================================*/
/* for list construction */
-/*
- * TODO:
- * - Rename to SCM_SYM_* to indicate that these macro are not pointing to
- * syntax but symbol
- */
-#define SCM_QUOTE SigScm_quote
-#define SCM_QUASIQUOTE SigScm_quasiquote
-#define SCM_UNQUOTE SigScm_unquote
-#define SCM_UNQUOTE_SPLICING SigScm_unquote_splicing
+#define SCM_SYM_QUOTE Scm_sym_quote
+#define SCM_SYM_QUASIQUOTE Scm_sym_quasiquote
+#define SCM_SYM_UNQUOTE Scm_sym_unquote
+#define SCM_SYM_UNQUOTE_SPLICING Scm_sym_unquote_splicing
/*============================================================================
Internal Declarations For Special Constants And Predefined Symbols
@@ -450,7 +445,7 @@
extern ScmObj SigScm_unbound, SigScm_undef;
/* sigscheme.c */
-extern ScmObj SigScm_quote, SigScm_quasiquote, SigScm_unquote;
-extern ScmObj SigScm_unquote_splicing;
+extern ScmObj Scm_sym_quote, Scm_sym_quasiquote;
+extern ScmObj Scm_sym_unquote, Scm_sym_unquote_splicing;
#endif /* __SIGSCMTYPE_H */
More information about the uim-commit
mailing list