djgpp, and MinGW compiled executables with sources [DOS 32-bit, windows 32+64-bit]) in a single bracematcher.zip. It is under the GPL3 license. lsm file.
10/05/2010 02:49 AM 198,090 bracematcher.zip SHA512 bracematcher.zip ff3a7109ee4127d9 83c03b6a10d98c6a cbb01d7d45a6c05e 19010c560642793d aa5611dcb302862a a126f068769068a9 970f3053db9e9fbb f5e59b938cf76447 MD5 bracematcher.zip 815378da0918febfa355a6b7014770d3
This is a command-line program for people who work with source code (such as PHP). it handles comments, (but not strings), and the following types of brackets: [] {} () ignores single and double quote strings ('' "" including escaped characters) and optionally <>
Programmer's notes:
-------------------
This program was compiled with Borland C++ 5.5.1 and MinGW 5.1.4.
You should be able to compile it with the borland compiler or any
compiler for that matter, because it only uses 2 libraries: stdio.h and
stdlib.h (sometimes I've see it called libstd.h once). You will need to change the qlong types (you can do it in types.h) to int if you port it to another system and change the printf statements, but the change is only minor.
I only use the following external functions (based on what I remember):
exit()
printf()
fopen()
fgetc()
fclose()
This program can generate a very long report. I suggest you feed the
output into FIND.EXE or grep for an exclamation point (!).

The class has changes only slightly since then. anything relating to line numbers and columns has been changed to qlong.
boilerplate
gcc compiler note: -fpack-struct cannot be used with iostream or anything to do with libstdc++ (including locale which includes iostream) without getting lots of errors.
The dos version is compiled with DJ Delorie's djgpp (gcc for DOS). It can be obtained at DJDelorie.com/djgpp.
The windows version was compiled with Borland C++ 5.5 (free edition). It is available at article (may include patches), free compiler (requires regisration).
The GNU compiler set has the peculiar ability to glob filenames at the command line. this can be a nice or an unwanted feature. to get around it, aurround the * with double quotes "*". This includes DJGPP-generated and MinGW-generated code.
The windows version was also compiled with MinGW 5.1.4 which is a GNU compiler set for windows. it has the peculiarity that it requires any use of __int64 to #include <basestd.h>, and it also doesn't allow 64-bit constants in the microsoft/borland style of appending i64 to the number. it requires you to use the gcc LL instead, however, printf does use %I64d rather than the normal gcc %lld. If you use %lld, your program will crash and do the DrWatson error report thing.
PHP is a programming language used for web page development and for applications and is available at http://php.net
ArgoUML is a UML diagramming tool used for designing programs and is available at http://argouml.tigris.org
Copyright 2008-2010 Jim Michaels
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.