CDFADefinition.cs
22 lines
| 642 B
| text/x-csharp
|
CSharpLexer
cin
|
r158 | namespace Implab.Parsing { | ||
public class CDFADefinition : DFADefinition { | ||||
readonly CharAlphabet m_alphabet; | ||||
cin
|
r55 | |||
cin
|
r158 | public CharAlphabet Alphabet { | ||
cin
|
r55 | get { return m_alphabet; } | ||
} | ||||
cin
|
r158 | public CDFADefinition(CharAlphabet alphabet): base(alphabet.Count) { | ||
cin
|
r55 | m_alphabet = alphabet; | ||
} | ||||
public CDFADefinition Optimize() { | ||||
cin
|
r160 | |||
return (CDFADefinition)Optimize(alphabet => new CDFADefinition((CharAlphabet)alphabet), m_alphabet, new CharAlphabet()); | ||||
cin
|
r55 | } | ||
public void PrintDFA() { | ||||
PrintDFA(m_alphabet); | ||||
} | ||||
} | ||||
} | ||||