[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/bnf-mode f00384e 10/74: Change comment syntax
From: |
Stefan Monnier |
Subject: |
[elpa] externals/bnf-mode f00384e 10/74: Change comment syntax |
Date: |
Thu, 9 May 2019 08:27:43 -0400 (EDT) |
branch: externals/bnf-mode
commit f00384e485052655042df8aabd6942bdcd8cbc6b
Author: Serghei Iakovlev <address@hidden>
Commit: Serghei Iakovlev <address@hidden>
Change comment syntax
---
CHANGELOG.org | 3 +++
README.org | 10 ++++++++--
bnf-mode.el | 28 +++++++++++++---------------
3 files changed, 24 insertions(+), 17 deletions(-)
diff --git a/CHANGELOG.org b/CHANGELOG.org
index eabf01d..e68ace6 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -5,6 +5,9 @@ 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.1.0...HEAD][Unreleased]]
+*** Changed
+- Changed comment syntax from ~#~ to ~;~ to follow
[[https://tools.ietf.org/html/rfc822#section-2.8][RFC822#2.8]] .
+- Comments no longer use syntax table. For more see `comment-use-syntax'.
** 0.1.0 - 2019-03-16
*** Added
diff --git a/README.org b/README.org
index 7f8f2d0..71d405c 100644
--- a/README.org
+++ b/README.org
@@ -8,9 +8,15 @@ A GNU Emacs major mode for editing BNF grammars.
Currently provides basic syntax and font-locking for BNF files.
EBNF and ABNF are in my plans for the near future.
+When developing this mode, the following RFCs were taken into account:
+
+- [[https://www.ietf.org/rfc/rfc822.txt][RFC822]]: Standard for ARPA Internet
Text Messages
+- [[https://www.ietf.org/rfc/rfc5234.txt][RFC5234]]: Augmented BNF for Syntax
Specifications: ABNF
+
** Features
-1. Syntax highlighting
+- Basic syntax definition
+- Syntax highlighting
** Installation
@@ -74,8 +80,8 @@ To see what has changed in recent versions of BNF Mode, see
the [[https://github
** External Links
-- [[https://tools.ietf.org/html/rfc5234][RFC 5234: Augmented BNF for Syntax
Specifications: ABNF]]
- [[https://en.wikipedia.org/wiki/Backus%E2%80%93Naur_form][Wikipedia:
Backus–Naur form]]
+- [[https://www.ics.uci.edu/~pattis/ICS-33/lectures/ebnf.pdf][EBNF: A Notation
to Describe Syntax]]
** License
diff --git a/bnf-mode.el b/bnf-mode.el
index 96c7ac2..0ebe02e 100644
--- a/bnf-mode.el
+++ b/bnf-mode.el
@@ -4,7 +4,7 @@
;; Author: Serghei Iakovlev (concat "sadhooklay" "@" "gmail" ".com")
;; Maintainer: Serghei Iakovlev
-;; Version: 0.1.0
+;; Version: 0.2.0
;; URL: https://github.com/sergeyklay/bnf-mode
;; Keywords: languages
;; Package-Requires: ((cl-lib "0.5") (pkg-info "0.4") (emacs "24.3"))
@@ -33,6 +33,14 @@
;; GNU Emacs major mode for editing BNF grammars. Currently this mode
;; provides basic syntax and font-locking for "*.bnf" files.
;;
+;; When developing this mode, the following RFCs were taken into account:
+;;
+;; - RFC822: Standard for ARPA Internet Text Messages [1]
+;; - RFC5234: Augmented BNF for Syntax Specifications: ABNF [2]
+;;
+;; [1]: https://www.ietf.org/rfc/rfc822.txt
+;; [2]: https://www.ietf.org/rfc/rfc5234.txt
+;;
;; Usage: Put this file in your Emacs Lisp path (eg. site-lisp) and add to
;; your .emacs file:
;;
@@ -47,15 +55,6 @@
;;; Code:
-;;; Compatibility
-
-;; Work around emacs bug#18845, cc-mode expects cl to be loaded
-;; while bnf-mode only uses cl-lib (without compatibility aliases)
-(eval-and-compile
- (if (and (= emacs-major-version 24) (>= emacs-minor-version 4))
- (require 'cl)))
-
-
;;; Requirements
;; Tell the byte compiler about autoloaded functions from packages
@@ -185,7 +184,7 @@ See `rx' documentation for more information about REGEXPS
param."
;; Characters used to delimit string constants
(modify-syntax-entry ?\" "\"" table)
;; Comments setup
- (modify-syntax-entry ?# "<" table)
+ (modify-syntax-entry ?\; "<" table)
(modify-syntax-entry ?\n ">" table)
;; Treat ::= as sequence of symbols
(modify-syntax-entry ?\: "_" table)
@@ -204,9 +203,8 @@ See `rx' documentation for more information about REGEXPS
param."
:syntax-table bnf-mode-syntax-table
:group 'bnf-mode
;; Comment setup
- (setq-local comment-use-syntax t)
- (setq-local comment-auto-fill-only-comments t)
- (setq-local comment-start "# ")
+ (setq-local comment-use-syntax nil)
+ (setq-local comment-start "; ")
(setq-local comment-end "")
(setq-local font-lock-keyword-face 'php-keyword)
;; Font locking
@@ -215,7 +213,7 @@ See `rx' documentation for more information about REGEXPS
param."
bnf-font-lock-keywords
;; keywords-only
nil
- ;; Regarding RFC-5234
+ ;; Regarding RFC5234
;; The names <rulename>, <Rulename>, <RULENAME>,
;; and <rUlENamE> all refer to the same rule.
t
- [elpa] externals/bnf-mode 6eb06a8 52/74: Make tests easier to read, (continued)
- [elpa] externals/bnf-mode 6eb06a8 52/74: Make tests easier to read, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode 273eabd 31/74: Correct change log formatting (II) [ci skip], Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode 687ee9e 16/74: Angle brackets to use for nonterminals are optional. Changed, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode 83f0e0f 28/74: Code cleanup, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode 96c6e76 61/74: Changed CI deploy token [ci skip], Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode 8dabc6c 63/74: Minor correction to the change log format, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode e898672 73/74: Removed no longer needed local variables, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode f95ec5f 69/74: Improved preparing package, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode 7c98cc9 66/74: Fixed misspelling, updated change log, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode ce5005e 57/74: Install missed dependency on Travis CI, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode f00384e 10/74: Change comment syntax,
Stefan Monnier <=
- [elpa] externals/bnf-mode 7240455 38/74: Improved test reporting, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode 6ce1208 33/74: We're on MELPA. Yay!, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode e5f56ca 35/74: Amended documentation, update change log, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode ac004f6 34/74: Removed the bnf-mode-version function, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode 89660ba 44/74: Removing emacs26-el package solves "Recursive load" issue, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode c836c7c 19/74: Temporarily removed ABNF, amended tests, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode 5b6ff92 41/74: Update copyright, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode e9a5e4a 45/74: Return back comment-start and comment-end, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode 3eda5e7 48/74: This package is NOT part of GNU Emacs, Stefan Monnier, 2019/05/09
- [elpa] externals/bnf-mode ebd9b83 51/74: Added ability to generate info, Stefan Monnier, 2019/05/09