Flex/Bison is my first solution. Those related files add.