--- nyacc/lang/c99/parser.scm | 35 +++++++++++++++++++++++++++++++++++ nyacc/lang/c99/pprint.scm | 32 ++++++++++++++++++++++++++++++++ nyacc/version.scm | 6 ++++++ 3 files changed, 73 insertions(+) create mode 100644 nyacc/lang/c99/parser.scm create mode 100644 nyacc/lang/c99/pprint.scm create mode 100644 nyacc/version.scm
diff --git a/nyacc/lang/c99/parser.scm b/nyacc/lang/c99/parser.scm new file mode 100644 index 0000000..9a0bf95 --- /dev/null +++ b/nyacc/lang/c99/parser.scm @@ -0,0 +1,35 @@ +;;; nyacc/lang/c99/parser.scm - C parser execution + +;; Copyright (C) 2015-2026 Matthew Wette +;; Copyright (C) 2024,2026 Janneke Nieuwenhuizen <[email protected]> +;; +;; +;; This library is free software; you can redistribute it and/or +;; modify it under the terms of the GNU Lesser General Public +;; License as published by the Free Software Foundation; either +;; version 3 of the License, or (at your option) any later version. +;; +;; This library is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; Lesser General Public License for more details. +;; +;; You should have received a copy of the GNU Lesser General Public License +;; along with this library; if not, see <http://www.gnu.org/licenses/>. + +;;; Commentary: +;;; +;;; This is a NYACC-compatibility wrapper for NYACC-for-Mes. +;;; +;;; +;;; Code: + +(define-module (nyacc lang c99 parser) + #:use-module ((nyacc-cp c99-parser) #:select ((parse-c99 . nyacc-cp:parse-c99))) + #:export (parse-c99)) + +(define c99-act-v #()) +(define c99-len-v #()) + +(define* (parse-c99 #:key debug (inc-dirs '()) (cpp-defs '()) mode) + (nyacc-cp:parse-c99 #:debug debug #:inc-dirs inc-dirs #:cpp-defs cpp-defs)) diff --git a/nyacc/lang/c99/pprint.scm b/nyacc/lang/c99/pprint.scm new file mode 100644 index 0000000..acb9c4d --- /dev/null +++ b/nyacc/lang/c99/pprint.scm @@ -0,0 +1,32 @@ +;;; nyacc/lang/c99/pprint.scm - C pretty-printer + +;; Copyright (C) 2015-2018,2021-2024 Matthew R. Wette +;; Copyright (C) 2024,2026 Janneke Nieuwenhuizen <[email protected]> +;; +;; This library is free software; you can redistribute it and/or +;; modify it under the terms of the GNU Lesser General Public +;; License as published by the Free Software Foundation; either +;; version 3 of the License, or (at your option) any later version. +;; +;; This library is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; Lesser General Public License for more details. +;; +;; You should have received a copy of the GNU Lesser General Public License +;; along with this library; if not, see <http://www.gnu.org/licenses/> + +;;; Commentary: +;;; +;;; This is a NYACC-compatibility wrapper for NYACC-for-Mes. +;;; +;;; +;;; Code: + +(define-module (nyacc lang c99 pprint) + #:export (pretty-print-c99)) + +(define* (pretty-print-c99 tree + #:optional (port (current-output-port)) + #:key ugly per-line-prefix (basic-offset 2)) + (write tree port)) diff --git a/nyacc/version.scm b/nyacc/version.scm new file mode 100644 index 0000000..4ed523a --- /dev/null +++ b/nyacc/version.scm @@ -0,0 +1,6 @@ +(define-module (nyacc version) + #:export (*nyacc-name* + *nyacc-version*)) + +(define *nyacc-name* "nyacc-for-mes") +(define *nyacc-version* "0.3.1") -- 2.54.0
