The Markovski project

The Markovski project implements an interpreter/compiler for a language named Markovski, used to write Markov algorithms. (Project's licence)

I invite you to see the Wikipedia presentation.

The goal of the project is mainly to implement a parser and interpreter in python use AllTests.py to run all tests.

The script in the bundle contains some scripts.

Download the code at Sourceforge.

Here after is a simple example showing an algorithm and the result produced if the input to the program is acabac.

Jean Lazarou


Markov Algorithm Definition

    [1] 1a -> b1; [2] 1b -> a1; [3] 1c -> c1; [4] 1 -> . [5] -> 1;

The previous algorithm produces:

Input:  acabac
[1]    1acabac
[2]    b1cabac
[3]    bc1abac
[4]    bcb1bac
[5]    bcba1ac
[6]    bcbab1c
[7]    bcbabc1
Output: bcbabc

Algorithm steps:

  1. apply rule 5
  2. apply rule 1
  3. apply rule 3
  4. apply rule 1
  5. apply rule 2
  6. apply rule 1
  7. apply rule 3
  8. apply rule 4