Hi,

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....

--

Rigidboss

Recommended Answers

All 8 Replies

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 ????


and...

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....

--

Rigidboss

There are some great commercial tools like Coverity (www.coverity.com) and Klocwork (www.klocwork.com) that do logical checking for defects. Services companies like Code Integrity Solutions (http://www.codeintegritysolutions.com) can help you out.

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

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

google

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

google

Yeah thanx

commented: Ohhh, sarcasm from the noob - JFDI and stop whining -3
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.