Tips to write a custom parser