Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Table-driven parsers with custom per-statement tokenizers are still common in surviving Fortran compilers, with the exception of flang-new in LLVM. I used a custom parser combinator library there, inspired by a prototype in Haskell's Parsec, to implement a recursive descent algorithm with backtracking on failure. I'm still happy with the results, especially with the fact that it's all very strongly typed and coupled with the parse tree definition.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: