views:

136

answers:

1

I want to apply rules of BNF Grammar to produce derivation for : a_Num

+3  A: 

Your question is a bit vague. But below is a BNF (ish) grammar for an integer number.

nz_digit   = '1' | ... | '9';
digit      = '0' | nz_digit;
digitseq   = digit | digitseq, digit;

num        =  '0' | nz_digit, digitseq;
Gamecat
That's for an unsigned int, depending on the context one might need the minus sign, too.
johannes
Agreed, but he can add that himself, I just gave some basic example.
Gamecat