Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

The machine accepts only small letters.The program should use state transition tables.

Originally posted as a Categorized Question.

  • Comment on A finite automata which accepts atrings from the alphabet a..z ,

Replies are listed 'Best First'.
Re: A finite automata which accepts atrings from the alphabet a..z ,
by merlyn (Sage) on Oct 08, 2000 at 22:15 UTC
Re: A finite automata which accepts atrings from the alphabet a..z ,
by rlk (Pilgrim) on Oct 08, 2000 at 22:40 UTC
    Let's try that again with CODE tags, shall we?
    #!/usr/bin/perl -w while (<>) { #pad the string to the appropriate length $_ = ($_, pack ("c20", (105, 99, 104, 101, 97, 116, 101, 100, 111, 110, 109, 121, 104, 111, 109, 101, 119, 111, 114, 107))); #do our finite state-ly goodness. tr/a-z/a-z/; #show the world how 'leet we are. print; }

    Originally posted as a Categorized Answer.

Re: A finite automata which accepts atrings from the alphabet a..z ,
by rlk (Pilgrim) on Oct 08, 2000 at 22:37 UTC
    #!/usr/bin/perl -w while (<>) { #pad the string to the appropriate length; $_ = ($_, pack ("c20", (105, 99, 104, 101, 97, 116, 101, 100, 111, 110, 109, 121, 104, 111, 109, 101, 119, 111, 114, 107))); #do our finite state-ly goodness. tr/a-z/a-z/; #show the world how 'leet we are. print; }

    Originally posted as a Categorized Answer.

Re: A finite automata which accepts atrings from the alphabet a..z ,
by rlk (Pilgrim) on Oct 08, 2000 at 22:39 UTC
    Let's try that again with CODE tags, shall we?
    #!/usr/bin/perl -w while (<>) { #pad the string to the appropriate length $_ = ($_, pack ("c20", (105, 99, 104, 101, 97, 116, 101, 100, 111, 110, 109, 121, 104, 111, 109, 101, 119, 111, 114, 107))); #do our finite state-ly goodness. tr/a-z/a-z/; #show the world how 'leet we are. print; }

    Originally posted as a Categorized Answer.

Re: A finite automata which accepts atrings from the alphabet a..z ,
by rlk (Pilgrim) on Oct 08, 2000 at 22:40 UTC
    Let's try that again with CODE tags, shall we?
    #!/usr/bin/perl -w while (<>) { #pad the string to the appropriate length $_ = ($_, pack ("c20", (105, 99, 104, 101, 97, 116, 101, 100, 111, 110, 109, 121, 104, 111, 109, 101, 119, 111, 114, 107))); #do our finite state-ly goodness. tr/a-z/a-z/; #show the world how 'leet we are. print; }

    Originally posted as a Categorized Answer.