mescc: Have Nyacc trace functions while parsing.

* guile/mescc.scm (main): Set NYACC_TRACE.
* scripts/mescc.mes (main): Set NYACC_TRACE.
This commit is contained in:
Jan Nieuwenhuizen 2018-04-07 09:35:08 +02:00
parent 6932d83d82
commit 8481b54097
2 changed files with 2 additions and 0 deletions

View file

@ -133,6 +133,7 @@ Usage: mescc.scm [OPTION]... FILE...
(multi-opt (lambda (option) (lambda (o) (and (eq? (car o) option) (cdr o)))))
(defines (reverse (filter-map (multi-opt 'define) options)))
(includes (reverse (filter-map (multi-opt 'include) options))))
(setenv "NYACC_TRACE" "yes")
(when (getenv "MES_DEBUG") (format (current-error-port) "options=~s\n" options)
(format (current-error-port) "output: ~a\n" out))
(if (and (pair? sources) (pair? objects)) (error "cannot mix source and object files:" files))

View file

@ -141,6 +141,7 @@ Usage: mescc.mes [OPTION]... FILE...
(multi-opt (lambda (option) (lambda (o) (and (eq? (car o) option) (cdr o)))))
(defines (reverse (filter-map (multi-opt 'define) options)))
(includes (reverse (filter-map (multi-opt 'include) options))))
(setenv "NYACC_TRACE" "yes")
(when (getenv "MES_DEBUG") (format (current-error-port) "options=~s\n" options)
(format (current-error-port) "output: ~a\n" out))
(if (and (pair? sources) (pair? objects)) (error "cannot mix source and object files:" files))