Jump to content

Alternation (formal language theory)

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Macrakis (talk | contribs) at 22:39, 11 November 2012 (Macrakis moved page Pattern alternation to Alternation (formal language theory)). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

In formal language theory and pattern matching, alternation is the union of two sets of strings or patterns.

In some programming languages, string concatenation is a binary infix operator, often notated "|". As a pattern, the alternation a|b matches either a or b.

References

  • John E. Hopcroft and Jeffrey D. Ullman, Introduction to Automata Theory, Languages and Computation, Addison-Wesley Publishing, Reading Massachusetts, 1979. ISBN 0-201-02988-X.