Trying to understand filter syntax

Antony Stone Antony.Stone at arbtt.open.source.it
Sun Jul 2 20:06:43 CEST 2017


On Sunday 02 July 2017 at 19:46:22, Gwern Branwen wrote:

> What happens if you try sticking your rule in the config file as a special
> single-purpose new tag? Does the rule work there but not on the CLI?

With a rule:

	  $date >= 2017-07-02 && $date < 2017-07-03  ==> tag Today,

I get:

Parser error:
"gwern.cfg" (line 27, column 16):
unexpected "-"
expecting digit, "=~", ">=", ">", "==", "=", "<" or "<="
Cannot compare expressions of type Date and type Integer

With a rule:

	$date >= "2017-07-02" && $date < "2017-07-03"  ==> tag Today,

I get:

Parser error:
"gwern.cfg" (line 27, column 25):
unexpected "&"
expecting "=~", ">=", ">", "==", "=", "<" or "<="
Cannot compare expressions of type Date and type String


So, same result as the CLI.


Antony.

-- 
Because it messes up the order in which people normally read text.
> Why is top-posting such a bad thing?
> > Top-posting.
> > > What is the most annoying way of replying to e-mail?

                                                   Please reply to the list;
                                                         please *don't* CC me.




More information about the arbtt mailing list