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

[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>          ::=
 



reply via email to

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