Giter Club home page Giter Club logo

giraffe's Introduction

giraffe

Discover module and #include dependencies for a given file.

Setting up a project configuration file.

To be useful, giraffe needs to know the include paths and #define macros being using by your project's gcc installation. This information can be discovered like so:

# Print out include paths, and #define macros.
# Use 'gcc' for C code. Don't forget to specify
# any additional command line options.
gcc -x c++ -dM -E -Wp,-v - </dev/null

Once the correct set of command line options is specified, save the output to a configuration file that is later loaded into giraffe.

# Example, using C++20. Note use of 2>&1 to capture include paths.
gcc -x c++ -std=c++20 -dM -E -Wp,-v - </dev/null 1>g++-config.text 2>&1

Running

Example Project

  • TODO, very minimal example Makefile
  • Example with run.sh

Limitations

  • Intended for gcc -- would not be hard to support clang.
  • Have to supply the installation path for system libraries.
  • No sizeof operator in constant expressions.
  • All constant expressions are treated as integers.

TODO

  • Roll eval-context into context, including symbol table
  • Scanner built from token sequence
  • Diagnostics to store their own error messages

giraffe's People

Contributors

aaron-michaux avatar

Watchers

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