Click here to Skip to main content
15,891,253 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hello to everyone
I have to implement Chapin metric functionality(via C#) (complexity of programs). The metric should detect all variables of a VB code and somehow determine their corresponding classes:
P = number of input variables (including global variables) that are used in calculating the output
M = number of variables that are modified or created in the method
C = number of variables that participate in determining control flow
T = number of variables that are unused But these traditional software complexity metrics are applicable at the method level.
How can this thing be done? As I realize regular expressions is not the best way. Maybe there are some lexical parsers/analyzers of vb code?

Any help is appreciated!
Posted
Comments
Krunal Rohit 13-Nov-15 0:53am    
I think lexical parser would help you. Introduction to GOLD Parser[^]

-KR
Dzianis Igaravich Leanenka 13-Nov-15 2:07am    
Thank you! it seems to me that I need a kind of suitable parser like this one

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900