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?
A:
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.
Vivin Paliath
2010-07-13 23:25:38
A:
In addition to the stuff already listed, I'd recomment to consider the following: http://en.wikipedia.org/wiki/Parsing_expression_grammar
SK-logic
2010-07-14 09:45:07