-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdump
More file actions
executable file
·34 lines (30 loc) · 892 Bytes
/
dump
File metadata and controls
executable file
·34 lines (30 loc) · 892 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env racket
;; -*- scheme -*-
#lang racket
(require "src/ga-compile-print.rkt"
"src/el.rkt")
(define bootstream-type (make-parameter false))
(define symbols? (make-parameter false))
(define pretty? (make-parameter false))
(define count? (make-parameter false))
(define hex? (make-parameter false))
(define input-file
(command-line
#:once-each
[("-b" "--bootstream") bs "bootstream type"
(bootstream-type bs)]
[("-s" "--symbols") "include symboltable"
(symbols? t)]
[("-p" "--pretty") "print in human readable"
(pretty? t)]
[("-c" "--count") "count ram usage"
(count? t)]
[("-x" "--hex") "print numbers in hexadecimal format"
(hex? t)]
#:args (filename)
filename))
(if (count?)
(print-count input-file)
(if (pretty?)
(print-pretty input-file hex?)
(print-json input-file bootstream-type symbols?)))