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

NPL 词法处理。 更多...

#include "NPL/Lexical.h"
#include <ystdex/string.hpp>
Lexical.cpp 的引用(Include)关系图:

浏览源代码.

函数

char CheckLiteral (const string &str)
 检查指定字符串是否为字面量。
 
string Deliteralize (const string &str)
 去除字面量边界分隔符。
 
string MakeEscape (const string &str)
 转义字符串:替换指定字符串中的可转义字符。
 
list< string > Decompose (const string &src_str)
 分解字符串为记号。
 
list< string > Tokenize (const list< string > &src)
 记号化:提取字符串列表中的记号。
 

详细描述

NPL 词法处理。

版本
r1283
作者
FrankHBfrank.nosp@m.hb19.nosp@m.89@gm.nosp@m.ail..nosp@m.com
自从
build 335
创建时间:
2012-08-03 23:04:26 +0800
修改时间:
2012-09-25 08:46 +0800
文本编码:
UTF-8
模块名称:
NPL::Lexical

在文件 Lexical.cpp 中定义.

函数说明

char CheckLiteral ( const string &  )

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

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

在文件 Lexical.cpp172 行定义.

参考自 Deliteralize().

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

list<string> Decompose ( const string &  )

分解字符串为记号。

自从
build 335

在文件 Lexical.cpp228 行定义.

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

参考自 Tokenize().

函数调用图:

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

string Deliteralize ( const string &  )

去除字面量边界分隔符。

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

在文件 Lexical.cpp184 行定义.

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

参考自 TransformConfiguration().

函数调用图:

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

string MakeEscape ( const string &  )

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

参见
LexicalAnalyzer
自从
build 335

在文件 Lexical.cpp190 行定义.

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

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

list<string> Tokenize ( const list< string > &  )

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

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

在文件 Lexical.cpp252 行定义.

参考 Decompose().

函数调用图: