Parsing Object Oriented Expressions with RPN
#1

Incredibly geeky hyperlink.

#2

Very cool Howard, thanks for posting it. ;)

#3

For what it's worth, this is basically how an algebraic calculator evaluates an expression that you type. So in a way, even TI's are RPN at heart :).

HP calculators do the same thing when they parse a symbolic expression because symbolics are stored in postfix notation.

#4

Quote:
symbolics are stored in postfix notation.

That's why you can't enter something like '(A+B)'. It is stored as 'A B +' and displayed as 'A+B'.

BTW: There's a programm ->RPN in the directory 'EXAMPLE/PRGS' you get when executing the command TEACH. It transforms an algebraic expression to its equivalent RPN-representation.

Thomas

Edited: 5 Oct 2010, 12:59 p.m.

#5

Several years ago I wrote an expression parser that converts an algebraic expression (with variables and functions) into an array of RPN tokens. This approach allows the re-evaluation of the expression multiple times without having to re-parse each time. It was a fun project in VB .Net.

The program's GUI would list the parsed RPN expression.

Namir

Edited: 6 Oct 2010, 2:04 a.m.



Possibly Related Threads…
Thread Author Replies Views Last Post
  [PRIME] RPN: another attempt at returning more than one value to the RPN stack Marcus von Cube, Germany 5 2,384 11-05-2013, 02:44 AM
Last Post: Marcus von Cube, Germany
  HP Prime - Saved formulas, expressions CR Haeger 6 2,035 10-07-2013, 08:25 PM
Last Post: CR Haeger
  HP-Prime: issues in entering expressions fhub 30 7,668 10-02-2013, 12:32 AM
Last Post: Tim Wessman
  PRIME runtime vs. parsing. Chris Tvergard 7 1,950 09-25-2013, 03:26 PM
Last Post: Chris Tvergard
  Product Series and Limit Expressions on the 50G Matt Agajanian 13 3,597 09-03-2013, 02:02 PM
Last Post: Simone Cerica
  OT: Google evaluates mathematic expressions (with a twist) DavidShenk 4 1,988 02-13-2013, 09:05 AM
Last Post: Juan J
  Immediate algebraic expressions in RPL+ Oliver Unter Ecker 8 2,374 11-19-2011, 04:29 AM
Last Post: Oliver Unter Ecker
  Help: how to get the hp-50g to work on expressions. Luca 2 1,071 08-17-2009, 12:39 PM
Last Post: Luca
  How to compute the value of symbolic expressions in HP-50g? Luca 2 1,043 08-17-2009, 02:36 AM
Last Post: Luca
  New Iphone & Itouch calculator - Access RPN and Active RPN Nigel Bamber 1 1,129 06-10-2009, 04:13 PM
Last Post: Jean-Michel

Forum Jump: