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

Regular expressions are probably not enough for parsing formulas (depending of course on the exact task given), they usually are at least a context free language.
 help



Regular expressions are definitely enough for turning characters into tokens, after which a simple recursive descent parser is vastly more straightforward to write. Lexing is optional, but generally advised.



Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: