Reverse polish

S

Steve Lambert

Hi

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

Cheers
 
J

Joona I Palaste

Steve Lambert said:
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.
 
G

Guillaume

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.
 
K

Keith Thompson

Joona I Palaste said:
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.
 
M

Mark McIntyre

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.
 
C

CBFalconer

*** rude topposting fixed ***

Steve said:
.... 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.
 
M

Malcolm

Steve Lambert said:
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.
 
S

Steve Lambert

I realise this but comp.programming and comp.theory seem to be dead
newsgroups so I wasn't sure where else to post
 
J

Joona I Palaste

Steve Lambert said:
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.
 
I

infobahn

Steve said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top