semantic analyser: basic framework