extract used symbols and save declarations