compiler: working SPARK scanner