Re: problem with qualifier parser?

Sebastien Bigaret <[email protected]> 19 Apr 2004 21:27:57 +0200
Newsgroups gmane.comp.python.modeling
Message-ID <[email protected]>
        Hi John and all,

  You'll find a patch solving the problem along w/ the corresponding
  unittests at sf.net, bug #938096:

https://sourceforge.net/tracker/index.php?func=detail&aid=938096&group_id=58935&atid=489335

        Thanks for reporting!

-- Sébastien.


PS for Yannick: I still did not find the time to investigate any further
  about GNU Arch, but I will, this looks interesting (not to say about
  the new name for the framework...!-). Any comparison w/ subversion,
  BTW?


> John Lenton <[email protected]> writes:
> >     $ python
> >     Python 2.3.3 (#2, Feb 24 2004, 09:29:20)
> >     [GCC 3.3.3 (Debian)] on linux2
> >     Type "help", "copyright", "credits" or "license" for more information.
> >     >>> from Modeling.EditingContext import EditingContext
> >     >>> ec=EditingContext()
> >     >>> ec.fetch('foo', 'orbit > 3')
> >     Traceback (most recent call last):
> >       File "<stdin>", line 1, in ?
> [...]
> >         raise ValueError, "Syntax error near token: `%s'" % token
> >     ValueError: Syntax error near token: `<Token OR>'
> > 
> > actually there's the same problem with any token: OR, AND, IN, or
> > NOT. Is this a known problem in spark? is my spark version wrong?
> > spark is 0.6.1, Modeling is 0.9-pre-16-patch892454.
> 
> 
> This is a bug, unfortunately not fixed on sf yet :/  I'll have a look at it
> tonite. In the meantime you can build the same qualifier by hand:
> 
>   >>> from Modeling.Qualifier import *
>   >>> q=KeyValueQualifier('foo', QualifierOperatorGreaterThan, 3)
>   >>> print q
>   (foo>3)
>   >>> ec.fetch('foo', q)
> 
> You can have a look at test_Qualifier.py for other examples.



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click