Advertisement

05.26.2008 at 12:34PM PDT, ID: 23433239
[x]
Attachment Details

check for unmatched braces

Asked by GP1628 in Linux, Linux Programming

I need to check a file line by line for a missing brace. The line can contain multiple, nested braces using {}. Such as this...
#alias {botcast} #if {$botfail<$maxfail} {cast '$lastspell' $target;#var holderc
 $botfail;#math {botfail} {$holderc+1}};#if {$botfail=$maxfail} {say I give up on casting '$lastspell' $target}}

No check needs to go past a line. Each line will pass or fail on its own. All I have to know is which lines do not have matches of {}

Ive spent all morning googling and every answer seems to be either too complicated or extensive in its checks. I really thought there would be a snippet to do this. Maybe something that checks for matched quotes or matched brackets which can be modified for this job. Before anyone brings up standard prettyfiers this is tintin code which might confuse some of the standard code-checkers.Start Free Trial
[+][-]05.26.2008 at 02:19PM PDT, ID: 21648148

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]05.26.2008 at 02:30PM PDT, ID: 21648179

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Linux, Linux Programming
Sign Up Now!
Solution Provided By: Tintin
Participating Experts: 2
Solution Grade: B
 
 
[+][-]05.26.2008 at 02:54PM PDT, ID: 21648264

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.26.2008 at 03:11PM PDT, ID: 21648337

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.26.2008 at 05:38PM PDT, ID: 21648781

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.26.2008 at 06:11PM PDT, ID: 21648856

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05.26.2008 at 10:15PM PDT, ID: 21649489

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628