module documentation

# Dedicated module for the syntax of all the parsing # All tokens inherit a SemanticType among SemanticType, ExplicitSemanticType and EmptySemanticType # All tokens have a label, and __eq__ and __ne__ methods. # Note: there is an UnimplementedToken # Usage: # from bootstraparse.modules.syntax import line # line.parse_line('string') # returns a List of tokens # line_to_replace.parse_line('string') # returns a List of tokens parsed for replacements # imports.parse_line('string', True) # returns a List of tokens parsed for imports # any_token.create_diagram("filename") # Debugging

Class AddFirstElementToLabel Class used for verification in the context manager. Adds the first element of the content to the label (for matching purposes).
Class AliasToken Undocumented
Class BeAssignToken Undocumented
Class BeValueToken Undocumented
Class BlockQuoteAuthorToken Undocumented
Class BlockQuoteToken Undocumented
Class ClosedSemanticType Semantic type used to signify it has a matching start component and needs to be matched.
Class CodeToken Undocumented
Class DisplayToken ! string ! number of ! indicates level
Class EmptySemanticType Empty semantic type, the content is the only information we need.
Class EtCustomSpanToken (#int)
Class EtEmToken *
Class EtOlistToken #.
Class EtStrikethroughToken ~~
Class EtStrongToken **
Class EtUlistToken No summary
Class EtUnderlineToken __
Class ExplicitSemanticType Explicit semantic type, the label is the only information we need.
Class FinalSemanticType Semantic type used by the context manager to ascertain token is possible to encapsulate.
Class HeaderToken # string # number of # indicates level
Class HyperlinkToken Undocumented
Class ImageToken Undocumented
Class Linebreak Undocumented
Class OpenedSemanticType Semantic type used to signify it has a matching end component and needs to be matched.
Class OptionalClassToken Undocumented
Class OptionalInsertToken Undocumented
Class OptionalToken Undocumented
Class OptionalVarToken Undocumented
Class SemanticType Allows us to access basic operations and identify each token parsed.
Class StructuralElementEndToken div|article|section|aside|header|body|nav>>
Class StructuralElementStartToken <<div|article|section|aside|header|body|nav
Class TableCellToken Undocumented
Class TableRowToken Undocumented
Class TableSeparatorToken Undocumented
Class TableToken Undocumented
Class TextToken Undocumented
Class TokensToMatch Class used for verification in the context manager. Classes inheriting this should be added to matched_elements.
Class UnimplementedToken Undocumented
Function of_type Function creating a custom function for generating the given Token type. :param token_class: SemanticType class :type token_class: type :return: returns a function creating an instance of the given class :rtype: function...
Function readable_markup Function used for testing and readability purposes. Replaces matched markup with html-like tags. :param list_of_tokens: list of matched markup tokens in analysed text. :type list_of_tokens: list :return: returns readable string...
Function reparse Creates a function which reparses given match with specified parsing element. :param parse_element: pp object defining desired match :type parse_element: pp.ParserElement :return: returns a function parsing given match with specified parsing element :rtype: function...
Function split_optionals Splits the optional attributes into separate lists. :param optionals: list of optional attributes :type optionals: OptionalToken :return: SplitOptionals object containing the split optionals :rtype: SplitOptionals...
Variable alias Undocumented
Variable alias_element Undocumented
Variable assignation Undocumented
Variable blockquote Undocumented
Variable blockquote_author Undocumented
Variable class_insert Undocumented
Variable code Undocumented
Variable display_element Undocumented
Variable enhanced_text Undocumented
Variable et_custom_span Undocumented
Variable et_em Undocumented
Variable et_strikethrough Undocumented
Variable et_strong Undocumented
Variable et_underline Undocumented
Variable expression Undocumented
Variable header_element Undocumented
Variable html_insert Undocumented
Variable il_link Undocumented
Variable image Undocumented
Variable image_element Undocumented
Variable line Undocumented
Variable line_to_replace Undocumented
Variable markup Undocumented
Variable multi_line Undocumented
Variable one_display Undocumented
Variable one_header Undocumented
Variable one_line Undocumented
Variable one_olist Undocumented
Variable one_ulist Undocumented
Variable optional Undocumented
Variable quotation Undocumented
Variable quotes Undocumented
Variable rgx_import_file Undocumented
Variable se Undocumented
Variable se_end Undocumented
Variable se_start Undocumented
Variable SplitOptionals Undocumented
Variable structural_elements Undocumented
Variable table Undocumented
Variable table_row Undocumented
Variable table_separator Undocumented
Variable text Undocumented
Variable value Undocumented
Variable var Undocumented
def of_type(token_class):

Function creating a custom function for generating the given Token type. :param token_class: SemanticType class :type token_class: type :return: returns a function creating an instance of the given class :rtype: function

def readable_markup(list_of_tokens):

Function used for testing and readability purposes. Replaces matched markup with html-like tags. :param list_of_tokens: list of matched markup tokens in analysed text. :type list_of_tokens: list :return: returns readable string. :rtype: string

def reparse(parse_element):

Creates a function which reparses given match with specified parsing element. :param parse_element: pp object defining desired match :type parse_element: pp.ParserElement :return: returns a function parsing given match with specified parsing element :rtype: function

def split_optionals(optionals):

Splits the optional attributes into separate lists. :param optionals: list of optional attributes :type optionals: OptionalToken :return: SplitOptionals object containing the split optionals :rtype: SplitOptionals

alias =

Undocumented

alias_element =

Undocumented

assignation =

Undocumented

blockquote =

Undocumented

blockquote_author =

Undocumented

class_insert =

Undocumented

code =

Undocumented

display_element =

Undocumented

enhanced_text =

Undocumented

et_custom_span =

Undocumented

et_em =

Undocumented

et_strikethrough =

Undocumented

et_strong =

Undocumented

et_underline =

Undocumented

expression =

Undocumented

header_element =

Undocumented

html_insert =

Undocumented

il_link =

Undocumented

image =

Undocumented

image_element =

Undocumented

line =

Undocumented

line_to_replace =

Undocumented

markup =

Undocumented

multi_line =

Undocumented

one_display =

Undocumented

one_header =

Undocumented

one_line =

Undocumented

one_olist =

Undocumented

one_ulist =

Undocumented

optional =

Undocumented

quotation =

Undocumented

quotes =

Undocumented

rgx_import_file =

Undocumented

se =

Undocumented

se_end =

Undocumented

se_start =

Undocumented

SplitOptionals =

Undocumented

structural_elements =

Undocumented

table =

Undocumented

table_row =

Undocumented

table_separator =

Undocumented

text =

Undocumented

value =

Undocumented

var =

Undocumented