• Home
  • Blog
  • Creating an Abstract Syntax Tree (AST) for SimpleC

Creating an Abstract Syntax Tree (AST) for SimpleC

0 comments

Hi

Getting started

  • Accept the GitHub classroom assignment to create your git repository for the project. We will grade your project via the contents you push to the GitHub classroom repository.
  • Create a local repository and add the GitHub classroom repository as a remote repository, per the instructions on GitHub or as described in lecture.
  • Copy the starter files below into your local repository’s folder
    • Alternatively, use the wget command to download each file directory inside your virtual machine.
    • Put the Makefile and all source files in the root of the source code repository; there is no need to create a subfolder within the repository folder.
  • Switch to your virtual machine and navigate to the local repository folder.
  • Add and commit the starter files to your repository with git.
  • Run make in your source folder to build the project, which should create the simplec program.
    • If the build fails, double-check that you have all the starter files available in the directory.
  • Run cat example.simplec | ./simplec
    • Running ./simplec without providing input will cause the program to stop and wait for input to stdin.
    • If ./simplec is not found, be sure to prefix the program with ./ and be sure the make step above succeeded.

    More information

About the Author

Follow me


{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}