Give a grammer for the set of integer number in c.
Answers
Answered by
1
Your syntax allows +0, 01, and +09. Try this instead
(number) ::= 0 | (nonzero unsigned number) | (sign)(nonzero unsigned number)
(sign) ::= + | -
(nonzero unsigned number) ::= (nonzero digit)(digits)
(nonzero digit) ::= 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
(digit) ::= 0 | (nonzero digit)
(digits) ::= | (digits)(digit)
Answered by
1
Answer:
hope it help you
mark me as Brainliest
Attachments:
Similar questions