分析器C# [英] Parser for C#

查看:148
本文介绍了分析器C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

哪个解析器都可以解析C#code?

Which parsers are available for parsing C# code?

我在寻找任何可以在C#中使用,并给了我关于分析code的每个假象接入线和文件信息一个C#编译器。

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 ​​$ C:

Works on source code:

  • CSParser: From C# 1.0 to 2.0, open-source
  • Metaspec C# Parser: From C# 1.0 to 3.0, commercial product (about 5000$)
  • #recognize!: From C# 1.0 to 3.0, commercial product (about 900€) (answer by SharpRecognize)
  • SharpDevelop Parser (answer by Akselsson)
  • NRefactory: From C# 1.0 to 4.0 (+async), open-source, parser used in SharpDevelop. Includes semantic analysis.
  • C# Parser and CodeDOM: A complete C# 4.0 Parser, already support the C# 5.0 async feature. Commercial product (49$ to 299$) (answer by Ken Beckett)
  • Microsoft Roslyn CTP: Compiler as a service.

工程于装配:


  • 的System.Reflection

  • Microsoft通用编译架构
    从C#1.0到3.0,基于Microsoft Public License。通过<二手href=\"http://www.microsoft.com/downloads/details.aspx?FamilyID=9aeaa970-f281-4fb0-aba1-d59d7ed09772&displaylang=en\">Fxcop和规格#

  • Mono.Cecil能做到
    从C#1.0到3.0,开放源代码

汇编解析的问题是,我们对行和文件较少信息(信息的基于.pdb文件和PDB包含线路信息仅供方法)

The problem with assembly "parsing" is that we have less informations about line and file (the informations is based on .pdb file, and Pdb contains lines informations only for methods)

我personnaly推荐的 Mono.Cecil能做到 NRefactory

I personnaly recommend Mono.Cecil and NRefactory.

这篇关于分析器C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆