DR 17-0029: Proposal to reorganize the EBNF in 18.17.2.3

MURATA Makoto eb2m-mrt at asahi-net.or.jp
Wed Oct 24 06:30:56 CEST 2018


Dear colleagues,

If you try to carefully read the EBNF in 18.17.2.3, you will
immediately be overwhelmed by its complexity.  If you spend a bit of
time, you will find that the complexity is caused by two sets of very
similar rules.  One is for *unquoted* worksheet prefixes and another
is for *quoted* worksheet prefixes.

If you give up the idea of using the EBNF to distinguish what is to be
quoted and what is not, you can merge the two sets into one set.  The
result is a very readable EBNF:

cell-reference=
  name
  | [work-sheet-prefix, "!"] A1-reference
  | [work-sheet-prefix, "!"] A1-reference, ":", A1-reference
  | [work-sheet-prefix, "!"] R1C1-reference
  | [work-sheet-prefix, "!"] R1C1-reference, ":", R1C1-reference ;

work-sheet-prefix=
  sheet-name
    | apostrophe,  sheet-name,  apostrophe

  |   sheet-name,  ":",  sheet-name
    |   apostrophe,  sheet-name,  ":", sheet-name,  apostrophe

  |   "[",  workbook-name,  "]",  sheet-name,  ":",  sheet-name
    |   apostrophe,  "[",  workbook-name,  "]", sheet-name,  apostrophe

  |   "[",  workbook-name,  "]", sheet-name,
            ":",  sheet-name
    |   apostrophe,  "[",  workbook-name,  "]", sheet-name,
            ":",  sheet-name,  apostrophe ;

workbook-name=   % A sequence of one or more characters that satisfies
constraint X %

sheet-name=   % A sequence of one or more characters that satisfies
constraint Y %

apostrophe=   "'"  ;   (* one apostrophe character *)

Constraint X: A workbook name in a worksheet index may contain
operator characters, "'", "[" , "]" , and "?" only when the worksheet
index is quoted by the apostrophe character.  (This constraint has
to  be adjusted more.)

Constraint Y: A sheet name in a worksheet index may contain operator
characters, "'", "[" , "]" , "\", and "?" only when the worksheet
index is quoted by the apostrophe character.  (This constraint has
to  be adjusted more.)

While constructing this EBNF, I find that work-sheet-prefix-special has

   apostrophe,  sheet-name-special,  ":", sheet-name-special,  apostrophe,
"!"

as a possibility but work-sheet-prefix does not have

   sheet-name,  ":", sheet-name,  "!"

Is this a mistake?  (I suppose so.)

We should also introduce some normative text for encouraging quoting
when it is required.  (This is missing in the published standard.)

Regards,
Makoto


This message has been scanned for malware by Forcepoint. www.forcepoint.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.vse.cz/pipermail/sc34wg4/attachments/20181024/078573ab/attachment.html>


More information about the sc34wg4 mailing list