Commits

Anonymous committed c2d5649

Bugfix: update FIRST-NTERMINAL-ID
Keywords: bug, macro, grammar

* generator/fg-macro.lisp (fucc:defparser):
Update grammar's FIRST-NTERMINAL-ID after grammar cleanup.

Comments (0)

Files changed (1)

generator/fg-macro.lisp

         (loop :for idx :from 0
               :for terminal :in (grammar-terminals grammar) :do
               (setf (nterm-id terminal) idx))
-        (loop :for idx :from (length (grammar-terminals grammar))
+        (setf (first-nterminal-id grammar) (length (grammar-terminals grammar)))
+        (loop :for idx :from (first-nterminal-id grammar)
               :for nterminal :in (grammar-nterminals grammar) :do
               (setf (nterm-id nterminal) idx))
         (renumber-rules grammar)