     input set
     0 pos set
     f lrstack set
-    <parse-error> errors set
+    V{ } clone error-stack set
     H{ } clone heads set
     H{ } clone packrat set
   ] H{ } make-assoc swap bind ; inline

  ] with-compilation-unit ;

: compiled-parse ( state word -- result )
  swap [ execute [ errors get throw ] unless* ] with-packrat ; inline 

: parse ( input parser -- result )
  dup word? [ compile ] unless compiled-parse ;

M: choice-parser (compile) ( parser -- quot )
  [ 
    f ,
    parsers>> [ compiled-parser ] map 
    unclip 1quotation , \ unless* , [ 1quotation [ merge-errors ] compose , \ unless* , ] each
  ] [ ] make ;

TUPLE: repeat0-parser p1 ;
