diff --git a/mes/module/nyacc/lang/c99/parser.mes b/mes/module/nyacc/lang/c99/parser.mes index 1a9aaf73..9fbb5fd1 100644 --- a/mes/module/nyacc/lang/c99/parser.mes +++ b/mes/module/nyacc/lang/c99/parser.mes @@ -1,7 +1,7 @@ ;;; -*-scheme-*- ;;; GNU Mes --- Maxwell Equations of Software -;;; Copyright © 2016,2017 Jan (janneke) Nieuwenhuizen +;;; Copyright © 2016,2017,2019 Jan (janneke) Nieuwenhuizen ;;; ;;; This file is part of GNU Mes. ;;; @@ -35,5 +35,6 @@ (mes-use-module (nyacc lang sx-util)) (mes-use-module (nyacc lang util)) (mes-use-module (nyacc lang c99 cpp)) +(mes-use-module (nyacc lang c99 util)) (include-from-path "nyacc/lang/c99/parser.scm") diff --git a/mes/module/nyacc/lang/c99/util.mes b/mes/module/nyacc/lang/c99/util.mes new file mode 100644 index 00000000..b4e24885 --- /dev/null +++ b/mes/module/nyacc/lang/c99/util.mes @@ -0,0 +1,45 @@ +;;; -*-scheme-*- + +;;; GNU Mes --- Maxwell Equations of Software +;;; Copyright © 2019 Jan (janneke) Nieuwenhuizen +;;; +;;; This file is part of GNU Mes. +;;; +;;; GNU Mes is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Mes 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 General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Mes. If not, see . + +;;; Commentary: + +;;; Code: + +(mes-use-module (mes guile)) +(mes-use-module (mes catch)) +(mes-use-module (mes fluids)) +(mes-use-module (mes pretty-print)) +(mes-use-module (mes optargs)) +(mes-use-module (srfi srfi-1)) +(mes-use-module (srfi srfi-9)) +(mes-use-module (sxml xpath)) + +;; FIXME: Nyacc 0.93.0: +;; FIXME: (mes-use-module (srfi srfi-2)) +;; FIXME: (mes-use-module (sxml fold)) +;; FIXME: (ice-9 popen) +;; FIXME: (ice-9 rdelim) +(define (export . rest) #t) +(define (close-port port) #t) + +(mes-use-module (nyacc lang util)) +(mes-use-module (nyacc lang sx-util)) + +(include-from-path "nyacc/lang/c99/util.scm") diff --git a/module/mescc/compile.scm b/module/mescc/compile.scm index 74a2deff..39b352c0 100644 --- a/module/mescc/compile.scm +++ b/module/mescc/compile.scm @@ -1713,6 +1713,10 @@ ((asm-expr ,gnuc (,null ,arg0 . string)) (append-text info (wrap-as (asm->m1 arg0)))) + ;; Nyacc 0.90.2 + ((asm-expr ,gnuc (string ,arg0)) + (append-text info (wrap-as (asm->m1 arg0)))) + ((expr-stmt (fctn-call (p-expr (ident ,name)) (expr-list . ,expr-list))) (if (equal? name "asm") (let ((arg0 (cadr (cadar expr-list)))) (append-text info (wrap-as (asm->m1 arg0)))) diff --git a/module/mescc/preprocess.scm b/module/mescc/preprocess.scm index c7327a44..b8c38aa0 100644 --- a/module/mescc/preprocess.scm +++ b/module/mescc/preprocess.scm @@ -40,7 +40,7 @@ '(("0.85.3" (1 2 3)) ("0.86.0" (1 2 3))) *nyacc-version*) - '(1 2 3))) + '((1 2 3)))) (define (progress o) (when (and o (getenv "NYACC_DEBUG")) @@ -114,6 +114,7 @@ (define (ast-strip-comment o) (pmatch o + ((@ (comment . ,comment)) #f) ; Nyacc 0.90.2/0.93.0? ((comment . ,comment) #f) (((comment . ,comment) . ,t) (filter-map ast-strip-comment t)) (((comment . ,comment) . ,cdr) cdr)