Git Product home page Git Product logo

clair's Introduction

ClaiR - C Language Analysis in Rascal

ClaiR provides a mapping from the Eclipse CDT open C and C++ front-end to a Rascal M3 model for further processing.

DOI

Required software

  • Eclipse 2019-06 with CDT (C/C++ Development Tools) (see here).
  • Rascal (see here).

How to install ClaiR into Eclipse

  • In the Help menu, select Install New Software.
  • Use https://update.rascal-mpl.org/libs as an update site. Hit Add to save it for future updates.
  • Select clair_feature in the list of libraries and follow the instructions.

How to run

  • In Eclipse's Project Explorer, right click a project's folder and select Rascal Console. The console should open inside Eclipse's terminal window with the title "Rascal [project: , mode: debug]". If, instead, it shows "project: none", make sure you clicked the project and the project is actually open.
  • Import ClaiR into the console by running import lang::cpp::AST;.
  • To parse a string containing source code, call the parseString function, e.g., parseString("int foo() { return 0; }").
  • To parse source files on disk, call the parseCpp function with a source location, e.g., parseCpp(|file:///tmp/example.cpp|), parseCpp(|project://clair/src/test/test.cpp|), parseCpp(|home://myFile.cpp|), or parseCpp(|file://C:/My%20Dir/main.cpp|).

clair's People

Contributors

rodinaarssen avatar jurgenvinju avatar omarzd avatar

Watchers

James Cloos 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.