Language: Java

import java.util.Scanner;
import java.util.Deque;
import java.util.ArrayDeque;

public class Main {
	public static void main(String args[]){
		Scanner in=new Scanner (System.in);
		Deque<Character> stack=new ArrayDeque<Character>();
		String target;
		while (!(in.hasNext("."))) {
			target=in.next();
			for (int i=0;i<target.length();i++) {
				if (target.charAt(i)=='\[' || target.charAt(i)=='\(') {
					stack.push(target.charAt(i));
				}else if ((stack.getLast()=='\[' && target.charAt(i)=='\]') || (stack.getLast()=='\(' && target.charAt(i)=='\)')) {
						stack.pop();
				}
			}
			if (stack.isEmpty()) {
				System.out.println("yes");
			}else{
				System.out.println("no");
				stack.clear();
			}
		}
	}
}

Compiler output:
Main.java:13: error: illegal escape character
				if (target.charAt(i)=='\[' || target.charAt(i)=='\(') {
				                        ^
Main.java:13: error: unclosed character literal
				if (target.charAt(i)=='\[' || target.charAt(i)=='\(') {
				                      ^
Main.java:13: error: unclosed character literal
				if (target.charAt(i)=='\[' || target.charAt(i)=='\(') {
				                         ^
Main.java:13: error: illegal escape character
				if (target.charAt(i)=='\[' || target.charAt(i)=='\(') {
				                                                  ^
Main.java:13: error: unclosed character literal
				if (target.charAt(i)=='\[' || target.charAt(i)=='\(') {
				                                                ^
Main.java:13: error: not a statement
				if (target.charAt(i)=='\[' || target.charAt(i)=='\(') {
				                                              ^
Main.java:13: error: unclosed character literal
				if (target.charAt(i)=='\[' || target.charAt(i)=='\(') {
				                                                   ^
Main.java:15: error: illegal escape character
				}else if ((stack.getLast()=='\[' && target.charAt(i)=='\]') || (stack.getLast()=='\(' && target.charAt(i)=='\)')) {
				                              ^
Main.java:15: error: unclosed character literal
				}else if ((stack.getLast()=='\[' && target.charAt(i)=='\]') || (stack.getLast()=='\(' && target.charAt(i)=='\)')) {
				                            ^
Main.java:15: error: 'else' without 'if'
				}else if ((stack.getLast()=='\[' && target.charAt(i)=='\]') || (stack.getLast()=='\(' && target.charAt(i)=='\)')) {
				 ^
Main.java:15: error: unclosed character literal
				}else if ((stack.getLast()=='\[' && target.charAt(i)=='\]') || (stack.getLast()=='\(' && target.charAt(i)=='\)')) {
				                               ^
Main.java:15: error: illegal escape character
				}else if ((stack.getLast()=='\[' && target.charAt(i)=='\]') || (stack.getLast()=='\(' && target.charAt(i)=='\)')) {
				                                                        ^
Main.java:15: error: unclosed character literal
				}else if ((stack.getLast()=='\[' && target.charAt(i)=='\]') || (stack.getLast()=='\(' && target.charAt(i)=='\)')) {
				                                                      ^
Main.java:15: error: not a statement
				}else if ((stack.getLast()=='\[' && target.charAt(i)=='\]') || (stack.getLast()=='\(' && target.charAt(i)=='\)')) {
				                                                    ^
Main.java:15: error: unclosed character literal
				}else if ((stack.getLast()=='\[' && target.charAt(i)=='\]') || (stack.getLast()=='\(' && target.charAt(i)=='\)')) {
				                                                         ^
Main.java:15: error: illegal escape character
				}else if ((stack.getLast()=='\[' && target.charAt(i)=='\]') || (stack.getLast()=='\(' && target.charAt(i)=='\)')) {
				                                                                                   ^
Main.java:15: error: unclosed character literal
				}else if ((stack.getLast()=='\[' && target.charAt(i)=='\]') || (stack.getLast()=='\(' && target.charAt(i)=='\)')) {
				                                                                                 ^
Main.java:15: error: not a statement
				}else if ((stack.getLast()=='\[' && target.charAt(i)=='\]') || (stack.getLast()=='\(' && target.charAt(i)=='\)')) {
				                                                                               ^
Main.java:15: error: unclosed character literal
				}else if ((stack.getLast()=='\[' && target.charAt(i)=='\]') || (stack.getLast()=='\(' && target.charAt(i)=='\)')) {
				                                                                                    ^
Main.java:15: error: illegal escape character
				}else if ((stack.getLast()=='\[' && target.charAt(i)=='\]') || (stack.getLast()=='\(' && target.charAt(i)=='\)')) {
				                                                                                                             ^
Main.java:15: error: unclosed character literal
				}else if ((stack.getLast()=='\[' && target.charAt(i)=='\]') || (stack.getLast()=='\(' && target.charAt(i)=='\)')) {
				                                                                                                           ^
Main.java:15: error: not a statement
				}else if ((stack.getLast()=='\[' && target.charAt(i)=='\]') || (stack.getLast()=='\(' && target.charAt(i)=='\)')) {
				                                                                                                         ^
Main.java:15: error: unclosed character literal
				}else if ((stack.getLast()=='\[' && target.charAt(i)=='\]') || (stack.getLast()=='\(' && target.charAt(i)=='\)')) {
				                                                                                                              ^
23 errors