New answers tagged

2

What you are describing is a regular language, so describing it with a regular expression would be a good approach. Another way to view the language is one word, followed by zero or more (underscore word) sequences. In PCRE syntax, [a-z]+(_[a-z]+)*. The same idea can be used to remove left recursion from some grammars; instead of a production rule like $E \...


Top 50 recent answers are included