added test/kfg; refactored kfg scanner/parser interfaces