From 265d323ff362a51016b881b11ee36df13de476af Mon Sep 17 00:00:00 2001 From: telesoho Date: Wed, 1 Jun 2022 02:33:01 +0800 Subject: [PATCH 1/2] fixed AttributeError: module 'collection' has no attribute 'MutableMapping' in python 3.10 --- flanker/addresslib/drivers/dns_lookup.py | 8 ++++++-- flanker/addresslib/drivers/redis_driver.py | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/flanker/addresslib/drivers/dns_lookup.py b/flanker/addresslib/drivers/dns_lookup.py index b3625082..8d66c4fa 100644 --- a/flanker/addresslib/drivers/dns_lookup.py +++ b/flanker/addresslib/drivers/dns_lookup.py @@ -1,8 +1,12 @@ -import collections +import sys import dnsq +if sys.version_info.major == 3 and sys.version_info.minor >= 10: + from collections.abc import MutableMapping +else: + from collections import MutableMapping -class DNSLookup(collections.MutableMapping): +class DNSLookup(MutableMapping): """ DNSLookup has the same interface as a dict, but talks to a DNS server """ diff --git a/flanker/addresslib/drivers/redis_driver.py b/flanker/addresslib/drivers/redis_driver.py index 773b1c3f..16b68d53 100644 --- a/flanker/addresslib/drivers/redis_driver.py +++ b/flanker/addresslib/drivers/redis_driver.py @@ -1,9 +1,13 @@ -import collections import os import redis +import sys +if sys.version_info.major == 3 and sys.version_info.minor >= 10: + from collections.abc import MutableMapping +else: + from collections import MutableMapping -class RedisCache(collections.MutableMapping): +class RedisCache(MutableMapping): """ RedisCache has the same interface as a dict, but talks to a redis server. """ From 1b2fba941af99263dbf2786dd03bf366970cf541 Mon Sep 17 00:00:00 2001 From: telesoho Date: Wed, 1 Jun 2022 02:37:27 +0800 Subject: [PATCH 2/2] dissable warnning --- flanker/addresslib/_parser/addr_spec_parsetab.py | 7 ++++--- flanker/addresslib/_parser/mailbox_or_url_list_parsetab.py | 7 ++++--- flanker/addresslib/_parser/mailbox_or_url_parsetab.py | 7 ++++--- flanker/addresslib/_parser/mailbox_parsetab.py | 7 ++++--- flanker/addresslib/_parser/url_parsetab.py | 7 ++++--- 5 files changed, 20 insertions(+), 15 deletions(-) diff --git a/flanker/addresslib/_parser/addr_spec_parsetab.py b/flanker/addresslib/_parser/addr_spec_parsetab.py index 3ec67846..560a9c41 100644 --- a/flanker/addresslib/_parser/addr_spec_parsetab.py +++ b/flanker/addresslib/_parser/addr_spec_parsetab.py @@ -1,13 +1,14 @@ # addr_spec_parsetab.py # This file is automatically generated. Do not edit. +# pylint: disable=W,C,R _tabversion = '3.10' _lr_method = 'LALR' -_lr_signature = 'addr_specFWSP AT DOT COMMA SEMICOLON LANGLE RANGLE ATOM DOT_ATOM LBRACKET RBRACKET DTEXT DQUOTE QTEXT QPAIR LPAREN RPAREN CTEXT URLmailbox_or_url_list : mailbox_or_url_list delim mailbox_or_url\n | mailbox_or_url_list delim\n | mailbox_or_urldelim : delim fwsp COMMA\n | delim fwsp SEMICOLON\n | COMMA\n | SEMICOLONmailbox_or_url : mailbox\n | urlurl : ofwsp URL ofwspmailbox : addr_spec\n | angle_addr\n | name_addrname_addr : ofwsp phrase angle_addrangle_addr : ofwsp LANGLE addr_spec RANGLE ofwspaddr_spec : ofwsp local_part AT domain ofwsplocal_part : DOT_ATOM\n | ATOM\n | quoted_stringdomain : DOT_ATOM\n | ATOM\n | domain_literalquoted_string : DQUOTE quoted_string_text DQUOTE\n | DQUOTE DQUOTEquoted_string_text : quoted_string_text QTEXT\n | quoted_string_text QPAIR\n | quoted_string_text fwsp\n | QTEXT\n | QPAIR\n | fwspdomain_literal : LBRACKET domain_literal_text RBRACKET\n | LBRACKET RBRACKETdomain_literal_text : domain_literal_text DTEXT\n | domain_literal_text fwsp\n | DTEXT\n | fwspcomment : LPAREN comment_text RPAREN\n | LPAREN RPARENcomment_text : comment_text CTEXT\n | comment_text fwsp\n | CTEXT\n | fwspphrase : phrase fwsp ATOM\n | phrase fwsp DOT_ATOM\n | phrase fwsp DOT\n | phrase fwsp quoted_string\n | phrase ATOM\n | phrase DOT_ATOM\n | phrase DOT\n | phrase quoted_string\n | ATOM\n | DOT_ATOM\n | DOT\n | quoted_stringofwsp : fwsp comment fwsp\n | fwsp comment\n | comment fwsp\n | comment\n | fwsp\n |fwsp : FWSP' +_lr_signature = 'addr_specAT ATOM COMMA CTEXT DOT DOT_ATOM DQUOTE DTEXT FWSP LANGLE LBRACKET LPAREN QPAIR QTEXT RANGLE RBRACKET RPAREN SEMICOLON URLmailbox_or_url_list : mailbox_or_url_list delim mailbox_or_url\n | mailbox_or_url_list delim\n | mailbox_or_urldelim : delim fwsp COMMA\n | delim fwsp SEMICOLON\n | COMMA\n | SEMICOLONmailbox_or_url : mailbox\n | urlurl : ofwsp URL ofwspmailbox : addr_spec\n | angle_addr\n | name_addrname_addr : ofwsp phrase angle_addrangle_addr : ofwsp LANGLE addr_spec RANGLE ofwspaddr_spec : ofwsp local_part AT domain ofwsplocal_part : DOT_ATOM\n | ATOM\n | quoted_stringdomain : DOT_ATOM\n | ATOM\n | domain_literalquoted_string : DQUOTE quoted_string_text DQUOTE\n | DQUOTE DQUOTEquoted_string_text : quoted_string_text QTEXT\n | quoted_string_text QPAIR\n | quoted_string_text fwsp\n | QTEXT\n | QPAIR\n | fwspdomain_literal : LBRACKET domain_literal_text RBRACKET\n | LBRACKET RBRACKETdomain_literal_text : domain_literal_text DTEXT\n | domain_literal_text fwsp\n | DTEXT\n | fwspcomment : LPAREN comment_text RPAREN\n | LPAREN RPARENcomment_text : comment_text CTEXT\n | comment_text fwsp\n | CTEXT\n | fwspphrase : phrase fwsp ATOM\n | phrase fwsp DOT_ATOM\n | phrase fwsp DOT\n | phrase fwsp quoted_string\n | phrase ATOM\n | phrase DOT_ATOM\n | phrase DOT\n | phrase quoted_string\n | ATOM\n | DOT_ATOM\n | DOT\n | quoted_stringofwsp : fwsp comment fwsp\n | fwsp comment\n | comment fwsp\n | comment\n | fwsp\n |fwsp : FWSP' -_lr_action_items = {'FWSP':([0,2,4,6,7,10,14,15,16,17,20,21,22,24,25,26,27,28,29,30,31,32,33,34,35,38,39,40,41,42,43,44,],[4,4,-61,4,4,4,-42,4,-38,-41,-30,-29,-28,4,-40,-37,-39,4,4,-20,-21,-22,-27,-26,-25,-36,-35,4,-32,-34,-33,-31,]),'QPAIR':([4,10,20,21,22,24,33,34,35,],[-61,21,-30,-29,-28,34,-27,-26,-25,]),'QTEXT':([4,10,20,21,22,24,33,34,35,],[-61,22,-30,-29,-28,35,-27,-26,-25,]),'DTEXT':([4,29,38,39,40,42,43,],[-61,39,-36,-35,43,-34,-33,]),'DQUOTE':([0,1,2,3,4,7,8,10,16,18,20,21,22,24,26,33,34,35,],[-60,-59,-58,10,-61,-56,-57,23,-38,-55,-30,-29,-28,36,-37,-27,-26,-25,]),'LBRACKET':([19,],[29,]),'DOT_ATOM':([0,1,2,3,4,7,8,16,18,19,26,],[-60,-59,-58,11,-61,-56,-57,-38,-55,30,-37,]),'AT':([9,11,12,13,23,36,],[19,-17,-18,-19,-24,-23,]),'LPAREN':([0,1,4,28,30,31,32,41,44,],[6,6,-61,6,-20,-21,-22,-32,-31,]),'ATOM':([0,1,2,3,4,7,8,16,18,19,26,],[-60,-59,-58,12,-61,-56,-57,-38,-55,31,-37,]),'RPAREN':([4,6,14,15,17,25,27,],[-61,16,-42,26,-41,-40,-39,]),'RBRACKET':([4,29,38,39,40,42,43,],[-61,41,-36,-35,44,-34,-33,]),'CTEXT':([4,6,14,15,17,25,27,],[-61,17,-42,27,-41,-40,-39,]),'$end':([1,2,4,5,7,8,16,18,26,28,30,31,32,37,41,44,],[-59,-58,-61,0,-56,-57,-38,-55,-37,-60,-20,-21,-22,-16,-32,-31,]),} +_lr_action_items = {'DOT_ATOM':([0,2,3,4,5,12,13,15,18,24,25,],[-60,8,-59,-58,-61,-56,-57,-38,29,-55,-37,]),'ATOM':([0,2,3,4,5,12,13,15,18,24,25,],[-60,9,-59,-58,-61,-56,-57,-38,30,-55,-37,]),'DQUOTE':([0,2,3,4,5,11,12,13,15,20,21,22,23,24,25,34,35,36,],[-60,11,-59,-58,-61,19,-56,-57,-38,33,-28,-29,-30,-55,-37,-25,-26,-27,]),'FWSP':([0,4,5,6,11,12,14,15,16,17,20,21,22,23,25,26,27,28,29,30,31,32,34,35,36,38,39,40,41,42,43,44,],[5,5,-61,5,5,5,5,-38,-41,-42,5,-28,-29,-30,-37,-39,-40,5,-20,-21,-22,5,-25,-26,-27,5,-32,-35,-36,-31,-33,-34,]),'LPAREN':([0,3,5,28,29,30,31,39,42,],[6,6,-61,6,-20,-21,-22,-32,-31,]),'$end':([1,3,4,5,12,13,15,24,25,28,29,30,31,37,39,42,],[0,-59,-58,-61,-56,-57,-38,-55,-37,-60,-20,-21,-22,-16,-32,-31,]),'RPAREN':([5,6,14,16,17,26,27,],[-61,15,25,-41,-42,-39,-40,]),'CTEXT':([5,6,14,16,17,26,27,],[-61,16,26,-41,-42,-39,-40,]),'QTEXT':([5,11,20,21,22,23,34,35,36,],[-61,21,34,-28,-29,-30,-25,-26,-27,]),'QPAIR':([5,11,20,21,22,23,34,35,36,],[-61,22,35,-28,-29,-30,-25,-26,-27,]),'RBRACKET':([5,32,38,40,41,43,44,],[-61,39,42,-35,-36,-33,-34,]),'DTEXT':([5,32,38,40,41,43,44,],[-61,40,43,-35,-36,-33,-34,]),'AT':([7,8,9,10,19,33,],[18,-17,-18,-19,-24,-23,]),'LBRACKET':([18,],[32,]),} _lr_action = {} for _k, _v in _lr_action_items.items(): @@ -16,7 +17,7 @@ _lr_action[_x][_k] = _y del _lr_action_items -_lr_goto_items = {'fwsp':([0,2,6,7,10,15,24,28,29,40,],[1,8,14,18,20,25,33,1,38,42,]),'comment':([0,1,28,],[2,7,2,]),'domain':([19,],[28,]),'comment_text':([6,],[15,]),'ofwsp':([0,28,],[3,37,]),'local_part':([3,],[9,]),'quoted_string_text':([10,],[24,]),'domain_literal_text':([29,],[40,]),'addr_spec':([0,],[5,]),'quoted_string':([3,],[13,]),'domain_literal':([19,],[32,]),} +_lr_goto_items = {'addr_spec':([0,],[1,]),'ofwsp':([0,28,],[2,37,]),'fwsp':([0,4,6,11,12,14,20,28,32,38,],[3,13,17,23,24,27,36,3,41,44,]),'comment':([0,3,28,],[4,12,4,]),'local_part':([2,],[7,]),'quoted_string':([2,],[10,]),'comment_text':([6,],[14,]),'quoted_string_text':([11,],[20,]),'domain':([18,],[28,]),'domain_literal':([18,],[31,]),'domain_literal_text':([32,],[38,]),} _lr_goto = {} for _k, _v in _lr_goto_items.items(): diff --git a/flanker/addresslib/_parser/mailbox_or_url_list_parsetab.py b/flanker/addresslib/_parser/mailbox_or_url_list_parsetab.py index a0f07b05..1fc1d6e2 100644 --- a/flanker/addresslib/_parser/mailbox_or_url_list_parsetab.py +++ b/flanker/addresslib/_parser/mailbox_or_url_list_parsetab.py @@ -1,13 +1,14 @@ # mailbox_or_url_list_parsetab.py # This file is automatically generated. Do not edit. +# pylint: disable=W,C,R _tabversion = '3.10' _lr_method = 'LALR' -_lr_signature = 'mailbox_or_url_listFWSP AT DOT COMMA SEMICOLON LANGLE RANGLE ATOM DOT_ATOM LBRACKET RBRACKET DTEXT DQUOTE QTEXT QPAIR LPAREN RPAREN CTEXT URLmailbox_or_url_list : mailbox_or_url_list delim mailbox_or_url\n | mailbox_or_url_list delim\n | mailbox_or_urldelim : delim fwsp COMMA\n | delim fwsp SEMICOLON\n | COMMA\n | SEMICOLONmailbox_or_url : mailbox\n | urlurl : ofwsp URL ofwspmailbox : addr_spec\n | angle_addr\n | name_addrname_addr : ofwsp phrase angle_addrangle_addr : ofwsp LANGLE addr_spec RANGLE ofwspaddr_spec : ofwsp local_part AT domain ofwsplocal_part : DOT_ATOM\n | ATOM\n | quoted_stringdomain : DOT_ATOM\n | ATOM\n | domain_literalquoted_string : DQUOTE quoted_string_text DQUOTE\n | DQUOTE DQUOTEquoted_string_text : quoted_string_text QTEXT\n | quoted_string_text QPAIR\n | quoted_string_text fwsp\n | QTEXT\n | QPAIR\n | fwspdomain_literal : LBRACKET domain_literal_text RBRACKET\n | LBRACKET RBRACKETdomain_literal_text : domain_literal_text DTEXT\n | domain_literal_text fwsp\n | DTEXT\n | fwspcomment : LPAREN comment_text RPAREN\n | LPAREN RPARENcomment_text : comment_text CTEXT\n | comment_text fwsp\n | CTEXT\n | fwspphrase : phrase fwsp ATOM\n | phrase fwsp DOT_ATOM\n | phrase fwsp DOT\n | phrase fwsp quoted_string\n | phrase ATOM\n | phrase DOT_ATOM\n | phrase DOT\n | phrase quoted_string\n | ATOM\n | DOT_ATOM\n | DOT\n | quoted_stringofwsp : fwsp comment fwsp\n | fwsp comment\n | comment fwsp\n | comment\n | fwsp\n |fwsp : FWSP' +_lr_signature = 'mailbox_or_url_listAT ATOM COMMA CTEXT DOT DOT_ATOM DQUOTE DTEXT FWSP LANGLE LBRACKET LPAREN QPAIR QTEXT RANGLE RBRACKET RPAREN SEMICOLON URLmailbox_or_url_list : mailbox_or_url_list delim mailbox_or_url\n | mailbox_or_url_list delim\n | mailbox_or_urldelim : delim fwsp COMMA\n | delim fwsp SEMICOLON\n | COMMA\n | SEMICOLONmailbox_or_url : mailbox\n | urlurl : ofwsp URL ofwspmailbox : addr_spec\n | angle_addr\n | name_addrname_addr : ofwsp phrase angle_addrangle_addr : ofwsp LANGLE addr_spec RANGLE ofwspaddr_spec : ofwsp local_part AT domain ofwsplocal_part : DOT_ATOM\n | ATOM\n | quoted_stringdomain : DOT_ATOM\n | ATOM\n | domain_literalquoted_string : DQUOTE quoted_string_text DQUOTE\n | DQUOTE DQUOTEquoted_string_text : quoted_string_text QTEXT\n | quoted_string_text QPAIR\n | quoted_string_text fwsp\n | QTEXT\n | QPAIR\n | fwspdomain_literal : LBRACKET domain_literal_text RBRACKET\n | LBRACKET RBRACKETdomain_literal_text : domain_literal_text DTEXT\n | domain_literal_text fwsp\n | DTEXT\n | fwspcomment : LPAREN comment_text RPAREN\n | LPAREN RPARENcomment_text : comment_text CTEXT\n | comment_text fwsp\n | CTEXT\n | fwspphrase : phrase fwsp ATOM\n | phrase fwsp DOT_ATOM\n | phrase fwsp DOT\n | phrase fwsp quoted_string\n | phrase ATOM\n | phrase DOT_ATOM\n | phrase DOT\n | phrase quoted_string\n | ATOM\n | DOT_ATOM\n | DOT\n | quoted_stringofwsp : fwsp comment fwsp\n | fwsp comment\n | comment fwsp\n | comment\n | fwsp\n |fwsp : FWSP' -_lr_action_items = {'FWSP':([0,2,4,9,13,15,16,18,19,20,21,22,23,24,25,26,27,28,29,30,36,37,38,39,40,44,45,46,47,48,49,50,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,74,75,76,77,78,79,80,],[4,4,-61,4,4,4,4,-51,4,-52,4,-54,-53,-42,4,-38,-41,-7,4,-6,-30,-29,-28,-24,4,-48,-47,-50,-49,-40,-37,-39,4,4,4,-20,-21,-22,-27,-26,-25,-23,-44,-43,-46,-45,-5,-4,-36,-35,4,-32,-34,-33,-31,]),'LANGLE':([0,1,2,3,4,13,14,18,20,21,22,23,26,28,29,30,31,39,41,42,44,45,46,47,49,51,65,66,67,68,69,70,71,],[-60,-59,-58,15,-61,-56,-57,-51,-52,-60,-54,-53,-38,-7,-60,-6,-55,-24,-59,15,-48,-47,-50,-49,-37,-59,-23,-44,-43,-46,-45,-5,-4,]),'QPAIR':([4,19,36,37,38,40,62,63,64,],[-61,37,-30,-29,-28,63,-27,-26,-25,]),'SEMICOLON':([1,2,4,5,6,7,8,10,11,12,13,14,16,26,28,29,30,31,34,43,49,51,52,56,57,59,60,61,70,71,72,73,77,80,],[-59,-58,-61,-13,-11,-3,-8,28,-12,-9,-56,-57,-60,-38,-7,-2,-6,-55,-10,-14,-37,70,-1,-60,-60,-20,-21,-22,-5,-4,-15,-16,-32,-31,]),'URL':([0,1,2,3,4,13,14,26,28,29,30,31,49,51,70,71,],[-60,-59,-58,16,-61,-56,-57,-38,-7,-60,-6,-55,-37,-59,-5,-4,]),'QTEXT':([4,19,36,37,38,40,62,63,64,],[-61,38,-30,-29,-28,64,-27,-26,-25,]),'RPAREN':([4,9,24,25,27,48,50,],[-61,26,-42,49,-41,-40,-39,]),'DTEXT':([4,58,74,75,76,78,79,],[-61,75,-36,-35,79,-34,-33,]),'DQUOTE':([0,1,2,3,4,13,14,15,18,19,20,21,22,23,26,28,29,30,31,32,36,37,38,39,40,41,44,45,46,47,49,51,62,63,64,65,66,67,68,69,70,71,],[-60,-59,-58,19,-61,-56,-57,-60,-51,39,-52,19,-54,-53,-38,-7,-60,-6,-55,19,-30,-29,-28,-24,65,19,-48,-47,-50,-49,-37,-59,-27,-26,-25,-23,-44,-43,-46,-45,-5,-4,]),'LBRACKET':([35,],[58,]),'DOT_ATOM':([0,1,2,3,4,13,14,15,18,20,21,22,23,26,28,29,30,31,32,35,39,41,44,45,46,47,49,51,65,66,67,68,69,70,71,],[-60,-59,-58,20,-61,-56,-57,-60,-51,-52,44,-54,-53,-38,-7,-60,-6,-55,53,59,-24,66,-48,-47,-50,-49,-37,-59,-23,-44,-43,-46,-45,-5,-4,]),'COMMA':([1,2,4,5,6,7,8,10,11,12,13,14,16,26,28,29,30,31,34,43,49,51,52,56,57,59,60,61,70,71,72,73,77,80,],[-59,-58,-61,-13,-11,-3,-8,30,-12,-9,-56,-57,-60,-38,-7,-2,-6,-55,-10,-14,-37,71,-1,-60,-60,-20,-21,-22,-5,-4,-15,-16,-32,-31,]),'AT':([17,18,20,22,39,53,54,55,65,],[35,-18,-17,-19,-24,-17,-18,-19,-23,]),'LPAREN':([0,1,4,15,16,18,20,21,22,23,28,29,30,39,41,44,45,46,47,51,56,57,59,60,61,65,66,67,68,69,70,71,77,80,],[9,9,-61,9,9,-51,-52,9,-54,-53,-7,9,-6,-24,9,-48,-47,-50,-49,9,9,9,-20,-21,-22,-23,-44,-43,-46,-45,-5,-4,-32,-31,]),'ATOM':([0,1,2,3,4,13,14,15,18,20,21,22,23,26,28,29,30,31,32,35,39,41,44,45,46,47,49,51,65,66,67,68,69,70,71,],[-60,-59,-58,18,-61,-56,-57,-60,-51,-52,45,-54,-53,-38,-7,-60,-6,-55,54,60,-24,67,-48,-47,-50,-49,-37,-59,-23,-44,-43,-46,-45,-5,-4,]),'RANGLE':([1,2,4,13,14,26,31,33,49,57,59,60,61,73,77,80,],[-59,-58,-61,-56,-57,-38,-55,56,-37,-60,-20,-21,-22,-16,-32,-31,]),'RBRACKET':([4,58,74,75,76,78,79,],[-61,77,-36,-35,80,-34,-33,]),'CTEXT':([4,9,24,25,27,48,50,],[-61,27,-42,50,-41,-40,-39,]),'DOT':([0,1,2,3,4,13,14,18,20,21,22,23,26,28,29,30,31,39,41,44,45,46,47,49,51,65,66,67,68,69,70,71,],[-60,-59,-58,23,-61,-56,-57,-51,-52,47,-54,-53,-38,-7,-60,-6,-55,-24,69,-48,-47,-50,-49,-37,-59,-23,-44,-43,-46,-45,-5,-4,]),'$end':([1,2,4,5,6,7,8,10,11,12,13,14,16,26,28,29,30,31,34,43,49,52,56,57,59,60,61,70,71,72,73,77,80,],[-59,-58,-61,-13,-11,-3,-8,0,-12,-9,-56,-57,-60,-38,-7,-2,-6,-55,-10,-14,-37,-1,-60,-60,-20,-21,-22,-5,-4,-15,-16,-32,-31,]),} +_lr_action_items = {'URL':([0,8,9,10,11,13,14,15,25,26,28,32,49,50,53,54,],[-60,16,-59,-58,-61,-60,-6,-7,-56,-57,-38,-59,-55,-37,-4,-5,]),'LANGLE':([0,8,9,10,11,13,14,15,19,20,21,22,23,25,26,28,32,37,39,40,41,42,43,44,49,50,53,54,64,65,66,67,68,],[-60,18,-59,-58,-61,-60,-6,-7,-60,-52,-51,-54,-53,-56,-57,-38,-59,18,-59,-47,-48,-49,-50,-24,-55,-37,-4,-5,-43,-44,-45,-46,-23,]),'DOT_ATOM':([0,8,9,10,11,13,14,15,18,19,20,21,22,23,25,26,28,32,34,35,39,40,41,42,43,44,49,50,53,54,64,65,66,67,68,],[-60,20,-59,-58,-61,-60,-6,-7,-60,41,-52,-51,-54,-53,-56,-57,-38,-59,56,60,65,-47,-48,-49,-50,-24,-55,-37,-4,-5,-43,-44,-45,-46,-23,]),'ATOM':([0,8,9,10,11,13,14,15,18,19,20,21,22,23,25,26,28,32,34,35,39,40,41,42,43,44,49,50,53,54,64,65,66,67,68,],[-60,21,-59,-58,-61,-60,-6,-7,-60,40,-52,-51,-54,-53,-56,-57,-38,-59,57,61,64,-47,-48,-49,-50,-24,-55,-37,-4,-5,-43,-44,-45,-46,-23,]),'DOT':([0,8,9,10,11,13,14,15,19,20,21,22,23,25,26,28,32,39,40,41,42,43,44,49,50,53,54,64,65,66,67,68,],[-60,23,-59,-58,-61,-60,-6,-7,42,-52,-51,-54,-53,-56,-57,-38,-59,66,-47,-48,-49,-50,-24,-55,-37,-4,-5,-43,-44,-45,-46,-23,]),'DQUOTE':([0,8,9,10,11,13,14,15,18,19,20,21,22,23,24,25,26,28,32,35,39,40,41,42,43,44,45,46,47,48,49,50,53,54,64,65,66,67,68,69,70,71,],[-60,24,-59,-58,-61,-60,-6,-7,-60,24,-52,-51,-54,-53,44,-56,-57,-38,-59,24,24,-47,-48,-49,-50,-24,68,-28,-29,-30,-55,-37,-4,-5,-43,-44,-45,-46,-23,-25,-26,-27,]),'FWSP':([0,10,11,12,13,14,15,16,18,19,20,21,22,23,24,25,27,28,29,30,40,41,42,43,44,45,46,47,48,50,51,52,53,54,55,56,57,58,59,63,64,65,66,67,68,69,70,71,73,74,75,76,78,79,80,],[11,11,-61,11,11,-6,-7,11,11,11,-52,-51,-54,-53,11,11,11,-38,-41,-42,-47,-48,-49,-50,-24,11,-28,-29,-30,-37,-39,-40,-4,-5,11,-20,-21,-22,11,11,-43,-44,-45,-46,-23,-25,-26,-27,11,-32,-35,-36,-31,-33,-34,]),'LPAREN':([0,9,11,13,14,15,16,18,19,20,21,22,23,32,39,40,41,42,43,44,53,54,55,56,57,58,63,64,65,66,67,68,74,78,],[12,12,-61,12,-6,-7,12,12,12,-52,-51,-54,-53,12,12,-47,-48,-49,-50,-24,-4,-5,12,-20,-21,-22,12,-43,-44,-45,-46,-23,-32,-31,]),'$end':([1,2,3,4,5,6,7,9,10,11,13,14,15,16,25,26,28,31,33,38,49,50,53,54,55,56,57,58,63,72,74,77,78,],[0,-3,-8,-9,-11,-12,-13,-59,-58,-61,-2,-6,-7,-60,-56,-57,-38,-1,-10,-14,-55,-37,-4,-5,-60,-20,-21,-22,-60,-16,-32,-15,-31,]),'COMMA':([1,2,3,4,5,6,7,9,10,11,13,14,15,16,25,26,28,31,32,33,38,49,50,53,54,55,56,57,58,63,72,74,77,78,],[14,-3,-8,-9,-11,-12,-13,-59,-58,-61,-2,-6,-7,-60,-56,-57,-38,-1,53,-10,-14,-55,-37,-4,-5,-60,-20,-21,-22,-60,-16,-32,-15,-31,]),'SEMICOLON':([1,2,3,4,5,6,7,9,10,11,13,14,15,16,25,26,28,31,32,33,38,49,50,53,54,55,56,57,58,63,72,74,77,78,],[15,-3,-8,-9,-11,-12,-13,-59,-58,-61,-2,-6,-7,-60,-56,-57,-38,-1,54,-10,-14,-55,-37,-4,-5,-60,-20,-21,-22,-60,-16,-32,-15,-31,]),'RANGLE':([9,10,11,25,26,28,36,49,50,55,56,57,58,72,74,78,],[-59,-58,-61,-56,-57,-38,63,-55,-37,-60,-20,-21,-22,-16,-32,-31,]),'RPAREN':([11,12,27,29,30,51,52,],[-61,28,50,-41,-42,-39,-40,]),'CTEXT':([11,12,27,29,30,51,52,],[-61,29,51,-41,-42,-39,-40,]),'QTEXT':([11,24,45,46,47,48,69,70,71,],[-61,46,69,-28,-29,-30,-25,-26,-27,]),'QPAIR':([11,24,45,46,47,48,69,70,71,],[-61,47,70,-28,-29,-30,-25,-26,-27,]),'RBRACKET':([11,59,73,75,76,79,80,],[-61,74,78,-35,-36,-33,-34,]),'DTEXT':([11,59,73,75,76,79,80,],[-61,75,79,-35,-36,-33,-34,]),'AT':([17,20,21,22,44,60,61,62,68,],[34,-17,-18,-19,-24,-17,-18,-19,-23,]),'LBRACKET':([34,],[59,]),} _lr_action = {} for _k, _v in _lr_action_items.items(): @@ -16,7 +17,7 @@ _lr_action[_x][_k] = _y del _lr_action_items -_lr_goto_items = {'fwsp':([0,2,9,13,15,16,19,21,25,29,40,56,57,58,76,],[1,14,24,31,1,1,36,41,48,51,62,1,1,74,78,]),'comment':([0,1,15,16,21,29,41,51,56,57,],[2,13,2,2,2,2,13,13,2,2,]),'domain':([35,],[57,]),'comment_text':([9,],[25,]),'name_addr':([0,29,],[5,5,]),'ofwsp':([0,15,16,21,29,56,57,],[3,32,34,42,3,72,73,]),'mailbox_or_url_list':([0,],[10,]),'angle_addr':([0,21,29,],[11,43,11,]),'mailbox_or_url':([0,29,],[7,52,]),'local_part':([3,32,],[17,17,]),'delim':([10,],[29,]),'domain_literal_text':([58,],[76,]),'mailbox':([0,29,],[8,8,]),'quoted_string_text':([19,],[40,]),'url':([0,29,],[12,12,]),'addr_spec':([0,15,29,],[6,33,6,]),'phrase':([3,],[21,]),'quoted_string':([3,21,32,41,],[22,46,55,68,]),'domain_literal':([35,],[61,]),} +_lr_goto_items = {'mailbox_or_url_list':([0,],[1,]),'mailbox_or_url':([0,13,],[2,31,]),'mailbox':([0,13,],[3,3,]),'url':([0,13,],[4,4,]),'addr_spec':([0,13,18,],[5,5,36,]),'angle_addr':([0,13,19,],[6,6,38,]),'name_addr':([0,13,],[7,7,]),'ofwsp':([0,13,16,18,19,55,63,],[8,8,33,35,37,72,77,]),'fwsp':([0,10,12,13,16,18,19,24,25,27,45,55,59,63,73,],[9,26,30,32,9,9,39,48,49,52,71,9,76,9,80,]),'comment':([0,9,13,16,18,19,32,39,55,63,],[10,25,10,10,10,10,25,25,10,10,]),'delim':([1,],[13,]),'local_part':([8,35,],[17,17,]),'phrase':([8,],[19,]),'quoted_string':([8,19,35,39,],[22,43,62,67,]),'comment_text':([12,],[27,]),'quoted_string_text':([24,],[45,]),'domain':([34,],[55,]),'domain_literal':([34,],[58,]),'domain_literal_text':([59,],[73,]),} _lr_goto = {} for _k, _v in _lr_goto_items.items(): diff --git a/flanker/addresslib/_parser/mailbox_or_url_parsetab.py b/flanker/addresslib/_parser/mailbox_or_url_parsetab.py index f738e719..6d36bc2a 100644 --- a/flanker/addresslib/_parser/mailbox_or_url_parsetab.py +++ b/flanker/addresslib/_parser/mailbox_or_url_parsetab.py @@ -1,13 +1,14 @@ # mailbox_or_url_parsetab.py # This file is automatically generated. Do not edit. +# pylint: disable=W,C,R _tabversion = '3.10' _lr_method = 'LALR' -_lr_signature = 'mailbox_or_urlFWSP AT DOT COMMA SEMICOLON LANGLE RANGLE ATOM DOT_ATOM LBRACKET RBRACKET DTEXT DQUOTE QTEXT QPAIR LPAREN RPAREN CTEXT URLmailbox_or_url_list : mailbox_or_url_list delim mailbox_or_url\n | mailbox_or_url_list delim\n | mailbox_or_urldelim : delim fwsp COMMA\n | delim fwsp SEMICOLON\n | COMMA\n | SEMICOLONmailbox_or_url : mailbox\n | urlurl : ofwsp URL ofwspmailbox : addr_spec\n | angle_addr\n | name_addrname_addr : ofwsp phrase angle_addrangle_addr : ofwsp LANGLE addr_spec RANGLE ofwspaddr_spec : ofwsp local_part AT domain ofwsplocal_part : DOT_ATOM\n | ATOM\n | quoted_stringdomain : DOT_ATOM\n | ATOM\n | domain_literalquoted_string : DQUOTE quoted_string_text DQUOTE\n | DQUOTE DQUOTEquoted_string_text : quoted_string_text QTEXT\n | quoted_string_text QPAIR\n | quoted_string_text fwsp\n | QTEXT\n | QPAIR\n | fwspdomain_literal : LBRACKET domain_literal_text RBRACKET\n | LBRACKET RBRACKETdomain_literal_text : domain_literal_text DTEXT\n | domain_literal_text fwsp\n | DTEXT\n | fwspcomment : LPAREN comment_text RPAREN\n | LPAREN RPARENcomment_text : comment_text CTEXT\n | comment_text fwsp\n | CTEXT\n | fwspphrase : phrase fwsp ATOM\n | phrase fwsp DOT_ATOM\n | phrase fwsp DOT\n | phrase fwsp quoted_string\n | phrase ATOM\n | phrase DOT_ATOM\n | phrase DOT\n | phrase quoted_string\n | ATOM\n | DOT_ATOM\n | DOT\n | quoted_stringofwsp : fwsp comment fwsp\n | fwsp comment\n | comment fwsp\n | comment\n | fwsp\n |fwsp : FWSP' +_lr_signature = 'mailbox_or_urlAT ATOM COMMA CTEXT DOT DOT_ATOM DQUOTE DTEXT FWSP LANGLE LBRACKET LPAREN QPAIR QTEXT RANGLE RBRACKET RPAREN SEMICOLON URLmailbox_or_url_list : mailbox_or_url_list delim mailbox_or_url\n | mailbox_or_url_list delim\n | mailbox_or_urldelim : delim fwsp COMMA\n | delim fwsp SEMICOLON\n | COMMA\n | SEMICOLONmailbox_or_url : mailbox\n | urlurl : ofwsp URL ofwspmailbox : addr_spec\n | angle_addr\n | name_addrname_addr : ofwsp phrase angle_addrangle_addr : ofwsp LANGLE addr_spec RANGLE ofwspaddr_spec : ofwsp local_part AT domain ofwsplocal_part : DOT_ATOM\n | ATOM\n | quoted_stringdomain : DOT_ATOM\n | ATOM\n | domain_literalquoted_string : DQUOTE quoted_string_text DQUOTE\n | DQUOTE DQUOTEquoted_string_text : quoted_string_text QTEXT\n | quoted_string_text QPAIR\n | quoted_string_text fwsp\n | QTEXT\n | QPAIR\n | fwspdomain_literal : LBRACKET domain_literal_text RBRACKET\n | LBRACKET RBRACKETdomain_literal_text : domain_literal_text DTEXT\n | domain_literal_text fwsp\n | DTEXT\n | fwspcomment : LPAREN comment_text RPAREN\n | LPAREN RPARENcomment_text : comment_text CTEXT\n | comment_text fwsp\n | CTEXT\n | fwspphrase : phrase fwsp ATOM\n | phrase fwsp DOT_ATOM\n | phrase fwsp DOT\n | phrase fwsp quoted_string\n | phrase ATOM\n | phrase DOT_ATOM\n | phrase DOT\n | phrase quoted_string\n | ATOM\n | DOT_ATOM\n | DOT\n | quoted_stringofwsp : fwsp comment fwsp\n | fwsp comment\n | comment fwsp\n | comment\n | fwsp\n |fwsp : FWSP' -_lr_action_items = {'FWSP':([0,2,7,11,12,14,15,17,18,19,20,21,22,23,24,25,26,32,33,34,35,36,40,41,42,43,44,45,46,50,51,52,53,54,55,56,57,58,59,60,61,62,63,66,67,68,69,70,71,72,],[7,7,-61,7,7,7,7,-51,7,-52,7,-54,-53,-42,7,-38,-41,-30,-29,-28,-24,7,-48,-47,-50,-49,-40,-37,-39,7,7,7,-20,-21,-22,-27,-26,-25,-23,-44,-43,-46,-45,-36,-35,7,-32,-34,-33,-31,]),'LANGLE':([0,1,2,4,7,12,13,17,19,20,21,22,25,27,35,37,38,40,41,42,43,45,59,60,61,62,63,],[-60,-59,-58,14,-61,-56,-57,-51,-52,-60,-54,-53,-38,-55,-24,-59,14,-48,-47,-50,-49,-37,-23,-44,-43,-46,-45,]),'QPAIR':([7,18,32,33,34,36,56,57,58,],[-61,33,-30,-29,-28,57,-27,-26,-25,]),'URL':([0,1,2,4,7,12,13,25,27,45,],[-60,-59,-58,15,-61,-56,-57,-38,-55,-37,]),'QTEXT':([7,18,32,33,34,36,56,57,58,],[-61,34,-30,-29,-28,58,-27,-26,-25,]),'DTEXT':([7,52,66,67,68,70,71,],[-61,67,-36,-35,71,-34,-33,]),'DQUOTE':([0,1,2,4,7,12,13,14,17,18,19,20,21,22,25,27,28,32,33,34,35,36,37,40,41,42,43,45,56,57,58,59,60,61,62,63,],[-60,-59,-58,18,-61,-56,-57,-60,-51,35,-52,18,-54,-53,-38,-55,18,-30,-29,-28,-24,59,18,-48,-47,-50,-49,-37,-27,-26,-25,-23,-44,-43,-46,-45,]),'LBRACKET':([31,],[52,]),'DOT_ATOM':([0,1,2,4,7,12,13,14,17,19,20,21,22,25,27,28,31,35,37,40,41,42,43,45,59,60,61,62,63,],[-60,-59,-58,19,-61,-56,-57,-60,-51,-52,40,-54,-53,-38,-55,47,53,-24,60,-48,-47,-50,-49,-37,-23,-44,-43,-46,-45,]),'RPAREN':([7,11,23,24,26,44,46,],[-61,25,-42,45,-41,-40,-39,]),'AT':([16,17,19,21,35,47,48,49,59,],[31,-18,-17,-19,-24,-17,-18,-19,-23,]),'LPAREN':([0,1,7,14,15,17,19,20,21,22,35,37,40,41,42,43,50,51,53,54,55,59,60,61,62,63,69,72,],[11,11,-61,11,11,-51,-52,11,-54,-53,-24,11,-48,-47,-50,-49,11,11,-20,-21,-22,-23,-44,-43,-46,-45,-32,-31,]),'ATOM':([0,1,2,4,7,12,13,14,17,19,20,21,22,25,27,28,31,35,37,40,41,42,43,45,59,60,61,62,63,],[-60,-59,-58,17,-61,-56,-57,-60,-51,-52,41,-54,-53,-38,-55,48,54,-24,61,-48,-47,-50,-49,-37,-23,-44,-43,-46,-45,]),'RANGLE':([1,2,7,12,13,25,27,29,45,51,53,54,55,65,69,72,],[-59,-58,-61,-56,-57,-38,-55,50,-37,-60,-20,-21,-22,-16,-32,-31,]),'RBRACKET':([7,52,66,67,68,70,71,],[-61,69,-36,-35,72,-34,-33,]),'CTEXT':([7,11,23,24,26,44,46,],[-61,26,-42,46,-41,-40,-39,]),'DOT':([0,1,2,4,7,12,13,17,19,20,21,22,25,27,35,37,40,41,42,43,45,59,60,61,62,63,],[-60,-59,-58,22,-61,-56,-57,-51,-52,43,-54,-53,-38,-55,-24,63,-48,-47,-50,-49,-37,-23,-44,-43,-46,-45,]),'$end':([1,2,3,5,6,7,8,9,10,12,13,15,25,27,30,39,45,50,51,53,54,55,64,65,69,72,],[-59,-58,-13,-12,0,-61,-8,-9,-11,-56,-57,-60,-38,-55,-10,-14,-37,-60,-60,-20,-21,-22,-15,-16,-32,-31,]),} +_lr_action_items = {'URL':([0,7,8,9,10,21,22,24,43,44,],[-60,12,-59,-58,-61,-56,-57,-38,-55,-37,]),'LANGLE':([0,7,8,9,10,15,16,17,18,19,21,22,24,31,33,34,35,36,37,38,43,44,56,57,58,59,60,],[-60,14,-59,-58,-61,-60,-52,-51,-54,-53,-56,-57,-38,14,-59,-47,-48,-49,-50,-24,-55,-37,-43,-44,-45,-46,-23,]),'DOT_ATOM':([0,7,8,9,10,14,15,16,17,18,19,21,22,24,28,29,33,34,35,36,37,38,43,44,56,57,58,59,60,],[-60,16,-59,-58,-61,-60,35,-52,-51,-54,-53,-56,-57,-38,48,52,57,-47,-48,-49,-50,-24,-55,-37,-43,-44,-45,-46,-23,]),'ATOM':([0,7,8,9,10,14,15,16,17,18,19,21,22,24,28,29,33,34,35,36,37,38,43,44,56,57,58,59,60,],[-60,17,-59,-58,-61,-60,34,-52,-51,-54,-53,-56,-57,-38,49,53,56,-47,-48,-49,-50,-24,-55,-37,-43,-44,-45,-46,-23,]),'DOT':([0,7,8,9,10,15,16,17,18,19,21,22,24,33,34,35,36,37,38,43,44,56,57,58,59,60,],[-60,19,-59,-58,-61,36,-52,-51,-54,-53,-56,-57,-38,58,-47,-48,-49,-50,-24,-55,-37,-43,-44,-45,-46,-23,]),'DQUOTE':([0,7,8,9,10,14,15,16,17,18,19,20,21,22,24,29,33,34,35,36,37,38,39,40,41,42,43,44,56,57,58,59,60,61,62,63,],[-60,20,-59,-58,-61,-60,20,-52,-51,-54,-53,38,-56,-57,-38,20,20,-47,-48,-49,-50,-24,60,-28,-29,-30,-55,-37,-43,-44,-45,-46,-23,-25,-26,-27,]),'FWSP':([0,9,10,11,12,14,15,16,17,18,19,20,21,23,24,25,26,34,35,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,55,56,57,58,59,60,61,62,63,65,66,67,68,70,71,72,],[10,10,-61,10,10,10,10,-52,-51,-54,-53,10,10,10,-38,-41,-42,-47,-48,-49,-50,-24,10,-28,-29,-30,-37,-39,-40,10,-20,-21,-22,10,10,-43,-44,-45,-46,-23,-25,-26,-27,10,-32,-35,-36,-31,-33,-34,]),'LPAREN':([0,8,10,12,14,15,16,17,18,19,33,34,35,36,37,38,47,48,49,50,55,56,57,58,59,60,66,70,],[11,11,-61,11,11,11,-52,-51,-54,-53,11,-47,-48,-49,-50,-24,11,-20,-21,-22,11,-43,-44,-45,-46,-23,-32,-31,]),'$end':([1,2,3,4,5,6,8,9,10,12,21,22,24,27,32,43,44,47,48,49,50,55,64,66,69,70,],[0,-8,-9,-11,-12,-13,-59,-58,-61,-60,-56,-57,-38,-10,-14,-55,-37,-60,-20,-21,-22,-60,-16,-32,-15,-31,]),'RANGLE':([8,9,10,21,22,24,30,43,44,47,48,49,50,64,66,70,],[-59,-58,-61,-56,-57,-38,55,-55,-37,-60,-20,-21,-22,-16,-32,-31,]),'RPAREN':([10,11,23,25,26,45,46,],[-61,24,44,-41,-42,-39,-40,]),'CTEXT':([10,11,23,25,26,45,46,],[-61,25,45,-41,-42,-39,-40,]),'QTEXT':([10,20,39,40,41,42,61,62,63,],[-61,40,61,-28,-29,-30,-25,-26,-27,]),'QPAIR':([10,20,39,40,41,42,61,62,63,],[-61,41,62,-28,-29,-30,-25,-26,-27,]),'RBRACKET':([10,51,65,67,68,71,72,],[-61,66,70,-35,-36,-33,-34,]),'DTEXT':([10,51,65,67,68,71,72,],[-61,67,71,-35,-36,-33,-34,]),'AT':([13,16,17,18,38,52,53,54,60,],[28,-17,-18,-19,-24,-17,-18,-19,-23,]),'LBRACKET':([28,],[51,]),} _lr_action = {} for _k, _v in _lr_action_items.items(): @@ -16,7 +17,7 @@ _lr_action[_x][_k] = _y del _lr_action_items -_lr_goto_items = {'fwsp':([0,2,11,12,14,15,18,20,24,36,50,51,52,68,],[1,13,23,27,1,1,32,37,44,56,1,1,66,70,]),'comment':([0,1,14,15,20,37,50,51,],[2,12,2,2,2,12,2,2,]),'domain':([31,],[51,]),'comment_text':([11,],[24,]),'name_addr':([0,],[3,]),'ofwsp':([0,14,15,20,50,51,],[4,28,30,38,64,65,]),'angle_addr':([0,20,],[5,39,]),'mailbox_or_url':([0,],[6,]),'local_part':([4,28,],[16,16,]),'domain_literal_text':([52,],[68,]),'mailbox':([0,],[8,]),'quoted_string_text':([18,],[36,]),'url':([0,],[9,]),'addr_spec':([0,14,],[10,29,]),'phrase':([4,],[20,]),'quoted_string':([4,20,28,37,],[21,42,49,62,]),'domain_literal':([31,],[55,]),} +_lr_goto_items = {'mailbox_or_url':([0,],[1,]),'mailbox':([0,],[2,]),'url':([0,],[3,]),'addr_spec':([0,14,],[4,30,]),'angle_addr':([0,15,],[5,32,]),'name_addr':([0,],[6,]),'ofwsp':([0,12,14,15,47,55,],[7,27,29,31,64,69,]),'fwsp':([0,9,11,12,14,15,20,21,23,39,47,51,55,65,],[8,22,26,8,8,33,42,43,46,63,8,68,8,72,]),'comment':([0,8,12,14,15,33,47,55,],[9,21,9,9,9,21,9,9,]),'local_part':([7,29,],[13,13,]),'phrase':([7,],[15,]),'quoted_string':([7,15,29,33,],[18,37,54,59,]),'comment_text':([11,],[23,]),'quoted_string_text':([20,],[39,]),'domain':([28,],[47,]),'domain_literal':([28,],[50,]),'domain_literal_text':([51,],[65,]),} _lr_goto = {} for _k, _v in _lr_goto_items.items(): diff --git a/flanker/addresslib/_parser/mailbox_parsetab.py b/flanker/addresslib/_parser/mailbox_parsetab.py index 0a2def0f..bbdcd72e 100644 --- a/flanker/addresslib/_parser/mailbox_parsetab.py +++ b/flanker/addresslib/_parser/mailbox_parsetab.py @@ -1,13 +1,14 @@ # mailbox_parsetab.py # This file is automatically generated. Do not edit. +# pylint: disable=W,C,R _tabversion = '3.10' _lr_method = 'LALR' -_lr_signature = 'mailboxFWSP AT DOT COMMA SEMICOLON LANGLE RANGLE ATOM DOT_ATOM LBRACKET RBRACKET DTEXT DQUOTE QTEXT QPAIR LPAREN RPAREN CTEXT URLmailbox_or_url_list : mailbox_or_url_list delim mailbox_or_url\n | mailbox_or_url_list delim\n | mailbox_or_urldelim : delim fwsp COMMA\n | delim fwsp SEMICOLON\n | COMMA\n | SEMICOLONmailbox_or_url : mailbox\n | urlurl : ofwsp URL ofwspmailbox : addr_spec\n | angle_addr\n | name_addrname_addr : ofwsp phrase angle_addrangle_addr : ofwsp LANGLE addr_spec RANGLE ofwspaddr_spec : ofwsp local_part AT domain ofwsplocal_part : DOT_ATOM\n | ATOM\n | quoted_stringdomain : DOT_ATOM\n | ATOM\n | domain_literalquoted_string : DQUOTE quoted_string_text DQUOTE\n | DQUOTE DQUOTEquoted_string_text : quoted_string_text QTEXT\n | quoted_string_text QPAIR\n | quoted_string_text fwsp\n | QTEXT\n | QPAIR\n | fwspdomain_literal : LBRACKET domain_literal_text RBRACKET\n | LBRACKET RBRACKETdomain_literal_text : domain_literal_text DTEXT\n | domain_literal_text fwsp\n | DTEXT\n | fwspcomment : LPAREN comment_text RPAREN\n | LPAREN RPARENcomment_text : comment_text CTEXT\n | comment_text fwsp\n | CTEXT\n | fwspphrase : phrase fwsp ATOM\n | phrase fwsp DOT_ATOM\n | phrase fwsp DOT\n | phrase fwsp quoted_string\n | phrase ATOM\n | phrase DOT_ATOM\n | phrase DOT\n | phrase quoted_string\n | ATOM\n | DOT_ATOM\n | DOT\n | quoted_stringofwsp : fwsp comment fwsp\n | fwsp comment\n | comment fwsp\n | comment\n | fwsp\n |fwsp : FWSP' +_lr_signature = 'mailboxAT ATOM COMMA CTEXT DOT DOT_ATOM DQUOTE DTEXT FWSP LANGLE LBRACKET LPAREN QPAIR QTEXT RANGLE RBRACKET RPAREN SEMICOLON URLmailbox_or_url_list : mailbox_or_url_list delim mailbox_or_url\n | mailbox_or_url_list delim\n | mailbox_or_urldelim : delim fwsp COMMA\n | delim fwsp SEMICOLON\n | COMMA\n | SEMICOLONmailbox_or_url : mailbox\n | urlurl : ofwsp URL ofwspmailbox : addr_spec\n | angle_addr\n | name_addrname_addr : ofwsp phrase angle_addrangle_addr : ofwsp LANGLE addr_spec RANGLE ofwspaddr_spec : ofwsp local_part AT domain ofwsplocal_part : DOT_ATOM\n | ATOM\n | quoted_stringdomain : DOT_ATOM\n | ATOM\n | domain_literalquoted_string : DQUOTE quoted_string_text DQUOTE\n | DQUOTE DQUOTEquoted_string_text : quoted_string_text QTEXT\n | quoted_string_text QPAIR\n | quoted_string_text fwsp\n | QTEXT\n | QPAIR\n | fwspdomain_literal : LBRACKET domain_literal_text RBRACKET\n | LBRACKET RBRACKETdomain_literal_text : domain_literal_text DTEXT\n | domain_literal_text fwsp\n | DTEXT\n | fwspcomment : LPAREN comment_text RPAREN\n | LPAREN RPARENcomment_text : comment_text CTEXT\n | comment_text fwsp\n | CTEXT\n | fwspphrase : phrase fwsp ATOM\n | phrase fwsp DOT_ATOM\n | phrase fwsp DOT\n | phrase fwsp quoted_string\n | phrase ATOM\n | phrase DOT_ATOM\n | phrase DOT\n | phrase quoted_string\n | ATOM\n | DOT_ATOM\n | DOT\n | quoted_stringofwsp : fwsp comment fwsp\n | fwsp comment\n | comment fwsp\n | comment\n | fwsp\n |fwsp : FWSP' -_lr_action_items = {'FWSP':([0,2,6,9,10,12,14,15,16,17,18,19,20,21,22,23,28,29,30,31,32,36,37,38,39,40,41,42,46,47,48,49,50,51,52,53,54,55,56,57,58,59,62,63,64,65,66,67,68,],[6,6,-61,6,6,6,-51,6,-52,6,-54,-53,-42,6,-38,-41,-30,-29,-28,-24,6,-48,-47,-50,-49,-40,-37,-39,6,6,6,-20,-21,-22,-27,-26,-25,-23,-44,-43,-46,-45,-36,-35,6,-32,-34,-33,-31,]),'LANGLE':([0,1,2,4,6,10,11,14,16,17,18,19,22,24,31,33,34,36,37,38,39,41,55,56,57,58,59,],[-60,-59,-58,12,-61,-56,-57,-51,-52,-60,-54,-53,-38,-55,-24,-59,12,-48,-47,-50,-49,-37,-23,-44,-43,-46,-45,]),'RPAREN':([6,9,20,21,23,40,42,],[-61,22,-42,41,-41,-40,-39,]),'QTEXT':([6,15,28,29,30,32,52,53,54,],[-61,30,-30,-29,-28,54,-27,-26,-25,]),'DTEXT':([6,48,62,63,64,66,67,],[-61,63,-36,-35,67,-34,-33,]),'DQUOTE':([0,1,2,4,6,10,11,12,14,15,16,17,18,19,22,24,25,28,29,30,31,32,33,36,37,38,39,41,52,53,54,55,56,57,58,59,],[-60,-59,-58,15,-61,-56,-57,-60,-51,31,-52,15,-54,-53,-38,-55,15,-30,-29,-28,-24,55,15,-48,-47,-50,-49,-37,-27,-26,-25,-23,-44,-43,-46,-45,]),'LBRACKET':([27,],[48,]),'QPAIR':([6,15,28,29,30,32,52,53,54,],[-61,29,-30,-29,-28,53,-27,-26,-25,]),'DOT_ATOM':([0,1,2,4,6,10,11,12,14,16,17,18,19,22,24,25,27,31,33,36,37,38,39,41,55,56,57,58,59,],[-60,-59,-58,16,-61,-56,-57,-60,-51,-52,36,-54,-53,-38,-55,43,49,-24,56,-48,-47,-50,-49,-37,-23,-44,-43,-46,-45,]),'AT':([13,14,16,18,31,43,44,45,55,],[27,-18,-17,-19,-24,-17,-18,-19,-23,]),'LPAREN':([0,1,6,12,14,16,17,18,19,31,33,36,37,38,39,46,47,49,50,51,55,56,57,58,59,65,68,],[9,9,-61,9,-51,-52,9,-54,-53,-24,9,-48,-47,-50,-49,9,9,-20,-21,-22,-23,-44,-43,-46,-45,-32,-31,]),'ATOM':([0,1,2,4,6,10,11,12,14,16,17,18,19,22,24,25,27,31,33,36,37,38,39,41,55,56,57,58,59,],[-60,-59,-58,14,-61,-56,-57,-60,-51,-52,37,-54,-53,-38,-55,44,50,-24,57,-48,-47,-50,-49,-37,-23,-44,-43,-46,-45,]),'RANGLE':([1,2,6,10,11,22,24,26,41,47,49,50,51,61,65,68,],[-59,-58,-61,-56,-57,-38,-55,46,-37,-60,-20,-21,-22,-16,-32,-31,]),'RBRACKET':([6,48,62,63,64,66,67,],[-61,65,-36,-35,68,-34,-33,]),'CTEXT':([6,9,20,21,23,40,42,],[-61,23,-42,42,-41,-40,-39,]),'DOT':([0,1,2,4,6,10,11,14,16,17,18,19,22,24,31,33,36,37,38,39,41,55,56,57,58,59,],[-60,-59,-58,19,-61,-56,-57,-51,-52,39,-54,-53,-38,-55,-24,59,-48,-47,-50,-49,-37,-23,-44,-43,-46,-45,]),'$end':([1,2,3,5,6,7,8,10,11,22,24,35,41,46,47,49,50,51,60,61,65,68,],[-59,-58,-13,-12,-61,0,-11,-56,-57,-38,-55,-14,-37,-60,-60,-20,-21,-22,-15,-16,-32,-31,]),} +_lr_action_items = {'LANGLE':([0,5,6,7,8,12,13,14,15,16,18,19,21,27,29,30,31,32,33,34,39,40,52,53,54,55,56,],[-60,11,-59,-58,-61,-60,-52,-51,-54,-53,-56,-57,-38,11,-59,-47,-48,-49,-50,-24,-55,-37,-43,-44,-45,-46,-23,]),'DOT_ATOM':([0,5,6,7,8,11,12,13,14,15,16,18,19,21,24,25,29,30,31,32,33,34,39,40,52,53,54,55,56,],[-60,13,-59,-58,-61,-60,31,-52,-51,-54,-53,-56,-57,-38,44,48,53,-47,-48,-49,-50,-24,-55,-37,-43,-44,-45,-46,-23,]),'ATOM':([0,5,6,7,8,11,12,13,14,15,16,18,19,21,24,25,29,30,31,32,33,34,39,40,52,53,54,55,56,],[-60,14,-59,-58,-61,-60,30,-52,-51,-54,-53,-56,-57,-38,45,49,52,-47,-48,-49,-50,-24,-55,-37,-43,-44,-45,-46,-23,]),'DOT':([0,5,6,7,8,12,13,14,15,16,18,19,21,29,30,31,32,33,34,39,40,52,53,54,55,56,],[-60,16,-59,-58,-61,32,-52,-51,-54,-53,-56,-57,-38,54,-47,-48,-49,-50,-24,-55,-37,-43,-44,-45,-46,-23,]),'DQUOTE':([0,5,6,7,8,11,12,13,14,15,16,17,18,19,21,25,29,30,31,32,33,34,35,36,37,38,39,40,52,53,54,55,56,57,58,59,],[-60,17,-59,-58,-61,-60,17,-52,-51,-54,-53,34,-56,-57,-38,17,17,-47,-48,-49,-50,-24,56,-28,-29,-30,-55,-37,-43,-44,-45,-46,-23,-25,-26,-27,]),'FWSP':([0,7,8,9,11,12,13,14,15,16,17,18,20,21,22,23,30,31,32,33,34,35,36,37,38,40,41,42,43,44,45,46,47,51,52,53,54,55,56,57,58,59,61,62,63,64,66,67,68,],[8,8,-61,8,8,8,-52,-51,-54,-53,8,8,8,-38,-41,-42,-47,-48,-49,-50,-24,8,-28,-29,-30,-37,-39,-40,8,-20,-21,-22,8,8,-43,-44,-45,-46,-23,-25,-26,-27,8,-32,-35,-36,-31,-33,-34,]),'LPAREN':([0,6,8,11,12,13,14,15,16,29,30,31,32,33,34,43,44,45,46,51,52,53,54,55,56,62,66,],[9,9,-61,9,9,-52,-51,-54,-53,9,-47,-48,-49,-50,-24,9,-20,-21,-22,9,-43,-44,-45,-46,-23,-32,-31,]),'$end':([1,2,3,4,6,7,8,18,19,21,28,39,40,43,44,45,46,51,60,62,65,66,],[0,-11,-12,-13,-59,-58,-61,-56,-57,-38,-14,-55,-37,-60,-20,-21,-22,-60,-16,-32,-15,-31,]),'RANGLE':([6,7,8,18,19,21,26,39,40,43,44,45,46,60,62,66,],[-59,-58,-61,-56,-57,-38,51,-55,-37,-60,-20,-21,-22,-16,-32,-31,]),'RPAREN':([8,9,20,22,23,41,42,],[-61,21,40,-41,-42,-39,-40,]),'CTEXT':([8,9,20,22,23,41,42,],[-61,22,41,-41,-42,-39,-40,]),'QTEXT':([8,17,35,36,37,38,57,58,59,],[-61,36,57,-28,-29,-30,-25,-26,-27,]),'QPAIR':([8,17,35,36,37,38,57,58,59,],[-61,37,58,-28,-29,-30,-25,-26,-27,]),'RBRACKET':([8,47,61,63,64,67,68,],[-61,62,66,-35,-36,-33,-34,]),'DTEXT':([8,47,61,63,64,67,68,],[-61,63,67,-35,-36,-33,-34,]),'AT':([10,13,14,15,34,48,49,50,56,],[24,-17,-18,-19,-24,-17,-18,-19,-23,]),'LBRACKET':([24,],[47,]),} _lr_action = {} for _k, _v in _lr_action_items.items(): @@ -16,7 +17,7 @@ _lr_action[_x][_k] = _y del _lr_action_items -_lr_goto_items = {'fwsp':([0,2,9,10,12,15,17,21,32,46,47,48,64,],[1,11,20,24,1,28,33,40,52,1,1,62,66,]),'comment':([0,1,12,17,33,46,47,],[2,10,2,2,10,2,2,]),'domain':([27,],[47,]),'comment_text':([9,],[21,]),'name_addr':([0,],[3,]),'ofwsp':([0,12,17,46,47,],[4,25,34,60,61,]),'angle_addr':([0,17,],[5,35,]),'local_part':([4,25,],[13,13,]),'mailbox':([0,],[7,]),'quoted_string_text':([15,],[32,]),'domain_literal_text':([48,],[64,]),'addr_spec':([0,12,],[8,26,]),'phrase':([4,],[17,]),'quoted_string':([4,17,25,33,],[18,38,45,58,]),'domain_literal':([27,],[51,]),} +_lr_goto_items = {'mailbox':([0,],[1,]),'addr_spec':([0,11,],[2,26,]),'angle_addr':([0,12,],[3,28,]),'name_addr':([0,],[4,]),'ofwsp':([0,11,12,43,51,],[5,25,27,60,65,]),'fwsp':([0,7,9,11,12,17,18,20,35,43,47,51,61,],[6,19,23,6,29,38,39,42,59,6,64,6,68,]),'comment':([0,6,11,12,29,43,51,],[7,18,7,7,18,7,7,]),'local_part':([5,25,],[10,10,]),'phrase':([5,],[12,]),'quoted_string':([5,12,25,29,],[15,33,50,55,]),'comment_text':([9,],[20,]),'quoted_string_text':([17,],[35,]),'domain':([24,],[43,]),'domain_literal':([24,],[46,]),'domain_literal_text':([47,],[61,]),} _lr_goto = {} for _k, _v in _lr_goto_items.items(): diff --git a/flanker/addresslib/_parser/url_parsetab.py b/flanker/addresslib/_parser/url_parsetab.py index 9fb61a83..48fdefbc 100644 --- a/flanker/addresslib/_parser/url_parsetab.py +++ b/flanker/addresslib/_parser/url_parsetab.py @@ -1,13 +1,14 @@ # url_parsetab.py # This file is automatically generated. Do not edit. +# pylint: disable=W,C,R _tabversion = '3.10' _lr_method = 'LALR' -_lr_signature = 'urlFWSP AT DOT COMMA SEMICOLON LANGLE RANGLE ATOM DOT_ATOM LBRACKET RBRACKET DTEXT DQUOTE QTEXT QPAIR LPAREN RPAREN CTEXT URLmailbox_or_url_list : mailbox_or_url_list delim mailbox_or_url\n | mailbox_or_url_list delim\n | mailbox_or_urldelim : delim fwsp COMMA\n | delim fwsp SEMICOLON\n | COMMA\n | SEMICOLONmailbox_or_url : mailbox\n | urlurl : ofwsp URL ofwspmailbox : addr_spec\n | angle_addr\n | name_addrname_addr : ofwsp phrase angle_addrangle_addr : ofwsp LANGLE addr_spec RANGLE ofwspaddr_spec : ofwsp local_part AT domain ofwsplocal_part : DOT_ATOM\n | ATOM\n | quoted_stringdomain : DOT_ATOM\n | ATOM\n | domain_literalquoted_string : DQUOTE quoted_string_text DQUOTE\n | DQUOTE DQUOTEquoted_string_text : quoted_string_text QTEXT\n | quoted_string_text QPAIR\n | quoted_string_text fwsp\n | QTEXT\n | QPAIR\n | fwspdomain_literal : LBRACKET domain_literal_text RBRACKET\n | LBRACKET RBRACKETdomain_literal_text : domain_literal_text DTEXT\n | domain_literal_text fwsp\n | DTEXT\n | fwspcomment : LPAREN comment_text RPAREN\n | LPAREN RPARENcomment_text : comment_text CTEXT\n | comment_text fwsp\n | CTEXT\n | fwspphrase : phrase fwsp ATOM\n | phrase fwsp DOT_ATOM\n | phrase fwsp DOT\n | phrase fwsp quoted_string\n | phrase ATOM\n | phrase DOT_ATOM\n | phrase DOT\n | phrase quoted_string\n | ATOM\n | DOT_ATOM\n | DOT\n | quoted_stringofwsp : fwsp comment fwsp\n | fwsp comment\n | comment fwsp\n | comment\n | fwsp\n |fwsp : FWSP' +_lr_signature = 'urlAT ATOM COMMA CTEXT DOT DOT_ATOM DQUOTE DTEXT FWSP LANGLE LBRACKET LPAREN QPAIR QTEXT RANGLE RBRACKET RPAREN SEMICOLON URLmailbox_or_url_list : mailbox_or_url_list delim mailbox_or_url\n | mailbox_or_url_list delim\n | mailbox_or_urldelim : delim fwsp COMMA\n | delim fwsp SEMICOLON\n | COMMA\n | SEMICOLONmailbox_or_url : mailbox\n | urlurl : ofwsp URL ofwspmailbox : addr_spec\n | angle_addr\n | name_addrname_addr : ofwsp phrase angle_addrangle_addr : ofwsp LANGLE addr_spec RANGLE ofwspaddr_spec : ofwsp local_part AT domain ofwsplocal_part : DOT_ATOM\n | ATOM\n | quoted_stringdomain : DOT_ATOM\n | ATOM\n | domain_literalquoted_string : DQUOTE quoted_string_text DQUOTE\n | DQUOTE DQUOTEquoted_string_text : quoted_string_text QTEXT\n | quoted_string_text QPAIR\n | quoted_string_text fwsp\n | QTEXT\n | QPAIR\n | fwspdomain_literal : LBRACKET domain_literal_text RBRACKET\n | LBRACKET RBRACKETdomain_literal_text : domain_literal_text DTEXT\n | domain_literal_text fwsp\n | DTEXT\n | fwspcomment : LPAREN comment_text RPAREN\n | LPAREN RPARENcomment_text : comment_text CTEXT\n | comment_text fwsp\n | CTEXT\n | fwspphrase : phrase fwsp ATOM\n | phrase fwsp DOT_ATOM\n | phrase fwsp DOT\n | phrase fwsp quoted_string\n | phrase ATOM\n | phrase DOT_ATOM\n | phrase DOT\n | phrase quoted_string\n | ATOM\n | DOT_ATOM\n | DOT\n | quoted_stringofwsp : fwsp comment fwsp\n | fwsp comment\n | comment fwsp\n | comment\n | fwsp\n |fwsp : FWSP' -_lr_action_items = {'FWSP':([0,2,5,6,7,9,10,11,12,13,16,17,18,],[5,5,-61,5,5,5,-42,5,-38,-41,-40,-37,-39,]),'RPAREN':([5,6,10,11,13,16,18,],[-61,12,-42,17,-41,-40,-39,]),'URL':([0,1,2,3,5,7,8,12,14,17,],[-60,-59,-58,9,-61,-56,-57,-38,-55,-37,]),'LPAREN':([0,1,5,9,],[6,6,-61,6,]),'CTEXT':([5,6,10,11,13,16,18,],[-61,13,-42,18,-41,-40,-39,]),'$end':([1,2,4,5,7,8,9,12,14,15,17,],[-59,-58,0,-61,-56,-57,-60,-38,-55,-10,-37,]),} +_lr_action_items = {'URL':([0,2,3,4,5,8,9,11,15,16,],[-60,7,-59,-58,-61,-56,-57,-38,-55,-37,]),'FWSP':([0,4,5,6,7,8,10,11,12,13,16,17,18,],[5,5,-61,5,5,5,5,-38,-41,-42,-37,-39,-40,]),'LPAREN':([0,3,5,7,],[6,6,-61,6,]),'$end':([1,3,4,5,7,8,9,11,14,15,16,],[0,-59,-58,-61,-60,-56,-57,-38,-10,-55,-37,]),'RPAREN':([5,6,10,12,13,17,18,],[-61,11,16,-41,-42,-39,-40,]),'CTEXT':([5,6,10,12,13,17,18,],[-61,12,17,-41,-42,-39,-40,]),} _lr_action = {} for _k, _v in _lr_action_items.items(): @@ -16,7 +17,7 @@ _lr_action[_x][_k] = _y del _lr_action_items -_lr_goto_items = {'url':([0,],[4,]),'fwsp':([0,2,6,7,9,11,],[1,8,10,14,1,16,]),'comment_text':([6,],[11,]),'comment':([0,1,9,],[2,7,2,]),'ofwsp':([0,9,],[3,15,]),} +_lr_goto_items = {'url':([0,],[1,]),'ofwsp':([0,7,],[2,14,]),'fwsp':([0,4,6,7,8,10,],[3,9,13,3,15,18,]),'comment':([0,3,7,],[4,8,4,]),'comment_text':([6,],[10,]),} _lr_goto = {} for _k, _v in _lr_goto_items.items():