Commits

Anonymous committed 68e567b

WARN if delimiter has alphabetic character in its name.
Keywords: grammar, syntax

* generator/fg-grammar.lisp (split-rule-form):
Check name and issue a warning.

  • Participants
  • Parent commits 726c5a5

Comments (0)

Files changed (1)

File generator/fg-grammar.lisp

 (defun split-rule-form (rule-form)
   "Convert rule form (A -> x -> y) into list ((A x) (A y))"
   (destructuring-bind (left-nterminal delim &rest data) rule-form
+    (when (find-if #'alpha-char-p (symbol-name delim))
+      (warn "Delimiter ~S with alphabetic character in rule group ~S" delim rule-form))
     (let ((left-sides (list nil)))
       (dolist (token data)
         (if (eq delim token)