diff --git a/pitfall/pitfall/parse.rkt b/pitfall/pitfall/parse.rkt index fcbdefee..d1e7cb40 100644 --- a/pitfall/pitfall/parse.rkt +++ b/pitfall/pitfall/parse.rkt @@ -75,7 +75,7 @@ (define data (string->bytes/utf-8 str)) (when (not (equal? (hash-ref (co-dict-dict dict) 'Length) (bytes-length data))) (raise-argument-error 'pf-stream - (format "~a bytes of data" (hash-ref dict 'Length)) + (format "~a bytes of data" (hash-ref (co-dict-dict dict) 'Length)) (format "~a = ~v" (bytes-length data) data))) (co-stream dict data)) diff --git a/pitfall/pitfall/parser.rkt b/pitfall/pitfall/parser.rkt index 4d7ff176..5cb1e395 100644 --- a/pitfall/pitfall/parser.rkt +++ b/pitfall/pitfall/parser.rkt @@ -1,6 +1,6 @@ #lang brag -pf-program : pf-header pf-object* +pf-program : [pf-header] pf-object* pf-header : PDF-HEADER @pf-object : pf-null | CHAR | BOOLEAN | INT | REAL | pf-name | pf-string | pf-array | pf-dict | pf-stream | pf-indirect-object | pf-indirect-object-ref | pf-comment @pf-null : NULL