From fb0370ea4b7f3e56f40cbbcda97cc7a99aa05397 Mon Sep 17 00:00:00 2001 From: Dimitri Fontaine Date: Sat, 7 Sep 2013 23:32:36 +0200 Subject: [PATCH] We don't need to produce groups from the ABNF itself. --- abnf.lisp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/abnf.lisp b/abnf.lisp index 0b0a302..0115824 100644 --- a/abnf.lisp +++ b/abnf.lisp @@ -251,7 +251,11 @@ This table comes from http://tools.ietf.org/html/rfc2234#page-11 and 12. (:lambda (group) (destructuring-bind (open ws1 a ws2 close) group (declare (ignore open close ws1 ws2)) - `(:group ,a)))) + ;; we need the grouping when parsing the ABNF syntax, but once this + ;; parsing is done there's no ambiguity possible left and we don't + ;; need the grouping anymore in the resulting regular-expression parse + ;; tree. + a))) (defrule option (and "[" n-wsp alternation n-wsp "]") (:lambda (option)