2007-10-17 [wwp] 3.0.2cvs79
[claws.git] / src / quote_fmt_lex.l
index 13ac3fab19145304049d02e72132bf24e81b39ba..22d102a29b79d672dad12acedb71bbe5b58b995d 100644 (file)
@@ -7,7 +7,7 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
  * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
@@ -16,8 +16,8 @@
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ * 
  */
 
 #include "quote_fmt_lex.h"
@@ -70,34 +70,35 @@ int line = -1;
        }       
 %}
 
-<S_NORMAL>"%X" /* cursor pos */ return SET_CURSOR_POS;
-<S_NORMAL>"%A" /* email address */ return SHOW_MAIL_ADDRESS;
-<S_NORMAL>"%c" /* cc */ return SHOW_CC;
-<S_NORMAL>"%d" /* date */ return SHOW_DATE;
-<S_NORMAL>"%D" /* date */ { BEGIN S_DATE; return SHOW_DATE_EXPR; }
-<S_NORMAL>"%f" /* from */ return SHOW_FROM;
-<S_NORMAL>"%F" /* first name */ return SHOW_FIRST_NAME;
-<S_NORMAL>"%i" /* message-id */ return SHOW_MESSAGEID;
-<S_NORMAL>"%I" /* initial of sender */ return SHOW_SENDER_INITIAL;
-<S_NORMAL>"%m" /* message with no signature */ return SHOW_MESSAGE_NO_SIGNATURE;
-<S_NORMAL>"%M" /* message */ return SHOW_MESSAGE;
-<S_NORMAL>"%n" /* newsgroups */ return SHOW_NEWSGROUPS;
-<S_NORMAL>"%N" /* full name */ return SHOW_FULLNAME;
-<S_NORMAL>"%L" /* last name */ return SHOW_LAST_NAME;
-<S_NORMAL>"%r" /* references */ return SHOW_REFERENCES;
-<S_NORMAL>"%s" /* subject */ return SHOW_SUBJECT;
-<S_NORMAL>"%t" /* to */ return SHOW_TO;
-<S_NORMAL>"%T" /* current dictionary */ return SHOW_DICT;
-<S_NORMAL>"%Q" /* quoted message */ return SHOW_QUOTED_MESSAGE;
-<S_NORMAL>"%q" /* quoted message with no signature */ return SHOW_QUOTED_MESSAGE_NO_SIGNATURE;
-<S_NORMAL>"%af" /* full name in compose account */ return SHOW_ACCOUNT_FULL_NAME;
-<S_NORMAL>"%am" /* mail address in compose account */ return SHOW_ACCOUNT_MAIL_ADDRESS;
-<S_NORMAL>"%an" /* compose account name itself */ return SHOW_ACCOUNT_NAME;
-<S_NORMAL>"%ao" /* organization in compose account */ return SHOW_ACCOUNT_ORGANIZATION;
-<S_NORMAL>"%aT" /* main dict (if enabled) in compose account */ return SHOW_ACCOUNT_DICT;
-<S_NORMAL>"%ABc" /* completion of 'Cc' from the address book */ return SHOW_ADDRESSBOOK_COMPLETION_FOR_CC;
-<S_NORMAL>"%ABf" /* completion of 'From' from the address book */ return SHOW_ADDRESSBOOK_COMPLETION_FOR_FROM;
-<S_NORMAL>"%ABt" /* completion of 'To' from the address book */ return SHOW_ADDRESSBOOK_COMPLETION_FOR_TO;
+<S_NORMAL>("%X"|"%cursor") /* cursor pos */ return SET_CURSOR_POS;
+<S_NORMAL>("%A"|"%email") /* email address */ return SHOW_MAIL_ADDRESS;
+<S_NORMAL>("%c"|"%cc") /* cc */ return SHOW_CC;
+<S_NORMAL>("%d"|"%date") /* date */ return SHOW_DATE;
+<S_NORMAL>("%D"|"%date_fmt") /* date */ { BEGIN S_DATE; return SHOW_DATE_EXPR; }
+<S_NORMAL>("%f"|"%from") /* from */ return SHOW_FROM;
+<S_NORMAL>("%F"|"%firstname") /* first name */ return SHOW_FIRST_NAME;
+<S_NORMAL>("%i"|"%messageid") /* message-id */ return SHOW_MESSAGEID;
+<S_NORMAL>("%I"|"%initials") /* initial of sender */ return SHOW_SENDER_INITIAL;
+<S_NORMAL>("%m"|"%msg_no_sig") /* message with no signature */ return SHOW_MESSAGE_NO_SIGNATURE;
+<S_NORMAL>("%M"|"%msg") /* message */ return SHOW_MESSAGE;
+<S_NORMAL>("%n"|"%newsgroups") /* newsgroups */ return SHOW_NEWSGROUPS;
+<S_NORMAL>("%N"|"%fullname") /* full name */ return SHOW_FULLNAME;
+<S_NORMAL>("%L"|"%lastname") /* last name */ return SHOW_LAST_NAME;
+<S_NORMAL>("%r"|"%references") /* references */ return SHOW_REFERENCES;
+<S_NORMAL>("%s"|"%subject") /* subject */ return SHOW_SUBJECT;
+<S_NORMAL>("%t"|"%to") /* to */ return SHOW_TO;
+<S_NORMAL>("%T"|"%dict") /* current dictionary */ return SHOW_DICT;
+<S_NORMAL>("%tags") /* tags */ return SHOW_TAGS;
+<S_NORMAL>("%Q"|"%quoted_msg") /* quoted message */ return SHOW_QUOTED_MESSAGE;
+<S_NORMAL>("%q"|"%quoted_msg_no_sig") /* quoted message with no signature */ return SHOW_QUOTED_MESSAGE_NO_SIGNATURE;
+<S_NORMAL>("%af"|"%account_fullname") /* full name in compose account */ return SHOW_ACCOUNT_FULL_NAME;
+<S_NORMAL>("%am"|"%account_email") /* mail address in compose account */ return SHOW_ACCOUNT_MAIL_ADDRESS;
+<S_NORMAL>("%an"|"%account_name") /* compose account name itself */ return SHOW_ACCOUNT_NAME;
+<S_NORMAL>("%ao"|"%account_org") /* organization in compose account */ return SHOW_ACCOUNT_ORGANIZATION;
+<S_NORMAL>("%aT"|"%account_dict") /* main dict (if enabled) in compose account */ return SHOW_ACCOUNT_DICT;
+<S_NORMAL>("%ABc"|"%addrbook_cc") /* completion of 'Cc' from the address book */ return SHOW_ADDRESSBOOK_COMPLETION_FOR_CC;
+<S_NORMAL>("%ABf"|"%addrbook_from") /* completion of 'From' from the address book */ return SHOW_ADDRESSBOOK_COMPLETION_FOR_FROM;
+<S_NORMAL>("%ABt"|"%addrbook_to") /* completion of 'To' from the address book */ return SHOW_ADDRESSBOOK_COMPLETION_FOR_TO;
 "\\\%" /* % */ return SHOW_PERCENT;
 "\\\\" /* \ */ return SHOW_BACKSLASH;
 "\\t"|"\t" /* tab */ return SHOW_TAB;
@@ -107,41 +108,42 @@ int line = -1;
 "\\|" return SHOW_PIPE;
 "\\{" return SHOW_OPARENT;
 "\\}" return SHOW_CPARENT;
-"?d" /* query date */ return QUERY_DATE;
-"?f" /* query from */ return QUERY_FROM;
-"?N"|"?F"|"?L"|"?I" /* query from name */ return QUERY_FULLNAME;
-"?s" /* query subject */ return QUERY_SUBJECT;
-"?t" /* query to */ return QUERY_TO;
-"?T" /* query current dictionary set and enabled */ return QUERY_DICT;
-"?c" /* query cc */ return QUERY_CC;
-"?n" /* query newsgroups */ return QUERY_NEWSGROUPS;
-"?i" /* query message-id */ return QUERY_MESSAGEID;
-"?r" /* query references */ return QUERY_REFERENCES;
-"?af" /* query full name in compose account */ return QUERY_ACCOUNT_FULL_NAME;
-"?ao" /* query organization in compose account */ return QUERY_ACCOUNT_ORGANIZATION;
-"?aT" /* query account main dict enabled */ return QUERY_ACCOUNT_DICT;
-"?ABc" /* query completion for 'Cc' in address book */ return QUERY_CC_FOUND_IN_ADDRESSBOOK;
-"?ABf" /* query completion for 'From' in address book */ return QUERY_FROM_FOUND_IN_ADDRESSBOOK;
-"?ABt" /* query completion for 'To' in address book */ return QUERY_TO_FOUND_IN_ADDRESSBOOK;
-"|f" /* insert file */ return INSERT_FILE;
-"|p" /* insert program output */ return INSERT_PROGRAMOUTPUT;
-"|i" /* insert user input */ return INSERT_USERINPUT;
-"!d" /* query date */ return QUERY_NOT_DATE;
-"!f" /* query from */ return QUERY_NOT_FROM;
-"!N"|"!F"|"!L"|"!I" /* query not(from name) */ return QUERY_NOT_FULLNAME;
-"!s" /* query not(subject) */ return QUERY_NOT_SUBJECT;
-"!t" /* query not(to) */ return QUERY_NOT_TO;
-"!T" /* query not(current dictionary set and enabled) */ return QUERY_NOT_DICT;
-"!c" /* query not(cc) */ return QUERY_NOT_CC;
-"!n" /* query not(newsgroups) */ return QUERY_NOT_NEWSGROUPS;
-"!i" /* query not(message-id) */ return QUERY_NOT_MESSAGEID;
-"!r" /* query not(references) */ return QUERY_NOT_REFERENCES;
-"!af" /* query not(full name in compose account) */ return QUERY_NOT_ACCOUNT_FULL_NAME;
-"!ao" /* query not(organization in compose account) */ return QUERY_NOT_ACCOUNT_ORGANIZATION;
-"!aT" /* query not(account main dict enabled and set) */ return QUERY_NOT_ACCOUNT_DICT;
-"!ABc" /* query not(completion for 'Cc' in address book) */ return QUERY_NOT_CC_FOUND_IN_ADDRESSBOOK;
-"!ABf" /* query not(completion for 'From' in address book) */ return QUERY_NOT_FROM_FOUND_IN_ADDRESSBOOK;
-"!ABt" /* query not(completion for 'To' in address book) */ return QUERY_NOT_TO_FOUND_IN_ADDRESSBOOK;
+("?d"|"?date") /* query date */ return QUERY_DATE;
+("?f"|"?from") /* query from */ return QUERY_FROM;
+("?N"|"?F"|"?L"|"?I"|"?fullname"|"?firstname"|"?lastname"|"?initials") /* query from name */ return QUERY_FULLNAME;
+("?s"|"?subject") /* query subject */ return QUERY_SUBJECT;
+("?t"|"?to") /* query to */ return QUERY_TO;
+("?T"|"?dict") /* query current dictionary set and enabled */ return QUERY_DICT;
+("?c"|"?cc") /* query cc */ return QUERY_CC;
+("?n"|"?newsgroups") /* query newsgroups */ return QUERY_NEWSGROUPS;
+("?i"|"?messageid") /* query message-id */ return QUERY_MESSAGEID;
+("?r"|"?references") /* query references */ return QUERY_REFERENCES;
+("?af"|"?account_fullname") /* query full name in compose account */ return QUERY_ACCOUNT_FULL_NAME;
+("?ao"|"?account_org") /* query organization in compose account */ return QUERY_ACCOUNT_ORGANIZATION;
+("?aT"|"?account_dict") /* query account main dict enabled */ return QUERY_ACCOUNT_DICT;
+("?ABc"|"?addrbook_cc") /* query completion for 'Cc' in address book */ return QUERY_CC_FOUND_IN_ADDRESSBOOK;
+("?ABf"|"?addrbook_from") /* query completion for 'From' in address book */ return QUERY_FROM_FOUND_IN_ADDRESSBOOK;
+("?ABt"|"?addrbook_to") /* query completion for 'To' in address book */ return QUERY_TO_FOUND_IN_ADDRESSBOOK;
+("!d"|"!date") /* query not(date) */ return QUERY_NOT_DATE;
+("!f"|"!from") /* query not(from) */ return QUERY_NOT_FROM;
+("!N"|"!F"|"!L"|"!I"|"!fullname"|"!firstname"|"!lastname"|"!initials") /* query not(from name) */ return QUERY_NOT_FULLNAME;
+("!s"|"!subject") /* query not(subject) */ return QUERY_NOT_SUBJECT;
+("!t"|"!to") /* query not(to) */ return QUERY_NOT_TO;
+("!T"|"!dict") /* query not(current dictionary set and enabled) */ return QUERY_NOT_DICT;
+("!c"|"!cc") /* query not(cc) */ return QUERY_NOT_CC;
+("!n"|"!newsgroups") /* query not(newsgroups) */ return QUERY_NOT_NEWSGROUPS;
+("!i"|"!messageid") /* query not(message-id) */ return QUERY_NOT_MESSAGEID;
+("!r"|"!references") /* query not(references) */ return QUERY_NOT_REFERENCES;
+("!af"|"!account_fullname") /* query not(full name in compose account) */ return QUERY_NOT_ACCOUNT_FULL_NAME;
+("!ao"|"!account_org") /* query not(organization in compose account) */ return QUERY_NOT_ACCOUNT_ORGANIZATION;
+("!aT"|"!account_dict") /* query not(account main dict enabled and set) */ return QUERY_NOT_ACCOUNT_DICT;
+("!ABc"|"!addrbook_cc") /* query not(completion for 'Cc' in address book) */ return QUERY_NOT_CC_FOUND_IN_ADDRESSBOOK;
+("!ABf"|"!addrbook_from") /* query not(completion for 'From' in address book) */ return QUERY_NOT_FROM_FOUND_IN_ADDRESSBOOK;
+("!ABt"|"!addrbook_to") /* query not(completion for 'To' in address book) */ return QUERY_NOT_TO_FOUND_IN_ADDRESSBOOK;
+("|f"|"|file") /* insert file */ return INSERT_FILE;
+("|p"|"|program") /* insert program output */ return INSERT_PROGRAMOUTPUT;
+("|i"|"|input") /* insert user input */ return INSERT_USERINPUT;
+("|a"|"|attach") /* attach file */ return ATTACH_FILE;
 <S_DATE>"{" return OPARENT;
 <S_DATE>"}" { BEGIN S_NORMAL; return CPARENT; }
 <S_NORMAL>"{" return OPARENT;