GenI-0.17.3: examples/artificial/macros
% trivial example of the kid to parent rule
k2p-trivial() initial
Mother [cat:a]![] { Anchor anchor [ cat:x ]![] }
% note: the alphabetical names below are meaningless - they are just
% chinese numbers (which is why i follow them by the equivalent
% arabic numerals)
%
% why do i name them this way? dunno... figured they'd be easier
% to see or something
yi1() initial
YiMo [cat:a tb:?T]![tb:?B] {
YiLe anchor [ cat:x ]![]
YiRi type:subst [ cat:b ]![]
}
er2() initial
Mother [cat:b]![] {
Left anchor [ cat:x ]![]
Right type:subst [ cat:t1 ]![]
}
term(?C ?X) initial
T anchor [cat:?C foo:?X]![]
aux-bad() auxiliary
Mother [cat:t1 tb:foo]![] {
Left anchor [ cat:x ]![]
Foot type:foot [cat:t1]![tb:bar]
}
aux-good() auxiliary
MothA [cat:t1 tb:ping]![] {
LeftA anchor [cat:x]![]
FootA type:foot [cat:t1]![tb:ping]
}
aux-nepas () auxiliary
Mother [cat:t1 tb:ping]![] {
Left anchor [cat:x]![]
Foot type:foot [cat:t1]![tb:ping]
Right type:lex "pas"
}
% meant to receive substitution from san3
% if it works - ?A should be set to bar
wu5 () initial
WuM [cat:a foo:?A]![] {
WuL anchor [cat:x]![]
WuR type:subst [cat:t1 foo:?A]![]
}
% a simple tb unification which ought to work
liu6-good () initial
Mother [cat:a]![cat:a] { Anchor anchor [cat:x]![] }
% unification + subst should work, but this should NOT propagate up!
% this should NOT propagate up
wu5-bad () initial
Mother [cat:a foo:?A]![] {
Anch anchor [cat:x]![]
Left type:subst [cat:t1 foo:?A]![]
Right type:subst [cat:t2 foo:?A]![]
}
% top-bot unification failure (simple)
liu6-bad1 () initial
Mother [cat:a]![cat:b] { Anch anchor [cat:x]![] }
% top-bot unification (complex)
liu6-bad2 () initial
Mother [cat:a tb:?X]![tb:?Y] {
Anch anchor [cat:x]![]
Left type:subst [cat:t1 foo:?X]![]
Right type:subst [cat:t2 foo:?Y]![]
}
% this should still be passed
iaf-killer-good (?X) initial
Mother [cat:a]![cat:a] {
Anch anchor [cat:x]![]
Left type:subst [cat:t1 idx:?X]![]
Right type:subst [cat:t2 idx:?X]![]
}
aconstr-with-anchor () initial
Anch anchor aconstr:noadj [cat:a]![]
% this succeeds iff thing is good or left unset
tb-unification-noadj () initial
M [cat:a]![] {
X type:subst [cat:x thing:?X]![thing:good]
Y anchor [cat:b]![]
}
tb-unification-bot() initial
M anchor [cat:a]![]
tb-unification-adj() auxiliary
M [cat:a]![idx:b] {
X anchor [cat:b]![]
Y type:foot [cat:a]![]
}
no-thing () initial
X anchor [cat:x]![]
thing-good () initial
X anchor [cat:x thing:good]![]
thing-bad () initial
X anchor [cat:x thing:bad]![]
lemanchor () initial
M [cat:x]![] {
X anchor [cat:x]![]
Y type:subst [cat:y]![lemanchor:hello]
Z type:subst [cat:y]![lemanchor:world]
}