added cycle pattern to grammar.
also renamed grammar helper method "values" to "values_of" because I think it reads better
max elements per sequence/cycle in the grammar