fix name resolving in rules; simplify lapg.tm: use extended BNF