You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
typesetting/pitfall/pitfall/parser.rkt

21 lines
697 B
Racket

#lang brag
pf-program : pf-header pf-body pf-trailer
pf-header : PDF-HEADER
@pf-body : pf-object*
@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
pf-name : NAME
pf-string : STRING-TOK | /"<" HEX-DIGIT-PAIR* /">"
pf-array : /"[" pf-object* /"]"
pf-dict : /"<" /"<" (pf-dict-key pf-dict-value)* /">" /">"
@pf-dict-key : pf-object
@pf-dict-value : pf-object
pf-stream : pf-dict STREAM-DATA
pf-indirect-object : INT INT /"obj" pf-object /"endobj"
pf-indirect-object-ref : INDIRECT-OBJECT-REF-TOK
pf-comment : COMMENT
;pf-xref-table :
pf-trailer : /"trailer" pf-dict