Parser for C#

2018-12-31 23:37发布

Which parsers are available for parsing C# code?

I'm looking for a C# parser that can be used in C# and give me access to line and file informations about each artefact of the analysed code.

标签: c# parsing
15条回答
墨雨无痕
2楼-- · 2019-01-01 00:22

Have a look at Gold Parser. It has a very intuitive IU that lets you interactively test your grammar and generate C# code. There are plenty of examples available with it and it is completely free.

查看更多
春风洒进眼中
3楼-- · 2019-01-01 00:24

SharpDevelop, an open source IDE, comes with a visitor-based code parser which works really well. It can be used independently of the IDE.

查看更多
怪性笑人.
4楼-- · 2019-01-01 00:25

We have recently released a C# parser that handles all C# 4.0 features plus the new async feature: C# Parser and CodeDOM

This library generates a semantic object model which retains comments and formatting information and can be modified and saved. It also supports the use of LINQ queries to analyze source code.

查看更多
登录 后发表回答