PragmaHandler

exception cpip.core.PragmaHandler.ExceptionPragmaHandler

Simple specialisation of an exception class for the PragmaHandler. If raised this will cause the PpLexer to register undefined behaviour.

exception cpip.core.PragmaHandler.ExceptionPragmaHandlerStopParsing

Exception class for the PragmaHandler to stop parsing token stream.

class cpip.core.PragmaHandler.PragmaHandlerABC

Abstract base class for a pragma handler.

pragma(theTokS)

Takes a list of PpTokens, processes then and should return a newline terminated string that will be preprocessed in the current environment.

replaceTokens

An boolean attribute that says whether the supplied tokens should be macro replaced before being passed to self.

class cpip.core.PragmaHandler.PragmaHandlerNull

A pragma handler that does nothing.

pragma(theTokS)

Consume and return.

replaceTokens

Tokens do not require macro replacement.

class cpip.core.PragmaHandler.PragmaHandlerSTDC

Base class for a pragma handler that implements ISO/IEC 9899:1999 (E) 6.10.5 Error directive para. 2.

DIRECTIVES = ('FP_CONTRACT', 'FENV_ACCESS', 'CX_LIMITED_RANGE')

Standard C acceptable macro directives

ON_OFF_SWITCH_STATES = ('ON', 'OFF', 'DEFAULT')

Standard C macro states

STDC = 'STDC'

Standard C macro

pragma(theTokS)

Inject a macro declaration into the environment.

See ISO/IEC 9899:1999 (E) 6.10.5 Error directive para. 2.

replaceTokens

STDC lines do not require macro replacement.

Previous topic

PpWhitespace

Next topic

cpip.util

This Page