@@ -0,0 +1,143 | |||
|
1 | using System; | |
|
2 | using Implab.Automaton.RegularExpressions; | |
|
3 | using Implab.Automaton; | |
|
4 | ||
|
5 | namespace Implab.Formats { | |
|
6 | public struct BufferScanner<TTag> { | |
|
7 | char[] m_buffer; | |
|
8 | int m_offset; | |
|
9 | int m_position; | |
|
10 | int m_hi; | |
|
11 | ||
|
12 | readonly int m_chunk; | |
|
13 | readonly int m_limit; | |
|
14 | ||
|
15 | readonly DFAStateDescriptor<TTag>[] m_dfa; | |
|
16 | int m_state; | |
|
17 | ||
|
18 | public BufferScanner(DFAStateDescriptor<TTag>[] dfa, int initialState, int chunk, int limit) { | |
|
19 | m_dfa = dfa; | |
|
20 | m_state = initialState; | |
|
21 | m_chunk = chunk; | |
|
22 | m_limit = limit; | |
|
23 | m_buffer = null; | |
|
24 | m_offset = 0; | |
|
25 | m_position = 0; | |
|
26 | m_hi = 0; | |
|
27 | } | |
|
28 | ||
|
29 | public char[] Buffer { | |
|
30 | get { | |
|
31 | return m_buffer; | |
|
32 | } | |
|
33 | } | |
|
34 | ||
|
35 | public int HiMark { | |
|
36 | get { | |
|
37 | return m_hi; | |
|
38 | } | |
|
39 | } | |
|
40 | ||
|
41 | public int Position { | |
|
42 | get { | |
|
43 | return m_position; | |
|
44 | } | |
|
45 | } | |
|
46 | ||
|
47 | public int Length { | |
|
48 | get { | |
|
49 | return m_hi - m_position; | |
|
50 | } | |
|
51 | } | |
|
52 | ||
|
53 | public int TokenOffset { | |
|
54 | get { | |
|
55 | return m_offset; | |
|
56 | } | |
|
57 | } | |
|
58 | ||
|
59 | public int TokenLength { | |
|
60 | get { | |
|
61 | return m_position - m_offset; | |
|
62 | } | |
|
63 | } | |
|
64 | ||
|
65 | public void Init(char[] buffer, int position, int length) { | |
|
66 | m_buffer = buffer; | |
|
67 | m_position = position; | |
|
68 | m_offset = position; | |
|
69 | m_hi = position + length; | |
|
70 | } | |
|
71 | ||
|
72 | public int Extend() { | |
|
73 | // free space | |
|
74 | var free = m_buffer.Length - m_hi; | |
|
75 | ||
|
76 | // if the buffer have enough free space | |
|
77 | if (free > 0) | |
|
78 | return free; | |
|
79 | ||
|
80 | // effective size of the buffer | |
|
81 | var size = m_buffer.Length - m_offset; | |
|
82 | ||
|
83 | // calculate the new size | |
|
84 | int grow = Math.Min(m_limit - size, m_chunk); | |
|
85 | if (grow <= 0) | |
|
86 | throw new ParserException(String.Format("Input buffer {0} bytes limit exceeded", m_limit)); | |
|
87 | ||
|
88 | var temp = new char[size + grow]; | |
|
89 | Array.Copy(m_buffer, m_offset, temp, 0, m_hi - m_offset); | |
|
90 | m_position -= m_offset; | |
|
91 | m_hi -= m_offset; | |
|
92 | m_offset = 0; | |
|
93 | m_buffer = temp; | |
|
94 | ||
|
95 | return free + grow; | |
|
96 | } | |
|
97 | ||
|
98 | public void RaiseMark(int size) { | |
|
99 | m_hi += size; | |
|
100 | } | |
|
101 | ||
|
102 | /// <summary> | |
|
103 | /// Scan this instance. | |
|
104 | /// </summary> | |
|
105 | /// <returns><c>true</c> - additional data required</returns> | |
|
106 | public bool Scan() { | |
|
107 | while (m_position < m_hi) { | |
|
108 | var ch = m_buffer[m_position]; | |
|
109 | var next = m_dfa[m_state].transitions[(int)ch]; | |
|
110 | if (next == DFAConst.UNREACHABLE_STATE) { | |
|
111 | if (m_dfa[m_state].final) | |
|
112 | return false; | |
|
113 | ||
|
114 | throw new ParserException( | |
|
115 | String.Format( | |
|
116 | "Unexpected token '{0}'", | |
|
117 | new string(m_buffer, m_offset, m_position - m_offset) | |
|
118 | ) | |
|
119 | ); | |
|
120 | } | |
|
121 | m_state = next; | |
|
122 | m_position++; | |
|
123 | } | |
|
124 | ||
|
125 | return true; | |
|
126 | } | |
|
127 | ||
|
128 | public void Eof() { | |
|
129 | if (!m_dfa[m_state].final) | |
|
130 | throw new ParserException( | |
|
131 | String.Format( | |
|
132 | "Unexpected token '{0}'", | |
|
133 | new string(m_buffer, m_offset, m_position - m_offset) | |
|
134 | ) | |
|
135 | ); | |
|
136 | } | |
|
137 | ||
|
138 | public TTag[] GetTokenTags() { | |
|
139 | return m_dfa[m_state].tags; | |
|
140 | } | |
|
141 | } | |
|
142 | } | |
|
143 |
@@ -0,0 +1,72 | |||
|
1 | using System; | |
|
2 | using Implab.Components; | |
|
3 | ||
|
4 | namespace Implab.Formats { | |
|
5 | public abstract class TextScanner<TTag> : Disposable { | |
|
6 | ||
|
7 | char[] m_buffer; | |
|
8 | int m_offset; | |
|
9 | int m_length; | |
|
10 | int m_tokenOffset; | |
|
11 | int m_tokenLength; | |
|
12 | TTag[] m_tags; | |
|
13 | ||
|
14 | BufferScanner<TTag> m_scanner; | |
|
15 | ||
|
16 | protected bool ReadTokenInternal() { | |
|
17 | if (EOF) | |
|
18 | return false; | |
|
19 | ||
|
20 | // create a new scanner from template (scanners are structs) | |
|
21 | var inst = m_scanner; | |
|
22 | ||
|
23 | // initialize the scanner | |
|
24 | inst.Init(m_buffer, m_offset, m_length); | |
|
25 | ||
|
26 | // do work | |
|
27 | while (inst.Scan()) | |
|
28 | Feed(ref inst); | |
|
29 | ||
|
30 | // save result; | |
|
31 | m_buffer = inst.Buffer; | |
|
32 | m_length = inst.Length; | |
|
33 | m_offset = inst.Position; | |
|
34 | m_tokenOffset = inst.TokenOffset; | |
|
35 | m_tokenLength = inst.TokenLength; | |
|
36 | ||
|
37 | m_tags = inst.GetTokenTags(); | |
|
38 | } | |
|
39 | ||
|
40 | protected string GetToken() { | |
|
41 | return new String(m_buffer, m_tokenOffset, m_tokenLength); | |
|
42 | } | |
|
43 | ||
|
44 | protected TTag[] Tags { | |
|
45 | get { | |
|
46 | return m_tags; | |
|
47 | } | |
|
48 | } | |
|
49 | ||
|
50 | /// <summary> | |
|
51 | /// Feed the specified scanner. | |
|
52 | /// </summary> | |
|
53 | /// <param name="scanner">Scanner.</param> | |
|
54 | /// <example> | |
|
55 | /// protected override void Feed(ref BufferScanner<TTag> scanner) { | |
|
56 | /// var size = scanner.Extend(); | |
|
57 | /// var actual = m_reader.Read(scanner.Buffer, scanner.HiMark, size); | |
|
58 | /// if (actual == 0) { | |
|
59 | /// m_eof = true; | |
|
60 | /// scanner.Eof(); | |
|
61 | /// } else { | |
|
62 | /// scanner.RaiseHiMark(actual); | |
|
63 | /// } | |
|
64 | /// } | |
|
65 | /// </example> | |
|
66 | protected abstract void Feed(ref BufferScanner<TTag> scanner); | |
|
67 | ||
|
68 | public abstract bool EOF { get; } | |
|
69 | ||
|
70 | } | |
|
71 | } | |
|
72 |
@@ -1,272 +1,274 | |||
|
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="Formats\JSON\JSONElementContext.cs" /> |
|
174 | 174 | <Compile Include="Formats\JSON\JSONElementType.cs" /> |
|
175 | 175 | <Compile Include="Formats\JSON\JSONGrammar.cs" /> |
|
176 | 176 | <Compile Include="Formats\JSON\JSONParser.cs" /> |
|
177 | 177 | <Compile Include="Formats\JSON\JSONScanner.cs" /> |
|
178 | 178 | <Compile Include="Formats\JSON\JsonTokenType.cs" /> |
|
179 | 179 | <Compile Include="Formats\JSON\JSONWriter.cs" /> |
|
180 | 180 | <Compile Include="Formats\JSON\JSONXmlReader.cs" /> |
|
181 | 181 | <Compile Include="Formats\JSON\JSONXmlReaderOptions.cs" /> |
|
182 | 182 | <Compile Include="Formats\JSON\StringTranslator.cs" /> |
|
183 | 183 | <Compile Include="Automaton\MapAlphabet.cs" /> |
|
184 | 184 | <Compile Include="Automaton\DummyAlphabet.cs" /> |
|
185 | 185 | <Compile Include="Formats\CharAlphabet.cs" /> |
|
186 | 186 | <Compile Include="Formats\ByteAlphabet.cs" /> |
|
187 | 187 | <Compile Include="Automaton\IDFATable.cs" /> |
|
188 | 188 | <Compile Include="Automaton\IDFATableBuilder.cs" /> |
|
189 | 189 | <Compile Include="Automaton\DFATable.cs" /> |
|
190 | 190 | <Compile Include="Automaton\RegularExpressions\RegularDFA.cs" /> |
|
191 | 191 | <Compile Include="Automaton\RegularExpressions\RegularExpressionVisitor.cs" /> |
|
192 | 192 | <Compile Include="Automaton\RegularExpressions\ITaggedDFABuilder.cs" /> |
|
193 | 193 | <Compile Include="Automaton\RegularExpressions\DFAStateDescriptorT.cs" /> |
|
194 | <Compile Include="Formats\BufferScanner.cs" /> | |
|
195 | <Compile Include="Formats\TextScanner.cs" /> | |
|
194 | 196 | </ItemGroup> |
|
195 | 197 | <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> |
|
196 | 198 | <ItemGroup /> |
|
197 | 199 | <ProjectExtensions> |
|
198 | 200 | <MonoDevelop> |
|
199 | 201 | <Properties> |
|
200 | 202 | <Policies> |
|
201 | 203 | <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 | 204 | <TextStylePolicy FileWidth="120" EolMarker="Unix" inheritsSet="VisualStudio" inheritsScope="text/plain" scope="text/x-csharp" /> |
|
203 | 205 | <DotNetNamingPolicy DirectoryNamespaceAssociation="PrefixedHierarchical" ResourceNamePolicy="MSBuild" /> |
|
204 | 206 | <TextStylePolicy FileWidth="120" TabsToSpaces="False" inheritsSet="VisualStudio" inheritsScope="text/plain" scope="application/xml" /> |
|
205 | 207 | <XmlFormattingPolicy inheritsSet="Mono" inheritsScope="application/xml" scope="application/xml" /> |
|
206 | 208 | <TextStylePolicy FileWidth="120" TabsToSpaces="False" inheritsSet="VisualStudio" inheritsScope="text/plain" scope="text/plain" /> |
|
207 | 209 | <NameConventionPolicy> |
|
208 | 210 | <Rules> |
|
209 | 211 | <NamingRule Name="Namespaces" AffectedEntity="Namespace" VisibilityMask="VisibilityMask" NamingStyle="PascalCase" IncludeInstanceMembers="True" IncludeStaticEntities="True" /> |
|
210 | 212 | <NamingRule Name="Types" AffectedEntity="Class, Struct, Enum, Delegate" VisibilityMask="VisibilityMask" NamingStyle="PascalCase" IncludeInstanceMembers="True" IncludeStaticEntities="True" /> |
|
211 | 213 | <NamingRule Name="Interfaces" AffectedEntity="Interface" VisibilityMask="VisibilityMask" NamingStyle="PascalCase" IncludeInstanceMembers="True" IncludeStaticEntities="True"> |
|
212 | 214 | <RequiredPrefixes> |
|
213 | 215 | <String>I</String> |
|
214 | 216 | </RequiredPrefixes> |
|
215 | 217 | </NamingRule> |
|
216 | 218 | <NamingRule Name="Attributes" AffectedEntity="CustomAttributes" VisibilityMask="VisibilityMask" NamingStyle="PascalCase" IncludeInstanceMembers="True" IncludeStaticEntities="True"> |
|
217 | 219 | <RequiredSuffixes> |
|
218 | 220 | <String>Attribute</String> |
|
219 | 221 | </RequiredSuffixes> |
|
220 | 222 | </NamingRule> |
|
221 | 223 | <NamingRule Name="Event Arguments" AffectedEntity="CustomEventArgs" VisibilityMask="VisibilityMask" NamingStyle="PascalCase" IncludeInstanceMembers="True" IncludeStaticEntities="True"> |
|
222 | 224 | <RequiredSuffixes> |
|
223 | 225 | <String>EventArgs</String> |
|
224 | 226 | </RequiredSuffixes> |
|
225 | 227 | </NamingRule> |
|
226 | 228 | <NamingRule Name="Exceptions" AffectedEntity="CustomExceptions" VisibilityMask="VisibilityMask" NamingStyle="PascalCase" IncludeInstanceMembers="True" IncludeStaticEntities="True"> |
|
227 | 229 | <RequiredSuffixes> |
|
228 | 230 | <String>Exception</String> |
|
229 | 231 | </RequiredSuffixes> |
|
230 | 232 | </NamingRule> |
|
231 | 233 | <NamingRule Name="Methods" AffectedEntity="Methods" VisibilityMask="VisibilityMask" NamingStyle="PascalCase" IncludeInstanceMembers="True" IncludeStaticEntities="True" /> |
|
232 | 234 | <NamingRule Name="Static Readonly Fields" AffectedEntity="ReadonlyField" VisibilityMask="Internal, Protected, Public" NamingStyle="CamelCase" IncludeInstanceMembers="False" IncludeStaticEntities="True" /> |
|
233 | 235 | <NamingRule Name="Fields (Non Private)" AffectedEntity="Field" VisibilityMask="Internal, Public" NamingStyle="CamelCase" IncludeInstanceMembers="True" IncludeStaticEntities="True" /> |
|
234 | 236 | <NamingRule Name="ReadOnly Fields (Non Private)" AffectedEntity="ReadonlyField" VisibilityMask="Internal, Public" NamingStyle="CamelCase" IncludeInstanceMembers="True" IncludeStaticEntities="False" /> |
|
235 | 237 | <NamingRule Name="Fields (Private)" AffectedEntity="Field, ReadonlyField" VisibilityMask="Private, Protected" NamingStyle="CamelCase" IncludeInstanceMembers="True" IncludeStaticEntities="False"> |
|
236 | 238 | <RequiredPrefixes> |
|
237 | 239 | <String>m_</String> |
|
238 | 240 | </RequiredPrefixes> |
|
239 | 241 | </NamingRule> |
|
240 | 242 | <NamingRule Name="Static Fields (Private)" AffectedEntity="Field" VisibilityMask="Private" NamingStyle="CamelCase" IncludeInstanceMembers="False" IncludeStaticEntities="True"> |
|
241 | 243 | <RequiredPrefixes> |
|
242 | 244 | <String>_</String> |
|
243 | 245 | </RequiredPrefixes> |
|
244 | 246 | </NamingRule> |
|
245 | 247 | <NamingRule Name="ReadOnly Fields (Private)" AffectedEntity="ReadonlyField" VisibilityMask="Private, Protected" NamingStyle="CamelCase" IncludeInstanceMembers="True" IncludeStaticEntities="False"> |
|
246 | 248 | <RequiredPrefixes> |
|
247 | 249 | <String>m_</String> |
|
248 | 250 | </RequiredPrefixes> |
|
249 | 251 | </NamingRule> |
|
250 | 252 | <NamingRule Name="Constant Fields" AffectedEntity="ConstantField" VisibilityMask="VisibilityMask" NamingStyle="AllUpper" IncludeInstanceMembers="True" IncludeStaticEntities="True" /> |
|
251 | 253 | <NamingRule Name="Properties" AffectedEntity="Property" VisibilityMask="VisibilityMask" NamingStyle="PascalCase" IncludeInstanceMembers="True" IncludeStaticEntities="True" /> |
|
252 | 254 | <NamingRule Name="Events" AffectedEntity="Event" VisibilityMask="VisibilityMask" NamingStyle="PascalCase" IncludeInstanceMembers="True" IncludeStaticEntities="True" /> |
|
253 | 255 | <NamingRule Name="Enum Members" AffectedEntity="EnumMember" VisibilityMask="VisibilityMask" NamingStyle="PascalCase" IncludeInstanceMembers="True" IncludeStaticEntities="True" /> |
|
254 | 256 | <NamingRule Name="Parameters" AffectedEntity="Parameter, LocalVariable" VisibilityMask="VisibilityMask" NamingStyle="CamelCase" IncludeInstanceMembers="True" IncludeStaticEntities="True" /> |
|
255 | 257 | <NamingRule Name="Type Parameters" AffectedEntity="TypeParameter" VisibilityMask="VisibilityMask" NamingStyle="PascalCase" IncludeInstanceMembers="True" IncludeStaticEntities="True"> |
|
256 | 258 | <RequiredPrefixes> |
|
257 | 259 | <String>T</String> |
|
258 | 260 | </RequiredPrefixes> |
|
259 | 261 | </NamingRule> |
|
260 | 262 | </Rules> |
|
261 | 263 | </NameConventionPolicy> |
|
262 | 264 | </Policies> |
|
263 | 265 | </Properties> |
|
264 | 266 | </MonoDevelop> |
|
265 | 267 | </ProjectExtensions> |
|
266 | 268 | <ItemGroup> |
|
267 | 269 | <Folder Include="Components\" /> |
|
268 | 270 | <Folder Include="Automaton\RegularExpressions\" /> |
|
269 | 271 | <Folder Include="Formats\" /> |
|
270 | 272 | <Folder Include="Formats\JSON\" /> |
|
271 | 273 | </ItemGroup> |
|
272 | 274 | </Project> No newline at end of file |
General Comments 0
You need to be logged in to leave comments.
Login now