mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
* snarf.h, guile-snarf.awk.in, guile-snarf.in: Replaced snarf
markers with identifiers (SCM__I, SCM__D, SCM__S, SCM__E). (Thanks to Bernard Urban.)
This commit is contained in:
parent
0abbd8f4a3
commit
d80f396e99
3 changed files with 17 additions and 17 deletions
|
@ -10,16 +10,16 @@ BEGIN { FS="|";
|
|||
printf "" > dot_doc_file;
|
||||
}
|
||||
|
||||
/^[ \t]* *% *% *%/ { copy = $0;
|
||||
gsub(/[ \t]* *% *% *%/, "", copy);
|
||||
gsub(/ *\$ *\$ *\$.*$/, "", copy);
|
||||
/^[ \t]*SCM__I/ { copy = $0;
|
||||
gsub(/[ \t]*SCM__I/, "", copy);
|
||||
gsub(/SCM__D.*$/, "", copy);
|
||||
print copy; }
|
||||
|
||||
/ *\$ *\$ *\$/,/ *@ *@ *@/ { copy = $0;
|
||||
if (match(copy,/ *\$ *\$ *\$R/)) { registering = 1; }
|
||||
/SCM__D/,/SCM__S/ { copy = $0;
|
||||
if (match(copy,/SCM__DR/)) { registering = 1; }
|
||||
else {registering = 0; }
|
||||
gsub(/.* *\$ *\$ *\$./,"", copy);
|
||||
gsub(/ *@ *@ *@.*/,"",copy);
|
||||
gsub(/.*SCM__D./,"", copy);
|
||||
gsub(/SCM__S.*/,"",copy);
|
||||
gsub(/[ \t]+/," ", copy);
|
||||
sub(/^[ \t]*/,"(", copy);
|
||||
gsub(/\"/,"",copy);
|
||||
|
@ -52,10 +52,10 @@ BEGIN { FS="|";
|
|||
{ print location ":*** `" copy "' is improperly registered as having " numactuals " arguments" > std_err; }
|
||||
print "\n" copy (registering?")":"") > dot_doc_file ; }
|
||||
|
||||
/ *@ *@ *@/,/@ *! *! *!.*$/ { copy = $0;
|
||||
gsub(/.* *@ *@ *@/,"",copy);
|
||||
/SCM__S/,/SCM__E.*$/ { copy = $0;
|
||||
gsub(/.*SCM__S/,"",copy);
|
||||
sub(/^[ \t]*"?/,"", copy);
|
||||
sub(/\"?[ \t]*@ *! *! *!.*$/,"", copy);
|
||||
sub(/\"?[ \t]*SCM__E.*$/,"", copy);
|
||||
gsub(/\\n\\n"?/,"\n",copy);
|
||||
gsub(/\\n"?[ \t]*$/,"",copy);
|
||||
gsub(/\\\"[ \t]*$/,"\"",copy);
|
||||
|
@ -63,7 +63,7 @@ BEGIN { FS="|";
|
|||
if (copy != "") { print copy > dot_doc_file }
|
||||
}
|
||||
|
||||
/@ *! *! *![ \t]/ { print "[" location "]" >> dot_doc_file; }
|
||||
/SCM__E[ \t]/ { print "[" location "]" >> dot_doc_file; }
|
||||
|
||||
/\*&\*&\*&\*SCM_ARG_BETTER_BE_IN_POSITION/ { copy = $0;
|
||||
sub(/.*\*&\*&\*&\*SCM_ARG_BETTER_BE_IN_POSITION\([ \t]*/,"",copy);
|
||||
|
|
|
@ -10,7 +10,7 @@ test -n "${CPP+set}" || CPP="@CPP@"
|
|||
## We must use a temporary file here, instead of a pipe, because we
|
||||
## need to know if CPP exits with a non-zero status.
|
||||
${CPP} -DSCM_MAGIC_SNARFER "$@" > ${temp} || exit $?
|
||||
< ${temp} grep "^ *% *% *%" | sed -e "s/^ *% *% *%//" -e 's/ *\$ *\$ *\$.*$//g'
|
||||
< ${temp} grep "^SCM__I" | sed -e "s/^SCM__I//" -e 's/SCM__D.*$//g'
|
||||
|
||||
## Apparently, AIX's preprocessor is unhappy if you try to #include an
|
||||
## empty file.
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
* SCM_INIT (NAME = foo ())
|
||||
*
|
||||
* The SCM_INIT text goes into the corresponding .x file
|
||||
* up through the first occurrence of $$$ on that line, if any.
|
||||
* up through the first occurrence of SCM__D on that line, if any.
|
||||
*/
|
||||
|
||||
#ifndef SCM_MAGIC_SNARFER
|
||||
|
@ -76,7 +76,7 @@
|
|||
# define SCM_DOCS(X)
|
||||
#else
|
||||
# define SCM_HERE(X)
|
||||
# define SCM_INIT(X) %%% X
|
||||
# define SCM_INIT(X) SCM__I X
|
||||
# define SCM_DOCS(X) X
|
||||
#endif
|
||||
|
||||
|
@ -89,7 +89,7 @@ SCM_INIT(\
|
|||
scm_make_gsubr (s_ ## FNAME, REQ, OPT, VAR, (SCM_FUNC_CAST_ARBITRARY_ARGS) FNAME); \
|
||||
)\
|
||||
SCM_DOCS(\
|
||||
$$$P PRIMNAME #ARGLIST | REQ | OPT | VAR | __FILE__:__LINE__ | @@@ DOCSTRING @!!! \
|
||||
SCM__DP PRIMNAME #ARGLIST | REQ | OPT | VAR | __FILE__:__LINE__ | SCM__S DOCSTRING SCM__E \
|
||||
)
|
||||
|
||||
#define SCM_DEFINE1(FNAME, PRIMNAME, TYPE, ARGLIST, DOCSTRING) \
|
||||
|
@ -99,7 +99,7 @@ SCM FNAME ARGLIST\
|
|||
)\
|
||||
SCM_INIT(scm_make_subr (s_ ## FNAME, TYPE, FNAME); ) \
|
||||
SCM_DOCS(\
|
||||
$$$1 PRIMNAME #ARGLIST | 2 | 0 | 0 | __FILE__:__LINE__ | @@@ DOCSTRING @!!! \
|
||||
SCM__D1 PRIMNAME #ARGLIST | 2 | 0 | 0 | __FILE__:__LINE__ | SCM__S DOCSTRING SCM__E \
|
||||
)
|
||||
|
||||
#define SCM_PROC(RANAME, STR, REQ, OPT, VAR, CFN) \
|
||||
|
@ -110,7 +110,7 @@ SCM_INIT(scm_make_gsubr (RANAME, REQ, OPT, VAR, (SCM_FUNC_CAST_ARBITRARY_ARGS) C
|
|||
SCM_HERE(static const char RANAME[]=STR) \
|
||||
SCM_INIT(scm_make_gsubr (RANAME, REQ, OPT, VAR, (SCM_FUNC_CAST_ARBITRARY_ARGS) CFN);) \
|
||||
SCM_DOCS(\
|
||||
$$$R STR | REQ | OPT | VAR | __FILE__:__LINE__ | @@@ CFN @!!! \
|
||||
SCM__DR STR | REQ | OPT | VAR | __FILE__:__LINE__ | SCM__S CFN SCM__E \
|
||||
)
|
||||
|
||||
#define SCM_GPROC(RANAME, STR, REQ, OPT, VAR, CFN, GF) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue