Ericsson interview question

Syntax Checking, given code snippets and rules that apply to them, check what (if any) rules have been broken