Hi,
You can find documentation for CINT at
http://root.cern.ch/drupal/content/cintand some related documentation on CINT in ROOT at
ftp://root.cern.ch/root/doc/7CINT.pdf
CINT is capable of 'interpreting' most of C++. In addition, it can
seemlessly interact with
compiled C++ by generating dictionary which gives you both the ability
to call the C++
and to inspect the set of classes and their content (i.e. introspection
and reflection).
CINT works by interpreting/executing each instructions and keeping
tracks of the 'state'
(i.e. list of global variable, stack of scope and their list of
variables, etc.).
To code the docs: "CINT is an interpreter for C and C++ code. It is
useful e.g. for situations where rapid development is more important
than execution time. Using an interpreter the compile and link cycle is
dramatically reduced facilitating rapid development. CINT makes C/C++
programming enjoyable even for part-time programmers."
In which context are you interested in a C++ interpreter?
Cheers,
Philippe.
Yang Zhang wrote:
> Hi, is there any document or resource describing how CINT works from a
> high level? I (and I'm sure others) are wondering out of curiosity.
> Any details you can spare would be great.
>
> The only other C REPL I've come across is
>
http://neugierig.org/software/c-repl/, and that works by incrementally
> compiling the expression as a function in a dynamic library, then
> dynamically linking to that library and calling the function. However,
> I'm not sure how it handles variable declarations and references -
> perhaps it accumulates all prior lines and recompiles everything.
>
> Thanks in advance!
>