X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=blobdiff_plain;f=src%2Fmatcher_parser_lex.l;h=f747e16c16eba0b6be77504e32eae8086f4cd8f2;hp=e638e51f042c39e32187e11dbc1759dd275705d1;hb=f7e4774dcdb992ad050571a39700c74fc3bb653e;hpb=19e7baeeceeb1ff4ccd3eb5ea2453d56ae2a76de diff --git a/src/matcher_parser_lex.l b/src/matcher_parser_lex.l index e638e51f0..f747e16c1 100644 --- a/src/matcher_parser_lex.l +++ b/src/matcher_parser_lex.l @@ -58,6 +58,9 @@ static void add_char(char ch) "score_greater" return MATCHER_SCORE_GREATER; "score_lower" return MATCHER_SCORE_LOWER; "score_equal" return MATCHER_SCORE_EQUAL; +"size_greater" return MATCHER_SIZE_GREATER; +"size_smaller" return MATCHER_SIZE_SMALLER; +"size_equal" return MATCHER_SIZE_EQUAL; "header" return MATCHER_HEADER; "~header" return MATCHER_NOT_HEADER; "headers_part" return MATCHER_HEADERS_PART; @@ -84,6 +87,7 @@ static void add_char(char ch) "forward_as_attachment" return MATCHER_FORWARD_AS_ATTACHMENT; "color" return MATCHER_COLOR; "bounce" return MATCHER_BOUNCE; +"delete_on_server" return MATCHER_DELETE_ON_SERVER; [ \t]+ "\n" return MATCHER_EOL; "&" return MATCHER_AND; @@ -92,54 +96,23 @@ static void add_char(char ch) BEGIN(string); string_buf_ptr = string_buf; } - /* the following tokens \n \t \r \b \f \\ could be - * removed from the list, but we let them here for - * the sake of clarity; they are unescaped by - * matcher.c:unescape_str()) */ -\\n { - /* paste as-is */ - add_char('\\'); - add_char('n'); - } -\\t { - /* paste as-is */ - add_char('\\'); - add_char('t'); - } -\\r { - /* paste as-is */ - add_char('\\'); - add_char('r'); - } -\\b { - /* paste as-is */ - add_char('\\'); - add_char('b'); - } -\\f { - /* paste as-is */ - add_char('\\'); - add_char('f'); - } -\\\' { - /* paste as-is */ - add_char('\\'); - add_char('\''); - } + /* alfons - OK, the new attempt is to just swallow + * *EVERYTHING* and make sure everything is escaped + * when actually performing things. */ \\\" { - /* paste as-is */ + /* take care of escaped \" because this means the + * quote char should be skipped */ add_char('\\'); add_char('\"'); } - /* we only miss the thing with nested escaping like - * \\\\" which should mean something like 'forget it, we want a "' - * right here in the token stream.... */ \" { + /* get out of the state: string ends. */ BEGIN(0); *string_buf_ptr = '\0'; yylval.str = string_buf; return MATCHER_STRING; } + /* put everything else in the output. */ . { add_char(yytext[0]); }