Mercurial > pub > ImplabNet
diff Implab/Parsing/CDFADefinition.cs @ 158:130781364799 v2
refactoring, code cleanup
author | cin |
---|---|
date | Thu, 18 Feb 2016 14:34:02 +0300 |
parents | 97fbbf816844 |
children | 5802131432e4 |
line wrap: on
line diff
--- a/Implab/Parsing/CDFADefinition.cs Thu Feb 18 11:03:47 2016 +0300 +++ b/Implab/Parsing/CDFADefinition.cs Thu Feb 18 14:34:02 2016 +0300 @@ -1,29 +1,17 @@ -using Implab; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +namespace Implab.Parsing { + public class CDFADefinition : DFADefinition { + readonly CharAlphabet m_alphabet; -namespace Implab.Parsing { - public class CDFADefinition : DFADefinitionBase { - readonly Alphabet m_alphabet; - - public Alphabet Alphabet { + public CharAlphabet Alphabet { get { return m_alphabet; } } - public override int AlphabetSize { - get { return m_alphabet.Count; } - } - - public CDFADefinition(Alphabet alphabet): base() { - Safe.ArgumentNotNull(alphabet, "alphabet"); + public CDFADefinition(CharAlphabet alphabet): base(alphabet.Count) { m_alphabet = alphabet; } public CDFADefinition Optimize() { - var optimized = new CDFADefinition(new Alphabet()); + var optimized = new CDFADefinition(new CharAlphabet()); Optimize(optimized, m_alphabet, optimized.Alphabet); return optimized;