Small, Fast S-Expression Library
Functions
Visualization and debugging routines

Functions

sexp_errcode_t sexp_to_dotfile (const sexp_t *sx, const char *fname)

Function Documentation

sexp_errcode_t sexp_to_dotfile ( const sexp_t sx,
const char *  fname 
)

Given a s-expression and a filename, this routine creates a DOT-file that can be used to generate a visualization of the s-expression data structure. This is useful for debugging to ensure that the structure is correct and follows what was expected by the programmer. Non-trivial s-expressions can yield very large visualizations though. Sometimes it is more practical to visualize a portion of the structure if one knows where a bug is likely to occur.

Parameters:
sxS-expression data structure to create a DOT file based on.
fnameFilename of the DOT file to emit.