|
C++ syntax validator |
Kevin Adrian
Member #7,087
April 2006
|
Hi, can anybody give a suggestion for a C++ syntax checking/validation tool? In my job we are using a scripting language with a C++ syntax. I've already searched for such tool but Google just found code analysing tools regarding to performance and code quality measurement. I just want to test, if there are any syntax errors in my source code. The syntax checking of the scripting language we are using at work has a very poor and not reliable error reporting. By the way, an open source tool would be awesome :-) Thanks in advance! My mouth will speak words of wisdom; the utterance from my heart will give understanding. (Psalm 49:3) |
Erin Maus
Member #7,537
July 2006
|
Clang and GCC have an option, -fsyntax-only, to only check for syntax errors. Assuming the language is a strict subset of C or C++, that should work. --- |
Kevin Adrian
Member #7,087
April 2006
|
OK thanks! I'll try that. My mouth will speak words of wisdom; the utterance from my heart will give understanding. (Psalm 49:3) |
Chris Katko
Member #1,881
January 2002
|
Also, the term you're looking for is a Linter. A tool that merely checks the code validity. One of the most popular C++ linters is called CppCheck and it's a huge, well-supported, project. -----sig: |
|