Another fix for calling rules from EBNF text.
authorD Herring <dherring@at.tentpost.dot.com>
Mon, 2 Apr 2007 00:53:23 +0000 (20:53 -0400)
committerD Herring <dherring@at.tentpost.dot.com>
Mon, 2 Apr 2007 00:53:23 +0000 (20:53 -0400)
; Previously,
(defgrammar "rule1='a'; rule2=[rule1];") ; worked
; but
(defgrammar "rule1='a'; rule2=rule1;") ; failed

ISO-14977.lisp

index ab073d5..e3929c3 100644 (file)
@@ -315,7 +315,9 @@ Strips all comments from the input"
   (grammar-or optional-sequence
               repeated-sequence
               grouped-sequence
-              meta-identifier
+              (grammar-func meta-identifier
+                            (lambda (x)
+                              (list (list 'grammar-or x))))
               (grammar-func terminal-string
                             (lambda (x)
                               (list (list 'grammar-string x))))