formal language theory
In logic, mathematics, computer science, and linguistics, a formal language consists of string (computer science), words whose symbol (formal), letters are taken from an alphabet (computer science), alphabet and are well-formedness, well-formed ...
In computer science
Computer science deals with the theoretical foundations of information, algorithms and the architectures of its computation as well as practical techniques for their application.
Computer science is the study of Algor ...
, 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
Mathematics (from Greek: ) includes the study of such topics as numbers (arithmetic and number theory), formulas and related structures (algebra), shapes and spaces in which they are contained (geometry), and quantities and ...
Mathematics (from Ancient Greek, Greek: ) includes the study of such topics as quantity (number theory), mathematical structure, structure (algebra), space (geometry), and calculus, change (mathematical analysis, analysis). ...
. This is not in general true in pattern-matching languages.
SNOBOL ("StriNg Oriented and symBOlic Language") is a series of programming language
A programming language is a formal language
In logic, mathematics, computer science, and linguistics, a formal language consists of string (computer sc ...
A regular expression (shortened as regex or regexp; also referred to as rational expression) is a sequence of Character (computing), characters that specifies a ''search pattern matching, pattern''. Usually such patterns are used by string-se ...
syntax, and some other languages, alternation is a
Binary may refer to:
Science and technology
* Binary number
In mathematics and digital electronics, a binary number is a number expressed in the base-2 numeral system or binary numeral system, which uses only two symbols: ty ... infix operator
Infix notation is the notation commonly used in arithmetical and logical formulae and statements. It is characterized by the placement of Operator (mathematics), operators between operands—"infixed operators"—such as the plus sign in 2 + 2.
on patterns, notated ", ".
* John E. Hopcroft and Jeffrey D. Ullman, ''Introduction to Automata Theory, Languages and Computation'', Addison-Wesley Publishing, Reading Massachusetts, 1979. .
Combinatorics on words
String (computer science)