Talk:Balanced brackets: Difference between revisions

added another thread. -- ~~~~
(added another thread. -- ~~~~)
Line 27:
I read the task as being primarily about checking for balanced strings and the generator being part of a check. I was hoping to find comments on how to generate longer strings with equal probability of being balanced or not.
The Tcl interpretaion fits too though. --[[User:Paddy3118|Paddy3118]] 09:57, 24 February 2011 (UTC)
 
== usefulness of task ==
 
I have a use for something like this, but to make it useful, any character not a grouping symbol is essentially ignored, but parsing for quoted strings is done with multiple deliminters allowed, namely the double quote ["] and the apostrophe ['].
<br>The input strings are essentially statements for assignment to variables.
<br>The allowable grouping symbols being <tt> ( ) [ ] { } « » </tt> (and could be expanded).
<br>Equations of the sort: <tt> xxx=]yyy+zz[ </tt> are, of course, illegal (even though they "pair up").
<br>The equation: <tt> zz='(' </tt> is legal.
<br>I had a difficult time programming to catch errors like: <tt> xxx = ((a+ [b/c)] ) </tt>.
<br>Such a generalized task, I guess, would better be served with its own task. -- [[User:Gerard Schildberger|Gerard Schildberger]] 23:29, 31 March 2012 (UTC)