##// END OF EJS Templates
DFA refactoring, rx based dfa.
cin -
r170:181119ef3b39 ref20160224
parent child
Show More
@@ -1,32 +1,32
1 1 using Implab;
2 2
3 3 namespace Implab.Automaton.RegularExpressions {
4 4 /// <summary>
5 5 /// Конечный символ расширенного регулярного выражения, при построении ДКА
6 6 /// используется для определения конечных состояний.
7 7 /// </summary>
8 8 public class EndToken<TTag>: Token<TTag> {
9 9
10 10 TTag m_tag;
11 11
12 12 public EndToken(TTag tag) {
13 13 m_tag = tag;
14 14 }
15 15
16 16 public EndToken()
17 : this(0) {
17 : this(default(TTag)) {
18 18 }
19 19
20 20 public TTag Tag {
21 21 get { return m_tag; }
22 22 }
23 23
24 24 public override void Accept(IVisitor<TTag> visitor) {
25 25 Safe.ArgumentNotNull(visitor, "visitor");
26 26 visitor.Visit(this);
27 27 }
28 28 public override string ToString() {
29 29 return "#";
30 30 }
31 31 }
32 32 }
@@ -1,180 +1,180
1 1 using Implab;
2 2 using System;
3 3 using System.Collections.Generic;
4 4 using System.Diagnostics;
5 5 using System.Linq;
6 6
7 7 namespace Implab.Automaton.RegularExpressions {
8 8 /// <summary>
9 9 /// Используется для построения ДКА по регулярному выражению, сначала обходит
10 10 /// регулярное выражение и вычисляет followpos, затем используется метод
11 11 /// <see cref="BuildDFA(IDFADefinition)"/> для построения автомата.
12 12 /// </summary>
13 13 public class RegularDFABuilder<TTag> : IVisitor<TTag> {
14 14 int m_idx;
15 15 Token<TTag> m_root;
16 16 HashSet<int> m_firstpos;
17 17 HashSet<int> m_lastpos;
18 18
19 19 readonly Dictionary<int, HashSet<int>> m_followpos = new Dictionary<int, HashSet<int>>();
20 20 readonly Dictionary<int, int> m_indexes = new Dictionary<int, int>();
21 21 readonly Dictionary<int, TTag> m_ends = new Dictionary<int, TTag>();
22 22
23 23 public Dictionary<int, HashSet<int>> FollowposMap {
24 24 get { return m_followpos; }
25 25 }
26 26
27 27 public HashSet<int> Followpos(int pos) {
28 28 HashSet<int> set;
29 29 return m_followpos.TryGetValue(pos, out set) ? set : m_followpos[pos] = new HashSet<int>();
30 30 }
31 31
32 32 bool Nullable(object n) {
33 33 if (n is EmptyToken<TTag> || n is StarToken<TTag>)
34 34 return true;
35 35 var altToken = n as AltToken<TTag>;
36 36 if (altToken != null)
37 37 return Nullable(altToken.Left) || Nullable(altToken.Right);
38 38 var catToken = n as CatToken<TTag>;
39 39 if (catToken != null)
40 40 return Nullable(catToken.Left) && Nullable(catToken.Right);
41 41 return false;
42 42 }
43 43
44 44
45 45 public void Visit(AltToken<TTag> token) {
46 46 if (m_root == null)
47 47 m_root = token;
48 48 var firtspos = new HashSet<int>();
49 49 var lastpos = new HashSet<int>();
50 50
51 51 token.Left.Accept(this);
52 52 firtspos.UnionWith(m_firstpos);
53 53 lastpos.UnionWith(m_lastpos);
54 54
55 55 token.Right.Accept(this);
56 56 firtspos.UnionWith(m_firstpos);
57 57 lastpos.UnionWith(m_lastpos);
58 58
59 59 m_firstpos = firtspos;
60 60 m_lastpos = lastpos;
61 61 }
62 62
63 63 public void Visit(StarToken<TTag> token) {
64 64 if (m_root == null)
65 65 m_root = token;
66 66 token.Token.Accept(this);
67 67
68 68 foreach (var i in m_lastpos)
69 69 Followpos(i).UnionWith(m_firstpos);
70 70 }
71 71
72 72 public void Visit(CatToken<TTag> token) {
73 73 if (m_root == null)
74 74 m_root = token;
75 75
76 76 var firtspos = new HashSet<int>();
77 77 var lastpos = new HashSet<int>();
78 78 token.Left.Accept(this);
79 79 firtspos.UnionWith(m_firstpos);
80 80 var leftLastpos = m_lastpos;
81 81
82 82 token.Right.Accept(this);
83 83 lastpos.UnionWith(m_lastpos);
84 84 var rightFirstpos = m_firstpos;
85 85
86 86 if (Nullable(token.Left))
87 87 firtspos.UnionWith(rightFirstpos);
88 88
89 89 if (Nullable(token.Right))
90 90 lastpos.UnionWith(leftLastpos);
91 91
92 92 m_firstpos = firtspos;
93 93 m_lastpos = lastpos;
94 94
95 95 foreach (var i in leftLastpos)
96 96 Followpos(i).UnionWith(rightFirstpos);
97 97
98 98 }
99 99
100 100 public void Visit(EmptyToken<TTag> token) {
101 101 if (m_root == null)
102 102 m_root = token;
103 103 }
104 104
105 105 public void Visit(SymbolToken<TTag> token) {
106 106 if (m_root == null)
107 107 m_root = token;
108 108 m_idx++;
109 109 m_indexes[m_idx] = token.Value;
110 110 m_firstpos = new HashSet<int>(new[] { m_idx });
111 111 m_lastpos = new HashSet<int>(new[] { m_idx });
112 112 }
113 113
114 114 public void Visit(EndToken<TTag> token) {
115 115 if (m_root == null)
116 116 m_root = token;
117 117 m_idx++;
118 118 m_indexes[m_idx] = DFAConst.UNCLASSIFIED_INPUT;
119 119 m_firstpos = new HashSet<int>(new[] { m_idx });
120 120 m_lastpos = new HashSet<int>(new[] { m_idx });
121 121 Followpos(m_idx);
122 122 m_ends.Add(m_idx, token.Tag);
123 123 }
124 124
125 public void BuildDFA(IDFATableBuilder<TTag> dfa) {
125 public void BuildDFA(IDFATableBuilder dfa) {
126 126 Safe.ArgumentNotNull(dfa,"dfa");
127 127
128 128 var states = new MapAlphabet<HashSet<int>>(new CustomEqualityComparer<HashSet<int>>(
129 129 (x, y) => x.SetEquals(y),
130 130 x => x.Sum(n => n.GetHashCode())
131 131 ));
132 132
133 133 var initialState = states.DefineSymbol(m_firstpos);
134 134 dfa.SetInitialState(initialState);
135 135
136 136 var tags = GetStateTags(m_firstpos);
137 137 if (tags != null && tags.Length > 0)
138 138 dfa.MarkFinalState(initialState, tags);
139 139
140 140 var inputMax = m_indexes.Values.Max();
141 141 var queue = new Queue<HashSet<int>>();
142 142
143 143 queue.Enqueue(m_firstpos);
144 144
145 145 while (queue.Count > 0) {
146 146 var state = queue.Dequeue();
147 147 var s1 = states.Translate(state);
148 148 Debug.Assert(s1 != DFAConst.UNCLASSIFIED_INPUT);
149 149
150 150 for (int a = 0; a <= inputMax; a++) {
151 151 var next = new HashSet<int>();
152 152 foreach (var p in state) {
153 153 if (m_indexes[p] == a) {
154 154 next.UnionWith(Followpos(p));
155 155 }
156 156 }
157 157 if (next.Count > 0) {
158 158 int s2 = states.Translate(next);
159 159 if (s2 == DFAConst.UNCLASSIFIED_INPUT) {
160 160 s2 = states.DefineSymbol(next);
161 161
162 162 tags = GetStateTags(next);
163 163 if (tags != null && tags.Length > 0)
164 164 dfa.MarkFinalState(s2, tags);
165 165
166 166 queue.Enqueue(next);
167 167 }
168 dfa.DefineTransition(s1, s2, a);
168 dfa.Add(new AutomatonTransition(s1, s2, a));
169 169 }
170 170 }
171 171 }
172 172 }
173 173
174 174 TTag[] GetStateTags(IEnumerable<int> state) {
175 175 Debug.Assert(state != null);
176 176 return state.Where(m_ends.ContainsKey).Select(pos => m_ends[pos]).ToArray();
177 177 }
178 178
179 179 }
180 180 }
@@ -1,43 +1,69
1 1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
2 4
3 5 namespace Implab.Automaton.RegularExpressions {
4 6 public class RegularDFADefinition<TInput, TTag> : DFATable {
5 7
8 readonly Dictionary<int,TTag[]> m_tags = new Dictionary<int, TTag[]>();
6 9 readonly IAlphabet<TInput> m_alphabet;
7 10
8 11 public RegularDFADefinition(IAlphabet<TInput> alphabet) {
9 12 Safe.ArgumentNotNull(alphabet, "aplhabet");
10 13
11 14 m_alphabet = alphabet;
12 15 }
13 16
14 17
15 18 public IAlphabet<TInput> InputAlphabet {
16 19 get {
17 20 return m_alphabet;
18 21 }
19 22 }
20 23
21 24 protected override DFAStateDescriptior[] ConstructTransitionTable() {
22 25 if (InputAlphabet.Count != m_alphabet.Count)
23 26 throw new InvalidOperationException("The alphabet doesn't match the transition table");
24 27
25 28 return base.ConstructTransitionTable();
26 29 }
27 30
31 public void MarkFinalState(int s, TTag[] tags) {
32 MarkFinalState(s);
33 SetStateTag(s, tags);
34 }
35
36 public void SetStateTag(int s, TTag[] tags) {
37 Safe.ArgumentNotNull(tags, "tags");
38 m_tags[s] = tags;
39 }
40
41 public TTag[] GetStateTag(int s) {
42 TTag[] tags;
43 return m_tags.TryGetValue(s, out tags) ? tags : new TTag[0];
44 }
45
28 46 /// <summary>
29 47 /// Optimize the specified alphabet.
30 48 /// </summary>
31 /// <param name = "dfaTable"></param>
32 49 /// <param name="alphabet">Пустой алфавит, который будет зполнен в процессе оптимизации.</param>
33 public void Optimize(IDFATableBuilder<TTag> dfaTable, IAlphabetBuilder<TInput> alphabet) {
50 public RegularDFADefinition<TInput,TTag> Optimize(IAlphabetBuilder<TInput> alphabet) {
34 51 Safe.ArgumentNotNull(alphabet, "alphabet");
35 Safe.ArgumentNotNull(dfaTable, "dfaTable");
52
53 var dfaTable = new RegularDFADefinition<TInput, TTag>(alphabet);
54
55 var states = new DummyAlphabet(StateCount);
56 var map = new MapAlphabet<int>();
36 57
37 Optimize(dfaTable, InputAlphabet, alphabet, new DummyAlphabet(StateCount), new MapAlphabet<int>());
58 Optimize(dfaTable, InputAlphabet, alphabet, states, map);
59
60 foreach (var g in m_tags.Where(x => x.Key < StateCount).GroupBy(x => map.Translate(x.Key), x => x.Value ))
61 dfaTable.SetStateTag(g.Key, g.SelectMany(x => x).ToArray());
62
63 return dfaTable;
38 64 }
39 65
40 66
41 67 }
42 68 }
43 69
@@ -1,272 +1,271
1 1 <?xml version="1.0" encoding="utf-8"?>
2 2 <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 3 <PropertyGroup>
4 4 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5 5 <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6 6 <ProjectGuid>{F550F1F8-8746-4AD0-9614-855F4C4B7F05}</ProjectGuid>
7 7 <OutputType>Library</OutputType>
8 8 <RootNamespace>Implab</RootNamespace>
9 9 <AssemblyName>Implab</AssemblyName>
10 10 <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
11 11 <ReleaseVersion>0.2</ReleaseVersion>
12 12 <ProductVersion>8.0.30703</ProductVersion>
13 13 <SchemaVersion>2.0</SchemaVersion>
14 14 </PropertyGroup>
15 15 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
16 16 <DebugSymbols>true</DebugSymbols>
17 17 <DebugType>full</DebugType>
18 18 <Optimize>false</Optimize>
19 19 <OutputPath>bin\Debug</OutputPath>
20 20 <DefineConstants>TRACE;DEBUG;</DefineConstants>
21 21 <ErrorReport>prompt</ErrorReport>
22 22 <WarningLevel>4</WarningLevel>
23 23 <ConsolePause>false</ConsolePause>
24 24 <RunCodeAnalysis>true</RunCodeAnalysis>
25 25 </PropertyGroup>
26 26 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
27 27 <DebugType>full</DebugType>
28 28 <Optimize>true</Optimize>
29 29 <OutputPath>bin\Release</OutputPath>
30 30 <ErrorReport>prompt</ErrorReport>
31 31 <WarningLevel>4</WarningLevel>
32 32 <ConsolePause>false</ConsolePause>
33 33 </PropertyGroup>
34 34 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug 4.5|AnyCPU' ">
35 35 <DebugSymbols>true</DebugSymbols>
36 36 <DebugType>full</DebugType>
37 37 <Optimize>false</Optimize>
38 38 <OutputPath>bin\Debug</OutputPath>
39 39 <DefineConstants>TRACE;DEBUG;NET_4_5</DefineConstants>
40 40 <ErrorReport>prompt</ErrorReport>
41 41 <WarningLevel>4</WarningLevel>
42 42 <RunCodeAnalysis>true</RunCodeAnalysis>
43 43 <ConsolePause>false</ConsolePause>
44 44 </PropertyGroup>
45 45 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release 4.5|AnyCPU' ">
46 46 <Optimize>true</Optimize>
47 47 <OutputPath>bin\Release</OutputPath>
48 48 <ErrorReport>prompt</ErrorReport>
49 49 <WarningLevel>4</WarningLevel>
50 50 <ConsolePause>false</ConsolePause>
51 51 <DefineConstants>NET_4_5</DefineConstants>
52 52 </PropertyGroup>
53 53 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugMono|AnyCPU' ">
54 54 <DebugSymbols>true</DebugSymbols>
55 55 <DebugType>full</DebugType>
56 56 <Optimize>false</Optimize>
57 57 <OutputPath>bin\Debug</OutputPath>
58 58 <DefineConstants>TRACE;DEBUG;NET_4_5;MONO</DefineConstants>
59 59 <ErrorReport>prompt</ErrorReport>
60 60 <WarningLevel>4</WarningLevel>
61 61 <RunCodeAnalysis>true</RunCodeAnalysis>
62 62 <ConsolePause>false</ConsolePause>
63 63 </PropertyGroup>
64 64 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'ReleaseMono|AnyCPU' ">
65 65 <Optimize>true</Optimize>
66 66 <OutputPath>bin\Release</OutputPath>
67 67 <DefineConstants>NET_4_5;MONO;</DefineConstants>
68 68 <ErrorReport>prompt</ErrorReport>
69 69 <WarningLevel>4</WarningLevel>
70 70 <ConsolePause>false</ConsolePause>
71 71 </PropertyGroup>
72 72 <ItemGroup>
73 73 <Reference Include="System" />
74 74 <Reference Include="System.Xml" />
75 75 <Reference Include="mscorlib" />
76 76 </ItemGroup>
77 77 <ItemGroup>
78 78 <Compile Include="CustomEqualityComparer.cs" />
79 79 <Compile Include="Diagnostics\ConsoleTraceListener.cs" />
80 80 <Compile Include="Diagnostics\EventText.cs" />
81 81 <Compile Include="Diagnostics\LogChannel.cs" />
82 82 <Compile Include="Diagnostics\LogicalOperation.cs" />
83 83 <Compile Include="Diagnostics\TextFileListener.cs" />
84 84 <Compile Include="Diagnostics\TraceLog.cs" />
85 85 <Compile Include="Diagnostics\TraceEvent.cs" />
86 86 <Compile Include="Diagnostics\TraceEventType.cs" />
87 87 <Compile Include="ICancellable.cs" />
88 88 <Compile Include="IProgressHandler.cs" />
89 89 <Compile Include="IProgressNotifier.cs" />
90 90 <Compile Include="IPromiseT.cs" />
91 91 <Compile Include="IPromise.cs" />
92 92 <Compile Include="IServiceLocator.cs" />
93 93 <Compile Include="ITaskController.cs" />
94 94 <Compile Include="Parallels\DispatchPool.cs" />
95 95 <Compile Include="Parallels\ArrayTraits.cs" />
96 96 <Compile Include="Parallels\MTQueue.cs" />
97 97 <Compile Include="Parallels\WorkerPool.cs" />
98 98 <Compile Include="ProgressInitEventArgs.cs" />
99 99 <Compile Include="Properties\AssemblyInfo.cs" />
100 100 <Compile Include="Parallels\AsyncPool.cs" />
101 101 <Compile Include="Safe.cs" />
102 102 <Compile Include="ValueEventArgs.cs" />
103 103 <Compile Include="PromiseExtensions.cs" />
104 104 <Compile Include="SyncContextPromise.cs" />
105 105 <Compile Include="Diagnostics\OperationContext.cs" />
106 106 <Compile Include="Diagnostics\TraceContext.cs" />
107 107 <Compile Include="Diagnostics\LogEventArgs.cs" />
108 108 <Compile Include="Diagnostics\LogEventArgsT.cs" />
109 109 <Compile Include="Diagnostics\Extensions.cs" />
110 110 <Compile Include="PromiseEventType.cs" />
111 111 <Compile Include="Parallels\AsyncQueue.cs" />
112 112 <Compile Include="PromiseT.cs" />
113 113 <Compile Include="IDeferred.cs" />
114 114 <Compile Include="IDeferredT.cs" />
115 115 <Compile Include="Promise.cs" />
116 116 <Compile Include="PromiseTransientException.cs" />
117 117 <Compile Include="Parallels\Signal.cs" />
118 118 <Compile Include="Parallels\SharedLock.cs" />
119 119 <Compile Include="Diagnostics\ILogWriter.cs" />
120 120 <Compile Include="Diagnostics\ListenerBase.cs" />
121 121 <Compile Include="Parallels\BlockingQueue.cs" />
122 122 <Compile Include="AbstractEvent.cs" />
123 123 <Compile Include="AbstractPromise.cs" />
124 124 <Compile Include="AbstractPromiseT.cs" />
125 125 <Compile Include="FuncTask.cs" />
126 126 <Compile Include="FuncTaskBase.cs" />
127 127 <Compile Include="FuncTaskT.cs" />
128 128 <Compile Include="ActionChainTaskBase.cs" />
129 129 <Compile Include="ActionChainTask.cs" />
130 130 <Compile Include="ActionChainTaskT.cs" />
131 131 <Compile Include="FuncChainTaskBase.cs" />
132 132 <Compile Include="FuncChainTask.cs" />
133 133 <Compile Include="FuncChainTaskT.cs" />
134 134 <Compile Include="ActionTaskBase.cs" />
135 135 <Compile Include="ActionTask.cs" />
136 136 <Compile Include="ActionTaskT.cs" />
137 137 <Compile Include="ICancellationToken.cs" />
138 138 <Compile Include="SuccessPromise.cs" />
139 139 <Compile Include="SuccessPromiseT.cs" />
140 140 <Compile Include="PromiseAwaiterT.cs" />
141 141 <Compile Include="PromiseAwaiter.cs" />
142 142 <Compile Include="Components\ComponentContainer.cs" />
143 143 <Compile Include="Components\Disposable.cs" />
144 144 <Compile Include="Components\DisposablePool.cs" />
145 145 <Compile Include="Components\ObjectPool.cs" />
146 146 <Compile Include="Components\ServiceLocator.cs" />
147 147 <Compile Include="Components\IInitializable.cs" />
148 148 <Compile Include="TaskController.cs" />
149 149 <Compile Include="Components\App.cs" />
150 150 <Compile Include="Components\IRunnable.cs" />
151 151 <Compile Include="Components\ExecutionState.cs" />
152 152 <Compile Include="Components\RunnableComponent.cs" />
153 153 <Compile Include="Components\IFactory.cs" />
154 154 <Compile Include="Automaton\DFAStateDescriptor.cs" />
155 155 <Compile Include="Automaton\EnumAlphabet.cs" />
156 156 <Compile Include="Automaton\IAlphabet.cs" />
157 157 <Compile Include="Automaton\ParserException.cs" />
158 158 <Compile Include="Automaton\Scanner.cs" />
159 159 <Compile Include="Automaton\IndexedAlphabetBase.cs" />
160 160 <Compile Include="Automaton\IAlphabetBuilder.cs" />
161 161 <Compile Include="Automaton\RegularExpressions\AltToken.cs" />
162 162 <Compile Include="Automaton\RegularExpressions\BinaryToken.cs" />
163 163 <Compile Include="Automaton\RegularExpressions\CatToken.cs" />
164 164 <Compile Include="Automaton\DFAConst.cs" />
165 165 <Compile Include="Automaton\RegularExpressions\Grammar.cs" />
166 166 <Compile Include="Automaton\RegularExpressions\StarToken.cs" />
167 167 <Compile Include="Automaton\RegularExpressions\SymbolToken.cs" />
168 168 <Compile Include="Automaton\RegularExpressions\EmptyToken.cs" />
169 169 <Compile Include="Automaton\RegularExpressions\EndToken.cs" />
170 170 <Compile Include="Automaton\RegularExpressions\Token.cs" />
171 171 <Compile Include="Automaton\RegularExpressions\IVisitor.cs" />
172 172 <Compile Include="Automaton\AutomatonTransition.cs" />
173 173 <Compile Include="Automaton\RegularExpressions\RegularDFABuilder.cs" />
174 174 <Compile Include="Formats\JSON\JSONElementContext.cs" />
175 175 <Compile Include="Formats\JSON\JSONElementType.cs" />
176 176 <Compile Include="Formats\JSON\JSONGrammar.cs" />
177 177 <Compile Include="Formats\JSON\JSONParser.cs" />
178 178 <Compile Include="Formats\JSON\JSONScanner.cs" />
179 179 <Compile Include="Formats\JSON\JsonTokenType.cs" />
180 180 <Compile Include="Formats\JSON\JSONWriter.cs" />
181 181 <Compile Include="Formats\JSON\JSONXmlReader.cs" />
182 182 <Compile Include="Formats\JSON\JSONXmlReaderOptions.cs" />
183 183 <Compile Include="Formats\JSON\StringTranslator.cs" />
184 184 <Compile Include="Automaton\MapAlphabet.cs" />
185 185 <Compile Include="Automaton\DummyAlphabet.cs" />
186 186 <Compile Include="Automaton\RegularExpressions\RegularDFADefinition.cs" />
187 187 <Compile Include="Formats\CharAlphabet.cs" />
188 188 <Compile Include="Formats\ByteAlphabet.cs" />
189 189 <Compile Include="Formats\RegularCharDFADefinition.cs" />
190 190 <Compile Include="Automaton\IDFATable.cs" />
191 191 <Compile Include="Automaton\IDFATableBuilder.cs" />
192 192 <Compile Include="Automaton\DFATable.cs" />
193 <Compile Include="Automaton\RegularExpressions\IDFATable2.cs" />
194 193 </ItemGroup>
195 194 <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
196 195 <ItemGroup />
197 196 <ProjectExtensions>
198 197 <MonoDevelop>
199 198 <Properties>
200 199 <Policies>
201 200 <CSharpFormattingPolicy IndentSwitchBody="True" NamespaceBraceStyle="EndOfLine" ClassBraceStyle="EndOfLine" InterfaceBraceStyle="EndOfLine" StructBraceStyle="EndOfLine" EnumBraceStyle="EndOfLine" MethodBraceStyle="EndOfLine" ConstructorBraceStyle="EndOfLine" DestructorBraceStyle="EndOfLine" BeforeMethodDeclarationParentheses="False" BeforeMethodCallParentheses="False" BeforeConstructorDeclarationParentheses="False" NewLineBeforeConstructorInitializerColon="NewLine" NewLineAfterConstructorInitializerColon="SameLine" BeforeIndexerDeclarationBracket="False" BeforeDelegateDeclarationParentheses="False" NewParentheses="False" SpacesBeforeBrackets="False" inheritsSet="Mono" inheritsScope="text/x-csharp" scope="text/x-csharp" />
202 201 <TextStylePolicy FileWidth="120" EolMarker="Unix" inheritsSet="VisualStudio" inheritsScope="text/plain" scope="text/x-csharp" />
203 202 <DotNetNamingPolicy DirectoryNamespaceAssociation="PrefixedHierarchical" ResourceNamePolicy="MSBuild" />
204 203 <TextStylePolicy FileWidth="120" TabsToSpaces="False" inheritsSet="VisualStudio" inheritsScope="text/plain" scope="application/xml" />
205 204 <XmlFormattingPolicy inheritsSet="Mono" inheritsScope="application/xml" scope="application/xml" />
206 205 <TextStylePolicy FileWidth="120" TabsToSpaces="False" inheritsSet="VisualStudio" inheritsScope="text/plain" scope="text/plain" />
207 206 <NameConventionPolicy>
208 207 <Rules>
209 208 <NamingRule Name="Namespaces" AffectedEntity="Namespace" VisibilityMask="VisibilityMask" NamingStyle="PascalCase" IncludeInstanceMembers="True" IncludeStaticEntities="True" />
210 209 <NamingRule Name="Types" AffectedEntity="Class, Struct, Enum, Delegate" VisibilityMask="VisibilityMask" NamingStyle="PascalCase" IncludeInstanceMembers="True" IncludeStaticEntities="True" />
211 210 <NamingRule Name="Interfaces" AffectedEntity="Interface" VisibilityMask="VisibilityMask" NamingStyle="PascalCase" IncludeInstanceMembers="True" IncludeStaticEntities="True">
212 211 <RequiredPrefixes>
213 212 <String>I</String>
214 213 </RequiredPrefixes>
215 214 </NamingRule>
216 215 <NamingRule Name="Attributes" AffectedEntity="CustomAttributes" VisibilityMask="VisibilityMask" NamingStyle="PascalCase" IncludeInstanceMembers="True" IncludeStaticEntities="True">
217 216 <RequiredSuffixes>
218 217 <String>Attribute</String>
219 218 </RequiredSuffixes>
220 219 </NamingRule>
221 220 <NamingRule Name="Event Arguments" AffectedEntity="CustomEventArgs" VisibilityMask="VisibilityMask" NamingStyle="PascalCase" IncludeInstanceMembers="True" IncludeStaticEntities="True">
222 221 <RequiredSuffixes>
223 222 <String>EventArgs</String>
224 223 </RequiredSuffixes>
225 224 </NamingRule>
226 225 <NamingRule Name="Exceptions" AffectedEntity="CustomExceptions" VisibilityMask="VisibilityMask" NamingStyle="PascalCase" IncludeInstanceMembers="True" IncludeStaticEntities="True">
227 226 <RequiredSuffixes>
228 227 <String>Exception</String>
229 228 </RequiredSuffixes>
230 229 </NamingRule>
231 230 <NamingRule Name="Methods" AffectedEntity="Methods" VisibilityMask="VisibilityMask" NamingStyle="PascalCase" IncludeInstanceMembers="True" IncludeStaticEntities="True" />
232 231 <NamingRule Name="Static Readonly Fields" AffectedEntity="ReadonlyField" VisibilityMask="Internal, Protected, Public" NamingStyle="CamelCase" IncludeInstanceMembers="False" IncludeStaticEntities="True" />
233 232 <NamingRule Name="Fields (Non Private)" AffectedEntity="Field" VisibilityMask="Internal, Public" NamingStyle="CamelCase" IncludeInstanceMembers="True" IncludeStaticEntities="True" />
234 233 <NamingRule Name="ReadOnly Fields (Non Private)" AffectedEntity="ReadonlyField" VisibilityMask="Internal, Public" NamingStyle="CamelCase" IncludeInstanceMembers="True" IncludeStaticEntities="False" />
235 234 <NamingRule Name="Fields (Private)" AffectedEntity="Field, ReadonlyField" VisibilityMask="Private, Protected" NamingStyle="CamelCase" IncludeInstanceMembers="True" IncludeStaticEntities="False">
236 235 <RequiredPrefixes>
237 236 <String>m_</String>
238 237 </RequiredPrefixes>
239 238 </NamingRule>
240 239 <NamingRule Name="Static Fields (Private)" AffectedEntity="Field" VisibilityMask="Private" NamingStyle="CamelCase" IncludeInstanceMembers="False" IncludeStaticEntities="True">
241 240 <RequiredPrefixes>
242 241 <String>_</String>
243 242 </RequiredPrefixes>
244 243 </NamingRule>
245 244 <NamingRule Name="ReadOnly Fields (Private)" AffectedEntity="ReadonlyField" VisibilityMask="Private, Protected" NamingStyle="CamelCase" IncludeInstanceMembers="True" IncludeStaticEntities="False">
246 245 <RequiredPrefixes>
247 246 <String>m_</String>
248 247 </RequiredPrefixes>
249 248 </NamingRule>
250 249 <NamingRule Name="Constant Fields" AffectedEntity="ConstantField" VisibilityMask="VisibilityMask" NamingStyle="AllUpper" IncludeInstanceMembers="True" IncludeStaticEntities="True" />
251 250 <NamingRule Name="Properties" AffectedEntity="Property" VisibilityMask="VisibilityMask" NamingStyle="PascalCase" IncludeInstanceMembers="True" IncludeStaticEntities="True" />
252 251 <NamingRule Name="Events" AffectedEntity="Event" VisibilityMask="VisibilityMask" NamingStyle="PascalCase" IncludeInstanceMembers="True" IncludeStaticEntities="True" />
253 252 <NamingRule Name="Enum Members" AffectedEntity="EnumMember" VisibilityMask="VisibilityMask" NamingStyle="PascalCase" IncludeInstanceMembers="True" IncludeStaticEntities="True" />
254 253 <NamingRule Name="Parameters" AffectedEntity="Parameter, LocalVariable" VisibilityMask="VisibilityMask" NamingStyle="CamelCase" IncludeInstanceMembers="True" IncludeStaticEntities="True" />
255 254 <NamingRule Name="Type Parameters" AffectedEntity="TypeParameter" VisibilityMask="VisibilityMask" NamingStyle="PascalCase" IncludeInstanceMembers="True" IncludeStaticEntities="True">
256 255 <RequiredPrefixes>
257 256 <String>T</String>
258 257 </RequiredPrefixes>
259 258 </NamingRule>
260 259 </Rules>
261 260 </NameConventionPolicy>
262 261 </Policies>
263 262 </Properties>
264 263 </MonoDevelop>
265 264 </ProjectExtensions>
266 265 <ItemGroup>
267 266 <Folder Include="Components\" />
268 267 <Folder Include="Automaton\RegularExpressions\" />
269 268 <Folder Include="Formats\" />
270 269 <Folder Include="Formats\JSON\" />
271 270 </ItemGroup>
272 271 </Project> No newline at end of file
1 NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now