Automata  1.0
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Protected Attributes | List of all members
System.Automata.Alphabet Class Reference

A automaton alphabet More...

Inheritance diagram for System.Automata.Alphabet:
System.Automata.StackAlphabet System.Automata.TapeAlphabet

Public Member Functions

 Alphabet (params char[] s)
 Initialize the alphabet with the given symbols. More...
 
void Add (char s)
 
bool Contains (char s)
 
IEnumerator< char > GetEnumerator ()
 
override string ToString ()
 

Static Public Member Functions

static Alphabet operator+ (Alphabet a, Alphabet b)
 
static Alphabet operator- (Alphabet a, Alphabet b)
 

Public Attributes

const char EmptyString = '\0'
 Represents a string of length 0 More...
 
const char Z = (char)3
 Represents the initial symbol on the stack. More...
 
const char Blank = (char)127
 Represents a blank symbol on a Turing tape. More...
 
const char Wildcard = (char)26
 Represents a wildcard (?) symbol when replacing stack contents. More...
 
int Count => Chars.Count
 

Static Public Attributes

static Alphabet Unary => new Alphabet('1')
 {1} More...
 
static Alphabet Binary => new Alphabet('0', '1')
 {0, 1} More...
 
static Alphabet Decimal => new Alphabet(Enumerable.Range(48, 10).Select(c => (char)c).ToArray())
 {0, 1, ..., 9} More...
 
static Alphabet Ab => new Alphabet('a', 'b')
 {a, b} More...
 
static Alphabet Abc => new Alphabet('a', 'b', 'c')
 {a, b, c} More...
 
static Alphabet AzLower => new Alphabet(Enumerable.Range(65, 26).Select(c => (char)c).ToArray())
 {a, b, ..., z} More...
 
static Alphabet AzUpper => new Alphabet(Enumerable.Range(97, 26).Select(c => (char)c).ToArray())
 {A, B, ..., Z} More...
 
static Alphabet AzAll => new Alphabet(AzLower.Concat(AzUpper).ToArray())
 {a, b, ..., Z} More...
 
static Alphabet Ascii => new Alphabet(Enumerable.Range(32, 94).Select(c => (char)c).ToArray())
 All the printable ASCII characters More...
 

Protected Attributes

List< char > Chars
 

Detailed Description

A automaton alphabet

Constructor & Destructor Documentation

◆ Alphabet()

System.Automata.Alphabet.Alphabet ( params char []  s)

Initialize the alphabet with the given symbols.

Parameters
sThe symbols to use.

Member Data Documentation

◆ Ab

Alphabet System.Automata.Alphabet.Ab => new Alphabet('a', 'b')
static

{a, b}

◆ Abc

Alphabet System.Automata.Alphabet.Abc => new Alphabet('a', 'b', 'c')
static

{a, b, c}

◆ Ascii

Alphabet System.Automata.Alphabet.Ascii => new Alphabet(Enumerable.Range(32, 94).Select(c => (char)c).ToArray())
static

All the printable ASCII characters

◆ AzAll

Alphabet System.Automata.Alphabet.AzAll => new Alphabet(AzLower.Concat(AzUpper).ToArray())
static

{a, b, ..., Z}

◆ AzLower

Alphabet System.Automata.Alphabet.AzLower => new Alphabet(Enumerable.Range(65, 26).Select(c => (char)c).ToArray())
static

{a, b, ..., z}

◆ AzUpper

Alphabet System.Automata.Alphabet.AzUpper => new Alphabet(Enumerable.Range(97, 26).Select(c => (char)c).ToArray())
static

{A, B, ..., Z}

◆ Binary

Alphabet System.Automata.Alphabet.Binary => new Alphabet('0', '1')
static

{0, 1}

◆ Blank

const char System.Automata.Alphabet.Blank = (char)127

Represents a blank symbol on a Turing tape.

◆ Decimal

Alphabet System.Automata.Alphabet.Decimal => new Alphabet(Enumerable.Range(48, 10).Select(c => (char)c).ToArray())
static

{0, 1, ..., 9}

◆ EmptyString

const char System.Automata.Alphabet.EmptyString = '\0'

Represents a string of length 0

◆ Unary

Alphabet System.Automata.Alphabet.Unary => new Alphabet('1')
static

{1}

◆ Wildcard

const char System.Automata.Alphabet.Wildcard = (char)26

Represents a wildcard (?) symbol when replacing stack contents.

◆ Z

const char System.Automata.Alphabet.Z = (char)3

Represents the initial symbol on the stack.


The documentation for this class was generated from the following file: