emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/bnf-mode 3b2f66a 43/43: Merge remote-tracking branch 'b


From: Stefan Monnier
Subject: [elpa] externals/bnf-mode 3b2f66a 43/43: Merge remote-tracking branch 'bnf-mode/master' into externals/bnf-mode
Date: Mon, 20 Jan 2020 13:39:06 -0500 (EST)

branch: externals/bnf-mode
commit 3b2f66ad424bb5387a199f023e09fc4a577d24ab
Merge: a1f2a93 87811bf
Author: Stefan Monnier <address@hidden>
Commit: Stefan Monnier <address@hidden>

    Merge remote-tracking branch 'bnf-mode/master' into externals/bnf-mode
---
 .codecov.yml                  |  54 ++++++++++++++++
 .elpaignore                   |   2 +-
 .github/workflows/build.yml   | 101 +++++++++++++++++++++++++++++
 .github/workflows/release.yml | 102 +++++++++++++++++++++++++++++
 .gitignore                    |   3 +-
 .travis.yml                   | 105 ------------------------------
 CHANGELOG.org                 |  64 ------------------
 Cask                          |   3 +-
 Makefile                      |  22 +++----
 NEWS                          |  90 ++++++++++++++++++++++++++
 README.org                    | 146 +++++++-----------------------------------
 bnf-mode.el                   |  48 ++++++++++----
 dir                           |   2 +-
 test/bnf-mode-font-test.el    |  10 ++-
 test/ebnf-grammar.ebnf        |  68 ++++++++++++++++++++
 test/test-helper.el           |  17 +++--
 16 files changed, 504 insertions(+), 333 deletions(-)

diff --git a/.codecov.yml b/.codecov.yml
new file mode 100644
index 0000000..1751a40
--- /dev/null
+++ b/.codecov.yml
@@ -0,0 +1,54 @@
+# Copyright (C) 2019-2020 Serghei Iakovlev
+#
+# License
+#
+# This file 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.
+#
+# This file 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 this file; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+codecov:
+  notify:
+    # will no delay sending notifications until all ci is finished
+    require_ci_to_pass: no
+
+coverage:
+  precision: 2
+  round: down
+  range: "65...90"
+
+  status:
+    project:
+      default:
+        # the amount that coverage can drop while still posting a success
+        threshold: 1%
+    patch: no
+    changes: no
+
+comment:
+  layout: diff
+  behavior: default
+  require_changes: false
+
+ignore:
+  - ".git"
+  - "*.yml"
+  - "*.json"
+  - "*.md"
+  - "*.mk"
+  - "*.txt"
+
+  # ignore folders and all its contents
+  - ".cask/.*"
+  - ".github/.*"
+  - "test/.*"
diff --git a/.elpaignore b/.elpaignore
index dcfa152..570e5e3 100644
--- a/.elpaignore
+++ b/.elpaignore
@@ -1,4 +1,4 @@
-.travis.yml
+.github
 .ert-runner
 .gitignore
 Makefile
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000..b3c98dd
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,101 @@
+# Copyright (C) 2019-2020 Serghei Iakovlev
+#
+# License
+#
+# This file 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.
+#
+# This file 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 this file; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+name: build
+
+on:
+  push:
+    paths-ignore:
+      - '**.md'
+      - '**.txt'
+  pull_request:
+    branches:
+      - master
+
+jobs:
+  build:
+    name: "GNU Emacs ${{ matrix.emacs_version }}"
+    runs-on: ubuntu-latest
+
+    strategy:
+      fail-fast: false
+
+      matrix:
+        emacs_version:
+          - '24.3'
+          - '24.4'
+          - '24.5'
+          - '25.1'
+          - '25.2'
+          - '25.3'
+          - '26.1'
+          - '26.2'
+          - '26.3'
+          - snapshot
+
+    steps:
+      - name: Checkout Code
+        uses: actions/checkout@v2-beta
+        with:
+          fetch-depth: 5
+
+      - name: Setup GNU Emacs
+        uses: purcell/setup-emacs@master
+        with:
+          version: ${{ matrix.emacs_version }}
+
+      - name: Setup Cask
+        run: curl -fsSkL https://raw.github.com/cask/cask/master/go | python
+
+      - name: Set Environment Variables
+        run: |
+          echo "::set-env name=PATH::$HOME/.cask/bin:$PATH"
+
+          if [ "${{ matrix.emacs_version }}" != "snapshot" ]; then
+            echo "::set-env name=UNDERCOVER_FORCE::1"
+          fi
+
+      - name: Fast Makefile Test
+        run: make help
+
+      - name: Initialize the Project
+        run: make init
+
+      - name: Byte Compile BNF Mode
+        run: make build
+
+      - name: Check for Errors in the Documentation
+        if: matrix.emacs_version >= '25.1'
+        run: make checkdoc
+
+      - name: Run Unit Tests
+        run: make test
+
+      - name: After Success Reporting
+        if: success()
+        run: git log --format=fuller -5
+
+      - name: Upload Code Coverage Report
+        uses: codecov/codecov-action@v1
+        with:
+          token: ${{ secrets.CODECOV_TOKEN }}
+          yml: ./.codecov.yml
+          name: codecov-umbrella
+          flags: unittests
+          fail_ci_if_error: false
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..3a185e5
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,102 @@
+# Copyright (C) 2019-2020 Serghei Iakovlev
+#
+# License
+#
+# This file 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.
+#
+# This file 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 this file; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+name: release
+
+on:
+  push:
+    tags:
+      - '*'
+
+jobs:
+  build:
+    name: Upload Release Asset
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: Checkout Code
+        uses: actions/checkout@v2-beta
+        with:
+          fetch-depth: 1
+
+      - name: Setup GNU Emacs
+        uses: purcell/setup-emacs@master
+        with:
+          version: 26.3
+
+      - name: Setup Cask
+        run: curl -fsSkL https://raw.github.com/cask/cask/master/go | python
+
+      - name: Set Environment Variables
+        run: |
+          echo "::set-env name=PATH::$HOME/.cask/bin:$PATH"
+          echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
+
+      - name: Common settings
+        run: |
+          git config --global user.name "Serghei Iakovlev"
+          git config --global user.email address@hidden
+
+      - name: Setup Prerequisites
+        run: |
+          # I don't need this at all. However I noticed
+          # that builds often fails because Microsoft
+          # servers are unstable or even offline.
+          sudo rm -f /etc/apt/sources.list.d/dotnetdev.list
+          sudo rm -f /etc/apt/sources.list.d/azure*.list
+
+          sudo apt-get update --quiet --yes 1>/dev/null
+          sudo apt-get install texinfo
+
+          _repo=https://github.com/jgm/pandoc
+          wget -q "$_repo/releases/download/2.9.1.1/pandoc-2.9.1.1-1-amd64.deb"
+          sudo dpkg -i pandoc-2.7.2-1-amd64.deb
+
+      - name: Initialize the Project
+        run: make init
+
+      - name: Build Package
+        run: make package
+
+      - name: Minimal Package Test
+        run: |
+          make install
+          head "$HOME/.emacs.d/elpa/bnf-mode-*/bnf-mode.el" | grep -q 
"$VERSION"
+
+      - name: Create Release
+        id: create_release
+        uses: actions/create-release@v1.0.0
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        with:
+          tag_name: ${{ github.ref }}
+          release_name: $VERSION
+          draft: false
+          prerelease: false
+
+      - name: Upload Release Asset
+        id: upload-release-asset
+        uses: actions/upload-release-asset@v1.0.1
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        with:
+          upload_url: ${{ steps.create_release.outputs.upload_url }}
+          asset_path: "bnf-mode-${VERSION}.tar"
+          asset_name: "bnf-mode-${VERSION}.tar"
+          asset_content_type: application/x-tar
diff --git a/.gitignore b/.gitignore
index b45c0df..a59fd18 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,10 +7,11 @@
 
 *~
 *.elc
-.cask/
+.cask
 bnf-mode.info
 bnf-mode-pkg.el
 bnf-mode-autoloads.el
 bnf-mode-*.tar
+coverage-final.json
 ChangeLog
 README
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 6344a98..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,105 +0,0 @@
-# Copyright (C) 2019 Serghei Iakovlev
-#
-# This file is NOT part of GNU Emacs.
-#
-# License
-#
-# This file 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.
-#
-# This file 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 this file; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, USA.
-
-language: emacs-lisp
-
-# Cache stable Emacs binaries, packages and Cask
-cache:
-  apt: true
-  timeout: 604800
-  directories:
-    - "$HOME/emacs"
-    # Cache BNF Mode dependencies
-    - ".cask/"
-    # Cache Cask bootstrap dependencies
-    - "$HOME/.emacs.d/.cask"
-
-addons:
-  apt:
-    packages:
-      - bsdtar
-      - texinfo
-
-git:
-  depth: 1
-
-env:
-  matrix:
-    - EMACS_VERSION=24.3
-    - EMACS_VERSION=24.4
-    - EMACS_VERSION=24.5
-    - EMACS_VERSION=25.1
-    - EMACS_VERSION=25.2
-    - EMACS_VERSION=25.3
-    - EMACS_VERSION=26.1
-    - EMACS_VERSION=26.2
-    - EMACS_VERSION=git-snapshot
-  global:
-    - PATH="$HOME/bin:$HOME/.cask/bin:$HOME/.evm/bin:$PATH"
-
-# Allow Emacs snapshot builds to fail and don't wait for it
-matrix:
-  fast_finish: true
-  allow_failures:
-    - env: EMACS_VERSION=git-snapshot
-
-before_install:
-  # Setup Emacs Version Manager
-  - git clone -q --depth=1 https://github.com/rejeep/evm.git $HOME/.evm
-  - evm config path /tmp
-
-install:
-  # Install Emacs (according to $EMACS_VERSION) and Cask
-  - evm install emacs-$EMACS_VERSION-travis --use --skip
-  - curl -fsSkL https://raw.github.com/cask/cask/master/go | python
-
-before_script:
-  # Configure $EMACS_MAJOR_VERSION
-  - EMACS_MAJOR_VERSION="$(echo $EMACS_VERSION | cut -d '.' -f 1)"
-
-script:
-  - make help
-  - make init
-  - make build
-  # The 'checkdoc-file' present on Emacs >= 25.1
-  - '[[ "$EMACS_MAJOR_VERSION" = "24" ]] || make checkdoc'
-  - make test
-
-before_deploy:
-  - git config --global user.name "Serghei Iakovlev"
-  - git config --global user.email address@hidden
-  - wget 
https://github.com/jgm/pandoc/releases/download/2.7.2/pandoc-2.7.2-1-amd64.deb 
-o /dev/null
-  - sudo dpkg -i pandoc-2.7.2-1-amd64.deb
-  - make package
-
-deploy:
-  provider: releases
-  api_key: $GITHUB_TOKEN
-  file_glob: true
-  file: bnf-mode-*.tar
-  skip_cleanup: true
-  on:
-    tags: true
-    condition: $EMACS_VERSION = 26.1
-    repo: sergeyklay/bnf-mode
-
-notifications:
-  email: false
diff --git a/CHANGELOG.org b/CHANGELOG.org
deleted file mode 100644
index ac2ecba..0000000
--- a/CHANGELOG.org
+++ /dev/null
@@ -1,64 +0,0 @@
-#+TITLE: Change Log
-#+AUTHOR: Serghei Iakovlev
-
-All notable changes to this project will be documented in this file.
-
-The format is based on [[http://keepachangelog.com][Keep a Changelog]] and 
this project adheres to [[http://semver.org][Semantic Versioning]].
-
-** [[https://github.com/sergeyklay/bnf-mode/compare/0.4.2...HEAD][Unreleased]]
-** [[https://github.com/sergeyklay/bnf-mode/compare/0.4.1...0.4.2][0.4.2]] - 
2019-05-14
-*** Added
-- Introduced ALGOL 60 comments style. Disabled by default.
-  For more see: [[https://github.com/sergeyklay/bnf-mode/pull/4][#4]] .
-
-*** Changed
-- Only setting =bnf-mode-algol-comments-style= to non-nil will allow use
-  semicolons as a regular terminal symbols. For more see: 
[[https://github.com/sergeyklay/bnf-mode/pull/4][#4]] .
-
-** [[https://github.com/sergeyklay/bnf-mode/compare/0.4.0...0.4.1][0.4.1]] - 
2019-04-21
-*** Fixes
-- Minor fix related to build & deploy BNF Mode on Travis CI.
-
-** [[https://github.com/sergeyklay/bnf-mode/compare/0.3.2...0.4.0][0.4.0]] - 
2019-04-21
-*** Added
-- Added =comment-start-skip= to help comment commands recognize comments.
-- Return back =comment-start= and =comment-end= removed in 
[[https://github.com/sergeyklay/bnf-mode/commit/83f0e0fc144e453bcce459d2d655a7b48e77953e][83f0e0f]]
 .
-- More intelligent terminal syntax recognition.
-  Added support of "=;=" character as an extra character used in terminals.
-- Provided ability to build installation package.
-  See =make help= for more.
-
-** [[https://github.com/sergeyklay/bnf-mode/compare/0.3.1...0.3.2][0.3.2]] - 
2019-03-24
-*** Changed
-- Published package on MELPA 
([[https://github.com/melpa/melpa/pull/6074][melpa/melpa#6074]]).
-
-*** Fixed
-- In the BNF there are no strings thus treat ' and " as a regular symbols.
-- Minor code cleanup: removed no longer needed =comment-*= variables.
-- In the BNF there are no grouping brackets except angle ones. Fixed.
-
-*** Removed
-- Removed the =bnf-mode-version= function. Users can easily call
-  =describe-package= or =pkg-info-package-version= interactively if they want
-  to get this information 
([[https://github.com/sergeyklay/bnf-mode/issues/1][#1]]).
-
-** [[https://github.com/sergeyklay/bnf-mode/compare/0.3.0...0.3.1][0.3.1]] - 
2019-03-17
-*** Fixed
-- Fixed BNF rule name definition to follow 
[[https://www.masswerk.at/algol60/report.htm][ALGOL 60 report]] .
-
-** [[https://github.com/sergeyklay/bnf-mode/compare/0.2.0...0.3.0][0.3.0]] - 
2019-03-17
-*** Changed
-- LHS nonterminals may be preceded by an unlimited number of spaces.
-
-** [[https://github.com/sergeyklay/bnf-mode/compare/0.1.0...0.2.0][0.2.0]] - 
2019-03-16
-*** Changed
-- Comments are no longer use syntax table. For more see =comment-use-syntax=.
-
-*** Fixed
-- Changed comment syntax from =#= to =;= to follow 
[[https://tools.ietf.org/html/rfc822#section-2.8][RFC822#2.8]] .
-
-** 0.1.0 - 2019-03-16
-*** Added
- - Initial stable release.
-
-[[https://www.gnu.org/software/emacs/][GNU Emacs]]
diff --git a/Cask b/Cask
index 1a9be14..d0032c2 100644
--- a/Cask
+++ b/Cask
@@ -7,8 +7,7 @@
 
 (files "*.el")
 
-(depends-on "rx")
-(depends-on "cl-lib")
+(depends-on "cl-lib" "0.5")
 
 (development
  (depends-on "f")
diff --git a/Makefile b/Makefile
index e73e0df..08e1f05 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,4 @@
-# Copyright (C) 2019 Serghei Iakovlev
-#
-# This file is NOT part of GNU Emacs.
+# Copyright (C) 2019-2020 Serghei Iakovlev
 #
 # License
 #
@@ -25,7 +23,7 @@ ROOT_DIR := $(shell dirname $(realpath $(lastword 
$(MAKEFILE_LIST))))
 EMACS ?= emacs
 CASK ?= cask
 PANDOC ?= pandoc
-TAR ?= COPYFILE_DISABLE=1 bsdtar
+TAR ?= tar
 
 EMACSFLAGS ?=
 TESTFLAGS ?= --reporter ert+duration
@@ -73,6 +71,7 @@ $(PKGDIR): Cask
        $(CASK) install
        touch $(PKGDIR)
 
+# Remove badges
 define org-clean
        cat $^ | sed -e "s/\[\[.*\.svg\]\]//g"
 endef
@@ -83,14 +82,14 @@ $(ARCHIVE_NAME).info: README.org
 README: README.org
        $(call org-clean,$^) | $(PANDOC) $(PANDOCLAGS) -t plain | sed -e 
"s/\[\]//g" > $@
 
-ChangeLog: CHANGELOG.org
-       $(call org-clean,$^) | $(PANDOC) $(PANDOCLAGS) -t plain | sed -e 
"s/\[\]//g" > $@
+ChangeLog: NEWS
+       cp $^ $@
 
 $(ARCHIVE_NAME)-pkg.el: $(ARCHIVE_NAME).el
        $(CASK) pkg-file
 
 $(PACKAGE_NAME).tar: README ChangeLog LICENSE $(ARCHIVE_NAME).el 
$(ARCHIVE_NAME)-pkg.el $(ARCHIVE_NAME).info dir
-       $(TAR) -c -s "@^@$(PACKAGE_NAME)/@" -f $(PACKAGE_NAME).tar $^
+       $(TAR) -c -v -f $(PACKAGE_NAME).tar --transform "s@^@$(PACKAGE_NAME)/@" 
$^
 
 # Public targets
 
@@ -115,7 +114,7 @@ test:
 .PHONY: clean
 clean:
        $(CASK) clean-elc
-       $(RM) -f README ChangeLog $(ARCHIVE_NAME).info
+       $(RM) -f README ChangeLog $(ARCHIVE_NAME).info coverage-final.json
        $(RM) -f $(ARCHIVE_NAME)-pkg.el $(ARCHIVE_NAME)-*.tar
 
 .PHONY: package
@@ -123,7 +122,8 @@ package: $(PACKAGE_NAME).tar
 
 .PHONY: install
 install: $(PACKAGE_NAME).tar
-       $(EMACS) --batch -l package -f package-initialize --eval 
"(package-install-file \"$(PWD)/$(PACKAGE_NAME).tar\")"
+       $(EMACS) --batch -l package -f package-initialize --eval \
+               "(let ((debug-on-error t))(package-install-file 
\"$(PWD)/$(PACKAGE_NAME).tar\"))"
 
 .PHONY: help
 help: .title
@@ -131,8 +131,8 @@ help: .title
        echo ''
        echo 'Available targets:'
        echo '  help:     Show this help and exit'
-       echo '  init:     Initialise the project (has to be launched first)'
-       echo '  checkdoc: Checks BNF Mode code for errors in documentation'
+       echo '  init:     Initialize the project (has to be launched first)'
+       echo '  checkdoc: Checks BNF Mode code for errors in the documentation'
        echo '  build:    Byte compile BNF Mode package'
        echo '  test:     Run the non-interactive unit test suite'
        echo '  clean:    Remove all byte compiled Elisp files as well as build'
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..39ec924
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,90 @@
+bnf-mode NEWS -- history of user-visible changes.
+
+Copyright (C) 2019-2020 Free Software Foundation, Inc.
+See the end of the file for license conditions.
+
+This file is about changes in BNF Mode.
+
+* BNF Mode 0.4.3
+** Fixed dependency list in the Cask file.
+Dependency list was fixed by specifying `cl-lib' version as well as
+removing `rx` (`rx' is part of GNU Emacs actually).  This fixed the
+issue reported in <https://github.com/sergeyklay/bnf-mode/issues/5>.
+The issue related to installation from the TAR file.
+
+** CI/CD process was moved on GitHub Actions.
+
+* BNF Mode 0.4.2
+** First release in ELPA.
+
+** Introduced ALGOL 60 comments style. Disabled by default.
+
+** Use semicolons as a comments.
+Only setting bnf-mode-algol-comments-style to non-nil will allow use
+semicolons as a regular terminal symbols.
+
+* BNF Mode 0.4.1
+** Minor fix related to build & deploy BNF Mode on Travis CI.
+
+* BNF Mode 0.4.0
+** Added comment-start-skip to improve recognize comments.
+
+** Return back comment-start and comment-end.
+
+** Use more intelligent terminal syntax recognition.
+Added support of ";" character as an extra character used in terminals.
+
+** Provided ability to build installation package.
+See make help for more.
+
+* BNF Mode 0.3.2
+** First release in MELPA.
+
+** Treat ' and " as a regular symbols.
+
+** Removed no longer needed comment-* variables.
+
+** In the BNF there are no grouping brackets except angle ones.
+
+** Removed the bnf-mode-version function.
+Users can easily call describe-package or pkg-info-package-version
+interactively if they want to get this information.
+
+* BNF Mode 0.3.1
+** Fixed BNF rule name definition to follow ALGOL 60 report.
+
+* BNF Mode 0.3.0
+** Nonterminals may be preceded by an unlimited number of spaces.
+
+* BNF Mode 0.2.0
+** Comments are no longer use syntax table.
+
+** Changed comment syntax from "#" to ";" to follow RFC822#2.8.
+
+* BNF Mode 0.1.0
+** Initial stable release.
+
+
+
+----------------------------------------------------------------------
+This file is part of GNU Emacs.
+
+GNU Emacs 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 Emacs 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 Emacs.  If not, see <https://www.gnu.org/licenses/>.
+
+
+Local variables:
+coding: utf-8
+mode: outline
+paragraph-separate: "[         ]*$"
+end:
diff --git a/README.org b/README.org
index 83d85b9..b94a936 100644
--- a/README.org
+++ b/README.org
@@ -1,7 +1,8 @@
 * BNF Mode for GNU Emacs
 
 
[[https://www.gnu.org/licenses/gpl-3.0.txt][https://img.shields.io/badge/license-GPL_3-green.svg]]
-[[https://travis-ci.com/sergeyklay/bnf-mode][https://travis-ci.com/sergeyklay/bnf-mode.svg]]
+[[https://github.com/sergeyklay/bnf-mode/actions][https://github.com/sergeyklay/bnf-mode/workflows/build/badge.svg]]
+[[https://codecov.io/gh/sergeyklay/bnf-mode][https://codecov.io/gh/sergeyklay/bnf-mode/branch/master/graph/badge.svg]]
 [[https://melpa.org/#/bnf-mode][https://melpa.org/packages/bnf-mode-badge.svg]]
 
[[https://stable.melpa.org/#/bnf-mode][https://stable.melpa.org/packages/bnf-mode-badge.svg]]
 
@@ -43,126 +44,15 @@ NOTE: The ~master~ branch will always contain the latest 
unstable version.
 If you wish to check older versions or formal, tagged release, please switch
 to the relevant [[https://github.com/sergeyklay/bnf-mode/tags][tag]].
 
-The best way of installing this major mode, at least for GNU Emacs 24, is to
-use the packaging system.  The following are ways to install using ELPA and
-MELPA.
+The recommended way is to use [[https://elpa.gnu.org/][ELPA]], 
[[https://stable.melpa.org/][MELPA Stable]] or [[https://melpa.org/][MELPA]]. 
If either is in your
+=package-archives=, do:
 
-*** Using ELPA or MELPA
-**** ELPA
-
-Since version 0.4.1 BNF Mode is available for installation from ELPA.
-Add ELPA to the list of repositories to access this mode:
-
-#+begin_src emacs-lisp
-(require 'package)
-(add-to-list 'package-archives
-             '("gnu" . "https://elpa.gnu.org/packages/";) t)
-(package-initialize)
-#+end_src
-
-**** MELPA
-
-Add MELPA or MELPA Stable to the list of repositories to access this mode.
-MELPA tracks this Git repository and updates relatively soon after each commit
-or formal release.  For more detail on setting up see 
[[https://melpa.org/#/getting-started][MELPA Getting Started]].
-
-For those who want only formal, tagged releases use MELPA Stable:
-
-#+begin_src emacs-lisp
-(require 'package)
-(add-to-list 'package-archives
-             '("melpa-stable" . "https://stable.melpa.org/packages/";) t)
-(package-initialize)
-#+end_src
-
-For those who want rolling releases as they happen use MELPA:
-
-#+begin_src emacs-lisp
-(require 'package)
-(add-to-list 'package-archives
-             '("melpa" . "https://melpa.org/packages/";) t)
-(package-initialize)
+#+begin_src
+M-x package-install RET bnf-mode RET
 #+end_src
 
-After initializing packaging system you can install BNF Mode using preferred 
way:
-
-***** =package-list-packages=
-
-Use ~M-x package-refresh-contents~ and ~M-x package-list-packages~ to get to
-the package listing and install ~bnf-mode~ from there.
-
-***** Manual
-
-You can install ~bnf-mode~ manually by adding following to your init file:
-
-#+begin_src emacs-lisp
-(unless (package-installed-p 'bnf-mode)
-    (package-refresh-contents)
-    (package-install 'bnf-mode))
-#+end_src
-
-***** Cask
-
-Add following to your [[https://cask.github.io/][Cask]] file:
-
-#+begin_src emacs-lisp
-(source melpa)
-
-(depends-on "bnf-mode")
-#+end_src
-
-***** =use-package=
-
-Add following to your init file:
-
-#+begin_src emacs-lisp
-(use-package bnf-mode
-  :ensure t
-  ;; To use MELPA Stable use ":pin mepla-stable",
-  ;; to use ELPA remove ":pin" line
-  :pin melpa
-  :mode "\\.bnf\\'")
-#+end_src
-
-*** El-get
-
-If you use el-get, just create a recipe file ~bnf.rcp~:
-
-#+begin_src emacs-lisp
-(:name bnf-mode
- :website "https://github.com/sergeyklay/bnf-mode";
- :description "BNF Mode: A major mode for editing BNF grammars"
- :type github
- :pkgname "sergeyklay/bnf-mode")
-#+end_src
-
-and add it to a directory present in ~el-get-recipe-path~.
-Then, use ~M-x el-get-install <RET> bnf-mode~ or add:
-
-#+begin_src emacs-lisp
-(el-get-bundle bnf-mode)
-#+end_src
-
-to your init file.
-
-*** Manual Install
-
-1. Download ~bnf-mode.el~
-2. Put the file in your Elisp common folder like ~$HOME/.emacs.d/lisp/~
-3. Then you can include like this:
-   #+begin_src emacs-lisp
-   (add-to-list 'load-path
-                (expand-file-name "lisp" user-emacs-directory))
-   #+end_src
-4. Add /either/ of the two following lines to your initialization file.
-   The first only loads BNF Mode when necessary, the 2nd always during startup
-   of GNU Emacs.
-   #+begin_src emacs-lisp
-   (autoload 'bnf-mode "bnf-mode" nil t)
-   ;; OR
-   (require 'bnf-mode)
-   #+end_src
-5. Optionally byte compile ~bnf-mode.el~ for faster startup: ~M-x byte-compile~
+To learn on how to use any other installation methods refer to relevant
+documentation.
 
 ** Usage
 
@@ -172,7 +62,16 @@ to your init file.
 |---------------------------------+----------------------------------|
 | ~bnf-mode~                      | Switches to BNF Mode.            |
 
-Any file that matches the glob ~*.bnf~ is automatically opened in ~bnf-mode~.
+By default any file that matches the glob ~*.bnf~ is automatically opened
+in ~bnf-mode~.
+
+** Customization
+
+To customize various options, use command as follows:
+
+#+begin_src
+M-x customize-group RET bnf RET
+#+end_src
 
 ** Support
 
@@ -180,17 +79,18 @@ Feel free to ask question or make suggestions in our 
[[https://github.com/sergey
 
 ** Changes
 
-To see what has changed in recent versions of BNF Mode, see the 
[[https://github.com/sergeyklay/bnf-mode/blob/master/CHANGELOG.org][CHANGELOG.org]]
 .
+To see what has changed in recent versions of BNF Mode see:
+https://github.com/sergeyklay/bnf-mode/blob/master/NEWS .
 
 ** External Links
 
 - [[https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_form][Wikipedia: 
Backus–Naur form]]
-- 
[[https://en.wikipedia.org/wiki/Extended_Backus%25E2%2580%2593Naur_form][Wikipedia:
 Extended Backus–Naur form]]
-- 
[[https://en.wikipedia.org/wiki/Augmented_Backus%25E2%2580%2593Naur_form][Wikipedia:
 Augmented Backus–Naur form]]
+- 
[[https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form][Wikipedia: 
Extended Backus–Naur form]]
+- 
[[https://en.wikipedia.org/wiki/Augmented_Backus%E2%80%93Naur_form][Wikipedia: 
Augmented Backus–Naur form]]
 - [[https://www.cl.cam.ac.uk/~mgk25/iso-14977.pdf][ISO/IEC 14977: EBNF]]
 - [[https://www.ics.uci.edu/~pattis/ICS-33/lectures/ebnf.pdf][EBNF: A Notation 
to Describe Syntax]]
 
 ** License
 
 BNF Mode is open source software licensed under the 
[[https://github.com/sergeyklay/bnf-mode/blob/master/LICENSE][GNU General 
Public Licence version 3]].
-Copyright © 2019, Free Software Foundation, Inc.
+Copyright © 2019-2020, Free Software Foundation, Inc.
diff --git a/bnf-mode.el b/bnf-mode.el
index f4f83ab..4fafc88 100644
--- a/bnf-mode.el
+++ b/bnf-mode.el
@@ -1,16 +1,14 @@
 ;;; bnf-mode.el --- Major mode for editing BNF grammars. -*- lexical-binding: 
t; -*-
 
-;; Copyright (C) 2019 Free Software Foundation, Inc
+;; Copyright (C) 2019-2020 Free Software Foundation, Inc
 
-;; Author: Serghei Iakovlev <address@hidden>
-;; Maintainer: Serghei Iakovlev <address@hidden>
-;; Version: 0.4.2
+;; Author: Serghei Iakovlev <address@hidden>
+;; Maintainer: Serghei Iakovlev <address@hidden>
+;; Version: 0.4.3
 ;; URL: https://github.com/sergeyklay/bnf-mode
 ;; Keywords: languages
 ;; Package-Requires: ((cl-lib "0.5") (emacs "24.3"))
 
-;; This file is NOT part of GNU Emacs.
-
 ;;;; License
 
 ;; This file is free software; you can redistribute it and/or
@@ -43,16 +41,42 @@
 ;; - Revised Report on the Algorithmic Language Algol 60
 ;;   (see URL `https://www.masswerk.at/algol60/report.htm')
 ;;
-;; Usage:  Put this file in your Emacs Lisp path (eg. site-lisp) and add to
-;; your .emacs file:
+;; Installation:
+;;
+;; The recommended way is to use ELPA (see URL `https://elpa.gnu.org'),
+;; MELPA (see URL `https://melpa.org') or MELPA Stable
+;; (see URL `https://stable.melpa.org').  If either is in your
+;; `package-archives', do:
+;;
+;;   M-x package-install RET bnf-mode RET
+;;
+;; To learn on how to use any other installation methods refer to relevant
+;; documentation.
+;;
+;; Usage:
+;;
+;; To toggle the mode in the current buffer:
 ;;
-;;   (require 'bnf-mode)
+;;   M-x bnf-mode RET
 ;;
-;; Bugs: Bug tracking is currently handled using the GitHub issue tracker
+;; By default any file that matches the glob *.bnf is automatically opened
+;; in `bnf-mode'.
+;;
+;; Customization:
+;;
+;; To customize various options, use command as follows:
+;;
+;;   M-x customize-group bnf RET
+;;
+;; Bugs:
+;;
+;; Bug tracking is currently handled using the GitHub issue tracker
 ;; (see URL `https://github.com/sergeyklay/bnf-mode/issues')
 ;;
-;; History: History is tracked in the Git repository rather than in this file.
-;; See URL `https://github.com/sergeyklay/bnf-mode/blob/master/CHANGELOG.org'
+;; History:
+;;
+;; History is tracked in the Git repository rather than in this file.
+;; (see URL `https://github.com/sergeyklay/bnf-mode/blob/master/NEWS')
 
 ;;; Code:
 
diff --git a/dir b/dir
index f96d9de..d3137ed 100644
--- a/dir
+++ b/dir
@@ -15,4 +15,4 @@ File: dir,    Node: Top       This is the top of the INFO tree
 * Menu:
 
 Languages
-* BNF Mode: (bnf-mode).               Major mode for editing BNF grammars.
+* BNF Mode: (bnf-mode).         Major mode for editing BNF grammars.
diff --git a/test/bnf-mode-font-test.el b/test/bnf-mode-font-test.el
index e88a6fc..bb3991b 100644
--- a/test/bnf-mode-font-test.el
+++ b/test/bnf-mode-font-test.el
@@ -1,14 +1,12 @@
 ;;; bnf-mode-font-test.el --- BNF Mode: Font highlighting test suite -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2019 Free Software Foundation, Inc.
+;; Copyright (C) 2019-2020 Free Software Foundation, Inc.
 
-;; Author: Serghei Iakovlev <address@hidden>
-;; Maintainer: Serghei Iakovlev <address@hidden>
-;; Version: 0.4.2
+;; Author: Serghei Iakovlev <address@hidden>
+;; Maintainer: Serghei Iakovlev <address@hidden>
+;; Version: 0.4.3
 ;; URL: https://github.com/sergeyklay/bnf-mode
 
-;; This file is NOT part of GNU Emacs.
-
 ;;;; License
 
 ;; This file is free software; you can redistribute it and/or
diff --git a/test/ebnf-grammar.ebnf b/test/ebnf-grammar.ebnf
new file mode 100644
index 0000000..b8e8f20
--- /dev/null
+++ b/test/ebnf-grammar.ebnf
@@ -0,0 +1,68 @@
+(*  This example defines Extended BNF informally.  Many of the syntax
+rules include a comment to explain their meaning; inside a comment a
+meta identifier is enclosed in angle brackets  <  and  >  to avoid
+confusion with similar English words.  The non-terminal symbols
+<letter>, <decimal_digit> and <character> are NOT defined.  The position
+of <comments> is stated in a comment but not formally defined.  *)
+
+(*  A <syntax_rule> defines the sequences of symbols represented by a
+<meta_identifier>  *)
+syntax = syntax_rule, { syntax_rule } ;
+syntax_rule = meta_identifier, '=', definitions_list, ';' ;
+
+(*  |  separates alternative <single_definitions>  *)
+definitions_list = single_definition, { '|', single_definition } ;
+
+(* ,  separates successive <terms>  *)
+single_definition = term, { ',', term } ;
+
+(*  A <term> represents any sequence of symbols that is defined by the
+<factor> but not defined by the <exception>  *)
+term = factor, ['-', exception] ;
+
+(*  A <factor> may be used as an <exception> if it could be replaced by
+a <factor> containing no <meta_identifiers>  *)
+exception =  factor;
+
+(*  The <integer> specifies the number of repetitions of the
+<primary>  *)
+factor = [ integer, '*' ], primary ;
+
+primary = optional_sequence | repeated_sequence | special_sequence
+          | grouped_sequence | meta_identifier | terminal_string
+          | empty ;
+
+empty = ;
+
+(*  The brackets  [  and  ]  enclose symbols which are optional  *)
+optional_sequence = '[', definitions_list, ']' ;
+
+(*  The brackets  {  and  }  enclose symbols which may be repeated any
+number of times  *)
+repeated_sequence = '{', definitions_list, '}' ;
+
+(*  The brackets  (  and  )  allow any <definitions_list> to be a
+<primary>  *)
+grouped_sequence = '(', definitions_list, ')' ;
+
+(*  A <terminal_string> represents the <characters> between the quote
+symbols '_'  or  "_"  *)
+terminal_string = "'", character - "'", { character - "'" }, "'"
+                  | '"', character - '"', { character - '"' }, '"' ;
+
+(*  A <meta_identifier> is the name of a syntactic element of the
+language being defined  *)
+meta_identifier = letter, { letter | decimal_digit } ;
+
+integer = decimal_digit, { decimal_digit } ;
+
+(*  The meaning of a <special_sequence> is not defined in the standard
+metalanguage.  *)
+special_sequence = '?', { character - '?' }, '?' ;
+
+(*  A comment is allowed anywhere outside a <terminal_string>,
+<meta_identifier>, <integer> or <special_sequence>  *)
+comment = '(*', { comment_symbol }, '*)' ;
+
+comment_symbol = comment | terminal_string | special_sequence
+                 | character ;
diff --git a/test/test-helper.el b/test/test-helper.el
index 379608b..a3f5204 100644
--- a/test/test-helper.el
+++ b/test/test-helper.el
@@ -1,14 +1,12 @@
 ;;; test-helper.el --- BNF Mode: Non-interactive unit-test setup -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2019 Free Software Foundation, Inc
+;; Copyright (C) 2019-2020 Free Software Foundation, Inc
 
-;; Author: Serghei Iakovlev <address@hidden>
-;; Maintainer: Serghei Iakovlev <address@hidden>
-;; Version: 0.4.2
+;; Author: Serghei Iakovlev <address@hidden>
+;; Maintainer: Serghei Iakovlev <address@hidden>
+;; Version: 0.4.3
 ;; URL: https://github.com/sergeyklay/bnf-mode
 
-;; This file is NOT part of GNU Emacs.
-
 ;;;; License
 
 ;; This file is free software; you can redistribute it and/or
@@ -36,7 +34,12 @@
 (message "Running tests on Emacs %s" emacs-version)
 
 (when (require 'undercover nil t)
-  (undercover "bnf-mode.el"))
+  ;; Track coverage, but don't send to coveralls. Save in parent
+  ;; directory as undercover saves paths relative to the repository
+  ;; root.
+  (undercover "*.el"
+              (:report-file "coverage-final.json")
+              (:send-report nil)))
 
 (let* ((current-file (if load-in-progress load-file-name (buffer-file-name)))
        (source-directory (locate-dominating-file current-file "Cask"))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]