File Index Symbol Index

/*********************************************************************** This file is generated by: Vczh Parser Generator From parser definition:ParsingXml.parser.txt Licensed under https://github.com/vczh-libraries/License ***********************************************************************/
#ifndef VCZH_PARSING_XML_PARSINGXML_PARSER_PARSER
#define VCZH_PARSING_XML_PARSINGXML_PARSER_PARSER
#include "../Parsing.h"
#include "../ParsingDefinitions.h"
#include "../ParsingAutomaton.h"
#include "ParsingXml_Ast.h"
namespace
vl
{
namespace
parsing
{
namespace
xml
{
/// <summary>Get the grammar definition for this parser.</summary>
/// <returns>The grammar definition for this parser.</returns>
extern
vl
::
WString
XmlGetParserTextBuffer
();
/// <summary>Convert parser result to a strong typed AST node. Usually you don't need to use this function, unless you are doing meta programming like error recovering or implementing intellisense for an editor.</summary>
/// <returns>Returns the strong typed AST node.</returns>
/// <param name="node">The parser result.</param>
/// <param name="tokens">Tokens for parsing. You can get the <see cref="vl::regex::RegexLexer"/> by calling <see cref="vl::parsing::tabling::ParsingTable::GetLexer"/> from <see cref="XmlLoadTable"/></param>
extern
vl
::
Ptr
<
vl
::
parsing
::
ParsingTreeCustomBase
>
XmlConvertParsingTreeNode
(
vl
::
Ptr
<
vl
::
parsing
::
ParsingTreeNode
>
node
,
const
vl
::
collections
::
List
<
vl
::
regex
::
RegexToken
>&
tokens
);
/// <summary>Create the parser table. You should cache the value if possible, for improving performance.</summary>
/// <returns>The created parser table.</returns>
extern
vl
::
Ptr
<
vl
::
parsing
::
tabling
::
ParsingTable
>
XmlLoadTable
();
/// <summary>Parse an XML document.</summary>
/// <returns>Returns the parsing result as a weak-typed AST node. Returns null if there is any unrecoverable error during parsing.</returns>
/// <param name="input">The input for parsing.</param>
/// <param name="table">The return value from <see cref="XmlLoadTable"/>.</param>
/// <param name="errors">All errors during parsing.</param>
/// <param name="codeIndex">(Optional): This argument will be copied to <see cref="vl::parsing::ParsingTextRange::codeIndex"/> in every AST nodes. The default value is -1.</param>
extern
vl
::
Ptr
<
vl
::
parsing
::
ParsingTreeNode
>
XmlParseDocumentAsParsingTreeNode
(
const
vl
::
WString
&
input
,
vl
::
Ptr
<
vl
::
parsing
::
tabling
::
ParsingTable
>
table
,
vl
::
collections
::
List
<
vl
::
Ptr
<
vl
::
parsing
::
ParsingError
>>&
errors
,
vl
::
vint
codeIndex
= -
1
);
/// <summary>Parse an XML document.</summary>
/// <returns>Returns the parsing result as a weak-typed AST node. Returns null if there is any unrecoverable error during parsing.</returns>
/// <param name="input">The input for parsing.</param>
/// <param name="table">The return value from <see cref="XmlLoadTable"/>.</param>
/// <param name="codeIndex">(Optional): This argument will be copied to <see cref="vl::parsing::ParsingTextRange::codeIndex"/> in every AST nodes. The default value is -1.</param>
extern
vl
::
Ptr
<
vl
::
parsing
::
ParsingTreeNode
>
XmlParseDocumentAsParsingTreeNode
(
const
vl
::
WString
&
input
,
vl
::
Ptr
<
vl
::
parsing
::
tabling
::
ParsingTable
>
table
,
vl
::
vint
codeIndex
= -
1
);
/// <summary>Parse an XML document.</summary>
/// <returns>Returns the parsing result as a strong-typed AST node. Returns null if there is any unrecoverable error during parsing.</returns>
/// <param name="input">The input for parsing.</param>
/// <param name="table">The return value from <see cref="XmlLoadTable"/>.</param>
/// <param name="errors">All errors during parsing.</param>
/// <param name="codeIndex">(Optional): This argument will be copied to <see cref="vl::parsing::ParsingTextRange::codeIndex"/> in every AST nodes. The default value is -1.</param>
extern
vl
::
Ptr
<
XmlDocument
>
XmlParseDocument
(
const
vl
::
WString
&
input
,
vl
::
Ptr
<
vl
::
parsing
::
tabling
::
ParsingTable
>
table
,
vl
::
collections
::
List
<
vl
::
Ptr
<
vl
::
parsing
::
ParsingError
>>&
errors
,
vl
::
vint
codeIndex
= -
1
);
/// <summary>Parse an XML document.</summary>
/// <returns>Returns the parsing result as a strong-typed AST node. Returns null if there is any unrecoverable error during parsing.</returns>
/// <param name="input">The input for parsing.</param>
/// <param name="table">The return value from <see cref="XmlLoadTable"/>.</param>
/// <param name="codeIndex">(Optional): This argument will be copied to <see cref="vl::parsing::ParsingTextRange::codeIndex"/> in every AST nodes. The default value is -1.</param>
extern
vl
::
Ptr
<
XmlDocument
>
XmlParseDocument
(
const
vl
::
WString
&
input
,
vl
::
Ptr
<
vl
::
parsing
::
tabling
::
ParsingTable
>
table
,
vl
::
vint
codeIndex
= -
1
);
/// <summary>Parse an XML element.</summary>
/// <returns>Returns the parsing result as a weak-typed AST node. Returns null if there is any unrecoverable error during parsing.</returns>
/// <param name="input">The input for parsing.</param>
/// <param name="table">The return value from <see cref="XmlLoadTable"/>.</param>
/// <param name="errors">All errors during parsing.</param>
/// <param name="codeIndex">(Optional): This argument will be copied to <see cref="vl::parsing::ParsingTextRange::codeIndex"/> in every AST nodes. The default value is -1.</param>
extern
vl
::
Ptr
<
vl
::
parsing
::
ParsingTreeNode
>
XmlParseElementAsParsingTreeNode
(
const
vl
::
WString
&
input
,
vl
::
Ptr
<
vl
::
parsing
::
tabling
::
ParsingTable
>
table
,
vl
::
collections
::
List
<
vl
::
Ptr
<
vl
::
parsing
::
ParsingError
>>&
errors
,
vl
::
vint
codeIndex
= -
1
);
/// <summary>Parse an XML element.</summary>
/// <returns>Returns the parsing result as a weak-typed AST node. Returns null if there is any unrecoverable error during parsing.</returns>
/// <param name="input">The input for parsing.</param>
/// <param name="table">The return value from <see cref="XmlLoadTable"/>.</param>
/// <param name="codeIndex">(Optional): This argument will be copied to <see cref="vl::parsing::ParsingTextRange::codeIndex"/> in every AST nodes. The default value is -1.</param>
extern
vl
::
Ptr
<
vl
::
parsing
::
ParsingTreeNode
>
XmlParseElementAsParsingTreeNode
(
const
vl
::
WString
&
input
,
vl
::
Ptr
<
vl
::
parsing
::
tabling
::
ParsingTable
>
table
,
vl
::
vint
codeIndex
= -
1
);
/// <summary>Parse an XML element.</summary>
/// <returns>Returns the parsing result as a strong-typed AST node. Returns null if there is any unrecoverable error during parsing.</returns>
/// <param name="input">The input for parsing.</param>
/// <param name="table">The return value from <see cref="XmlLoadTable"/>.</param>
/// <param name="errors">All errors during parsing.</param>
/// <param name="codeIndex">(Optional): This argument will be copied to <see cref="vl::parsing::ParsingTextRange::codeIndex"/> in every AST nodes. The default value is -1.</param>
extern
vl
::
Ptr
<
XmlElement
>
XmlParseElement
(
const
vl
::
WString
&
input
,
vl
::
Ptr
<
vl
::
parsing
::
tabling
::
ParsingTable
>
table
,
vl
::
collections
::
List
<
vl
::
Ptr
<
vl
::
parsing
::
ParsingError
>>&
errors
,
vl
::
vint
codeIndex
= -
1
);
/// <summary>Parse an XML element.</summary>
/// <returns>Returns the parsing result as a strong-typed AST node. Returns null if there is any unrecoverable error during parsing.</returns>
/// <param name="input">The input for parsing.</param>
/// <param name="table">The return value from <see cref="XmlLoadTable"/>.</param>
/// <param name="codeIndex">(Optional): This argument will be copied to <see cref="vl::parsing::ParsingTextRange::codeIndex"/> in every AST nodes. The default value is -1.</param>
extern
vl
::
Ptr
<
XmlElement
>
XmlParseElement
(
const
vl
::
WString
&
input
,
vl
::
Ptr
<
vl
::
parsing
::
tabling
::
ParsingTable
>
table
,
vl
::
vint
codeIndex
= -
1
); } } }
#endif