package ctoxml

  1. Overview
  2. Docs
Parses a C program into Cabs AST and dumps as an XML document

Install

Dune Dependency

Authors

Maintainers

Sources

v4.0.0.tar.gz
sha256=1cd4e72478b1bf03678dd3cc730400c26a0d02b883906a5f5a354907f2798279
md5=2e8875a947b12ae3de2e89b1d9b3c7fe

Description

Tags

FrontC C parser XML

Published: 09 May 2021

README

FrontC v4.0

FrontC is C language front-end. It provides the program in "C Abstract Form", a tree representation of the original C source. It may be used for many source works including:

  • compilation,

  • source pre-processing,

  • source beautification,

  • source analysis,

  • and so on.

It provides also an XML back-end making easier to transform the C program using XML tools like XSLT (it was my first goal when I perform this task).

ctoxml

The ctoxml package provides a

calipso

The calipso package provides a program analysis tool that removes non-structural control-flow from C programs. See https://dblp.org/rec/journals/tsi/CasseFRS02 for more details. The tool provides two binaries, calipso and calipso_stat

FrontC v3.0 (stable)

The stable branch supports only ANSI C (C89) with partial support for some GNU extensions. This branch is using ocamlyacc as a parser generator and doesn't accept new features, only occasional bug fixes.

Building and Installing

The easiest option is to install using opam, e.g.,

opam install FrontC # or calipso, or ctoxml

The command above will install the latest version of the package from the ocaml.org opam-repositor. To get the current development (not yet released to ocaml.org) version of a package, you can use the opam pin command, e.g.,

opam pin FrontC --dev-repo

You can also just clone this repo and do

make && make install # translates to `dune build && dune install`

If you change anything do not forget to run tests with make test.

Documentation

You can easily get the documentation using odig,

odig doc FrontC

Dependencies (3)

  1. FrontC >= "4.0.0"
  2. dune >= "2.7"
  3. ocaml >= "4.08.0"

Dev Dependencies (1)

  1. odoc with-doc

Used by

None

Conflicts

None

OCaml

Innovation. Community. Security.