azazak123 / nam-compiler

NAM(Markov's Normal Algorithm) files compiler

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NAM(Markov's Normal Algorithm) files compiler to executable

Generated nam programs, which input is word s for applying NAM substitute formulas, and output is the last word which is the result of applying NAM to the original word S

Required packages:

  • clang
  • ghc

Usage:

bash setup.sh                 #build compiler
cd program                    #compiler has been created in program directory
./main path-to-nam-file       #run compilation for NAM file
./nam                         #run compiled NAM program

NAM syntax

a -> b -- simple substitution

a => b -- final substitution

Example is provided in nam_example.txt

About

NAM(Markov's Normal Algorithm) files compiler

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Haskell 53.7%Language:C++ 39.7%Language:Shell 6.6%