Tag 'brackets':

Check Braces
Aug 3rd, 2015

algorithms brackets parsing
Annual hours saved: 1

The other day I needed a quick way to check a file for matching braces (and brackets and parentheses). I couldn’t find an easy way to do this on the command-line, so I wrote this simple Java class, and wrapped it into a .jar:


It correctly identifies mismatched, unexpected, and improperly nested brackets (e.g. { ( } )). It is however, completely language agnostic, and will not notice if brackets are in a comment block or string, or are otherwise escaped. It just does a naive count.

Your E-Sheep:

( change )

Recent Posts:

10/14 - ADHOC Changelog
8/19 - And now… random puppies!
8/3 - Check Braces
7/23 - Make Limits Java Heap Size on 32-bit Linux
7/21 - Terminal Color Support in Makefiles

Top Tags:

aaaaargh! algorithms automatic awesome colors config development environment documentation frustrating java linux make parsing project management random syntax-highlighting terminal types

Random Quote:

The problem with quotes on the internet is that you can't always be sure of their authenticity.
Abraham Lincoln

Powered By:

2017 - Creative Commons 3.0