An efficient syntactic analyser of certain formal languages