283
edits
KalmanKeri (talk | contribs) |
KalmanKeri (talk | contribs) (→Syntax) |
||
| Line 82: | Line 82: | ||
& \mbox{Atoms}~ & a, b \rule & \mathsf{A} \mid \mathsf{B} \mid \mathsf{'foo} \mid \mathsf{'bar} \mid ... \\ | & \mbox{Atoms}~ & a, b \rule & \mathsf{A} \mid \mathsf{B} \mid \mathsf{'foo} \mid \mathsf{'bar} \mid ... \\ | ||
& \mbox{ | & \mbox{Prefixes}~ & p, q \rule & \pos a \mid \neg a \\ | ||
& \mbox{Terms}~ & s, t \rule & ~ | & \mbox{Terms}~ & s, t \rule & ~ | ||
p | p . s | ||
\mid s \seq t \mid \succeed | \mid s \seq t \mid \succeed | ||
\mid s \mathsf{|} t \mid \fail | \mid s \mathsf{|} t \mid \fail | ||
| Line 94: | Line 94: | ||
'''Atoms''' are unscoped symbols. We assume a countably infinite set of atoms that is disjunct from the set of constants (operators, keywords and punctuation). | '''Atoms''' are unscoped symbols. We assume a countably infinite set of atoms that is disjunct from the set of constants (operators, keywords and punctuation). | ||
There are two kinds of ''' | There are two kinds of '''prefixes''', positive and negative literals. They can only occur on the left hand side of a prefix operator. | ||
'''Sequential composition''' <math>\seq</math> constructs ordered pairs. The symbol <math>\succeed</math> denotes an empty sequence which can be interpreted as successful termination. | '''Sequential composition''' <math>\seq</math> constructs ordered pairs. The symbol <math>\succeed</math> denotes an empty sequence which can be interpreted as successful termination. | ||
'''Alternative composition''' <math>\alt</math> connects a pair of alternatives. <math>\fail</math> denotes an empty set of alternatives, or intuitively failure to find any viable alternative. | '''Alternative composition''' <math>\alt</math> connects a pair of alternatives. <math>\fail</math> denotes an empty set of alternatives, or intuitively failure to find any viable alternative. | ||
edits