From b47e0e444bd9499b4906b054bb7a32a0a699613c Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 29 Nov 2014 23:23:23 +0100 Subject: mds-kbdc: fix permutation generation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- .../valid/unorderd_inside_alternation | 4 -- .../valid/unordered_inside_alternation | 32 ++++++++++++ .../simplify-tree/valid/unordered_sequence | 61 +++++++++++++++++++++- 3 files changed, 92 insertions(+), 5 deletions(-) delete mode 100644 test-files/mds-kbdc/simplify-tree/valid/unorderd_inside_alternation create mode 100644 test-files/mds-kbdc/simplify-tree/valid/unordered_inside_alternation (limited to 'test-files/mds-kbdc/simplify-tree/valid') diff --git a/test-files/mds-kbdc/simplify-tree/valid/unorderd_inside_alternation b/test-files/mds-kbdc/simplify-tree/valid/unorderd_inside_alternation deleted file mode 100644 index ac52b62..0000000 --- a/test-files/mds-kbdc/simplify-tree/valid/unorderd_inside_alternation +++ /dev/null @@ -1,4 +0,0 @@ -[1 (2 3)] : 0 - -# TODO - diff --git a/test-files/mds-kbdc/simplify-tree/valid/unordered_inside_alternation b/test-files/mds-kbdc/simplify-tree/valid/unordered_inside_alternation new file mode 100644 index 0000000..05e5308 --- /dev/null +++ b/test-files/mds-kbdc/simplify-tree/valid/unordered_inside_alternation @@ -0,0 +1,32 @@ +[1 (2 3)] : 0 + +# (map (@ 1 0-0) +# (.sequence +# (string (@ 1 1-2) ‘1’) +# ) +# (.result +# (string (@ 1 12-13) ‘0’) +# ) +# ) +# (map (@ 1 0-0) +# (.sequence +# (string (@ 1 4-5) ‘2’) +# (string (@ 1 6-7) ‘3’) +# ) +# (.result +# (string (@ 1 12-13) ‘0’) +# ) +# ) +# (map (@ 1 0-0) +# (.sequence +# (string (@ 1 6-7) ‘3’) +# (string (@ 1 4-5) ‘2’) +# ) +# (.result +# (string (@ 1 12-13) ‘0’) +# ) +# ) +# :1:3–4: warning: unordered subsequence inside alternation is discouraged +# [1 (2 3)] : 0 +# ^ + diff --git a/test-files/mds-kbdc/simplify-tree/valid/unordered_sequence b/test-files/mds-kbdc/simplify-tree/valid/unordered_sequence index a7cb1bf..20b5473 100644 --- a/test-files/mds-kbdc/simplify-tree/valid/unordered_sequence +++ b/test-files/mds-kbdc/simplify-tree/valid/unordered_sequence @@ -1,4 +1,63 @@ (1 2 3) : 0 -# TODO +# (map (@ 1 0-0) +# (.sequence +# (string (@ 1 1-2) ‘1’) +# (string (@ 1 3-4) ‘2’) +# (string (@ 1 5-6) ‘3’) +# ) +# (.result +# (string (@ 1 10-11) ‘0’) +# ) +# ) +# (map (@ 1 0-0) +# (.sequence +# (string (@ 1 1-2) ‘1’) +# (string (@ 1 5-6) ‘3’) +# (string (@ 1 3-4) ‘2’) +# ) +# (.result +# (string (@ 1 10-11) ‘0’) +# ) +# ) +# (map (@ 1 0-0) +# (.sequence +# (string (@ 1 3-4) ‘2’) +# (string (@ 1 1-2) ‘1’) +# (string (@ 1 5-6) ‘3’) +# ) +# (.result +# (string (@ 1 10-11) ‘0’) +# ) +# ) +# (map (@ 1 0-0) +# (.sequence +# (string (@ 1 3-4) ‘2’) +# (string (@ 1 5-6) ‘3’) +# (string (@ 1 1-2) ‘1’) +# ) +# (.result +# (string (@ 1 10-11) ‘0’) +# ) +# ) +# (map (@ 1 0-0) +# (.sequence +# (string (@ 1 5-6) ‘3’) +# (string (@ 1 1-2) ‘1’) +# (string (@ 1 3-4) ‘2’) +# ) +# (.result +# (string (@ 1 10-11) ‘0’) +# ) +# ) +# (map (@ 1 0-0) +# (.sequence +# (string (@ 1 5-6) ‘3’) +# (string (@ 1 3-4) ‘2’) +# (string (@ 1 1-2) ‘1’) +# ) +# (.result +# (string (@ 1 10-11) ‘0’) +# ) +# ) -- cgit v1.2.3-70-g09d2