Calculate first set, follow set and select set for Regex syntax parser.