开发者

Tokenizer for C#?

开发者 https://www.devze.com 2022-12-08 03:35 出处:网络
Is there any functionality built into the .NET framework somewhere to tokenize C# code? I\'m not looking to build a tokenizer in C#, I\'m looking for something that ca开发者_JAVA技巧n tokenize C# sour

Is there any functionality built into the .NET framework somewhere to tokenize C# code? I'm not looking to build a tokenizer in C#, I'm looking for something that ca开发者_JAVA技巧n tokenize C# source code.


The only thing that comes to mind is a parser generator like ANTLR, which has C# Sample Grammar available. Bison/Flex also looks like it has pretty decent C# grammar as well. Parsing any language and then actually making sense of it is fairly difficult, so I wish you the best of luck.


No, not built into the framework.

However, you may want to look at Irony, and C# Parser on CodePlex, as they both provide a parser/lexer for at least simple C#


The GOLD Parser too has a C# grammar (to parse C#), and run-time engines written in C# (so that you can execute that grammar using C# code).

0

精彩评论

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

关注公众号