Suppose we have the number at the format of " 3'b11 ".
I didnt find a rule derives from expr_primary or number, for recognising this.
Also, after finding the rule, I want to know how we can get every value ("3" , "b" , "11"), and how we know the number of digits (or different the length) of every previous number.
I nowhere found a rule to have a token or something about the "b" (base format) of the number.
I have been very busy with other things and have not had time to reply before now.
I don't have code available at the moment, but as I remember there is a grammar rule that defines this. I think the width is separate from the base and digits. The base is matched and checked in C++ code at the end of the lexor.lex file. I think the grammar puts the width in a global that the lexor uses when it matches the base and digits. The normal way to find this kind of information is to look at the grammar and find where this must exist and then track back until you find the grammar or lexor rule that defines what you are looking for.
I hope this helps. If you absolutely can not find this I can look it up.
Cary 04:23, 26 August 2009 (UTC)