"Hints for implementors" section

In the current "Hints to implementors" section, it explains how to translate the repetition constructs into simple constructs:

Optional factor:

f? ⇒ f-option
-f-option: f; .

Zero or more repetitions:

f* ⇒ f-star
-f-star: f, f-star; .

One or more repetitions:

f+ ⇒ f-plus
-f-plus: f, f-star.
-f-star: f, f-star; .

One or more repetitions with separator:

f+sep ⇒ f-plus-sep
-f-plus-sep: f, sep-part-option. 
-sep-part-option: sep, f-plus-sep; .

Zero or more repetitions with separator:

f*sep ⇒ f-star-sep
-f-star-sep: f-plus-sep; .
-f-plus-sep: f, sep-part-option.
-sep-part-option: sep, f-plus-sep; .

This could be done shorter in the following way. Do you consider it an improvement? (The first two are the same)

Optional factor:

f? ⇒ f-option
-f-option: f; .

Zero or more repetitions:

f* ⇒ f-star
-f-star: f, f-star; .

One or more repetitions:

f+ ⇒ f-plus
-f-plus: f, f*.


One or more repetitions with separator:

f+sep ⇒ f-plus-sep
-f-plus-sep: f, (sep, f-plus-sep)?.

Zero or more repetitions with separator:

f*sep ⇒ f-star-sep
-f-star-sep: f+sep; .
Steven

Received on Thursday, 2 December 2021 09:58:06 UTC