class Input
Declaration
class Input : public IO { /* full declaration omitted */ };
Description
The Input class is used to parse a yaml document into in-memory structs and vectors. It works by using YAMLParser to do a syntax parse of the entire yaml document, then the Input class builds a graph of HNodes which wraps each yaml Node. The extra layer is buffering. The low level yaml parser only lets you look at each node once. The buffering layer lets you search and interate multiple times. This is necessary because the mapRequired() method calls may not be in the same order as the keys in the document.
Declared at: llvm/include/llvm/Support/YAMLTraits.h:1416
Inherits from: IO
Member Variables
- private llvm::SourceMgr SrcMgr
- private std::unique_ptr<llvm::yaml::Stream> Strm
- private std::unique_ptr<HNode> TopNode
- private std::error_code EC
- private llvm::BumpPtrAllocator StringAllocator
- private llvm::yaml::document_iterator DocIterator
- private llvm::BitVector BitValuesUsed
- private llvm::yaml::Input::HNode* CurrentNode = nullptr
- private bool ScalarMatchFound = false
- private bool AllowUnknownKeys = false
Method Overview
- public Input(llvm::MemoryBufferRef Input, void * Ctxt = nullptr, SourceMgr::DiagHandlerTy DiagHandler = nullptr, void * DiagHandlerCtxt = nullptr)
- public Input(llvm::StringRef InputContent, void * Ctxt = nullptr, SourceMgr::DiagHandlerTy DiagHandler = nullptr, void * DiagHandlerCtxt = nullptr)
- private bool beginBitSetScalar(bool &)
- private void beginEnumScalar()
- private void beginFlowMapping()
- private unsigned int beginFlowSequence()
- private void beginMapping()
- private unsigned int beginSequence()
- private bool bitSetMatch(const char *, bool)
- private void blockScalarString(llvm::StringRef &)
- private bool canElideEmptySequence()
- private std::unique_ptr<Input::HNode> createHNodes(llvm::yaml::Node * node)
- private void endBitSetScalar()
- private void endEnumScalar()
- private void endFlowMapping()
- private void endFlowSequence()
- private void endMapping()
- private void endSequence()
- public std::error_code error()
- public const llvm::yaml::Node * getCurrentNode() const
- private llvm::yaml::NodeKind getNodeKind()
- private std::vector<StringRef> keys()
- private bool mapTag(llvm::StringRef, bool)
- private bool matchEnumFallback()
- private bool matchEnumScalar(const char *, bool)
- public bool nextDocument()
- private bool outputting() const
- private void postflightElement(void *)
- private void postflightFlowElement(void *)
- private void postflightKey(void *)
- private bool preflightElement(unsigned int index, void *&)
- private bool preflightFlowElement(unsigned int, void *&)
- private bool preflightKey(const char *, bool, bool, bool &, void *&)
- private void reportWarning(const llvm::SMRange & Range, const llvm::Twine & message)
- private void reportWarning(llvm::yaml::Node * hnode, const llvm::Twine & message)
- private void reportWarning(llvm::yaml::Input::HNode * hnode, const llvm::Twine & message)
- private void scalarString(llvm::StringRef &, llvm::yaml::QuotingType)
- private void scalarTag(std::string &)
- public void setAllowUnknownKeys(bool Allow)
- public bool setCurrentDocument()
- private void setError(const llvm::SMRange & Range, const llvm::Twine & message)
- private void setError(llvm::yaml::Node * node, const llvm::Twine & message)
- private void setError(llvm::yaml::Input::HNode * hnode, const llvm::Twine & message)
- private void setError(const llvm::Twine & message)
- public ~Input()
Inherited from IO:
- public beginBitSetScalar
- public beginEnumScalar
- public beginFlowMapping
- public beginFlowSequence
- public beginMapping
- public beginSequence
- public bitSetCase
- public bitSetCase
- public bitSetMatch
- public blockScalarString
- public canElideEmptySequence
- public endBitSetScalar
- public endEnumScalar
- public endFlowMapping
- public endFlowSequence
- public endMapping
- public endSequence
- public enumCase
- public enumCase
- public enumFallback
- public getContext
- public getNodeKind
- public keys
- public mapOptional
- public mapOptional
- public mapOptionalWithContext
- public mapOptionalWithContext
- public mapOptionalWithContext
- public mapOptionalWithContext
- public mapRequired
- public mapRequired
- public mapTag
- public maskedBitSetCase
- public maskedBitSetCase
- public matchEnumFallback
- public matchEnumScalar
- public outputting
- public postflightElement
- public postflightFlowElement
- public postflightKey
- public preflightElement
- public preflightFlowElement
- public preflightKey
- public scalarString
- public scalarTag
- public setAllowUnknownKeys
- public setContext
- public setError
Methods
¶Input(llvm::MemoryBufferRef Input,
void* Ctxt = nullptr,
SourceMgr::DiagHandlerTy DiagHandler =
nullptr,
void* DiagHandlerCtxt = nullptr)
Input(llvm::MemoryBufferRef Input,
void* Ctxt = nullptr,
SourceMgr::DiagHandlerTy DiagHandler =
nullptr,
void* DiagHandlerCtxt = nullptr)
Declared at: llvm/include/llvm/Support/YAMLTraits.h:1425
Parameters
- llvm::MemoryBufferRef Input
- void* Ctxt = nullptr
- SourceMgr::DiagHandlerTy DiagHandler = nullptr
- void* DiagHandlerCtxt = nullptr
¶Input(llvm::StringRef InputContent,
void* Ctxt = nullptr,
SourceMgr::DiagHandlerTy DiagHandler =
nullptr,
void* DiagHandlerCtxt = nullptr)
Input(llvm::StringRef InputContent,
void* Ctxt = nullptr,
SourceMgr::DiagHandlerTy DiagHandler =
nullptr,
void* DiagHandlerCtxt = nullptr)
Declared at: llvm/include/llvm/Support/YAMLTraits.h:1421
Parameters
- llvm::StringRef InputContent
- void* Ctxt = nullptr
- SourceMgr::DiagHandlerTy DiagHandler = nullptr
- void* DiagHandlerCtxt = nullptr
¶bool beginBitSetScalar(bool&)
bool beginBitSetScalar(bool&)
Declared at: llvm/include/llvm/Support/YAMLTraits.h:1456
Parameters
- bool&
¶void beginEnumScalar()
void beginEnumScalar()
Declared at: llvm/include/llvm/Support/YAMLTraits.h:1452
¶void beginFlowMapping()
void beginFlowMapping()
Declared at: llvm/include/llvm/Support/YAMLTraits.h:1442
¶unsigned int beginFlowSequence()
unsigned int beginFlowSequence()
Declared at: llvm/include/llvm/Support/YAMLTraits.h:1448
¶void beginMapping()
void beginMapping()
Declared at: llvm/include/llvm/Support/YAMLTraits.h:1437
¶unsigned int beginSequence()
unsigned int beginSequence()
Declared at: llvm/include/llvm/Support/YAMLTraits.h:1444
¶bool bitSetMatch(const char*, bool)
bool bitSetMatch(const char*, bool)
Declared at: llvm/include/llvm/Support/YAMLTraits.h:1457
Parameters
- const char*
- bool
¶void blockScalarString(llvm::StringRef&)
void blockScalarString(llvm::StringRef&)
Declared at: llvm/include/llvm/Support/YAMLTraits.h:1460
Parameters
¶bool canElideEmptySequence()
bool canElideEmptySequence()
Declared at: llvm/include/llvm/Support/YAMLTraits.h:1464
¶std::unique_ptr<Input::HNode> createHNodes(
llvm::yaml::Node* node)
std::unique_ptr<Input::HNode> createHNodes(
llvm::yaml::Node* node)
Declared at: llvm/include/llvm/Support/YAMLTraits.h:1542
Parameters
- llvm::yaml::Node* node
¶void endBitSetScalar()
void endBitSetScalar()
Declared at: llvm/include/llvm/Support/YAMLTraits.h:1458
¶void endEnumScalar()
void endEnumScalar()
Declared at: llvm/include/llvm/Support/YAMLTraits.h:1455
¶void endFlowMapping()
void endFlowMapping()
Declared at: llvm/include/llvm/Support/YAMLTraits.h:1443
¶void endFlowSequence()
void endFlowSequence()
Declared at: llvm/include/llvm/Support/YAMLTraits.h:1451
¶void endMapping()
void endMapping()
Declared at: llvm/include/llvm/Support/YAMLTraits.h:1438
¶void endSequence()
void endSequence()
Declared at: llvm/include/llvm/Support/YAMLTraits.h:1445
¶std::error_code error()
std::error_code error()
Declared at: llvm/include/llvm/Support/YAMLTraits.h:1432
¶const llvm::yaml::Node* getCurrentNode() const
const llvm::yaml::Node* getCurrentNode() const
Description
Returns the current node that's being parsed by the YAML Parser.
Declared at: llvm/include/llvm/Support/YAMLTraits.h:1558
¶llvm::yaml::NodeKind getNodeKind()
llvm::yaml::NodeKind getNodeKind()
Declared at: llvm/include/llvm/Support/YAMLTraits.h:1462
¶std::vector<StringRef> keys()
std::vector<StringRef> keys()
Declared at: llvm/include/llvm/Support/YAMLTraits.h:1441
¶bool mapTag(llvm::StringRef, bool)
bool mapTag(llvm::StringRef, bool)
Declared at: llvm/include/llvm/Support/YAMLTraits.h:1436
Parameters
- llvm::StringRef
- bool
¶bool matchEnumFallback()
bool matchEnumFallback()
Declared at: llvm/include/llvm/Support/YAMLTraits.h:1454
¶bool matchEnumScalar(const char*, bool)
bool matchEnumScalar(const char*, bool)
Declared at: llvm/include/llvm/Support/YAMLTraits.h:1453
Parameters
- const char*
- bool
¶bool nextDocument()
bool nextDocument()
Declared at: llvm/include/llvm/Support/YAMLTraits.h:1555
¶bool outputting() const
bool outputting() const
Declared at: llvm/include/llvm/Support/YAMLTraits.h:1435
¶void postflightElement(void*)
void postflightElement(void*)
Declared at: llvm/include/llvm/Support/YAMLTraits.h:1447
Parameters
- void*
¶void postflightFlowElement(void*)
void postflightFlowElement(void*)
Declared at: llvm/include/llvm/Support/YAMLTraits.h:1450
Parameters
- void*
¶void postflightKey(void*)
void postflightKey(void*)
Declared at: llvm/include/llvm/Support/YAMLTraits.h:1440
Parameters
- void*
¶bool preflightElement(unsigned int index, void*&)
bool preflightElement(unsigned int index, void*&)
Declared at: llvm/include/llvm/Support/YAMLTraits.h:1446
Parameters
- unsigned int index
- void*&
¶bool preflightFlowElement(unsigned int, void*&)
bool preflightFlowElement(unsigned int, void*&)
Declared at: llvm/include/llvm/Support/YAMLTraits.h:1449
Parameters
- unsigned int
- void*&
¶bool preflightKey(const char*,
bool,
bool,
bool&,
void*&)
bool preflightKey(const char*,
bool,
bool,
bool&,
void*&)
Declared at: llvm/include/llvm/Support/YAMLTraits.h:1439
Parameters
- const char*
- bool
- bool
- bool&
- void*&
¶void reportWarning(const llvm::SMRange& Range,
const llvm::Twine& message)
void reportWarning(const llvm::SMRange& Range,
const llvm::Twine& message)
Declared at: llvm/include/llvm/Support/YAMLTraits.h:1549
Parameters
- const llvm::SMRange& Range
- const llvm::Twine& message
¶void reportWarning(llvm::yaml::Node* hnode,
const llvm::Twine& message)
void reportWarning(llvm::yaml::Node* hnode,
const llvm::Twine& message)
Declared at: llvm/include/llvm/Support/YAMLTraits.h:1548
Parameters
- llvm::yaml::Node* hnode
- const llvm::Twine& message
¶void reportWarning(
llvm::yaml::Input::HNode* hnode,
const llvm::Twine& message)
void reportWarning(
llvm::yaml::Input::HNode* hnode,
const llvm::Twine& message)
Declared at: llvm/include/llvm/Support/YAMLTraits.h:1547
Parameters
- llvm::yaml::Input::HNode* hnode
- const llvm::Twine& message
¶void scalarString(llvm::StringRef&,
llvm::yaml::QuotingType)
void scalarString(llvm::StringRef&,
llvm::yaml::QuotingType)
Declared at: llvm/include/llvm/Support/YAMLTraits.h:1459
Parameters
- llvm::StringRef&
- llvm::yaml::QuotingType
¶void scalarTag(std::string&)
void scalarTag(std::string&)
Declared at: llvm/include/llvm/Support/YAMLTraits.h:1461
Parameters
¶void setAllowUnknownKeys(bool Allow)
void setAllowUnknownKeys(bool Allow)
Declared at: llvm/include/llvm/Support/YAMLTraits.h:1560
Parameters
- bool Allow
¶bool setCurrentDocument()
bool setCurrentDocument()
Declared at: llvm/include/llvm/Support/YAMLTraits.h:1554
¶void setError(const llvm::SMRange& Range,
const llvm::Twine& message)
void setError(const llvm::SMRange& Range,
const llvm::Twine& message)
Declared at: llvm/include/llvm/Support/YAMLTraits.h:1545
Parameters
- const llvm::SMRange& Range
- const llvm::Twine& message
¶void setError(llvm::yaml::Node* node,
const llvm::Twine& message)
void setError(llvm::yaml::Node* node,
const llvm::Twine& message)
Declared at: llvm/include/llvm/Support/YAMLTraits.h:1544
Parameters
- llvm::yaml::Node* node
- const llvm::Twine& message
¶void setError(llvm::yaml::Input::HNode* hnode,
const llvm::Twine& message)
void setError(llvm::yaml::Input::HNode* hnode,
const llvm::Twine& message)
Declared at: llvm/include/llvm/Support/YAMLTraits.h:1543
Parameters
- llvm::yaml::Input::HNode* hnode
- const llvm::Twine& message
¶void setError(const llvm::Twine& message)
void setError(const llvm::Twine& message)
Declared at: llvm/include/llvm/Support/YAMLTraits.h:1463
Parameters
- const llvm::Twine& message
¶~Input()
~Input()
Declared at: llvm/include/llvm/Support/YAMLTraits.h:1429