|
|
|
|
|
|
Synopsis |
|
|
|
Documentation |
|
data GeneralRule |
Constructors | SimpleRule Rule |
Simple rewriting rule such as f(X,Y) => f(Y,X). | FullRule Rule |
Complex rule, may use custom pattern matching. | IntersRule Intersection |
Intersection of two labels. |
|
|
|
symbol :: Parser Char |
One of some non alphanumeric symbols. |
|
comment :: Parser () |
#-till-newline comment parser. |
|
sp :: Parser () |
Whitespace parser (comments are whitespace). |
|
head :: Parser Head |
Heads start with lowercase char. |
|
label :: Parser Label |
Labels start with @. We let the user to fiddle with
intersectionLabel, since we allow "@!Inters" to be parsed, but
use it with cure! |
|
labelTerm :: Parser Term |
Term variant of label. |
|
variable :: Parser Variable |
Variables start with an uppercase char.
'!' is reserved inside variables. |
|
variableTerm :: Parser Term |
Term variant of variable. |
|
labelOrVariableTerm :: Parser Term |
Either a labelTerm or a variableTerm. |
|
loc :: Parser Loc |
|
termFactory :: Parser Term -> Parser Term |
Parse only the top-level of a term, using the given parser to parse
inner terms. |
|
groundTerm :: Parser Term |
|
simpleTerm :: Parser Term |
Parse simple terms. |
|
pureTerm :: Parser Term |
Parse pure terms. |
|
plainTerm :: Parser Term |
Parse plain terms. |
|
flatTerm :: Parser Term |
Parse terms of depth <= 1. |
|
fullTerm :: Parser Term |
Parse arbitrary terms. |
|
flatClause :: Parser Clause |
|
fullClause :: Parser Clause |
|
intersRule :: Parser GeneralRule |
IntersRules start with ||. Example
|| @a : @b /\ @c . |
|
fullRule :: Parser GeneralRule |
FullRules start with '|'. Example:
| L : f(X1, X2) , @a : X1 => @b : foo . |
|
barRule :: Parser GeneralRule |
Either a intersRule or a fullRule. |
|
simpleRule :: Parser GeneralRule |
SimpleRules do not start with '|'. Example:
f(X1, X2) => X2 . |
|
rule :: Parser GeneralRule |
|
production :: Parser (Label, [Term]) |
Grammar production parser. Example:
@a : f(@b,@c) , 2 , @b . |
|
rulesFile :: Parser ([Rule], [Rule], [Intersection], [(Label, [Term])]) |
Parser for the whole .rules file. |
|
splitGeneralRules :: [GeneralRule] -> ([Rule], [Rule], [Intersection]) |
|
Produced by Haddock version 0.6 |