aboutsummaryrefslogtreecommitdiffstats
path: root/container-search/src/test/java/com/yahoo/prelude/semantics/test/rulebases/backtrackingrules.sr
blob: 4a4859ec7d82b5f604e35bfc63ed43b9bb748d53 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
# Literals

[case1pos1],[case1pos2] -> replaced;

[case1pos1] :- (word1 word2 word3 word4), (word1 word2 word5 word6);

[case1pos2] :- (word1 word2 word5 word7), (word1 word2 word5 word8);


# References
# This is rather artificial because this rule references contexts which are
# conditionally present. Should we detect and make that illegal?

[case2pos1],[case2pos2] -> ref:[ref1] ref:[ref2] ref:[ref5] ref:[ref8];

[case2pos1] :- ([ref1] [ref2] [ref3] [ref4]), ([ref1] [ref2] [ref5] [ref6]);

[case2pos2] :- ([ref1] [ref2] [ref5] [ref7]), ([ref1] [ref2] [ref5] [ref8]);

[ref1] :- ref1;
[ref2] :- ref2;
[ref3] :- ref3;
[ref4] :- ref4;
[ref5] :- ref5;
[ref6] :- ref6;
[ref7] :- ref7;
[ref8] :- ref8;