[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/bnf-mode e99dd39 35/36: Amended documentation
From: |
Stefan Monnier |
Subject: |
[elpa] externals/bnf-mode e99dd39 35/36: Amended documentation |
Date: |
Wed, 17 Mar 2021 18:40:20 -0400 (EDT) |
branch: externals/bnf-mode
commit e99dd39d8e90d8fd0854fa7076a1efb586904c56
Author: Serghei Iakovlev <egrep@protonmail.ch>
Commit: Serghei Iakovlev <egrep@protonmail.ch>
Amended documentation
---
bnf-mode.info | 54 ++++++++++++++++++++++++++++++++++++++++++------------
bnf-mode.texi | 30 ++++++++++++++++++++++++++++++
test/bnf.bnf | 29 +++++++++++++++--------------
3 files changed, 87 insertions(+), 26 deletions(-)
diff --git a/bnf-mode.info b/bnf-mode.info
index 1915db2..576bdc3 100644
--- a/bnf-mode.info
+++ b/bnf-mode.info
@@ -68,6 +68,36 @@ it provides basic syntax and font-locking for BNF files.
BNF notation
is supported exactly form as it was first announced in the ALGOL 60
report.
+ Bellow canonical BNF notation represented with a BNF is presented.
+The syntax of the BNF has been carefully copied from Revised ALGOL 60
+report. For more see <http://www.masswerk.at/algol60/report.htm>.
+
+ <syntax> ::= <rule> | <rule> <syntax>
+ <rule> ::= <opt-ws> < <rule-name> > <opt-ws>
+ ::= <opt-ws> <expression> <line-end>
+ <opt-ws> ::= <space> <opt-ws> | <empty>
+ <expression> ::= <list> | <list> <opt-ws> <or> <opt-ws>
+ <expression>
+ <line-end> ::= <opt-ws> <EOL> | <line-end> <line-end>
+ <list> ::= <term> | <term> <opt-ws> <list>
+ <term> ::= <literal> | < <rule-name> >
+ <literal> ::= <character> <text>
+ <character> ::= <letter> | <digit> | <symbol>
+ <letter> ::= A | B | C | D | E | F | G | H | I | J | K | L |
+ M | N | O | P | Q | R | S | T | U | V | W | X |
+ Y | Z | a | b | c | d | e | f | g | h | i | j |
+ k | l | m | n | o | p | q | r | s | t | u | v |
+ w | x | y | z
+ <digit> ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
+ <symbol> ::= <or> | <space> | ! | # | $ | % | & | ( | ) |
+ * | + | , | - | . | / | : | ~ | > | = | < | ? |
+ @ | [ | \ | ] | ^ | _ | ` | ' | " | { | } | ;
+ <rule-name> ::= <letter> | <rule-name> <rule-char>
+ <rule-char> ::= <letter> | <digit> | -
+ <space> ::= <space, tab or new line character>
+ <or> ::= |
+ <empty> ::=
+
File: bnf-mode.info, Node: Installation, Next: Usage, Prev: Introduction,
Up: Top
@@ -331,18 +361,18 @@ Variable Index
Tag Table:
Node: Top1103
Node: Introduction1802
-Node: Installation2140
-Node: Installing from Elpa or Melpa2662
-Node: Installing using El-get4879
-Node: Installing from the Git Repository5558
-Node: Usage6459
-Node: Customizing6744
-Node: Project Links7421
-Node: Bugs Tracker7592
-Node: Change Log7825
-Node: Bibliography8074
-Node: Index9232
-Node: Variable Index9939
+Node: Installation3803
+Node: Installing from Elpa or Melpa4325
+Node: Installing using El-get6542
+Node: Installing from the Git Repository7221
+Node: Usage8122
+Node: Customizing8407
+Node: Project Links9084
+Node: Bugs Tracker9255
+Node: Change Log9488
+Node: Bibliography9737
+Node: Index10895
+Node: Variable Index11602
End Tag Table
diff --git a/bnf-mode.texi b/bnf-mode.texi
index 429c85b..24b6c74 100644
--- a/bnf-mode.texi
+++ b/bnf-mode.texi
@@ -92,6 +92,36 @@ Presently it provides basic syntax and font-locking for BNF
files.
BNF notation is supported exactly form as it was first announced in
the ALGOL 60 report.
+Bellow canonical BNF notation represented with a BNF is presented. The syntax
of the BNF has been carefully copied from Revised ALGOL 60 report. For more
see @url{http://www.masswerk.at/algol60/report.htm}.
+
+@example
+<syntax> ::= <rule> | <rule> <syntax>
+<rule> ::= <opt-ws> < <rule-name> > <opt-ws>
+ ::= <opt-ws> <expression> <line-end>
+<opt-ws> ::= <space> <opt-ws> | <empty>
+<expression> ::= <list> | <list> <opt-ws> <or> <opt-ws>
+ <expression>
+<line-end> ::= <opt-ws> <EOL> | <line-end> <line-end>
+<list> ::= <term> | <term> <opt-ws> <list>
+<term> ::= <literal> | < <rule-name> >
+<literal> ::= <character> <text>
+<character> ::= <letter> | <digit> | <symbol>
+<letter> ::= A | B | C | D | E | F | G | H | I | J | K | L |
+ M | N | O | P | Q | R | S | T | U | V | W | X |
+ Y | Z | a | b | c | d | e | f | g | h | i | j |
+ k | l | m | n | o | p | q | r | s | t | u | v |
+ w | x | y | z
+<digit> ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
+<symbol> ::= <or> | <space> | ! | # | $ | % | & | ( | ) |
+ * | + | @comma{} | - | . | / | : | ~ | > | = | < | ? |
+ @atchar{} | [ | @backslashchar{} | ] | ^ | _ | ` | ' | "
| @{ | @} | ;
+<rule-name> ::= <letter> | <rule-name> <rule-char>
+<rule-char> ::= <letter> | <digit> | -
+<space> ::= <space, tab or new line character>
+<or> ::= |
+<empty> ::=
+@end example
+
@node Installation
@chapter Installation
diff --git a/test/bnf.bnf b/test/bnf.bnf
index c539e0a..54913c0 100644
--- a/test/bnf.bnf
+++ b/test/bnf.bnf
@@ -4,27 +4,28 @@
;; <http://www.masswerk.at/algol60/report.htm>.
<syntax> ::= <rule> | <rule> <syntax>
- <rule> ::= <opt-whitespace> < <rule-name> > <opt-whitespace>
- ::= <opt-whitespace> <expression> <line-end>
- <opt-whitespace> ::= <space> <opt-whitespace> | <empty>
- <expression> ::= <list> | <list> <opt-whitespace> <or> <opt-whitespace>
+ <rule> ::= <opt-ws> < <rule-name> > <opt-ws>
+ ::= <opt-ws> <expression> <line-end>
+ <opt-ws> ::= <space> <opt-ws> | <empty>
+ <expression> ::= <list> | <list> <opt-ws> <or> <opt-ws>
<expression>
- <line-end> ::= <opt-whitespace> <EOL> | <line-end> <line-end>
- <list> ::= <term> | <term> <opt-whitespace> <list>
+ <line-end> ::= <opt-ws> <EOL> | <line-end> <line-end>
+ <list> ::= <term> | <term> <opt-ws> <list>
<term> ::= <literal> | < <rule-name> >
<literal> ::= <character> <text>
<character> ::= <letter> | <digit> | <symbol>
- <letter> ::= A | B | C | D | E | F | G | H | I | J | K | L | M | N |
- O | P | Q | R | S | T | U | V | W | X | Y | Z | a | b |
- c | d | e | f | g | h | i | j | k | l | m | n | o | p |
- q | r | s | t | u | v | w | x | y | z
+ <letter> ::= A | B | C | D | E | F | G | H | I | J | K | L |
+ M | N | O | P | Q | R | S | T | U | V | W | X |
+ Y | Z | a | b | c | d | e | f | g | h | i | j |
+ k | l | m | n | o | p | q | r | s | t | u | v |
+ w | x | y | z
<digit> ::= 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
- <symbol> ::= <or> | <space> | ! | # | $ | % | & | ( | ) | * | + |
- , | - | . | / | : | ~ | > | = | < | ? | @ | [ | \ | ] |
- ^ | _ | ` | ' | ‘ | ’ | " | “ | ” | { | } | ;
+ <symbol> ::= <or> | <space> | ! | # | $ | % | & | ( | ) |
+ * | + | , | - | . | / | : | ~ | > | = | < | ? |
+ @ | [ | \ | ] | ^ | _ | ` | ' | " | { | } | ;
<rule-name> ::= <letter> | <rule-name> <rule-char>
<rule-char> ::= <letter> | <digit> | -
- <space> ::= <any whitespace character including \t and \n>
+ <space> ::= <space, tab or new line character>
<or> ::= |
<empty> ::=
- [elpa] externals/bnf-mode d697e0a 10/36: Migrate tests to use buttercup, (continued)
- [elpa] externals/bnf-mode d697e0a 10/36: Migrate tests to use buttercup, Stefan Monnier, 2021/03/17
- [elpa] externals/bnf-mode 4ba8d28 14/36: Load undercover first to improve coverage report, Stefan Monnier, 2021/03/17
- [elpa] externals/bnf-mode 62238ee 16/36: Cleaned up Makefile, Stefan Monnier, 2021/03/17
- [elpa] externals/bnf-mode a3b6d86 21/36: Update change log, Stefan Monnier, 2021/03/17
- [elpa] externals/bnf-mode 8948987 20/36: Rename bnf-test-face-at => bnf-get-face-at, Stefan Monnier, 2021/03/17
- [elpa] externals/bnf-mode 2756c7c 26/36: Use default abbrev table provided by define-derived-mode, Stefan Monnier, 2021/03/17
- [elpa] externals/bnf-mode b9a8446 25/36: Refactor test to use shorten font lock helpers, Stefan Monnier, 2021/03/17
- [elpa] externals/bnf-mode d8cb802 27/36: Amended tests, Stefan Monnier, 2021/03/17
- [elpa] externals/bnf-mode 27e45bd 31/36: Cleaned up syntax table, Stefan Monnier, 2021/03/17
- [elpa] externals/bnf-mode a4fe013 33/36: Bump version, Stefan Monnier, 2021/03/17
- [elpa] externals/bnf-mode e99dd39 35/36: Amended documentation,
Stefan Monnier <=
- [elpa] externals/bnf-mode 0f7ebc1 17/36: Move revision number to the common place, Stefan Monnier, 2021/03/17
- [elpa] externals/bnf-mode 4d9ca0a 22/36: Updated documentation, Stefan Monnier, 2021/03/17
- [elpa] externals/bnf-mode e3489f3 24/36: Use years range in copyright notice, Stefan Monnier, 2021/03/17
- [elpa] externals/bnf-mode 639628a 28/36: Added generic test suite, Stefan Monnier, 2021/03/17
- [elpa] externals/bnf-mode 5856e25 29/36: Fixed comments recognition in ALGOL 60 style, Stefan Monnier, 2021/03/17
- [elpa] externals/bnf-mode 1e7e342 32/36: Removed support of ALGOL 60 style comments, Stefan Monnier, 2021/03/17
- [elpa] externals/bnf-mode d88eef6 36/36: Merge pull request #15 from sergeyklay/refactor-tests, Stefan Monnier, 2021/03/17