Simplify scanner definition in parser
Fix scanner in parser
Use .l instead of .lex
Fix small issues