update generated example code to use fixed last_occ.
s/string/text/ and don't initialize pattern/text in algorithms.
rename text in analysis, pass pattern/text from the outside.