Skip to main content
added 2 characters in body
Source Link
tsp216
  • 101
  • 3

The definition of the variable

< number>::=< digit > | < digit >< number >

where < digit > is defined as

< digit > ::= 1|2|3|4|5

Apparently reflects the following syntax diagram

enter image description here

Please explain why this is the case. I am particularly confused with the clause after the sheffer strokevertical OR line (i.e. < digit >< number >) and whether it has something to do with the fact that number can consist of many digits.

The definition of the variable

< number>::=< digit > | < digit >< number >

where < digit > is defined as

< digit > ::= 1|2|3|4|5

Apparently reflects the following syntax diagram

enter image description here

Please explain why this is the case. I am particularly confused with the clause after the sheffer stroke (i.e. < digit >< number >) and whether it has something to do with the fact that number can consist of many digits.

The definition of the variable

< number>::=< digit > | < digit >< number >

where < digit > is defined as

< digit > ::= 1|2|3|4|5

Apparently reflects the following syntax diagram

enter image description here

Please explain why this is the case. I am particularly confused with the clause after the vertical OR line (i.e. < digit >< number >) and whether it has something to do with the fact that number can consist of many digits.

Source Link
tsp216
  • 101
  • 3

Why does the following Backus-Naur form reflect the following syntax diagram?

The definition of the variable

< number>::=< digit > | < digit >< number >

where < digit > is defined as

< digit > ::= 1|2|3|4|5

Apparently reflects the following syntax diagram

enter image description here

Please explain why this is the case. I am particularly confused with the clause after the sheffer stroke (i.e. < digit >< number >) and whether it has something to do with the fact that number can consist of many digits.