Keeps a count of Preprocessing tokens.
Exception when handling PpTokenCount object.
Exception when handling PpTokenCountStack object.
Maps of {token_type : integer_count, ...} self._cntrTokAll is all tokens.
In-place add of the contents of another PpTokenCount object.
list of weak references to the object (if defined)
Increment the count. tok is a PpToken, isUnCond is a boolean that is True if this is not conditionally compiled. num is the number of tokens to increment.
Returns the token count of a particular type. If isAll is true then the count of all tokens is returned, if False the count of unconditional tokens is returned.
Returns the token count of a particular type. If isAll is true then the count of all tokens is returned, if False the count of unconditional tokens is returned.
Generator the yields (type, count) in PpToken.LEX_PPTOKEN_TYPES order where type is a string and count an integer.
If isAll is true then the count of all tokens is returned, if False the count of unconditional tokens is returned.
If allPossibleTypes is True the counts of all token types are yielded even if zero, if False then only token types encountered will be yielded i.e. all counts will be non-zero.
The total token count.
The token count of conditional tokens.
The token count of unconditional tokens.
This simply holds a stack of PpTokenCount objects that can be created and popped of the stack.
ctor with empty stack.
list of weak references to the object (if defined)
Finalisation, will raise a ExceptionPpTokenCountStack if there is anything on the stack.
Returns a reference to the current PpTokenCount object.
Pops the current PpTokenCount object off the stack and returns it.
Add a new counter object to the stack.