class MarkupParser

Declaration

class MarkupParser { /* full declaration omitted */ };

Description

Parses a log containing symbolizer markup into a sequence of nodes.

Declared at: llvm/include/llvm/DebugInfo/Symbolize/Markup.h:54

Member Variables

private const StringSet<> MultilineTags
private std::string FinishedMultiline
private std::string InProgressMultiline
private llvm::StringRef Line
private SmallVector<llvm::symbolize::MarkupNode> Buffer
private size_t NextIdx
private const llvm::Regex SGRSyntax

Method Overview

Methods

MarkupParser(StringSet<> MultilineTags = {})

Declared at: llvm/include/llvm/DebugInfo/Symbolize/Markup.h:56

Parameters

StringSet<> MultilineTags = {}

void flush()

Description

Inform the parser of that the input stream has ended. This allows the parser to finish any deferred processing (e.g., an in-progress multi-line element) and may cause nextNode() to return additional nodes.

Declared at: llvm/include/llvm/DebugInfo/Symbolize/Markup.h:77

bool isSGR(
    const llvm::symbolize::MarkupNode& Node) const

Declared at: llvm/include/llvm/DebugInfo/Symbolize/Markup.h:87

Parameters

const llvm::symbolize::MarkupNode& Node

Optional<llvm::symbolize::MarkupNode> nextNode()

Description

Returns the next node in the input sequence. Calling nextNode() may invalidate the contents of the node returned by the previous call.

Declared at: llvm/include/llvm/DebugInfo/Symbolize/Markup.h:85

Returns

the next markup node or None if none remain.

Optional<llvm::symbolize::MarkupNode>
parseElement(llvm::StringRef Line)

Declared at: llvm/include/llvm/DebugInfo/Symbolize/Markup.h:92

Parameters

llvm::StringRef Line

void parseLine(llvm::StringRef Line)

Description

Parses an individual \p Line of input. Nodes from the previous parseLine() call that haven't yet been extracted by nextNode() are discarded. The nodes returned by nextNode() may reference the input string, so it must be retained by the caller until the last use. Note that some elements may span multiple lines. If a line ends with the start of one of these elements, then no nodes will be produced until the either the end or something that cannot be part of an element is encountered. This may only occur after multiple calls to parseLine(), corresponding to the lines of the multi-line element.

Declared at: llvm/include/llvm/DebugInfo/Symbolize/Markup.h:70

Parameters

llvm::StringRef Line

Optional<llvm::StringRef> parseMultiLineBegin(
    llvm::StringRef Line)

Declared at: llvm/include/llvm/DebugInfo/Symbolize/Markup.h:94

Parameters

llvm::StringRef Line

Optional<llvm::StringRef> parseMultiLineEnd(
    llvm::StringRef Line)

Declared at: llvm/include/llvm/DebugInfo/Symbolize/Markup.h:95

Parameters

llvm::StringRef Line

void parseTextOutsideMarkup(llvm::StringRef Text)

Declared at: llvm/include/llvm/DebugInfo/Symbolize/Markup.h:93

Parameters

llvm::StringRef Text