System verilog allows numeric constants like this:
32'hdead_beef this is equivalent to the c value of 0xdeadbeef
System verilog allows the bit width to be defined as well as the base.
In general it is
<bit-width-in-decimal>'<base><digits-and-underscore>
<base> can be:
The underscore is ignored by the parser and is used for human readability. The hex digits are case insensitive.
The question is how to describe to calc this style of numbers.
I presume I will have to define a new language to calc. (it supports c/c++, Pascal, Fortran, and others.)
Is there a tutorial for how to add new calc languages?
Is there a special "syntax" table or regular expression that describes the input format?
Thanks for any help
Ian
User contributions licensed under CC BY-SA 3.0