]> gitweb.factorcode.org Git - factor.git/commitdiff
Fix (foo):n usage
authorChris Double <chris@bethia.(none)>
Thu, 19 Jun 2008 02:23:18 +0000 (14:23 +1200)
committerChris Double <chris@bethia.(none)>
Thu, 19 Jun 2008 02:23:18 +0000 (14:23 +1200)
extra/peg/ebnf/ebnf.factor

index 2ee09580513c22ea41743044dfa3deebe59b89e3..d982d73229a0532c0b4edb8fb197df4b763109df 100644 (file)
@@ -232,14 +232,18 @@ DEFER: 'choice'
 : ('sequence') ( -- parser )\r
   #! A sequence of terminals and non-terminals, including\r
   #! groupings of those. \r
-  [ \r
-    'ensure-not' sp ,\r
-    'ensure' sp ,\r
-    'element' sp ,\r
-    'group' sp , \r
-    'repeat0' sp ,\r
-    'repeat1' sp ,\r
-    'optional' sp , \r
+  [\r
+    [ \r
+      'ensure-not' sp ,\r
+      'ensure' sp ,\r
+      'element' sp ,\r
+      'group' sp , \r
+      'repeat0' sp ,\r
+      'repeat1' sp ,\r
+      'optional' sp , \r
+    ] choice* \r
+    [ dup  , ":" syntax , "a-zA-Z" range-pattern repeat1 [ >string ] action , ] seq* [ first2 <ebnf-var> ] action ,\r
+    ,\r
   ] choice* ;\r
 \r
 : 'action' ( -- parser )\r