Counting the number of if and else excluding the nested if-else

前端 未结 3 888
渐次进展
渐次进展 2021-01-22 05:50

Can anyone tell me how can i write a program where i have to read a c program from a text file and then count the number of if-else statements, excluding the nested if-else. Her

3条回答
  •  孤独总比滥情好
    2021-01-22 06:21

    If you aren't stuck to Java I would suggest Python pycparser https://github.com/eliben/pycparser . If you have to use Java then check Parsing / reading C-Header files using Java

提交回复
热议问题