views:

179

answers:

2

We have a proprietry system that we develop scripting code in. We currently do not have a developer environment (apart from Notepad++) and cannot debug or compile this code. We have to submit it to the vendor to insert the code into the test or live system. The language is essentially C like and has the same syntax. Basically we want a tool to be able to simply check the syntax of chunks of code we send to the vendor. Does a tool exist that will do this for me?

+3  A: 

If it's really the same syntax as C you can use a C compiler. Usually there's a syntax check only option (/Zs for MSVC).

I'm not sure how many problems you'll run into since C compilers are pretty picky, and being "like C" is not the same as being C.

It does seem odd that you're being asked to develop code without having any capability to run or even compile it. Kind of like writing a book without being able to proof read it before publishing. I have a hard time getting even "Hello World" programs to compile & run without some sort of goof-up on the very first go.

Michael Burr
+4  A: 

You write code in a proprietary scripting language, so you require syntax checking because you cannot compile or debug the code onsite? I'd suggest getting a copy of the language reference (including the BNF if possible) from your vendor, get a compiler-compiler like Coco/R (http://www.ssw.uni-linz.ac.at/coco/), and build yourself a quick and dirty compiler that just validates the abstract syntax tree.

That is to say, yes, there are tools you can use, though perhaps they involve more work than what you may have hoped.

Dave