YSTest  PreAlpha_b500_20140530
The YSLib Test Project
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
NPL 命名空间参考

命名空间

 SContext
 S 表达式上下文:处理 S 表达式。
 

class  Configuration
 设置:使用 S 表达式存储外部状态。 更多...
 
class  LexicalAnalyzer
 词法分析器。 更多...
 
struct  NPL
 NPL 元标签。 更多...
 
struct  NPLA
 NPLA 元标签。 更多...
 
struct  NPLA1
 NPLA1 元标签。 更多...
 
class  Session
 会话:分析指定 NPL 代码。 更多...
 

类型定义

using TokenList = list< string >
 
using TLIter = TokenList::iterator
 
using TLCIter = TokenList::const_iterator
 

函数

YF_API char CheckLiteral (const string &)
 检查指定字符串是否为字面量。 更多...
 
YF_API string Deliteralize (const string &)
 去除字面量边界分隔符。 更多...
 
YF_API string MakeEscape (const string &)
 转义字符串:替换指定字符串中的可转义字符。 更多...
 
yconstfn bool IsGraphicalDelimeter (char c)
 判断是否为 NPL 图形分隔符。 更多...
 
yconstfn bool IsDelimeter (char c)
 判断是否为 NPL 分隔符。 更多...
 
YF_API list< string > Decompose (const string &)
 分解字符串为记号。 更多...
 
YF_API list< string > Tokenize (const list< string > &)
 记号化:提取字符串列表中的记号。 更多...
 
YF_API ValueNode TransformNPLA1 (const ValueNode &)
 转换设置: S 表达式抽象语法树变换为 NPLA1 语义结构。 更多...
 
Fileoperator<< (File &f, const Configuration &conf)
 
TextFileoperator>> (TextFile &tf, Configuration &conf)
 
YF_API ValueNode LoadNPLA1 (ValueNode &&)
 读取 NPLA1 翻译单元。 更多...
 
template<typename _type >
ValueNode LoadNPLA1 (_type &&tree)
 

类型定义说明

using NPL::TLCIter = typedef TokenList::const_iterator

在文件 SContext.h47 行定义.

using NPL::TLIter = typedef TokenList::iterator

在文件 SContext.h46 行定义.

using NPL::TokenList = typedef list<string>

在文件 SContext.h45 行定义.

函数说明

char NPL::CheckLiteral ( const string &  str)

检查指定字符串是否为字面量。

返回
若为字面量(首尾字符都为 '\'' 或 '"' 之一),则为首字符,否则为 char() 。
自从
build 304
待办事项:
实现 UTF-8 字符串末尾兼容性。

在文件 Lexical.cpp173 行定义.

参考自 Deliteralize().

这是这个函数的调用关系图:

list< string > NPL::Decompose ( const string &  src_str)

分解字符串为记号。

自从
build 335

在文件 Lexical.cpp229 行定义.

参考 IsDelimeter(), IsGraphicalDelimeter(), ystdex::split_l(), ystdex::trim() , 以及 YAssert.

参考自 Tokenize().

函数调用图:

这是这个函数的调用关系图:

string NPL::Deliteralize ( const string &  str)

去除字面量边界分隔符。

返回
若首尾字符都为 '\'' 或 '"' 之一,则为去除首尾字符之后的副本;否则为原串。
自从
build 343

在文件 Lexical.cpp185 行定义.

参考 CheckLiteral() , 以及 ystdex::get_mid().

参考自 TransformNPLA1().

函数调用图:

这是这个函数的调用关系图:

yconstfn bool NPL::IsDelimeter ( char  c)

判断是否为 NPL 分隔符。

自从
build 331

在文件 Lexical.h177 行定义.

参考 IsGraphicalDelimeter().

参考自 Decompose().

函数调用图:

这是这个函数的调用关系图:

yconstfn bool NPL::IsGraphicalDelimeter ( char  c)

判断是否为 NPL 图形分隔符。

自从
build 331

在文件 Lexical.h165 行定义.

参考自 Decompose() , 以及 IsDelimeter().

这是这个函数的调用关系图:

ValueNode NPL::LoadNPLA1 ( ValueNode &&  tree)

读取 NPLA1 翻译单元。

自从
build 449

在文件 NPLA1.cpp86 行定义.

参考 ystdex::bad_any_cast::from(), ystdex::sfmt(), ystdex::bad_any_cast::to(), TransformNPLA1() , 以及 platform::Descriptions::Warning.

参考自 YSLib::FetchMIMEBiMapping(), LoadNPLA1(), YSLib::UI::WidgetLoader::LoadUILayout() , 以及 operator>>().

函数调用图:

这是这个函数的调用关系图:

template<typename _type >
ValueNode NPL::LoadNPLA1 ( _type &&  tree)

在文件 NPLA1.h81 行定义.

参考 LoadNPLA1().

函数调用图:

string NPL::MakeEscape ( const string &  str)

转义字符串:替换指定字符串中的可转义字符。

参见
LexicalAnalyzer
自从
build 335

在文件 Lexical.cpp191 行定义.

参考 CHRLib::c.

参考自 YReader::ShlReader::LoadBookmarks() , 以及 YReader::ShlReader::SaveBookmarks().

这是这个函数的调用关系图:

File& NPL::operator<< ( File f,
const Configuration &  conf 
)
related

在文件 Configuration.cpp135 行定义.

TextFile& NPL::operator>> ( TextFile tf,
Configuration &  conf 
)
自从
build 403

在文件 Configuration.cpp141 行定义.

参考 NPL::SContext::Analyze(), LoadNPLA1(), YSLib::TextFile::Rewind() , 以及 NPL::Configuration::root.

函数调用图:

list< string > NPL::Tokenize ( const list< string > &  src)

记号化:提取字符串列表中的记号。

注解
排除字面量,分解其余字符串为记号列表。
自从
build 301

在文件 Lexical.cpp252 行定义.

参考 Decompose().

函数调用图:

ValueNode NPL::TransformNPLA1 ( const ValueNode node)

转换设置: S 表达式抽象语法树变换为 NPLA1 语义结构。

自从
build 472

在文件 NPLA1.cpp38 行定义.

参考 YSLib::ValueNode::begin, Deliteralize(), YSLib::ValueNode::end, YSLib::ValueNode::GetSize(), platform_ex::Windows::s, ystdex::to_string() , 以及 yunseq.

参考自 LoadNPLA1().

函数调用图:

这是这个函数的调用关系图: