Bracket Matching by D

with Text_Io;Procedure B is
Use Ascii,Text_Io;Subtype C Is Character;procedure F(H:C)is A:C;begin
Get(A);if C'Pos(a)rem 4 in 1..2 then if C'Pos(h)/6/=C'Pos(A)/6 Then
Put("failed at: "&A&Get_Line&Lf);elsif End_Of_Line Then
Put("yes"&Lf);end if;elsif End_Of_Line then
Put("failed at: EOL"&Lf);else F(A);F(H);end If;end;begin F(Lf);end;

Note that non-ascii characters in the above source code will be escaped (such as \x9f).


return to the top page