Execute a Markov algorithm: Difference between revisions
Content added Content deleted
m (→{{header|Pascal}}: cosmetic) |
m (→{{header|Pascal}}: cosmetic) |
||
Line 3,629: | Line 3,629: | ||
'the shop -> my brother' +LE+ |
'the shop -> my brother' +LE+ |
||
'a never used -> .terminating rule'; |
'a never used -> .terminating rule'; |
||
Input: |
Input: 'I bought a B of As from T S.'; Output: 'I bought a bag of apples from my brother.'), |
||
(Scheme: |
(Scheme: |
||
'# Slightly modified from the rules on Wikipedia' +LE+ |
'# Slightly modified from the rules on Wikipedia' +LE+ |
||
Line 3,638: | Line 3,638: | ||
'the shop -> my brother' +LE+ |
'the shop -> my brother' +LE+ |
||
'a never used -> .terminating rule'; |
'a never used -> .terminating rule'; |
||
Input: |
Input: 'I bought a B of As from T S.'; Output: 'I bought a bag of apples from T shop.'), |
||
(Scheme: |
(Scheme: |
||
'# BNF Syntax testing rules' +LE+ |
'# BNF Syntax testing rules' +LE+ |
||
Line 3,651: | Line 3,651: | ||
'the shop -> my brother' +LE+ |
'the shop -> my brother' +LE+ |
||
'a never used -> .terminating rule'; |
'a never used -> .terminating rule'; |
||
Input: |
Input: 'I bought a B of As W my Bgage from T S.'; Output: 'I bought a bag of apples with my money from T shop.'), |
||
(Scheme: |
(Scheme: |
||
'### Unary Multiplication Engine, for testing Markov Algorithm implementations' +LE+ |
'### Unary Multiplication Engine, for testing Markov Algorithm implementations' +LE+ |
||
Line 3,681: | Line 3,681: | ||
'1+_ -> 1' +LE+ |
'1+_ -> 1' +LE+ |
||
'_+_ -> '; |
'_+_ -> '; |
||
Input: |
Input: '_1111*11111_'; Output: '11111111111111111111'), |
||
(Scheme: |
(Scheme: |
||
'# Turing machine: three-state busy beaver' +LE+ |
'# Turing machine: three-state busy beaver' +LE+ |
||
Line 3,701: | Line 3,701: | ||
'0C1 -> H01' +LE+ |
'0C1 -> H01' +LE+ |
||
'1C1 -> H11'; |
'1C1 -> H11'; |
||
Input: |
Input: '000000A000000'; Output: '00011H1111000') |
||
); |
); |
||
E_FMT = 'test #%d: expected "%s", but got "%s"'; |
E_FMT = 'test #%d: expected "%s", but got "%s"'; |