Good evening to all! As a fan of regular expressions in Perl, I came up with a question, which I could not answer by googling and searching for myself.
So let me give you a minimal example of my problem:
I have two text-files:
FileA.txt:
aaabbb
FileB.txt:
abbb
I want to check each file-content if it is a word, generated by a specific contextfree language. For example in this case: L={a^nb^n | n > 0}.
Now I have the problem, that the regex from Perl won't work, since it isn't a regular language. For sure I could script a little PDA and check if it terminates.
But is there another way in Perl to solve this problem? Maybe a way to pass a context-free-grammar or sth.?