parser library

Jan 18, 2012 at 9:21 PM

I'm debating between two options for parsing C#:

1. srcml --

2. Roslyn --

It seems that there are some advantages and disadvantages to both, in terms of efficiency and support for languages other than C#. Does anyone feel strongly about which one we use, or have some other approach to suggest?

Jan 19, 2012 at 6:05 PM

I can't help you with that - I've never done anything related to the C# parsing - I think Dave has some knowledge about that.

However, I think it would be better if you create a new layer for the parsing functionality, using interfaces and abstract classes (dependency injection), which will be used in the dependent project and hide the usage of the selected parser in the class implementing one of the interfaces. If we face some serious problems using the selected parser, we will be able to easily change the inner implementation, without the impact on the whole project - does it make sense to you?

Jan 21, 2012 at 6:26 PM

I prefer SrcML because once you have it working for C# it is trivial to add C and C++, which are also popular languages in Visual Studio.  HOWEVER, since you're kinda becoming the parser lead you can use whichever one you prefer and I will support that!