       ] each
     ] { } make ,
     [ call ] , \ map , \ seq , 
+  ] [ ] make ;
+
+M: ebnf-rule ebnf-compile ( ast -- quot )
+  [
+    dup ebnf-rule-symbol , \ in , \ get , \ create , 
+    ebnf-rule-elements ebnf-compile , \ define-compound , 
   ] [ ] make ;
 
 DEFER: 'rhs'

    ebnf-terminal-symbol , \ token ,
  ] [ ] make ;

M: ebnf-choice ebnf-compile ( ast -- quot )
  [
    [

! Copyright (C) 2007 Chris Double.
! See http://factorcode.org/license.txt for BSD license.
USING: kernel parser words arrays strings math.parser sequences namespaces peg ;
IN: peg.ebnf

TUPLE: ebnf-non-terminal symbol ;
