Install castxml by entering the following commands in the terminal:
sudo apt update sudo apt install castxml
C-family abstract syntax tree XML output tool
Parse C-family source files and optionally write a subset of the Abstract Syntax Tree (AST) to a representation in XML. This is the successor to gccxml.