public void scann(String text) {
		clean();
		int pos = 0;
		int line = 1;
		main: while (pos < text.length()) {
			for (String ign : ignore) {
				Pattern p = Pattern.compile(Pattern.quote(ign));
				Matcher matcher = p.matcher(text.substring(pos));
				if (matcher.lookingAt()) {
					if (isNewline(ign)) line++;
					pos += matcher.end();
					continue main;
				}
			}
			int mlen = 0;
			Symbol symbol = null;
			for (Token token : tokens) {
				MatchResult m = token.match(text.substring(pos));
				if (m != null) {
					String value = m.group();
					if (m.end() > mlen) {
						mlen = m.end();
						symbol = new Symbol(token, value);
						symbol.setLine(line);
					}
				} else {
					continue;
				}
			}
			if (mlen == 0)
				throw new SyntaxError("Unexpected character:"+text.charAt(pos)+" at line "+line);
			pos += mlen;
			table.add(symbol);
		}
	}