class symbol_kind¶
Enumeration class: the kind of a symbol .
symbol_kind Members¶
| Constructors | none |
| Static Method | from_integer() |
| Methods | __cmp__(), __eq__(), __ge__(), __gt__(), __hash__(), __le__(), __lt__(), __ne__(), __repr__(), __str__(), as_integer(), name() |
| Attributes | FUNCTION, HEAP, INTERMEDIATE, INTERNAL, LABEL, PARAM, RESULT, RETURN, STRING, SUBOBJ, USER |
symbol_kind Details¶
-
class
cs.symbol_kind¶ Enumeration class: the kind of a
symbol.-
static
from_integer(_inner)¶ Construct an instance from an integer representation.
Parameters: _inner (int) – The integer representation, as returned by symbol_kind.as_integer().Return type: symbol_kindRaises: result.ERROR_INVALID_ARGUMENTif_inneris not a valid integer representation for asymbol_kindinstance.Invariant: For
symbol_kindx, symbol_kind.from_integer(x.as_integer()) == x>>> sk = symbol_kind.SUBOBJ.as_integer() >>> sk 10 >>> symbol_kind.from_integer(sk) <cs.symbol_kind subobj>
-
__cmp__(other)¶ Comparison function for
symbol_kind, with respect to a stable overall ordering.Parameters: other ( symbol_kind) – Thesymbol_kindobject to compare against.Return type: int Returns: An integer N such that: - N==0 if the two objects compare equal
- N<0 if
self< other - N>0 if
self> other
>>> symbol_kind.INTERMEDIATE.__cmp__(symbol_kind.RESULT) -1
-
__eq__(b)¶ Equality operator for
symbol_kind.Parameters: b ( symbol_kind) – Thesymbol_kindobject to compare against.Return type: bool Returns: Trueifselfandbcompare equal,Falseotherwise.>>> symbol_kind.HEAP == symbol_kind.STRING False
-
__ge__(b)¶ Greater-than-or-equal operator for
symbol_kind.Parameters: b ( symbol_kind) – Thesymbol_kindobject to compare against.Return type: bool Returns: Trueifself>=b,Falseotherwise.>>> symbol_kind.INTERNAL >= symbol_kind.USER True
-
__gt__(b)¶ Greater-than operator for
symbol_kind.Parameters: b ( symbol_kind) – Thesymbol_kindobject to compare against.Return type: bool Returns: Trueifself>b,Falseotherwise.>>> symbol_kind.PARAM > symbol_kind.LABEL False
-
__hash__()¶ Hash function for
symbol_kind.Return type: int >>> hash(symbol_kind.RETURN) 3
-
__le__(b)¶ Less-than-or-equal operator for
symbol_kind.Parameters: b ( symbol_kind) – Thesymbol_kindobject to compare against.Return type: bool Returns: Trueifself<=b,Falseotherwise.>>> symbol_kind.SUBOBJ <= symbol_kind.INTERNAL False
-
__lt__(b)¶ Less-than operator for
symbol_kind.Parameters: b ( symbol_kind) – Thesymbol_kindobject to compare against.Return type: bool Returns: Trueifself<b,Falseotherwise.>>> symbol_kind.PARAM < symbol_kind.USER False
-
__ne__(b)¶ Inequality operator for
symbol_kind.Parameters: b ( symbol_kind) – Thesymbol_kindobject to compare against.Return type: bool Returns: Falseifselfandbcompare equal,Trueotherwise.>>> symbol_kind.INTERMEDIATE != symbol_kind.FUNCTION True
-
__repr__()¶ Get a representation of a
symbol_kindobject that includes information useful for debugging.Return type: str Returns: The string representation. >>> repr(symbol_kind.SUBOBJ) '<cs.symbol_kind subobj>'
-
__str__()¶ Get a simple string representation of a
symbol_kindobject.Return type: str Returns: The string representation. >>> str(symbol_kind.LABEL) 'label'
-
as_integer()¶ Get an integer representation of
self.Return type: int Returns: An integer suitable for use with symbol_kind.from_integer().Invariant: For
symbol_kindx, symbol_kind.from_integer(x.as_integer()) == x>>> sk = symbol_kind.SUBOBJ.as_integer() >>> sk 10 >>> symbol_kind.from_integer(sk) <cs.symbol_kind subobj>
-
name()¶ Get the name of a
symbol_kindobject.Return type: str Returns: The name. >>> symbol_kind.RESULT.name() 'result'
-
INTERMEDIATE¶ Kind intermediate.
>>> symbol_kind.INTERMEDIATE <cs.symbol_kind intermediate>
-
static