1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00

guile-snarf: allow multiple init actions on one line

* libguile/guile-snarf.in (modern_snarf): Allow programs to specify
  multiple initialization actions on a single line. This makes it
  possible for C programs to define multiple subrs with a single macro
  invocation.

* test-suite/standalone/test-guile-snarf: Enable more tests.
This commit is contained in:
BT Templeton 2011-02-22 13:15:31 -05:00 committed by Andy Wingo
parent 2dea6a4d33
commit fd029c35de
2 changed files with 4 additions and 4 deletions

View file

@ -51,7 +51,7 @@ modern_snarf () # writes stdout
## empty file.
echo "/* cpp arguments: $@ */" ;
${cpp} -DSCM_MAGIC_SNARF_INITS -DSCM_MAGIC_SNARFER "$@" > ${temp} && cpp_ok_p=true
grep "^ *\^ *\^" ${temp} | sed -e "s/ *\^ *\^//g" -e "s/\^ *: *\^/;/g"
sed -ne "s/ *\^ *: *\^/\n/;s/[^\n]*\^ *\^ *\([^\n]*\)/\1;/;tx;d;:x;P;D" ${temp}
}
## main

View file

@ -15,6 +15,6 @@ snarf_test ()
snarf_test "^^a^:^" "a;"
snarf_test " ^ ^ b ^ : ^ " "b;"
#snarf_test "c\n^^d^:^\ne" "d;"
#snarf_test "f^^g^:^h" "g;"
#snarf_test "^^i^:^j^^k^:^" "i;k;"
snarf_test "c\n^^d^:^\ne" "d;"
snarf_test "f^^g^:^h" "g;"
snarf_test "^^i^:^j^^k^:^" "i;k;"