2024-03-17 07:58:28 +00:00
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "libsyntax_global.h"
|
2025-02-02 12:54:32 +00:00
|
|
|
|
#include "libtokens.h"
|
2024-03-17 07:58:28 +00:00
|
|
|
|
#include <memory>
|
2025-02-02 12:54:32 +00:00
|
|
|
|
#include <QtCore/QList>
|
2024-03-17 07:58:28 +00:00
|
|
|
|
#include <tuple>
|
|
|
|
|
#include <functional>
|
|
|
|
|
namespace ast_basic {
|
2024-07-12 21:52:32 +00:00
|
|
|
|
class IExprInst;
|
2024-07-28 06:41:54 +00:00
|
|
|
|
class ExprElement;
|
2024-03-17 07:58:28 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
namespace lib_syntax {
|
2024-07-12 21:52:32 +00:00
|
|
|
|
class IBasicRule;
|
2024-06-18 17:09:45 +00:00
|
|
|
|
|
2024-06-18 03:54:36 +00:00
|
|
|
|
/**
|
|
|
|
|
* @brief <EFBFBD><EFBFBD>쳣
|
|
|
|
|
*/
|
2024-06-20 13:36:46 +00:00
|
|
|
|
class LIBSYNTAX_EXPORT SyntaxException {
|
2024-06-18 03:54:36 +00:00
|
|
|
|
private:
|
|
|
|
|
QString msg_store;
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
SyntaxException(const QString& message);
|
|
|
|
|
virtual ~SyntaxException() = default;
|
|
|
|
|
|
|
|
|
|
virtual QString message() const;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFB7A8><EFBFBD><EFBFBD><EFBFBD>ӿ<EFBFBD> ===================================================================================================
|
|
|
|
|
/**
|
|
|
|
|
* @brief <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ľӿ<EFBFBD>
|
|
|
|
|
*/
|
2024-07-12 21:52:32 +00:00
|
|
|
|
class IContext {
|
2024-06-18 03:54:36 +00:00
|
|
|
|
public:
|
2024-07-12 21:52:32 +00:00
|
|
|
|
virtual ~IContext() = default;
|
2024-06-18 03:54:36 +00:00
|
|
|
|
|
2024-07-28 08:37:31 +00:00
|
|
|
|
virtual void setCurrentFile(const QString& path) = 0;
|
2024-06-20 13:36:46 +00:00
|
|
|
|
virtual QString currentFile() const = 0;
|
|
|
|
|
|
2024-07-28 08:37:31 +00:00
|
|
|
|
virtual void appendParseErrors(const QString& file_path, int start, const QString& error_msg) = 0;
|
2024-06-27 04:55:07 +00:00
|
|
|
|
virtual QStringList errors() const = 0;
|
2024-07-28 08:37:31 +00:00
|
|
|
|
virtual void clearErrors(const QString& file_path, int start) = 0;
|
2024-06-27 04:55:07 +00:00
|
|
|
|
|
2024-07-12 22:19:30 +00:00
|
|
|
|
virtual void appendDocInst(std::shared_ptr<ast_basic::IExprInst> inst) = 0;
|
|
|
|
|
virtual QList<std::shared_ptr<const ast_basic::IExprInst>> getDocInsts() const = 0;
|
2024-07-12 04:53:43 +00:00
|
|
|
|
|
2024-06-18 03:54:36 +00:00
|
|
|
|
/**
|
|
|
|
|
* \brief <EFBFBD><EFBFBD>ǰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽԪ<EFBFBD><EFBFBD>.
|
|
|
|
|
*
|
|
|
|
|
* \return <EFBFBD><EFBFBD><EFBFBD>ص<EFBFBD>ǰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ
|
|
|
|
|
*/
|
2024-07-12 21:52:32 +00:00
|
|
|
|
virtual std::shared_ptr<ast_basic::IExprInst> currentExprInst() const = 0;
|
|
|
|
|
virtual void pushExprInst(std::shared_ptr<ast_basic::IExprInst> current_inst) = 0;
|
|
|
|
|
virtual std::shared_ptr<ast_basic::IExprInst> popExprInst() = 0;
|
|
|
|
|
|
|
|
|
|
virtual std::shared_ptr<const IBasicRule> currentExprRule() const = 0;
|
|
|
|
|
virtual void pushExprRule(std::shared_ptr<const IBasicRule> inst) = 0;
|
|
|
|
|
virtual std::shared_ptr<const IBasicRule> popExprRule() = 0;
|
2024-07-12 22:19:30 +00:00
|
|
|
|
virtual QList<std::shared_ptr<const IBasicRule>> currentExprRuleStack() const = 0;
|
2024-06-18 03:54:36 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӿ<EFBFBD>
|
|
|
|
|
*/
|
2024-07-12 21:52:32 +00:00
|
|
|
|
class IBasicRule {
|
2024-06-18 03:54:36 +00:00
|
|
|
|
public:
|
2024-07-12 21:52:32 +00:00
|
|
|
|
virtual ~IBasicRule() = default;
|
2024-06-18 03:54:36 +00:00
|
|
|
|
/**
|
|
|
|
|
* @brief <EFBFBD>ӹ<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
2024-07-12 21:52:32 +00:00
|
|
|
|
virtual QList<std::shared_ptr<const IBasicRule>> children() const = 0;
|
2024-06-18 03:54:36 +00:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief ƥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
*/
|
|
|
|
|
enum class MatchResult {
|
|
|
|
|
Success, // <20><><EFBFBD><EFBFBD>ƥ<EFBFBD><C6A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
Part, // <20><><EFBFBD><EFBFBD>ƥ<EFBFBD><C6A5>
|
|
|
|
|
Fail // <20>ӵ<EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȫ<EFBFBD><C8AB>ƥ<EFBFBD><C6A5>
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2024-06-18 14:59:41 +00:00
|
|
|
|
* @param rt_inst <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
* @param head <EFBFBD>б<EFBFBD>ͷ
|
|
|
|
|
* @return <EFBFBD><EFBFBD><EFBFBD>ؽ<EFBFBD><EFBFBD><EFBFBD><ƥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD>ͷ,ƥ<EFBFBD>䳤<EFBFBD><EFBFBD>>
|
2024-06-18 03:54:36 +00:00
|
|
|
|
*/
|
2025-02-02 12:54:32 +00:00
|
|
|
|
virtual std::tuple<IBasicRule::MatchResult, std::shared_ptr<const lib_words::IWordBase>>
|
|
|
|
|
parse(std::shared_ptr<IContext> rt_inst, std::shared_ptr<const lib_words::IWordBase> head) const = 0;
|
2024-06-18 03:54:36 +00:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ĵʷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>б<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
*
|
|
|
|
|
* \return <EFBFBD>ʷ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
*/
|
|
|
|
|
virtual QString token_present() const = 0;
|
|
|
|
|
};
|
|
|
|
|
|
2024-07-28 08:37:31 +00:00
|
|
|
|
template<typename elem>
|
|
|
|
|
using token_proc = void(*)(std::shared_ptr<elem> expr_inst, std::shared_ptr<const lib_token::IToken> token);
|
2024-06-18 03:54:36 +00:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief tokenƥ<EFBFBD><EFBFBD>
|
|
|
|
|
*/
|
2024-07-28 08:37:31 +00:00
|
|
|
|
template<typename elem, token_proc<elem> xproc = nullptr>
|
|
|
|
|
class TokenMatch : public IBasicRule, public std::enable_shared_from_this<TokenMatch<elem, xproc>> {
|
2024-06-18 03:54:36 +00:00
|
|
|
|
private:
|
2024-06-20 13:36:46 +00:00
|
|
|
|
std::shared_ptr<const lib_token::ITokenDefine> define_peer;
|
2024-06-18 03:54:36 +00:00
|
|
|
|
|
|
|
|
|
public:
|
2024-07-28 08:37:31 +00:00
|
|
|
|
TokenMatch(std::shared_ptr<const lib_token::ITokenDefine> define) : define_peer(define) {}
|
2024-06-18 03:54:36 +00:00
|
|
|
|
|
2024-07-12 21:52:32 +00:00
|
|
|
|
// IBasicRule interface
|
2024-06-18 03:54:36 +00:00
|
|
|
|
public:
|
2024-07-28 08:37:31 +00:00
|
|
|
|
virtual QList<std::shared_ptr<const IBasicRule>> children() const override { return QList<std::shared_ptr<const IBasicRule>>(); }
|
2025-02-02 12:54:32 +00:00
|
|
|
|
virtual std::tuple<IBasicRule::MatchResult, std::shared_ptr<const lib_words::IWordBase>> parse(std::shared_ptr<IContext> rt_inst, std::shared_ptr<const lib_words::IWordBase> head) const override {
|
2024-07-28 08:37:31 +00:00
|
|
|
|
if (!head) {
|
|
|
|
|
rt_inst->appendParseErrors(rt_inst->currentFile(), -1, QString(u8"Syntax[0x0000]token<65><6E><EFBFBD><EFBFBD>%1<><31><EFBFBD><EFBFBD>ǰ<EFBFBD><C7B0>ֹ").arg(rt_inst->currentFile()));
|
|
|
|
|
return std::make_tuple(IBasicRule::MatchResult::Fail, head);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
auto match_result = define_peer->analysis(head);
|
|
|
|
|
if (std::get<0>(match_result)) {
|
|
|
|
|
auto current_inst = rt_inst->currentExprInst();
|
|
|
|
|
current_inst->addToken(std::get<0>(match_result));
|
|
|
|
|
if (xproc) {
|
|
|
|
|
xproc(std::dynamic_pointer_cast<elem>(current_inst), std::get<0>(match_result));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (std::get<1>(match_result)) {
|
2025-02-02 12:54:32 +00:00
|
|
|
|
return std::make_tuple(IBasicRule::MatchResult::Success, std::make_shared<lib_words::WordImpl>(std::get<1>(match_result), head->nextWord()));
|
2024-07-28 08:37:31 +00:00
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
return std::make_tuple(IBasicRule::MatchResult::Success, head->nextWord());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
rt_inst->appendParseErrors(rt_inst->currentFile(), head->position(),
|
|
|
|
|
QString(u8"Syntax[0x00001]<5D>ƥ<EFB7A8><C6A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʶ<EFBFBD><CAB6>\"%1\"<row:%2,col:%3>(Ӧ<><D3A6>Ϊ<EFBFBD><CEAA>%4)\n\tĿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>%5<><35>\n")
|
|
|
|
|
.arg(head->content()).arg(head->row()).arg(head->column()).arg(this->define_peer->reviseWords())
|
|
|
|
|
.arg(rt_inst->currentExprRule()->token_present()));
|
|
|
|
|
return std::make_tuple(IBasicRule::MatchResult::Part, head);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
virtual QString token_present() const override {
|
|
|
|
|
return QString(u8"%1").arg(this->define_peer->reviseWords());
|
|
|
|
|
}
|
2024-06-18 03:54:36 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƥ<EFBFBD><EFBFBD>
|
|
|
|
|
*/
|
2024-07-12 21:52:32 +00:00
|
|
|
|
class LIBSYNTAX_EXPORT Any : public IBasicRule, public std::enable_shared_from_this<Any> {
|
2024-06-18 03:54:36 +00:00
|
|
|
|
private:
|
2024-07-12 21:52:32 +00:00
|
|
|
|
QList<std::shared_ptr<const IBasicRule>> mbrs_store;
|
2024-06-18 03:54:36 +00:00
|
|
|
|
|
2025-02-02 12:54:32 +00:00
|
|
|
|
std::tuple<MatchResult, uint, std::shared_ptr<const IBasicRule>, std::shared_ptr<const lib_words::IWordBase>> rule_select(std::shared_ptr<const lib_words::IWordBase> head) const;
|
2024-06-18 03:54:36 +00:00
|
|
|
|
|
|
|
|
|
public:
|
2024-07-12 21:52:32 +00:00
|
|
|
|
Any(const QList<std::shared_ptr<const IBasicRule>> mbrs);
|
2024-06-18 03:54:36 +00:00
|
|
|
|
|
2024-07-12 21:52:32 +00:00
|
|
|
|
// IBasicRule interface
|
2024-06-18 03:54:36 +00:00
|
|
|
|
public:
|
2024-07-12 21:52:32 +00:00
|
|
|
|
virtual QList<std::shared_ptr<const IBasicRule>> children() const override;
|
2025-02-02 12:54:32 +00:00
|
|
|
|
virtual std::tuple<IBasicRule::MatchResult, std::shared_ptr<const lib_words::IWordBase>>
|
|
|
|
|
parse(std::shared_ptr<IContext> rt_inst, std::shared_ptr<const lib_words::IWordBase> head) const override;
|
2024-06-18 03:54:36 +00:00
|
|
|
|
virtual QString token_present() const override;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƥ<EFBFBD><EFBFBD>
|
|
|
|
|
*/
|
2024-07-12 21:52:32 +00:00
|
|
|
|
class LIBSYNTAX_EXPORT Seqs : public IBasicRule, public std::enable_shared_from_this<Seqs> {
|
2024-06-18 03:54:36 +00:00
|
|
|
|
private:
|
2024-07-12 21:52:32 +00:00
|
|
|
|
QList<std::shared_ptr<const IBasicRule>> mbrs_store;
|
2024-06-18 03:54:36 +00:00
|
|
|
|
|
|
|
|
|
public:
|
2024-07-12 21:52:32 +00:00
|
|
|
|
Seqs(const QList<std::shared_ptr<const IBasicRule>> mbrs);
|
2024-06-18 03:54:36 +00:00
|
|
|
|
|
2024-07-12 21:52:32 +00:00
|
|
|
|
// IBasicRule interface
|
2024-06-18 03:54:36 +00:00
|
|
|
|
public:
|
2024-07-12 21:52:32 +00:00
|
|
|
|
virtual QList<std::shared_ptr<const IBasicRule>> children() const override;
|
2025-02-02 12:54:32 +00:00
|
|
|
|
virtual std::tuple<IBasicRule::MatchResult, std::shared_ptr<const lib_words::IWordBase>>
|
|
|
|
|
parse(std::shared_ptr<IContext> rt_inst, std::shared_ptr<const lib_words::IWordBase> head) const override;
|
2024-06-18 03:54:36 +00:00
|
|
|
|
virtual QString token_present() const override;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ظ<EFBFBD>ƥ<EFBFBD><EFBFBD>
|
|
|
|
|
*/
|
2024-07-12 21:52:32 +00:00
|
|
|
|
class LIBSYNTAX_EXPORT Rept : public IBasicRule, public std::enable_shared_from_this<Rept> {
|
2024-06-18 03:54:36 +00:00
|
|
|
|
private:
|
2024-07-12 21:52:32 +00:00
|
|
|
|
std::shared_ptr<const IBasicRule> rule_peer;
|
2024-06-18 03:54:36 +00:00
|
|
|
|
int min_match, max_match;
|
|
|
|
|
|
|
|
|
|
public:
|
2024-07-12 21:52:32 +00:00
|
|
|
|
Rept(std::shared_ptr<const IBasicRule> rule, int min, int max);
|
2024-06-18 03:54:36 +00:00
|
|
|
|
|
2024-07-12 21:52:32 +00:00
|
|
|
|
// IBasicRule interface
|
2024-06-18 03:54:36 +00:00
|
|
|
|
public:
|
2024-07-12 21:52:32 +00:00
|
|
|
|
virtual QList<std::shared_ptr<const IBasicRule>> children() const override;
|
2025-02-02 12:54:32 +00:00
|
|
|
|
virtual std::tuple<IBasicRule::MatchResult, std::shared_ptr<const lib_words::IWordBase>>
|
|
|
|
|
parse(std::shared_ptr<IContext> rt_inst, std::shared_ptr<const lib_words::IWordBase> head) const override;
|
2024-06-18 03:54:36 +00:00
|
|
|
|
virtual QString token_present() const override;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD>ʵ<EFB7A8><CAB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ===================================================================================================
|
|
|
|
|
/**
|
|
|
|
|
* @brief <EFBFBD><EFBFBD>Ӧ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
*/
|
2024-07-12 21:52:32 +00:00
|
|
|
|
class LIBSYNTAX_EXPORT ExprRule : public lib_syntax::IBasicRule, public std::enable_shared_from_this<ExprRule> {
|
2024-06-18 03:54:36 +00:00
|
|
|
|
public:
|
2024-06-20 13:36:46 +00:00
|
|
|
|
typedef QList<std::shared_ptr<const lib_token::IToken>> TokenSeqs;
|
2024-07-12 04:53:43 +00:00
|
|
|
|
ExprRule(const QString& rule_name, int expr_mark);
|
2024-06-18 03:54:36 +00:00
|
|
|
|
|
2024-07-12 21:52:32 +00:00
|
|
|
|
virtual std::shared_ptr<const ExprRule> reloadRule(std::shared_ptr<const IBasicRule> rule);
|
2024-06-18 03:54:36 +00:00
|
|
|
|
virtual QString name() const;
|
|
|
|
|
virtual int typeMark() const;
|
|
|
|
|
|
2024-07-12 21:52:32 +00:00
|
|
|
|
virtual std::shared_ptr<ast_basic::IExprInst> newEmptyInstance() const = 0;
|
2024-07-12 04:53:43 +00:00
|
|
|
|
virtual std::shared_ptr<ExprRule> makeCopy() const = 0;
|
2024-06-18 03:54:36 +00:00
|
|
|
|
|
2024-07-12 21:52:32 +00:00
|
|
|
|
// IBasicRule interface
|
2024-06-18 03:54:36 +00:00
|
|
|
|
public:
|
2024-07-12 21:52:32 +00:00
|
|
|
|
virtual QList<std::shared_ptr<const lib_syntax::IBasicRule>> children() const override;
|
2025-02-02 12:54:32 +00:00
|
|
|
|
virtual std::tuple<IBasicRule::MatchResult, std::shared_ptr<const lib_words::IWordBase>>
|
|
|
|
|
parse(std::shared_ptr<IContext> rt_inst, std::shared_ptr<const lib_words::IWordBase> head) const override;
|
2024-06-18 03:54:36 +00:00
|
|
|
|
virtual QString token_present() const override;
|
|
|
|
|
|
2024-07-13 05:17:56 +00:00
|
|
|
|
protected:
|
2024-07-12 21:52:32 +00:00
|
|
|
|
std::shared_ptr<const lib_syntax::IBasicRule> child_store;
|
2024-07-13 05:17:56 +00:00
|
|
|
|
|
|
|
|
|
private:
|
2024-06-18 03:54:36 +00:00
|
|
|
|
QString name_store;
|
|
|
|
|
int mark_store;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* <EFBFBD>Ԫ<EFBFBD>ؽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
*/
|
|
|
|
|
template<class ExprType>
|
2024-07-12 04:53:43 +00:00
|
|
|
|
class ElementRule : public ExprRule {
|
2024-06-18 03:54:36 +00:00
|
|
|
|
public:
|
|
|
|
|
ElementRule(const QString& rule_name, int expr_mark)
|
2024-07-28 08:37:31 +00:00
|
|
|
|
:ExprRule(rule_name, expr_mark) {}
|
2024-06-18 03:54:36 +00:00
|
|
|
|
|
2024-07-12 21:52:32 +00:00
|
|
|
|
virtual std::shared_ptr<ast_basic::IExprInst> newEmptyInstance() const {
|
|
|
|
|
return std::dynamic_pointer_cast<ast_basic::IExprInst>(
|
2024-06-18 03:54:36 +00:00
|
|
|
|
std::make_shared<ExprType>(this->shared_from_this()));
|
|
|
|
|
}
|
|
|
|
|
|
2024-07-12 04:53:43 +00:00
|
|
|
|
virtual std::shared_ptr<ExprRule> makeCopy() const {
|
2024-06-18 03:54:36 +00:00
|
|
|
|
return std::make_shared<ElementRule<ExprType>>(name(), typeMark());
|
|
|
|
|
}
|
|
|
|
|
};
|
2024-03-17 07:58:28 +00:00
|
|
|
|
} // namespace lib_syntax
|