Reverse polish

Discussion in 'C Programming' started by Steve Lambert, Dec 19, 2004.

  1. Hi

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

    Cheers
    Steve Lambert, Dec 19, 2004
    #1
    1. Advertising

  2. Steve Lambert <> 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 () ------------- Finland --------\
    \-------------------------------------------------------- rules! --------/
    "Ice cream sales somehow cause drownings: both happen in summer."
    - Antti Voipio & Arto Wikla
    Joona I Palaste, Dec 19, 2004
    #2
    1. Advertising

  3. Steve Lambert

    Guillaume Guest

    > 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.
    Guillaume, Dec 19, 2004
    #3
  4. Joona I Palaste <> writes:
    > Steve Lambert <> 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) <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.
    Keith Thompson, Dec 19, 2004
    #4
  5. Thanks for the reply. Could you possibly expand on this slightly

    "Joona I Palaste" <> wrote in message
    news:cq4c8h$i16$...
    > Steve Lambert <> 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 () ------------- Finland --------\
    > \-------------------------------------------------------- rules! --------/
    > "Ice cream sales somehow cause drownings: both happen in summer."
    > - Antti Voipio & Arto Wikla
    Steve Lambert, Dec 19, 2004
    #5
  6. On Sun, 19 Dec 2004 21:53:25 GMT, in comp.lang.c , "Steve Lambert"
    <> 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>
    Mark McIntyre, Dec 19, 2004
    #6
  7. Steve Lambert

    CBFalconer Guest

    *** rude topposting fixed ***

    Steve Lambert wrote:
    > "Joona I Palaste" <> wrote in message
    >> Steve Lambert <> 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 () ()
    Available for consulting/temporary embedded and systems.
    <http://cbfalconer.home.att.net> USE worldnet address!
    CBFalconer, Dec 20, 2004
    #7
  8. Steve Lambert

    Malcolm Guest

    "Steve Lambert" <> wrote in message
    news:pLmxd.471$...
    > 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.
    Malcolm, Dec 21, 2004
    #8
  9. I realise this but comp.programming and comp.theory seem to be dead
    newsgroups so I wasn't sure where else to post

    "Malcolm" <> wrote in message
    news:cqa06n$8kj$...
    >
    > "Steve Lambert" <> wrote in message
    > news:pLmxd.471$...
    >> 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.
    >
    >
    Steve Lambert, Dec 29, 2004
    #9
  10. Steve Lambert <> 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 () ------------- Finland --------\
    \-------------------------------------------------------- rules! --------/
    "To err is human. To really louse things up takes a computer."
    - Anon
    Joona I Palaste, Dec 29, 2004
    #10
  11. E. Robert Tisdale, Dec 29, 2004
    #11
  12. Steve Lambert

    infobahn Guest

    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.
    infobahn, Dec 30, 2004
    #12
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. schapopa

    OuterHTML - loosing polish fonts

    schapopa, Jan 24, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    320
    schapopa
    Jan 24, 2005
  2. ron
    Replies:
    1
    Views:
    879
    Stewart Gordon
    Jul 2, 2003
  3. Replies:
    2
    Views:
    740
    Oliver Wong
    Feb 6, 2006
  4. dogbite
    Replies:
    4
    Views:
    681
    osmium
    Oct 10, 2003
  5. Reverse Polish Ruby

    , Oct 20, 2006, in forum: Ruby
    Replies:
    0
    Views:
    102
Loading...

Share This Page