我使用的符号是什么?

What is the notation I'm using called?

我在 IBM 手册和其他地方(下面的示例)看到的表示法叫什么?

[Mr.|Ol’] Slome[{r|Dog|Dawg}] 

[] 表示 "optional"

| 表示 "choose one"

{}表示"not optional"

所以上面的示例允许: 斯洛默先生 老斯洛姆 斯洛姆狗 斯洛姆狗先生 和其他一些人。

我以为它是巴科斯-诺尔氏症的一种形式,直到我用谷歌搜索并感到困惑。

(我问是因为我打算使用这些符号 [以及其他符号] 启用输入、解析它并执行用户请求的任何操作。所以虽然这不是严格意义上的编程问题,但它是与我打算实现的一个编程概念有关。如果仍然不合法,可以;删除它。)

它可能是 BNF 的不同变体之一,特别是称为扩展巴科斯-诺尔形式的变体。 但是,在这种形式中,{} 表示重复。

摘自IBM PL/I for MVS & VM Programming Guide Release 1.1

How to Read the Notational Symbols
Some of the programming syntax in this book is presented using notational
symbols. This is to maintain consistency with descriptions of the same syntax in
other IBM publications, or to allow the syntax to be shown on single lines within a
table or heading.
 Braces, { }, indicate a choice of entry. Unless an item is underlined, indicating
a default, or the items are enclosed in brackets, you must choose at least one
of the entries.
 Items separated by a single vertical bar, |, are alternative items. You can
select only one of the group of items separated by single vertical bars. (Double
vertical bars, ||, specify a concatenation operation, not alternative items. See
the PL/I for MVS & VM Language Reference for more information on double
vertical bars.)
 Anything enclosed in brackets, [ ], is optional. If the items are vertically
stacked within the brackets, you can specify only one item.

它还在继续。也许 "name" 是 "IBM notational symbol syntax"。它在过去对我有用,现在对我也有用。