scanner: fix bug when ; directly followed an atom