Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2005:
[Freeciv-Dev] Re: (PR#12873) OR Requirements for Buildings
Home

[Freeciv-Dev] Re: (PR#12873) OR Requirements for Buildings

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: vasc@xxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#12873) OR Requirements for Buildings
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 23 Apr 2005 09:54:31 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12873 >

Vasco Alexandre da Silva Costa wrote:

> So an answer is: Reverse Polish Notation aka postfix notation. Like this:
> 
> sreqs    =
>     { "type", "name", "range"
>       "Tech", "Electronics", "Player"
>       "Building", "Factory", "City"
>       "Operator", "AND"
>       "Terrain", "Mountains", "Adjacent"
>       "Special", "River", "Adjacent"
>       "Operator", "OR"
>       "Operator", "AND"
>     }
> 
> Super reqs. You can still store the expression as a list, and with a
> stack you can calculate the expression pretty easily.

Not that I'm in favor of such craziness but prefix notation would be
better.  Just reverse the above list and you have prefix notation.

-jason





[Prev in Thread] Current Thread [Next in Thread]