Coder Social home page Coder Social logo

s2a's Introduction

Final Project for SE352

1. Please complete the following source code:

    Lines 318-322 in stmt.c (Control flow: if statement)
    Lines 330-336 in stmt.c (Control flow: while statement)	
    Lines 287-305 in expr.c (Function Call)

2. How to build and run demo.c

iron@Katana:s2a$ sudo apt-get install gcc-multilib g++-multilib

iron@Katana:s2a$ make

gcc  -static -o sc lex.c expr.c error.c decl.c stmt.c main.c emit.c func.c
./sc < demo.c	> demo.s
gcc  -m32 demo.s -o demo

iron@Katana:s2a$ make run

./demo 2022 11 12 17 35

iron@Katana:s2a$ cp ./sc ./examples/sc.exe
iron@Katana:s2a$ make runexams

4. Use sc.bak to run the benchmarks in the sub-directory "examples"

iron@Katana:s2a$ cp ./sc.bak ./examples/sc.exe
iron@Katana:s2a$ make runexams

5. Overview

iron@Katana:s2a$ wc -l `find . -name "*.h"`
   8 ./decl.h
  36 ./expr.h
   6 ./error.h
  33 ./func.h
  28 ./stmt.h
  41 ./lex.h
  54 ./emit.h
 206 total
iron@Katana:s2a$ wc -l `find . -name "*.c"`
  400 ./stmt.c
   99 ./demo.c
  107 ./lex.c
  162 ./decl.c
   17 ./error.c
   84 ./emit.c
  351 ./expr.c
  160 ./main.c
  112 ./func.c
 1492 total

6. git

 git clone ???
 git add .
 git commit -m "Update xxx"
 git push

s2a's People

Contributors

sheisc 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.