Parse locals; use match instead of scan