| @@ -1,6 +1,6 | |||
|  | 1 | 1 | |
|  | 2 | 2 | namespace Implab.Automaton { | 
|  | 3 | public static class | |
|  | 3 | public static class AutomatonConst { | |
|  | 4 | 4 | public const int UNREACHABLE_STATE = -1; | 
|  | 5 | 5 | |
|  | 6 | 6 | public const int UNCLASSIFIED_INPUT = 0; | 
| @@ -2,12 +2,12 | |||
|  | 2 | 2 | using System.Linq; | 
|  | 3 | 3 | |
|  | 4 | 4 | namespace Implab.Automaton.RegularExpressions { | 
|  | 5 | public class | |
|  | 5 | public class RegularDFA<TInput, TTag> : DFATable, ITaggedDFABuilder<TTag> { | |
|  | 6 | 6 | |
|  | 7 | 7 | readonly Dictionary<int,TTag[]> m_tags = new Dictionary<int, TTag[]>(); | 
|  | 8 | 8 | readonly IAlphabet<TInput> m_alphabet; | 
|  | 9 | 9 | |
|  | 10 | public | |
|  | 10 | public RegularDFA(IAlphabet<TInput> alphabet) { | |
|  | 11 | 11 | Safe.ArgumentNotNull(alphabet, "aplhabet"); | 
|  | 12 | 12 | |
|  | 13 | 13 | m_alphabet = alphabet; | 
| @@ -48,10 +48,10 namespace Implab.Automaton.RegularExpres | |||
|  | 48 | 48 | /// Optimize the specified alphabet. | 
|  | 49 | 49 | /// </summary> | 
|  | 50 | 50 | /// <param name="alphabet">Пустой алфавит, который будет зполнен в процессе оптимизации.</param> | 
|  | 51 | public | |
|  | 51 | public RegularDFA<TInput,TTag> Optimize(IAlphabetBuilder<TInput> alphabet) { | |
|  | 52 | 52 | Safe.ArgumentNotNull(alphabet, "alphabet"); | 
|  | 53 | 53 | |
|  | 54 | var dfa = new | |
|  | 54 | var dfa = new RegularDFA<TInput, TTag>(alphabet); | |
|  | 55 | 55 | |
|  | 56 | 56 | var states = new DummyAlphabet(StateCount); | 
|  | 57 | 57 | var alphaMap = new Dictionary<int,int>(); | 
| @@ -12,8 +12,8 namespace Implab.Formats.JSON { | |||
|  | 12 | 12 | public class JSONScanner : Disposable { | 
|  | 13 | 13 | readonly StringBuilder m_builder = new StringBuilder(); | 
|  | 14 | 14 | |
|  | 15 | readonly ScannerContext<JSONGrammar.TokenType> m_jsonContext = JSONGrammar.Instance.Json | |
|  | 16 | readonly ScannerContext<JSONGrammar.TokenType> m_stringContext = JSONGrammar.Instance.JsonString | |
|  | 15 | readonly ScannerContext<JSONGrammar.TokenType> m_jsonContext = JSONGrammar.Instance.JsonExpression; | |
|  | 16 | readonly ScannerContext<JSONGrammar.TokenType> m_stringContext = JSONGrammar.Instance.JsonStringExpression; | |
|  | 17 | 17 | |
|  | 18 | 18 | |
|  | 19 | 19 | readonly TextScanner m_scanner; | 
        
        General Comments 0
    
    
  
  
                      You need to be logged in to leave comments.
                      Login now
                    
                