5 /* Balanced parenthesis with conditions. */
17 void test( const char *str )
19 int cs = cond_start, n = 0;
21 const char *pe = str + strlen( str );
25 ( '('@{n++;} | ')'@{n--;} | [^()] )*
28 main := ' '* comment ' '* '\n' @{cout << "success";};
32 if ( cs < cond_first_final )
47 test( "((())()(((()))))\n" );
51 #ifdef _____OUTPUT_____