From 04453b242157e5966971fd86dc62c86ab6a56757 Mon Sep 17 00:00:00 2001 From: Chris Double Date: Thu, 19 Jun 2008 14:23:18 +1200 Subject: [PATCH] Fix (foo):n usage --- extra/peg/ebnf/ebnf.factor | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/extra/peg/ebnf/ebnf.factor b/extra/peg/ebnf/ebnf.factor index 2ee0958051..d982d73229 100644 --- a/extra/peg/ebnf/ebnf.factor +++ b/extra/peg/ebnf/ebnf.factor @@ -232,14 +232,18 @@ DEFER: 'choice' : ('sequence') ( -- parser ) #! A sequence of terminals and non-terminals, including #! groupings of those. - [ - 'ensure-not' sp , - 'ensure' sp , - 'element' sp , - 'group' sp , - 'repeat0' sp , - 'repeat1' sp , - 'optional' sp , + [ + [ + 'ensure-not' sp , + 'ensure' sp , + 'element' sp , + 'group' sp , + 'repeat0' sp , + 'repeat1' sp , + 'optional' sp , + ] choice* + [ dup , ":" syntax , "a-zA-Z" range-pattern repeat1 [ >string ] action , ] seq* [ first2 ] action , + , ] choice* ; : 'action' ( -- parser )