| 1 |
;; |
| 2 |
;; Parse Gauche source |
| 3 |
;; |
| 4 |
|
| 5 |
;; Run ./gosh -ftest ../test/lang-c-tester.scm under src |
| 6 |
|
| 7 |
(use gauche.time) |
| 8 |
(use util.match) |
| 9 |
(use lang.c.parser) |
| 10 |
(cpp-include-paths '("." "../gc/include" "../gc/libatomic_ops/src")) |
| 11 |
|
| 12 |
(define *sources* |
| 13 |
'(autoloads.c |
| 14 |
bignum.c |
| 15 |
bits.c |
| 16 |
boolean.c |
| 17 |
box.c |
| 18 |
builtin-syms.c |
| 19 |
char.c |
| 20 |
class.c |
| 21 |
code.c |
| 22 |
collection.c |
| 23 |
compare.c |
| 24 |
compaux.c |
| 25 |
compile.c |
| 26 |
connection.c |
| 27 |
core.c |
| 28 |
dispatch.c |
| 29 |
error.c |
| 30 |
execenv.c |
| 31 |
gauche-config.c |
| 32 |
gloc.c |
| 33 |
hash.c |
| 34 |
lazy.c |
| 35 |
libalpha.c |
| 36 |
libbool.c |
| 37 |
libchar.c |
| 38 |
libcmp.c |
| 39 |
libcode.c |
| 40 |
libdict.c |
| 41 |
libeval.c |
| 42 |
libexc.c |
| 43 |
libextra.c |
| 44 |
libfmt.c |
| 45 |
libio.c |
| 46 |
liblazy.c |
| 47 |
liblist.c |
| 48 |
libmacbase.c |
| 49 |
libmacro.c |
| 50 |
libmisc.c |
| 51 |
libmod.c |
| 52 |
libnative.c |
| 53 |
libnum.c |
| 54 |
libobj.c |
| 55 |
libomega.c |
| 56 |
libparam.c |
| 57 |
libproc.c |
| 58 |
librx.c |
| 59 |
libsrfis.c |
| 60 |
libstr.c |
| 61 |
libsym.c |
| 62 |
libsys.c |
| 63 |
libvec.c |
| 64 |
list.c |
| 65 |
load.c |
| 66 |
macro.c |
| 67 |
main.c |
| 68 |
module.c |
| 69 |
native.c |
| 70 |
number.c |
| 71 |
parameter.c |
| 72 |
paths.c |
| 73 |
port.c |
| 74 |
proc.c |
| 75 |
prof.c |
| 76 |
read.c |
| 77 |
regexp.c |
| 78 |
repl.c |
| 79 |
serial.c |
| 80 |
signal.c |
| 81 |
staticinit.c |
| 82 |
string.c |
| 83 |
symbol.c |
| 84 |
system.c |
| 85 |
test-arith.c |
| 86 |
test-extra.c |
| 87 |
test-vmstack.c |
| 88 |
treemap.c |
| 89 |
vector.c |
| 90 |
vm.c |
| 91 |
vmstat.c |
| 92 |
weak.c |
| 93 |
win-compat.c |
| 94 |
winmain.c |
| 95 |
write.c |
| 96 |
)) |
| 97 |
|
| 98 |
(define (do-parse file) |
| 99 |
(print "parsing " file " ...") |
| 100 |
(print (time-this 1 (^[] (c-parse-file file))))) |
| 101 |
|
| 102 |
(define (main args) |
| 103 |
(if (null? (cdr args)) |
| 104 |
(for-each do-parse *sources*) |
| 105 |
(for-each do-parse (cdr args))) |
| 106 |
0) |