     ebnf-rule-elements ebnf-compile , \ define-compound , 
   ] [ ] make ;
 
+M: ebnf-action ebnf-compile ( ast -- quot )
+  [
+    ebnf-action-quot , \ action , 
+  ] [ ] make ;
+
+M: vector ebnf-compile ( ast -- quot )
+  [
+    [ ebnf-compile % ] each 
+  ] [ ] make ;
+
+M: f ebnf-compile ( ast -- quot )
+  drop [ ] ;
+
 M: ebnf ebnf-compile ( ast -- quot )
   [
     ebnf-rules [

  CHAR: a CHAR: z range repeat1 [ >string <ebnf-non-terminal> ] action ;

: 'terminal' ( -- parser )
  "\"" token hide [ CHAR: " = not ] satisfy repeat1 "\"" token hide 3array seq [ first >string <ebnf-terminal> ] action ;

: 'element' ( -- parser )
  'non-terminal' 'terminal' 2array choice ;

C: <ebnf-sequence> ebnf-sequence
C: <ebnf-repeat0> ebnf-repeat0
C: <ebnf-rule> ebnf-rule
C: <ebnf-action> ebnf-action
C: <ebnf> ebnf

GENERIC: ebnf-compile ( ast -- quot )
