Giter Club home page Giter Club logo

cs320assignment4's Introduction

CS320Assignment4

Name : Antoine Rakotozafy
Email : [email protected]

Table of contents


  • GIT

If you don't have git yet, to install it, run this command line in your terminal on Linux : sudo apt install git

  • SSH

If you don't have a SSH key yet, here is a guide to generate one.

  • Essential libraries and compiler of C programs

sudo apt-get install build-essential

Quick start

  • Clone the 2 repositories :

    • The first one with the program inside (we will work inside this one):
      git clone [email protected]:AntoineRakotozafy/CS320Assignment4.git
  • We suppose that for compiling of prog4_1.c the library folder (lua-5.3.3) is in the assignment directory.

Then you can find specific information below of each program on how to run them.

Prog4_1

This program is a Lua interpreter written in C. It allows to interpret Lua code.

To compile it : gcc prog4_1.c -llua -lm -ldl -I Lua-5.3.3/src -L lua-5.3.3/src

Then **to run it : ** ./a.out test.lua

It must print 'Hello'.

Prog4_2

This program writes in lua will execute Fizzbuzz from 1 to 100. To execute it, we will use the interpreter we just develop in C before.

To run it : ./a.out prog4_2.lua

It must print the same content as correct.output

Prog4_3

This program allows us to automate the task we just did, that is to say, compile the interpreter then execute the Fizzbuzz write in Lua and then compare the output if it's the same as correct.output. If it is, it'll print "Passed Test" otherwise it should print "Failed Test"

To run it : ./prog4_3.sh <lua.script> <The correct file to compare>

The lua script should be : prog4_2.lua The correct file should be : correct.output

You may have an error, that you don't have the right to execute it :

To give the right to the prog to execute it: chmod +x prog4_3.sh

cs320assignment4's People

Contributors

lightskyz avatar

Stargazers

 avatar

Watchers

 avatar

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.