zenilib: sources.SourceProcessor Class Reference

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Public Attributes | List of all members
sources.SourceProcessor Class Reference

SOURCE PROCESSOR CLASS. More...

## Public Member Functions

def | __init__
def | add_block_lines
def | dump
def | parse_file
def | process_normal_line
def | reset

## Public Attributes

| blocks
| filename
| format
| lineno
| lines

## Detailed Description

SOURCE PROCESSOR CLASS.

The SourceProcessor is in charge of reading a C source file and decomposing it into a series of different "SourceBlock" objects.

each one of these blocks can be made of the following data:

- A documentation comment block that starts with "/**" and whose exact format will be discussed later
- normal sources lines, include comments

Definition at line 270 of file sources.py.

## Constructor & Destructor Documentation

def sources.SourceProcessor.__init__ | ( |  | self | ) |

    initialize a source processor

Definition at line 272 of file sources.py.

## Member Function Documentation

def sources.SourceProcessor.add_block_lines | ( |  | self | ) |

    add the current accumulated lines and create a new block

Definition at line 332 of file sources.py.

References sources.SourceBlock.filename, sources.SourceProcessor.filename, PCF_TableRec_.format, GXV_opbd_DataRec_.format, GXV_lcar_DataRec_.format, TT_CMap_ClassRec_.format, TT_CMapInfo_.format, CFF_EncodingRec_.format, CFF_CharsetRec_.format, FT_GlyphRec_.format, bdf_property_t_.format, CFF_FDSelectRec_.format, sources.SourceBlock.format, TT_NameTableRec_.format, sources.SourceProcessor.format, PFR_GlyphRec_.format, FTC_SBitRec_.format, FT_GlyphSlotRec_.format, sources.SourceBlock.lineno, sources.SourceProcessor.lineno, content.DocCode.lines, content.DocPara.lines, sources.SourceBlock.lines, and sources.SourceProcessor.lines.

Referenced by sources.SourceProcessor.process_normal_line().

def sources.SourceProcessor.dump | ( |  | self | ) |

    print all blocks in a processor

Definition at line 342 of file sources.py.

References formatter.Formatter.blocks, internal_state.blocks, sources.SourceProcessor.blocks, and content.DocSection.blocks.

def sources.SourceProcessor.parse_file | ( |  | self,
|  |  | filename
| ) |  |

    parse a C source file, and add its blocks to the processor's list

Definition at line 284 of file sources.py.

References sources.SourceBlock.filename, sources.SourceProcessor.filename, PCF_TableRec_.format, GXV_lcar_DataRec_.format, GXV_opbd_DataRec_.format, TT_CMap_ClassRec_.format, TT_CMapInfo_.format, CFF_EncodingRec_.format, CFF_CharsetRec_.format, FT_GlyphRec_.format, bdf_property_t_.format, CFF_FDSelectRec_.format, sources.SourceBlock.format, TT_NameTableRec_.format, sources.SourceProcessor.format, PFR_GlyphRec_.format, FTC_SBitRec_.format, FT_GlyphSlotRec_.format, DetectCallDepth::FunctionNode.reset(), pp::Token.reset(), sources.SourceProcessor.reset(), T1_Hints_FuncsRec_.reset, and content.ContentProcessor.reset().

def sources.SourceProcessor.process_normal_line | ( |  | self,
|  |  | line
| ) |  |

    process a normal line and check whether it is the start of a new block

Definition at line 322 of file sources.py.

References sources.SourceProcessor.add_block_lines(), PCF_TableRec_.format, GXV_lcar_DataRec_.format, GXV_opbd_DataRec_.format, TT_CMap_ClassRec_.format, TT_CMapInfo_.format, CFF_EncodingRec_.format, CFF_CharsetRec_.format, FT_GlyphRec_.format, bdf_property_t_.format, CFF_FDSelectRec_.format, sources.SourceBlock.format, TT_NameTableRec_.format, sources.SourceProcessor.format, PFR_GlyphRec_.format, FTC_SBitRec_.format, FT_GlyphSlotRec_.format, sources.SourceBlock.lineno, and sources.SourceProcessor.lineno.

def sources.SourceProcessor.reset | ( |  | self | ) |

    reset a block processor, clean all its blocks

Definition at line 279 of file sources.py.

References formatter.Formatter.blocks, internal_state.blocks, sources.SourceProcessor.blocks, content.DocSection.blocks, PCF_TableRec_.format, GXV_lcar_DataRec_.format, GXV_opbd_DataRec_.format, TT_CMap_ClassRec_.format, TT_CMapInfo_.format, CFF_EncodingRec_.format, CFF_CharsetRec_.format, bdf_property_t_.format, FT_GlyphRec_.format, CFF_FDSelectRec_.format, sources.SourceBlock.format, TT_NameTableRec_.format, sources.SourceProcessor.format, PFR_GlyphRec_.format, FTC_SBitRec_.format, and FT_GlyphSlotRec_.format.

Referenced by sources.SourceProcessor.parse_file().

## Member Data Documentation

sources.SourceProcessor.blocks

Definition at line 274 of file sources.py.

Referenced by sources.SourceProcessor.dump(), and sources.SourceProcessor.reset().

sources.SourceProcessor.filename

Definition at line 275 of file sources.py.

Referenced by sources.SourceProcessor.add_block_lines(), and sources.SourceProcessor.parse_file().

sources.SourceProcessor.format

Definition at line 276 of file sources.py.

Referenced by sources.SourceProcessor.add_block_lines(), sources.SourceProcessor.parse_file(), sources.SourceProcessor.process_normal_line(), and sources.SourceProcessor.reset().

sources.SourceProcessor.lineno

Definition at line 292 of file sources.py.

Referenced by sources.SourceProcessor.add_block_lines(), and sources.SourceProcessor.process_normal_line().

sources.SourceProcessor.lines

Definition at line 277 of file sources.py.

Referenced by sources.SourceProcessor.add_block_lines().

The documentation for this class was generated from the following file:

- zenilib/jni/external/freetype2/src/tools/docmaker/sources.py