Uppaal gives wrong location (points to next template) of syntax error if the template contains one non-initial location or none locations at all. To reproduce: 1) start uppaal with default empty spec, i.e. just one "Template" template. 2) choose edit->insert template, it will be called P0, leave it blank or create one location without "Initial" attribute 3) choose edit->insert template, it will be called P1, create at least one location with "Initial" attribute. 4) press F7 5) Uppaal reports syntax error: position P1, description "Missing initial state", which is a bug: it should be position P0.
Fixed on the trunk
Resolving the bug.