Puneet Varma (Editor)

Alternation (formal language theory)

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit

In formal language theory and pattern matching, alternation is the union of two sets of strings or patterns. As a pattern, the alternation of a and b matches either a or b.

In formal language theory, alternation is commutative and associative. This is not in general true in pattern-matching languages.

In the SNOBOL language, regular expression syntax, and some other languages, alternation is a binary infix operator on patterns, notated "|".

References

Alternation (formal language theory) Wikipedia


Similar Topics