|
|
@ -2,21 +2,21 @@
|
|
|
|
(require "parser.rkt" "tokenizer.rkt" brag/support rackunit)
|
|
|
|
(require "parser.rkt" "tokenizer.rkt" brag/support rackunit)
|
|
|
|
|
|
|
|
|
|
|
|
(check-equal?
|
|
|
|
(check-equal?
|
|
|
|
(parse-tree
|
|
|
|
(parse-to-datum
|
|
|
|
(apply-tokenizer-maker make-tokenizer "// line commment\n"))
|
|
|
|
(apply-tokenizer-maker make-tokenizer "// line commment\n"))
|
|
|
|
'(jsonic-program))
|
|
|
|
'(jsonic-program))
|
|
|
|
(check-equal?
|
|
|
|
(check-equal?
|
|
|
|
(parse-tree
|
|
|
|
(parse-to-datum
|
|
|
|
(apply-tokenizer-maker make-tokenizer "@$ 42 $@"))
|
|
|
|
(apply-tokenizer-maker make-tokenizer "@$ 42 $@"))
|
|
|
|
'(jsonic-program (jsonic-sexp " 42 ")))
|
|
|
|
'(jsonic-program (jsonic-sexp " 42 ")))
|
|
|
|
(check-equal?
|
|
|
|
(check-equal?
|
|
|
|
(parse-tree
|
|
|
|
(parse-to-datum
|
|
|
|
(apply-tokenizer-maker make-tokenizer "hi"))
|
|
|
|
(apply-tokenizer-maker make-tokenizer "hi"))
|
|
|
|
'(jsonic-program
|
|
|
|
'(jsonic-program
|
|
|
|
(jsonic-char "h")
|
|
|
|
(jsonic-char "h")
|
|
|
|
(jsonic-char "i")))
|
|
|
|
(jsonic-char "i")))
|
|
|
|
(check-equal?
|
|
|
|
(check-equal?
|
|
|
|
(parse-tree
|
|
|
|
(parse-to-datum
|
|
|
|
(apply-tokenizer-maker make-tokenizer
|
|
|
|
(apply-tokenizer-maker make-tokenizer
|
|
|
|
"hi\n// comment\n@$ 42 $@"))
|
|
|
|
"hi\n// comment\n@$ 42 $@"))
|
|
|
|
'(jsonic-program
|
|
|
|
'(jsonic-program
|
|
|
|