From f8e4d6e42b0f8a8e3193bb1d0d84c89c6af92f5b Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sun, 18 Dec 2016 15:47:55 +0100 Subject: [PATCH] nyacc: Add mes modules. * module/nyacc/lang/c99/cpp.mes * module/nyacc/lang/c99/parser.mes * module/nyacc/lang/calc/parser.mes * module/nyacc/lang/util.mes * module/nyacc/lex.mes * module/nyacc/parse.mes * module/nyacc/util.mes --- module/nyacc/lalr.mes | 29 +++++++++++++++++++++++++ module/nyacc/lang/c99/cpp.mes | 31 +++++++++++++++++++++++++++ module/nyacc/lang/c99/parser.mes | 35 +++++++++++++++++++++++++++++++ module/nyacc/lang/calc/parser.mes | 30 ++++++++++++++++++++++++++ module/nyacc/lang/util.mes | 28 +++++++++++++++++++++++++ module/nyacc/lex.mes | 31 +++++++++++++++++++++++++++ module/nyacc/parse.mes | 29 +++++++++++++++++++++++++ module/nyacc/util.mes | 28 +++++++++++++++++++++++++ 8 files changed, 241 insertions(+) create mode 100644 module/nyacc/lalr.mes create mode 100644 module/nyacc/lang/c99/cpp.mes create mode 100644 module/nyacc/lang/c99/parser.mes create mode 100644 module/nyacc/lang/calc/parser.mes create mode 100644 module/nyacc/lang/util.mes create mode 100644 module/nyacc/lex.mes create mode 100644 module/nyacc/parse.mes create mode 100644 module/nyacc/util.mes diff --git a/module/nyacc/lalr.mes b/module/nyacc/lalr.mes new file mode 100644 index 00000000..046f605a --- /dev/null +++ b/module/nyacc/lalr.mes @@ -0,0 +1,29 @@ +;;; -*-scheme-*- + +;;; Mes --- Maxwell Equations of Software +;;; Copyright © 2016 Jan Nieuwenhuizen +;;; +;;; This file is part of Mes. +;;; +;;; 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. +;;; +;;; 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 Mes. If not, see . + +;;; Commentary: + +;;; Code: + +(mes-use-module (mes psyntax)) +(mes-use-module (srfi srfi-1)) +(mes-use-module (srfi srfi-9-psyntax)) +(mes-use-module (srfi srfi-43)) +(include-from-path "nyacc/lalr.scm") diff --git a/module/nyacc/lang/c99/cpp.mes b/module/nyacc/lang/c99/cpp.mes new file mode 100644 index 00000000..50761d92 --- /dev/null +++ b/module/nyacc/lang/c99/cpp.mes @@ -0,0 +1,31 @@ +;;; -*-scheme-*- + +;;; Mes --- Maxwell Equations of Software +;;; Copyright © 2016 Jan Nieuwenhuizen +;;; +;;; This file is part of Mes. +;;; +;;; 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. +;;; +;;; 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 Mes. If not, see . + +;;; Commentary: + +;;; Code: + +(mes-use-module (mes guile)) +(mes-use-module (rnrs arithmetic bitwise)) + +(mes-use-module (nyacc parse)) +(mes-use-module (nyacc lex)) +(mes-use-module (nyacc lang util)) +(include-from-path "nyacc/lang/c99/cpp.scm") diff --git a/module/nyacc/lang/c99/parser.mes b/module/nyacc/lang/c99/parser.mes new file mode 100644 index 00000000..99227233 --- /dev/null +++ b/module/nyacc/lang/c99/parser.mes @@ -0,0 +1,35 @@ +;;; -*-scheme-*- + +;;; Mes --- Maxwell Equations of Software +;;; Copyright © 2016 Jan Nieuwenhuizen +;;; +;;; This file is part of Mes. +;;; +;;; 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. +;;; +;;; 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 Mes. If not, see . + +;;; Commentary: + +;;; Code: + +(mes-use-module (mes guile)) +(mes-use-module (mes pretty-print)) +(mes-use-module (mes optargs)) +(mes-use-module (srfi srfi-9-psyntax)) +(mes-use-module (sxml xpath)) + +(mes-use-module (nyacc lex)) +(mes-use-module (nyacc parse)) +(mes-use-module (nyacc lang util)) + +(include-from-path "nyacc/lang/c99/parser.scm") diff --git a/module/nyacc/lang/calc/parser.mes b/module/nyacc/lang/calc/parser.mes new file mode 100644 index 00000000..e4fac015 --- /dev/null +++ b/module/nyacc/lang/calc/parser.mes @@ -0,0 +1,30 @@ +;;; -*-scheme-*- + +;;; Mes --- Maxwell Equations of Software +;;; Copyright © 2016 Jan Nieuwenhuizen +;;; +;;; This file is part of Mes. +;;; +;;; 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. +;;; +;;; 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 Mes. If not, see . + +;;; Commentary: + +;;; Code: + +(mes-use-module (mes guile)) +(mes-use-module (mes pretty-print)) +(mes-use-module (nyacc lalr)) +(mes-use-module (nyacc lex)) +(mes-use-module (nyacc parse)) +(include-from-path "nyacc/lang/calc/parser.scm") diff --git a/module/nyacc/lang/util.mes b/module/nyacc/lang/util.mes new file mode 100644 index 00000000..c5017bfb --- /dev/null +++ b/module/nyacc/lang/util.mes @@ -0,0 +1,28 @@ +;;; -*-scheme-*- + +;;; Mes --- Maxwell Equations of Software +;;; Copyright © 2016 Jan Nieuwenhuizen +;;; +;;; This file is part of Mes. +;;; +;;; 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. +;;; +;;; 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 Mes. If not, see . + +;;; Commentary: + +;;; Code: + +(mes-use-module (mes guile)) +(mes-use-module (mes optargs)) +(mes-use-module (srfi srfi-1)) +(include-from-path "nyacc/lang/util.scm") diff --git a/module/nyacc/lex.mes b/module/nyacc/lex.mes new file mode 100644 index 00000000..c2846785 --- /dev/null +++ b/module/nyacc/lex.mes @@ -0,0 +1,31 @@ +;;; -*-scheme-*- + +;;; Mes --- Maxwell Equations of Software +;;; Copyright © 2016 Jan Nieuwenhuizen +;;; +;;; This file is part of Mes. +;;; +;;; 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. +;;; +;;; 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 Mes. If not, see . + +;;; Commentary: + +;;; Code: + +(mes-use-module (mes guile)) +(mes-use-module (mes optargs)) +(mes-use-module (mes pretty-print)) +(mes-use-module (mes psyntax)) +(mes-use-module (srfi srfi-1)) +(mes-use-module (srfi srfi-14)) +(include-from-path "nyacc/lex.scm") diff --git a/module/nyacc/parse.mes b/module/nyacc/parse.mes new file mode 100644 index 00000000..0df9b3ca --- /dev/null +++ b/module/nyacc/parse.mes @@ -0,0 +1,29 @@ +;;; -*-scheme-*- + +;;; Mes --- Maxwell Equations of Software +;;; Copyright © 2016 Jan Nieuwenhuizen +;;; +;;; This file is part of Mes. +;;; +;;; 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. +;;; +;;; 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 Mes. If not, see . + +;;; Commentary: + +;;; Code: + +(mes-use-module (mes guile)) +(mes-use-module (mes optargs)) +(mes-use-module (srfi srfi-43)) +(mes-use-module (nyacc util)) +(include-from-path "nyacc/parse.scm") diff --git a/module/nyacc/util.mes b/module/nyacc/util.mes new file mode 100644 index 00000000..9c8835d0 --- /dev/null +++ b/module/nyacc/util.mes @@ -0,0 +1,28 @@ +;;; -*-scheme-*- + +;;; Mes --- Maxwell Equations of Software +;;; Copyright © 2016 Jan Nieuwenhuizen +;;; +;;; This file is part of Mes. +;;; +;;; 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. +;;; +;;; 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 Mes. If not, see . + +;;; Commentary: + +;;; Code: + +(mes-use-module (mes guile)) +(mes-use-module (mes optargs)) +(mes-use-module (srfi srfi-43)) +(include-from-path "nyacc/util.scm")