In reply to dave_59:
So this means if i just use ``I , the expansion of macro `abc(1,a) would be :
assign abc[1] == R.duI_clk_x . Since its not defined as a separate token ??
Yes, that would be the result.
Both R and I are arguments to the macro so why you say that no
Ris needed where asIis needed. Is it because the left hand side has no dependency on R or is it because R is not breaking the lexical variable ?
Correct again. What you call a lexical variable is what the compiler calls a token identifier. The compiler grabs text in chunks called tokens, before it knows what the identifier is (variable, typedef, module name). An identifier starts with a letter, followed by any number of alpha-numeric characters, as well as _(underscore). Any other character ends the token.
So here
Iis not used, why ?
Only [I] is needed because I is surrounded by characters that are not part of token identifiers.