A program that convert C++ codes which without brace to standard C++ codes.
No third-part library used, directly use C++ complier to complie.
./cwb2sc your_file.cwb
your_file.cpp
The cwb file is actually just txt format file.
I define cwb file which contains C++ codes without brace, and the codes look like this:
while (pscF.getline(lastLine, 5000))
for (i = 0; i < strlen(lastLine); i++)
if (line[i] != ' ' && line[i] != '\t') break;
if (i == strlen(lastLine))
continue;
else
lastLineSpaceNum = i;
break;
As you can see, this type of codes cannot be complied by compiler, so can use this program to convert these codes to standard C++ codes:
while (pscF.getline(lastLine, 5000)){
for (i = 0; i < strlen(lastLine); i++){
if (line[i] != ' ' && line[i] != '\t') break;}
if (i == strlen(lastLine)){
continue;}
else{
lastLineSpaceNum = i;
break;}}