Post Reply 
My own infix to prefix approach. What do you think?
04-29-2014, 12:35 PM
Post: #9
RE: My own infix to prefix approach. What do you think?
(04-29-2014 08:55 AM)HP67 Wrote:  Thomas beat me to it but this one-hit wonder from Dijkstra appears to be a milestone of algorithmic approach to this.

Ah, but there's the rub - it's a one-hit wonder - which topped the charts in 1961, but the world has moved on since then. How do you add support for complex numbers? Vectors? Arrays? Flow control such as function definition, if-then-else and while? Local vs global variables? Classes? And so it goes. . . The decision really is, does Matt want to learn a generally-useful approach to parsing and language translation, or one algorithm for one specific problem? Hand-coding the shunting-yard algorithm is a basic exercise in coding stacks and queues, but ANTLR gets more work done, faster, using much more powerful techniques. Much better for exploring the underlying ideas and turning them into something useful.

--- Les
[http://www.lesbell.com.au]
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: My own infix to prefix approach. What do you think? - Les Bell - 04-29-2014 12:35 PM



User(s) browsing this thread: 1 Guest(s)