closed EBNF add notation elements as rules?

0 votes
asked Oct 7, 2022 in Wanted features by Todd Musheno (2,680 points)
closed Nov 8, 2022 by Todd Musheno
If creole is added to at least terminals (no reason not to add it for all nodes).

The case where people do funky things could be easily distinguished by adding some style to elements the require special handeling...

In the case of a didget one could either add terminals for 0,1,2,3,4,5,6,7,8,9... or do something like "<#FF8080>0-9" to distinguish between a regular termal, and something like a range, or regex.

I am open to alternatives to how this is done... could use differant quotes (" vs ') to change style maybe?
commented Oct 7, 2022 by Todd Musheno (2,680 points)

To clarify:

This should be colored differant from rules, terminals, and "note"s.

A some ebnf syntax documents define some terminals via documentation, not ebnf...

for example

the terminal "JavaLetter" is NOT defined by production rules, nor terminals, it simply states:

any Unicode character that is a "Java letter"

and then in the docuement it further denotes:

A "Java letter" is a character for which the method Character.isJavaIdentifierStart(int) returns true.

So in this case the syntax is incomplete in the ebnf itself, but one can determine what is and is not a valid "Java Letter" by other means.

commented Oct 7, 2022 by Todd Musheno (2,680 points)
Please note how the ebnf linked is all normal text, where as the stuff that references stuff outside the ebnf is italic.

Support for the "italicness" (please do not think I am suggesting italic must be how this is visually denoted) you see in the java lang spec is all this ticket is asking for.
commented Oct 7, 2022 by Todd Musheno (2,680 points)

Finally to kick the dead horse, there are currently 3 types of nodes:

  • Rule headers (currently looks like bold text)
  • Rule usages (currently light grey bubbles)
  • Terminals (currently white bubbles)
I would suggest we add (including the notes ticket):
  • Notes (I suggest the same yellow used elseware)
  • Notations (this would be almost identical to terminals, but in a another visual style, could be another color, or some icon, etc...)