GithubHelp home page GithubHelp logo

lenzpaul / qapla Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 1.25 MB

A programming language written in C.

Shell 0.64% C 34.90% Lex 7.72% Yacc 54.87% Makefile 1.87%
yacc lex bison cfg interpreter programming-language-interpreter c programming-language

qapla's Introduction

Qapla'

A first stab at creating a programming language interpreter, using lexical analyzer LEX, YACC parser and C.


Foo demo gif

Program description:

This is an interactive interpreter for the fooish language.

Check out a quick demo here

INSTALLATION

  • run makefile, located in src/
  • execute program by running ./src/fooChecker
  • the grammar is detailed in src/y.output (auto generated)
  • To exit the interpreter, type: exit

[optional] I've added the following files for different levels of debugging and informative messages.

  • fooCheckerd
  • fooChecker_debug
  • fooChecker_debug_full

FEATURES

  • Working features

    • comments
    • assignment statements
    • variables
    • I/O : typechecked. reads, readi, readr, print
    • string expressions
      • including syntax, literals, escape sequences for " and , comparison operators, concatenation
    • arithmetic expressions : + - * / , correct precedence and associativity, typechecking
    • boolean expressions
      • syntax, literals T and F, the comparison operators, compound operators (AND OR NOT), typechecking
    • selection
      • syntax, the use of if, else-if, else, the boolean test expressions, local block scope
    • function handling
      • syntax, function definitions and calls, local variables/scope, proper handling of parameters and return values
  • Non working features [ To be developed ]

    • string expressions
      • substring operators
    • arithmetic expressions
      • MOD, and ^
    • iteration
      • while loops are not implemented

qapla's People

Contributors

lenzpaul avatar davewesselsviu avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

Forkers

sho94os

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.