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

Pattern_Match_Knuth_Morris_Pratt_Fixed_Test Pattern_Match Max_Pattern_Length  Positive  256 Context Pre_Compute Pattern  String  Context Find_Location Of_Context  Context In_Text     String  Positive Pattern_Error Pattern_Length_T Positive  1Max_Pattern_Length Failure_Function_T  Pattern_Length_T  Positive Slided_Pattern_T String 1  Max_Pattern_Length Context Failure_Function Failure_Function_T M_Pattern        Slided_Pattern_T Pattern_Length   Positive Pattern_Match IFPLID_Context Pattern_MatchContext SRC_Context    Pattern_MatchContext Text_Test1  String  "IMCHG DLH5877 -BEGIN ADDR -IFPLID AT05428113 -SRC FPL -RFL F330" Text_Test2  String  "IMCHG DLH5877 EDDKCLHD -BEGIN ADDR -FAC CFMUTACT AA05428113 FPL -STAR WLD5M -SRC " IFPLID_Pos   Positive IFPLID_Pos_2 Positive  1 SRC_Pos      Positive SRC_Pos_2    Positive Pattern_Match Pre_Compute Pattern  String  Context I J Positive Pattern_Context Context Pattern "" Pattern_Error Pattern_ContextM_Pattern 1Pattern Pattern Pattern_ContextPattern_Length Pattern Pattern_ContextFailure_Function 1 1 I 2 J 1 I Pattern_ContextPattern_Length Pattern I Pattern J            Pattern_ContextFailure_Function I  J  1 I I  1 J J  1 J 1 J Pattern_ContextFailure_Function J  1 Pattern_ContextFailure_Function I 1 I I  1 Pattern_Context Pre_Compute Find_Location Of_Context  Context In_Text     String  Positive Slided_Text_T String 1  In_Text Slided_Text  Slided_Text_T  Slided_Text_T In_Text I J Positive I 1 J 1 I Slided_Text Slided_Text I Of_ContextM_Pattern J             J  Of_ContextPattern_Length I J  1 I I  1 J J  1 J 1 J Of_ContextFailure_Function J  1 I I  1 Pattern_Error Find_Location Pattern_Match Check_Pattern_Found Pattern      String At_Location  Positive In_Text      String Slided_Text_T String 1  Pattern Slided_Pattern  Slided_Text_T  Slided_Text_T Pattern At_Location In_Text At_Location Pattern  1  In_Text Slided_Text_T In_Text At_Location At_Location  Pattern  1  Slided_Pattern Program_Error Check_Pattern_Found IFPLID_Context Pattern_MatchPre_Compute "-IFPLID " SRC_Context    Pattern_MatchPre_Compute "-SRC " Expect_Pattern_Found IFPLID_Pos Pattern_MatchFind_Location Of_Context  IFPLID_Context In_Text    Text_Test1 Pattern_MatchPattern_Error Program_Error Expect_Pattern_Found Check_Pattern_Found Pattern     "-IFPLID " At_Location IFPLID_Pos In_Text     Text_Test1 Expect_Pattern_Not_Found IFPLID_Pos_2 Pattern_MatchFind_Location Of_Context  IFPLID_Context In_Text    Text_Test2 Program_Error Pattern_MatchPattern_Error Expect_Pattern_Not_Found IFPLID_Pos_2 1 Program_Error Expect_Second_Pattern_Found SRC_Pos Pattern_MatchFind_Location Of_Context  SRC_Context In_Text    Text_Test1 Pattern_MatchPattern_Error Program_Error Expect_Second_Pattern_Found Check_Pattern_Found Pattern     "-SRC " At_Location SRC_Pos In_Text     Text_Test1 Expect_Second_Pattern_Found_At_End SRC_Pos_2 Pattern_MatchFind_Location Of_Context  SRC_Context In_Text    Text_Test2 Pattern_MatchPattern_Error Program_Error Expect_Second_Pattern_Found_At_End Check_Pattern_Found Pattern     "-SRC " At_Location SRC_Pos_2 In_Text     Text_Test2 Pattern_Match_Knuth_Morris_Pratt_Fixed_Test

|