C#: How to parse arbitrary strings into expression trees?

后端 未结 3 1014
旧巷少年郎
旧巷少年郎 2020-12-17 04:09

In a project that I\'m working on I have to work with a rather weird data source. I can give it a \"query\" and it will return me a DataTable. But the query is not a traditi

3条回答
  •  北荒
    北荒 (楼主)
    2020-12-17 05:02

    I wrote a parser for exaclty this usage and complexity level by hand. It took about 2 days. I'm glad I did it, but I wouldn't do it again. I'd use ANTLR or F#'s Fslex.

提交回复
热议问题