项目作者: SmirnovOleg

项目描述 :
Arithmetic expressions language checker: unary multiplication
高级语言: Python
项目地址: git://github.com/SmirnovOleg/bmw.git
创建时间: 2020-11-21T11:16:38Z
项目社区:https://github.com/SmirnovOleg/bmw

开源协议:Apache License 2.0

下载


Arithmetic Expressions Language Checker

A tool for checking correctness of arithmetic expressions
(multiplications) using Type-0 and Type-1 grammars.
Currently implemented with unary numeral system.

Usage

You will need only Python 3.8 to run the tool from command line:

python main.py grammar word

  • grammar: could be t0 (to use Recursively enumerable grammar) or t1
    (to use Context-sensitive grammar)
  • word: a word to check for correctness, use symbols 1, *, and =
    without spaces

    Examples

  • python main.py t0 1*11=1

  • python main.py t1 111*11=111111