Re: [Pyparsing] How to distinguish a variable from a integer
Brought to you by:
ptmcg
From: spir <den...@fr...> - 2009-05-15 12:49:41
|
Le Thu, 14 May 2009 21:53:40 +0200, Gustavo Narea <me...@gu...> s'exprima ainsi: > I'm working on a package called PyACL, which as the name implies, > implements Access Control Lists in Python (and repoze.what 2 will use it a > lot). But one of the things that I was missing was the way to allow system > administrators to filter the access rules easily, so I started working on > this generic Pyparsing-based library which I'll announce here as soon as > it's usable: https://launchpad.net/booleano Had a look and find it really interesting (booleano). Reminds me of a project about customizing computer languages (PL, wiki, etc), including allowing various natural languages. This should be a kind of layer (possibly implemented in an editor) between the user and the standard computer language. The main issue was that key words (not necessarily reserved words) may well be free words for another user/natural language. E.g. in your example - 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 what happens if logical ('and' '==' '>=', probably 'not' 'or'), or maybe even key ('author' 'album' 'year'), tokens are used with another sense or context in another user's dialect? Do you need to protect all possible variants of words having a special meaning in your language? (Even if it was possible, then user-level choices are impossible). > > Buena suerte, y mucho gusto! > > ¡Lo mismo digo! ;-) > > Thank you! =) Bona sort, i molt plaer! (català) Denis ------ la vita e estrany |