I'm writing a program that needs to build syntax trees from expressions in prefix notation. What resources would you recommend I look into to learn about parsing expressions?
Resources on parsing expressions
Asked Answered
Your question is rather broad. I'd look into anything dealing with the following:
- Parsing expression-grammar
- BNFs, EBNF`s
- Recursive-Descent Parsers
- Operator-precedence parser (basically prefix parser)
- Polish notation (talks about prefix notation)
Your best bet is to try and understand BNF's and EBNF's. From there you can go on to writing recursive-descent parsers (they can be created easily from your grammars with a few simple rules).
This page here talks about recursive-descent parsing using BNF's.
In addition to the stuff already listed, I'd recomment to consider the following: http://en.wikipedia.org/wiki/Parsing_expression_grammar
© 2022 - 2024 — McMap. All rights reserved.