Click here to Skip to main content
15,899,314 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

Does anyone know the best way of recreating the source infix expression from the rpn equivalent - ie how to get from abc*+ to a*b+c. Somehow brackets have to be added back into the source.
Posted

 
Share this answer
 
Comments
Espen Harlinn 13-Jan-11 6:14am    
5+ that shows the "why" part of the answer :)
Use anlr, here is an example that will help:
http://www.antlr.org/wiki/display/ANTLR3/Expression+evaluator[^]

Regards
Espen Harlinn
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900