Here is a copy of the UEFA Euro 2012 Tie Breaking Rules. Group B would get very interesting in case Netherlands and Germany win on Sunday. Below are the tie breaking rules.
Equality of points after the group matches
8.07 If two or more teams are equal on points on completion of the group matches, the
following criteria are applied, in the order given; to determine the rankings:
a) higher number of points obtained in the matches among the teams in question;
b) superior goal difference in the matches among the teams in question (if more than two teams finish equal on points);
c) higher number of goals scored in the matches among the teams in question (if more than two teams finish equal on points);
d) superior goal difference in all the group matches;
e) higher number of goals scored in all the group matches;
f) position in the UEFA national team coefficient ranking system (see Annex I, paragraph 1.2.2);
g) fair play conduct of the teams (final tournament);
h) drawing of lots.
8.08 If two teams which have the same number of points, the same number of goals scored and conceded play their last group match against each other and are still equal at the end of that match, the ranking of the two teams in question is determined by kicks from the penalty mark (Article 16), provided no other teams within the group have the same number of points on completion of all group matches. Should more than two teams have the same number of points, the criteria listed under paragraph 8.07 apply.
Source: UEFA