List:General Discussion« Previous MessageNext Message »
From:Joerg Bruehe Date:July 10 2006 7:48am
Subject:Re: How to look for balanced parenthesis?
View as plain text  
Hi Mike, all!


mos wrote:
> I have a complicated SQL statement with around a dozen 
> "if(this,val1,val2)" embedded in it and there are even nested If 
> clauses. I'm getting syntax errors because I'm not balancing the "( )" 
> properly. Is there any free software out there for Windows that I can 
> copy and paste the SQL statement into that will show me where the 
> parenthesis are unbalanced? It doesn't have to know about SQL, I just to 
> either highlight the parenthesis range or find out when the parenthesis 
> become out of sync.

I cannot give a list of editors that will do it,
but I know that "vim" ("vi improved") does it.
It will also do syntax highlighting, but I do not know whether it knows 
about SQL already or would need an additional SQL syntax description.

"vim" is available freely (both "free of charge" and "free open source") 
for Unix + Windows from here:
    http://www.vim.org/

It has several other nice features which will need some time to really 
use them, like "folding" (hiding inner structure elements from display), 
and it includes "vimdiff" (a tool to compare two file versions side by 
side).

Whether you like vim (like I do) or not is a different issue, flame wars 
about editors are famous.

I admit that the way you use vim is different from many Windows tools, 
it is definitely not "point-and-click".
There is also a "gvim", more GUI-style, which I cannot comment on.

So you have to make your own choice.


HTH,
Jörg

-- 
Joerg Bruehe, Senior Production Engineer
MySQL AB, www.mysql.com
Office:  (+49 30) 417 01 487     VoIP: 4464@stripped
Thread
How to look for balanced parenthesis?mos9 Jul
  • Re: How to look for balanced parenthesis?Rhino9 Jul
    • Re: How to look for balanced parenthesis?Miles Thompson10 Jul
      • Re: How to look for balanced parenthesis?Hank11 Jul
        • Re: How to look for balanced parenthesis?Miles Thompson11 Jul
          • Re: How to look for balanced parenthesis?Andrew Kreps11 Jul
    • Re: How to look for balanced parenthesis?mos10 Jul
  • Re: How to look for balanced parenthesis?Miles Thompson10 Jul
  • Re: How to look for balanced parenthesis?Joerg Bruehe10 Jul
    • Re: How to look for balanced parenthesis?Pooly11 Jul
  • Re: How to look for balanced parenthesis?Rhino10 Jul