473,487 Members | 2,466 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Reverse polish

Hi

Anyone know how to convert a bracketed boolean expression into reverse
polish?

Cheers
Nov 14 '05 #1
11 2256
Steve Lambert <st***********@ntlworld.com> scribbled the following:
Hi Anyone know how to convert a bracketed boolean expression into reverse
polish?


That's an algorithm question and better suited to comp.theory. I'd go
about it by parsing the expression into a tree and then appending its
nodes together in a depth-wise order.

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-------------------------------------------------------- rules! --------/
"Ice cream sales somehow cause drownings: both happen in summer."
- Antti Voipio & Arto Wikla
Nov 14 '05 #2
> That's an algorithm question and better suited to comp.theory.

Ditto.

You'll find what you need to get started in "Algorithms in C",
by Robert Sedgewick.
Nov 14 '05 #3
Joona I Palaste <pa*****@cc.helsinki.fi> writes:
Steve Lambert <st***********@ntlworld.com> scribbled the following:
Hi
Anyone know how to convert a bracketed boolean expression into reverse
polish?


That's an algorithm question and better suited to comp.theory.


Or comp.programming.
I'd go about it by parsing the expression into a tree and then
appending its nodes together in a depth-wise order.


Agreed.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Nov 14 '05 #4
Thanks for the reply. Could you possibly expand on this slightly

"Joona I Palaste" <pa*****@cc.helsinki.fi> wrote in message
news:cq**********@oravannahka.helsinki.fi...
Steve Lambert <st***********@ntlworld.com> scribbled the following:
Hi

Anyone know how to convert a bracketed boolean expression into reverse
polish?


That's an algorithm question and better suited to comp.theory. I'd go
about it by parsing the expression into a tree and then appending its
nodes together in a depth-wise order.

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-------------------------------------------------------- rules! --------/
"Ice cream sales somehow cause drownings: both happen in summer."
- Antti Voipio & Arto Wikla

Nov 14 '05 #5
On Sun, 19 Dec 2004 21:53:25 GMT, in comp.lang.c , "Steve Lambert"
<st***********@ntlworld.com> wrote:
Thanks for the reply. Could you possibly expand on this slightly


If I might expand on it slightly, Joona rightly said you should ask this
over in comp.theory. I'd add comp.programming as a possible alternative.

Nobody is going to expand on the algo here. Its offtopic.

--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>
Nov 14 '05 #6
*** rude topposting fixed ***

Steve Lambert wrote:
"Joona I Palaste" <pa*****@cc.helsinki.fi> wrote in message
Steve Lambert <st***********@ntlworld.com> scribbled the following:
Anyone know how to convert a bracketed boolean expression into
reverse polish?
That's an algorithm question and better suited to comp.theory.

.... snip ...
Thanks for the reply. Could you possibly expand on this slightly


Yes. You could also try comp.programming. c.l.c is for C language
questions and not for foolish toppposting.

--
Chuck F (cb********@yahoo.com) (cb********@worldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!

Nov 14 '05 #7

"Steve Lambert" <st***********@ntlworld.com> wrote in message
news:pL***************@newsfe3-win.ntli.net...
Thanks for the reply. Could you possibly expand on this slightly

Your problem is implementing an infix to reverse Polish algorithm. Once you
understand that, writing the code in C, Basic, or indeed any programming
language ought to be relatively striaghtforward. So it's not a comp.lang.c
question.
Nov 14 '05 #8
I realise this but comp.programming and comp.theory seem to be dead
newsgroups so I wasn't sure where else to post

"Malcolm" <ma*****@55bank.freeserve.co.uk> wrote in message
news:cq**********@news8.svr.pol.co.uk...

"Steve Lambert" <st***********@ntlworld.com> wrote in message
news:pL***************@newsfe3-win.ntli.net...
Thanks for the reply. Could you possibly expand on this slightly

Your problem is implementing an infix to reverse Polish algorithm. Once
you
understand that, writing the code in C, Basic, or indeed any programming
language ought to be relatively striaghtforward. So it's not a comp.lang.c
question.

Nov 14 '05 #9
Steve Lambert <st***********@ntlworld.com> scribbled the following:
I realise this but comp.programming and comp.theory seem to be dead
newsgroups so I wasn't sure where else to post


Just because people won't answer your question there doesn't mean they
should answer it here. We're not responsible for people on other
newsgroups.

--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ------------- Finland --------\
\-------------------------------------------------------- rules! --------/
"To err is human. To really louse things up takes a computer."
- Anon
Nov 14 '05 #10
Steve Lambert wrote:
Anyone know how to
convert a bracketed boolean expression into reverse polish?


I used Google

http://www.google.com/

to search for

+"convert infix to postfix"

and I found lots of stuff including

http://www.faqts.com/knowledge_base/...html/aid/26071

"How convert infix to postfix expression?"
Nov 14 '05 #11
Steve Lambert wrote:
I realise this but comp.programming and comp.theory seem to be dead
newsgroups so I wasn't sure where else to post


comp.programming isn't dead; it's just rather quiet recently because
very few people have been asking questions there, possibly because
they think it's dead.
Nov 14 '05 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
4228
by: ron | last post by:
have been stuck on this for several days now. I am trying to create a reverse polish calculator and I'm stuck at an intermediate stage. This is what I know I have to do (just not sure how to do it...
7
8755
by: Philip Kofoed | last post by:
Greetings, I have a SQL server 2000 running on an english win2000 workstation. In a database I have a table where one varchar column is set to polish collation. Regional settings for the system...
2
1752
by: Marcin Floryan | last post by:
Hello! How can I create an Installer entirely in Polish language using Deployment Project in VB.NET (I have already translated the available texts into Polish). I have .NET 2003 EN and I read I...
0
3379
by: news.onet.pl | last post by:
How can I generate pdf with polish letters on linux ?? Now it generates double question marks instead of polish letters... Regards, Wojtas
0
2344
by: Larry Neylon | last post by:
Hi there, I'm currently trying to implement a website that will store and retrieve Polish, so I need to be able to handle Polish characters using classic ASP with MySql5. Does anybody have an...
2
5609
by: AmigoFd | last post by:
Hello, This problem is really driving me crazy ... * I have a mySql database which is latin1_swedish_ci * In my web.config I have: <globalization requestEncoding="ISO-8859-2"...
4
3659
by: robert.szczepanski | last post by:
Hi everybody; I can't change polish sign to small letter. This is my php script: <?php setlocale(LC_ALL, "pl_PL.UTF-8") ; //this function return "pl_PL.UTF-8"
8
5123
by: Werner Partner | last post by:
I would like to write correct poloish letters, e.g. in the following page: http://www.kairos-team.de/?lang=pl There are such letters as Å‚, Å„, Ä™, and so on. I found these letter sin polish...
0
1311
by: Piotrekk | last post by:
Hi I have a problem connected with DirectoryInfo class. My paths contain polish characters not present in english alphabet. Problem is that DirectoryInfo class displays them in a very bad way. I...
0
6967
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7132
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7180
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6846
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5439
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4870
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3076
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3071
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
266
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.