class Panini::Language

Defined in:

language.cr

Constant Summary

EPSILON = Lang.from(Alphabet::EPSILON)
PHI = Lang.new

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(operation : Regularity, *constituents : Language, ignore_epsilon = false) #

[View source]
def self.new(*, membership = NO_MEMBERSHIP, criterion : String -> Bool = REJECT_ALL, alphabet : Panini::Alphabet = Alphabet::NIL, min_size : Int32 = 0, max_size : Int32 = INFINITY, name : String = Helper.random_name) #

[View source]
def self.new(*, alphabets : Tuple, **named_args) #

[View source]

Class Method Detail

def self.from(criterion : String -> Bool) #

[View source]
def self.from(*strings : String) #

[View source]
def self.from(*symbols : Char) #

[View source]

Instance Method Detail

def **(n, ignore_epsilon = false) #

[View source]
def +(other : self, ignore_epsilon = false) #

concatenation


[View source]
def |(other : self) #

union


[View source]
def ~ #

closure


[View source]
def alphabet : Panini::Alphabet #

[View source]
def criterion : String -> Bool #

TODO replace with REJECT_ALL?


[View source]
def includes?(string : String) #

only membership is inclusion type, rest all are in reality exclusion types if membership test passes, language contains the string if other tests fail, language does not contain the string if all other tests pass, only then language contains the string


[View source]
def includes_epsilon? #

[View source]
def max_size : Int32 #

[View source]
def membership : Set(String) #

[View source]
def min_size : Int32 #

[View source]
def name : String #

[View source]
def nfa_datum #

[View source]
def regular? #

[View source]
def to_dfa #

[View source]
def to_nfa #

[View source]
def words(size) #

[View source]