29 #include YFM_NPL_SContext
31 using namespace YSLib;
36 Session::Session(
const string& line)
39 for(
const auto&
c : line)
62 while(b != e && *b !=
")")
67 if(res == e || *res !=
")")
79 while(b != e && *b !=
")")
83 auto res(
Reduce(nd, ++b, e));
85 if(res == e || *res !=
")")
87 node += std::move(nd);
99 if(token_list.empty())
102 if(
Validate(token_list.begin(), token_list.end()) != token_list.end())
105 const auto res(
Reduce(root, token_list.
begin(), token_list.end()));
107 yassume(res == token_list.end());
112 Analyze(root, session.GetTokenList());
TokenList::const_iterator TLCIter
YF_API TLCIter Reduce(ValueNode &node, TLCIter b, TLCIter e)
遍历规约记号列表,取抽象语法树储存至指定值类型节点。
YF_API TLCIter Validate(TLCIter b, TLCIter e)
遍历记号列表,验证基本合法性:圆括号是否对应。
YF_API void Analyze(ValueNode &, const TokenList &)
分析指定源,取抽象语法树储存至指定值类型节点。
#define YB_UNLIKELY(expr)
分支预测提示。
std::string to_string(unsigned char val)
转换为字符串。
Container Value const string name size_t GetSize() const ynothrow
bool is_undereferenceable(const any_input_iterator< _type, _tDifference, _tPointer, _tReference > &i)
fp fsize ptrdiff_t int whence const CheckEOF