开发者

Parser to parse Relational Algebras to T-Sql Codes and vice-versa

I now think about write a parser to parse Logical Expressions Relational Algebra to T-Sql Codes and vice-versa! Whether there is an parser to 开发者_开发问答do this? Otherwise how can i do this? What is the basics of writing a parser?


If you don't know the basics of parsing and translation, you need to spend significant energy there first or you will likely not succeed. (Sorry).

This SO answer gives you pointers to the background you need:

Learning to write a compiler


You would do well to look at LINQ expression trees (System.Linq.Expressions), and note that this (in the expression -> TSQL direction) is exactly what LINQ-to-SQL and similar tools do.

Expression trees are designed to be parsed in this manner; However for TSQL -> expression... that is going to be trickier since it is not a simple language, and was not designed for this deconstruction.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜