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?
Asked
Active
Viewed 561 times
1
-
You might first take a look at Linq-To-SQL? ExpressionTree is a good keyword in this area... – Yves M. Nov 09 '10 at 09:08
2 Answers
1
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:

Community
- 1
- 1

Ira Baxter
- 93,541
- 22
- 172
- 341
0
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.

Marc Gravell
- 1,026,079
- 266
- 2,566
- 2,900