I wanna generate a software, which should read a C file and check for some rules.

I mean, some lines will be syntactically correct according to C compiler. But logically sm lines will be wrong.

I wanna detect such lines using this software.

Please help me how to start with....



I believe the program is called lint.

If you want to write your own, you will probably want to study yacc (Yet Another Compiler Compiler)

Wer can i know more details about that lint program ????


I cant afford to pay a price for klockworks etc. its only a small peice of code. We are a small team and we need our own customized way of detecting "WRONG WAY OF WRITING CODE"

I mean like this...

Consider the following program. i put pseudo code for simplicity

if a is greater than b print a is greater, else b is greater.

Instead this line will be effecient ...

a>b?print a, print b

So could get my point.

This software must suggest and detect the wrong / in effecient code flow.

So it would be better to write a software on my own... For which i need a help to start... please help me guys....



Wer can i know more details about that lint program ????


commented: Simple and obvious really :) +17

Covertiy cost millions of dollars :D , you can try static analysis tool like C++Test .

I could not find any tool called c++ test in google.

Could you please help me about c++ test tool


Yeah thanx

commented: Ohhh, sarcasm from the noob - JFDI and stop whining -3