Package qm :: Package test :: Package classes :: Module compiler :: Class GCC
[hide private]
[frames] | no frames]

Class GCC

source code

Compiler --+
           |
          GCC

A 'GCC' is a GNU Compiler Collection compiler.

Instance Methods [hide private]
 
ParseOutput(self, output, ignore_regexps=())
Return the 'Diagnostic's indicated in the 'output'.
source code

Inherited from Compiler: Compile, ExecuteCommand, GetCompilationCommand, GetExecutableExtension, GetLDFlags, GetObjectExtension, GetOptions, GetPath, SetLDFlags, SetOptions, __init__

Inherited from Compiler (private): _GetModeSwitches

Class Variables [hide private]
  _severities = ['warning', 'error']
The diagnostic severities generated by the compiler.
  _severity_regexps = {'warning': re.compile('^(?P<file>[^:]*):(...
A map from severities to compiled regular expressions.
  _internal_error_regexp = re.compile('Internal (compiler )?error')
A compiled regular expression.
  MODE_PRECOMPILE = "precompile"
Precompile a header file.
  modes = Compiler.modes+ [MODE_PRECOMPILE]
The available compilation modes.

Inherited from Compiler: MODE_ASSEMBLE, MODE_COMPILE, MODE_LINK, MODE_PREPROCESS

Method Details [hide private]

ParseOutput(self, output, ignore_regexps=())

source code 

Return the 'Diagnostic's indicated in the 'output'.

'output' -- A string giving the output from the compiler.

'ignore_regexps' -- A sequence of regular expressions. If a diagnostic message matches one of these regular expressions, it will be ignored.

returns -- A list of 'Diagnostic's corresponding to the messages indicated in 'output', in the order that they were emitted.

Overrides: Compiler.ParseOutput

Class Variable Details [hide private]

_severities

The diagnostic severities generated by the compiler. Order matters; the order given here is the order that the '_severity_regexps' will be tried.

Value:
['warning', 'error']

_severity_regexps

A map from severities to compiled regular expressions. If the regular expression matches a line in the compiler output, then that line indicates a diagnostic with the indicated severity.

Value:
{'warning': re.compile('^(?P<file>[^:]*):((?P<line>[^:]*):)?' '(\s*(?P\
<column>[0-9]+):)? ' 'warning: (?P<message>.*)$'), 'error': re.compile\
('^(?P<file>[^:]*):((?P<line>[^:]*):)?' '(\s*(?P<column>[0-9]+):)? ' '\
(?P<message>.*)$')}

_internal_error_regexp

A compiled regular expression. When an error message is matched by this regular expression, the error message indicates an internal error in the compiler.

Value:
re.compile('Internal (compiler )?error')