Booleano
This is a pijnu version for a project lead by Gustavo Narea at Booleano Home Page.
Booleano defines a logical mini-language. The highly interesting aspect is that it is intended to allow a user express logical expressions using it's own natural language. So that the grammar must be flexible, adaptive. Booleano's approach is to define a standard grammar that will be overloaded to language-specific versions.
Gustavo does this using pyparsing, a parsing framework for and in python (actually the one that has been the main source of inspiration for pijnu's library).
For the sake of interest, I'm working with Gustavo's help on a pijnu implementation: pijnuBooleano — work in progress.
Abstract from Booleano at launchpad:
Booleano: Interpreter of boolean expressions
Booleano is a Python-powered interpreter of boolean expressions which developers can use to allow their users write text-based filters. It uses an adaptive grammar, so developers will be able to customize the language used.
Sample uses
1.- A music player could enable users to create playlists based on filters written in human languages. For example, users could use the following expressions to get only David TMX's songs from the albums released in 2008 or later:
- Castilian: autor == "David TMX" y álbum.año >= 2008
- English: author == "David TMX" and album.year >= 2008
- French: auteur == « David TMX » et album.année >= 2008
2.- Users of a search utility like `find` could use a search criteria written in a human language instead of command switches. For example, to search for the HTML documents whose owner is any user in the "admin" group or the current user, they could use the following expression:
- Castilian: extensión en {"html", "htm", "xhtml"} y ("admin" en propietario.grupos o yo == propietario)
- English: extension in {"html", "htm", "xhtml"} and ("admin" in owner.groups or me == owner)





