Algorithm Implementation/String searching/Knuth-Morris-Pratt pattern matcher

Pascal
'''// COPY, COMPILE, AND RUN ON DEV-PASCAL // DL LINK: http://download.cnet.com/Bloodshed-Dev-Pascal/3000-2069_4-10019919.html // PROGRAM BY : AMMAR QADRI // FROM      : WOBURN COLLEGIATE INSTITUTE '''

Ada
The following Ada implementation contains both the algorithms as well as a test program to test correctness of implementation.

Ada Programming/Algorithms/Knuth-Morris-Pratt pattern matcher

C++
The following C++ implementation contains only the algorithms without a test program to test correctness of implementation.

C
C implementations from the history of the Wikipedia page on the same topic with minor changes.

https://en.wikipedia.org/w/index.php?title=Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm&oldid=781303383

Lua
This implementation requires Lua version 5.1 or better.