public static class Parser.SizeBase
extends java.lang.Object
Parser.SizeBase
encapsulates literal size/base information.Constructor and Description |
---|
SizeBase()
Constructs a default size/base object.
|
SizeBase(int bitSize,
boolean isSigned,
int base)
Constructs a size/base object.
|
Modifier and Type | Method and Description |
---|---|
int |
getBase()
Returns the number system of the literal.
|
int |
getBitSize()
Returns the bit size of the literal.
|
int |
getBitsPerDigit()
Returns the number of bits per digit.
|
boolean |
isSigned()
Returns the signed/unsigned flag of the literal.
|
boolean |
isUndefined()
Checks whether size/base information is undefined.
|
void |
setBase(int base)
Sets the number system of the literal.
|
void |
setBitSize(int bitSize)
Sets the bit size of the literal.
|
void |
setSigned(boolean isSigned)
Sets the signed/unsigned flag of the literal.
|
public SizeBase(int bitSize, boolean isSigned, int base)
bitSize
- the bit size of the literal.isSigned
- the signed/unsigned flag.base
- the number system of the literal (2, 8, 10 or 16).public SizeBase()
public int getBitSize()
public void setBitSize(int bitSize)
bitSize
- the bit size to be set.public boolean isSigned()
true
iff the literal is signed.public void setSigned(boolean isSigned)
isSigned
- the flag to be set.public int getBase()
public void setBase(int base)
base
- the number system to be set.public int getBitsPerDigit()
public boolean isUndefined()
true
iff the information is undefined.