#lang racket (require "browser-evaluate.rkt" "../js-assembler/package.rkt" "../make-structs.rkt" racket/port racket/runtime-path racket/runtime-path (for-syntax racket/base)) (printf "test-earley-browser.rkt\n") (define-runtime-path earley-file-path (build-path "earley")) (define evaluate (make-evaluate (lambda (program op) (fprintf op "(function () {") (displayln (get-runtime) op) (newline op) (fprintf op "var innerInvoke = ") (package-anonymous (make-SexpSource program) #:should-follow? (lambda (src path) #t) #:output-port op) (fprintf op "();\n") (fprintf op #<string (open-input-file (build-path earley-file-path "expected.txt"))))