Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我现在考虑编写一个解析器来解析,反之亦然!是否有解析器来执行此操作?否则我该怎么做?编写解析器的基础是什么?Logical Expressions Relational AlgebraT-Sql Codes
Logical Expressions
Relational Algebra
T-Sql Codes
如果您不了解解析和翻译的基础知识,则需要首先在其中花费大量精力,否则您可能不会成功。(对不起)。
这个 SO 答案为您提供了所需背景的指针:
学习编写编译器
您最好查看 LINQ 表达式树 ( System.Linq.Expressions),并注意这(在表达式 -> TSQL 方向上)正是LINQ-to-SQL 和类似工具所做的。
System.Linq.Expressions
表达式树被设计为以这种方式解析;但是对于 TSQL -> 表达式...这将变得更加棘手,因为它不是一种简单的语言,并且不是为这种解构而设计的。