Asp.net源码专业站
首页->尚未分类->BugTrack51aspx汉化改造版V2.1.7>>ABNF.cs>>源码在线查看
温馨提示:代码在线浏览功能只能做为源码浏览参考,如果想更进一步了解该代码请下载:BugTrack51aspx汉化改造版V2.1.7
当前文件:文件类型 14RFAMJDWSL814/ABNF.cs[5K,2009-6-12 11:30:42]打开代码结构图
普通视图
		            
1// ----------------------------------------------------------------------- 2// 3// Copyright (C) 2003-2005 Angel Marin 4// 5// This file is part of SharpMimeTools 6// 7// SharpMimeTools is free software; you can redistribute it and/or 8// modify it under the terms of the GNU Lesser General Public 9// License as published by the Free Software Foundation; either 10// version 2.1 of the License, or (at your option) any later version. 11// 12// SharpMimeTools is distributed in the hope that it will be useful, 13// but WITHOUT ANY WARRANTY; without even the implied warranty of 14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15// Lesser General Public License for more details. 16// 17// You should have received a copy of the GNU Lesser General Public 18// License along with SharpMimeTools; if not, write to the Free Software 19// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20// 21// ----------------------------------------------------------------------- 22 23using System; 24 25namespace anmar.SharpMimeTools 26{ 27 /// <summary> 28 /// 29 /// </summary> 30 public sealed class ABNF { 31 /// <summary> 32 /// 33 /// </summary> 34 public const string CRLF = "\r\n"; 35 /// <summary> 36 /// 37 /// </summary> 38 public const string ALPHA = @"A-Za-z"; 39 /// <summary> 40 /// 41 /// </summary> 42 public const string DIGIT = @"0-9"; 43 /// <summary> 44 /// RFC 2822 Section 2.2.2 45 /// </summary> 46 public const string WSP = @"\x20\x09"; 47 /// <summary> 48 /// RFC 2822 Section 3.2.1 49 /// </summary> 50 public const string NO_WS_CTL = @"\x01-\x08\x0B\x0C\x0E-\x1F\x7F"; 51 /// <summary> 52 /// RFC 2822 Section 3.2.1 53 /// </summary> 54 // FIXME: add obs-text 55 public const string text = @"\x01-\x09\x0B\x0C\x0E-\x7F"; 56 /// <summary> 57 /// RFC 2822 Section 3.2.2 58 /// </summary> 59 // FIXME: add obs-qp 60 public const string quoted_pair = @"\x5C[" + text + "]"; 61 /// <summary> 62 /// RFC 2822 Section 3.2.3 63 /// </summary> 64 // FIXME: add obs-FWS 65 public const string FWS = @"(?:(?:[" + WSP + @"]{0,}\r\n){0,1}[" + WSP + @"]+)"; 66 /// <summary> 67 /// RFC 2822 Section 3.2.3 68 /// </summary> 69 // FIXME: Correct this simplification 70 public const string CFWS = FWS; 71 /// <summary> 72 /// RFC 2822 Section 3.2.4 73 /// </summary> 74 public const string atext = ALPHA + DIGIT + @"\x21\x23-\x27\x2A\x2B\x2D\x2F\x3D\x3F\x5E\x5F\x60\x7B-\x7E"; 75 /// <summary> 76 /// RFC 2822 Section 3.2.4 77 /// </summary> 78 public const string atom = CFWS + @"{0,1}[" + atext + @"]+" + CFWS + @"{0,1}"; 79 /// <summary> 80 /// RFC 2822 Section 3.2.4 81 /// </summary> 82 public const string dot_atom = CFWS + @"{0,1}" + dot_atom_text + CFWS + @"{0,1}"; 83 /// <summary> 84 /// RFC 2822 Section 3.2.4 85 /// </summary> 86 public const string dot_atom_text = @"[" + atext + @"]{1,}(?:\.[" + atext + @"]{1,}){0,}"; 87 /// <summary> 88 /// RFC 2822 Section 3.2.5 89 /// </summary> 90 public const string DQUOTE = @"\x22"; 91 /// <summary> 92 /// RFC 2822 Section 3.2.5 93 /// </summary> 94 public const string qtext = NO_WS_CTL + @"\x21\x23-\x5A\x5B\x5D-\x7E"; 95 /// <summary> 96 /// RFC 2822 Section 3.2.5 97 /// </summary> 98 public const string qcontent = @"(?:[" + qtext + @"]|(?:" + quoted_pair + @"))"; 99 /// <summary> 100 /// RFC 2822 Section 3.2.5 101 /// </summary> 102 public const string quoted_string = CFWS + @"{0,1}" + DQUOTE + @"(?:" + FWS + @"{0,1}" + qcontent + "){0,}" + FWS + @"{0,1}" + DQUOTE + CFWS + @"{0,1}"; 103 /// <summary> 104 /// RFC 2822 Section 3.2.6 105 /// </summary> 106 public const string word = @"(?:" + atom + @"|(?:" + quoted_string + @"))"; 107 /// <summary> 108 /// RFC 2822 Section 3.2.6 109 /// </summary> 110 // FIXME: add obs-phrase 111 public const string phrase = @"(?:" + word + @"){1,}"; 112 /// <summary> 113 /// RFC 2822 Section 3.2.6 114 /// </summary> 115 public const string address = @"(?:" + mailbox + @"|" + group + @")"; 116 /// <summary> 117 /// RFC 2822 Section 3.2.6 118 /// </summary> 119 public const string mailbox = @"(?:" + addr_spec + @"|" + name_addr + @")"; 120 /// <summary> 121 /// RFC 2822 Section 3.2.6 122 /// </summary> 123 public const string name_addr = @"(?:" + phrase + @"){0,}" + angle_addr; 124 /// <summary> 125 /// RFC 2822 Section 3.4 126 /// </summary> 127 // FIXME: add obs-angle-addr 128 public const string angle_addr = CFWS + @"{0,1}" + @"\x3C" + addr_spec + @"\x3E" + CFWS + @"{0,1}"; 129 /// <summary> 130 /// RFC 2822 Section 3.4 131 /// </summary> 132 public const string group = phrase + @":(?:" + mailbox_list + @"|" + CFWS + @"{0,1}){0,};" + CFWS + @"{0,1}"; 133 /// <summary> 134 /// RFC 2822 Section 3.4 135 /// </summary> 136 public const string mailbox_list = @"(?:" + mailbox + @"(?:," + mailbox + @"){0,})"; 137 /// <summary> 138 /// RFC 2822 Section 3.4 139 /// </summary> 140 public const string address_list = @"(?:" + address + @"(?:," + address + @"){0,})"; 141 /// <summary> 142 /// RFC 2822 Section 3.4.1 143 /// </summary> 144 // FIXME: add obs-local-part 145 public const string local_part = @"(?:" + dot_atom + @"|" + quoted_string + @")"; 146 /// <summary> 147 /// RFC 2822 Section 3.4.1 148 /// </summary> 149 // FIXME: add obs-domain 150 public const string domain = @"(?:" + dot_atom + @"|" + domain_literal + @")"; 151 /// <summary> 152 /// RFC 2822 Section 3.4.1 153 /// </summary> 154 public const string domain_literal = CFWS + @"{0,1}" + @"\[(?:" + FWS + @"{0,1}" + dcontent + @"){0,}" + FWS + @"{0,1}" + @"\]" + CFWS + @"{0,1}"; 155 /// <summary> 156 /// RFC 2822 Section 3.4.1 157 /// </summary> 158 public const string dtext = NO_WS_CTL + @"\x21-\x5A\x5E-\x7E"; 159 /// <summary> 160 /// RFC 2822 Section 3.4.1 161 /// </summary> 162 public const string dcontent = @"(?:[" + dtext + @"|" + quoted_pair + @")"; 163 /// <summary> 164 /// RFC 2822 Section 3.4.1 165 /// </summary> 166 public const string addr_spec = local_part + "@" + domain; 167 } 168} 169
还没有找到您心仪的内容?请用.net源码大搜捕
代码片断 打包下载该项目完整源码:BugTrack51aspx汉化改造版V2.1.7
51Aspx.com 版权所有 CopyRight © 2006-2010. 京ICP备06046876号 本站法律顾问:ITlaw-庄毅雄律师
返回顶部
客户服务:点击这里进行客户咨询 业务合作:点击这里洽谈业务合作 合作热线:010-68880146