Code Monkey home page Code Monkey logo

ctfi's Introduction

CTFi

This is the context free language interpreter. A rule set like palindrome.rule can be interpreted up until a certain iteration (your computer wouldn't like solving infinite languages I think)

Program

So I'm too lazy to list all options here, some trial and error will be required. The program itself has a '-h' and '--help' option like any normal unix-like program. So goodluck with that.

Rule syntax

Variables are written in capitals like in most mathematical representations, non-terminatal symbols are written in lowercase.

In addition to the strict mathematical notation it is ok to seperate rules with '|'

Demonstration

S -> a
S -> bc
S -> TT
S -> lambda
T -> aa
T -> λ

Note that rules can be entered via commandline or file

##Versions

Added in version 3.2:

  • shorthands "ctfi" or "./ctfi" is now enough to run the program
  • actions the generate function to generate a language is still there but it's also possible to
    • "mini": minify, simplify rules, note that this is fairly elementary
    • "rl2ll": transforms a right linear grammar to a left linear grammar
    • "ll2rl": transforms a left linear grammar to right linear grammar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.