3 ms·
Please don't use regular expressions to parse Dyck languages. It doesn't work.
by beders 5y ago
Please don't use regular expressions to parse Dyck languages. It doesn't work.
- lifthrasiir 5y agoRegexp for tokenization does work. This entire essay boils down to the fact that you can always postprocess matches and in this case that corresponds to tossing unwanted tokens out.
- beders 5y agoYes, tokenization is regular. Parsing the tokenization result of a Dyck language still requires as context-free grammar. It's not a badge of honor or a great trick to try that with regular expressions. It is using the wrong tool for the job.