Language Analysis with Push/Pop state and subMachine...

Algo "only 1 'b'" : Has input only an unique "b" letter?

First example is inspired from this article : http://continuations.com/post/65432407939/tech-tuesday-finite-state-machines-continued

Verify if the input string consisting of only two letters “a” and “b” and has exactly only one “b” in them.

Example:
abaa -> ok
abbaa -> not ok

Algo "palindrome" : Is input a palindrome of 'a' and 'b' letters ?

Second example tests if the input is a palindrome, as this example, or not :
abba -> ok
abbaa -> not ok!

Test yourself:

a Text to analyse:

Algo "only 1 'b'"
Algo "Palindrom"



	
    

provided by Intersel