Add arg validation to redex benchmark script
This commit is contained in:
parent
f19ea7c3a4
commit
c237fdfff1
|
@ -17,6 +17,11 @@
|
||||||
enum))
|
enum))
|
||||||
(define types '())
|
(define types '())
|
||||||
|
|
||||||
|
(define (set-type! arg)
|
||||||
|
(define t (string->symbol arg))
|
||||||
|
(unless (list? (member t all-types))
|
||||||
|
(error "Expected a generation type, got" t))
|
||||||
|
(set! types (cons t types)))
|
||||||
(define filename
|
(define filename
|
||||||
(command-line
|
(command-line
|
||||||
#:once-each
|
#:once-each
|
||||||
|
@ -28,7 +33,7 @@
|
||||||
(set! output-file out-file)]
|
(set! output-file out-file)]
|
||||||
#:multi
|
#:multi
|
||||||
[("-t" "--type") t "Generation type to run, one of: search, grammar, search-gen, search-gen-ref, search-gen-enum, search-gen-enum-ref, enum"
|
[("-t" "--type") t "Generation type to run, one of: search, grammar, search-gen, search-gen-ref, search-gen-enum, search-gen-enum-ref, enum"
|
||||||
(set! types (cons (string->symbol t) types))]
|
(set-type! t)]
|
||||||
#:args filenames
|
#:args filenames
|
||||||
(match filenames
|
(match filenames
|
||||||
[`()
|
[`()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user