Stacks are often used for parsing. A simple parsing task is to check whether a string of parentheses are matching.
For example, the string ([]) is matching, because the outer and inner brackets form pairs. ()<>) is not matching, because the last ) has no partner. ([)] is also not matching, be...