Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generate documentation using Doxygen #25

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft

Conversation

hv15
Copy link
Member

@hv15 hv15 commented Apr 7, 2019

We now support generating documentation using the Doxygen tool. Principally this is a straightforward task, however the SaC language has certain properties which do not work well with Doxygen's adherence to C/C++ syntax conventions. The sac2doxygen.py script transforms the SaC into a form that is more easily parsed by Doxygen.

This is hugely more advantageous than using sac2tex, as we are able to more closely link documentation to code. Additionally, we are able to generate all function variants (through the Templates.mac file) which is not the case when using sac2tex. We are also able to generate a variety of outputs, either HTML, PDF (LaTeX), MAN-pages, and even publish on ReadTheDocs (this last one is not important).

This MR is not complete yet, these steps are still needed:

  • Add some minor commenting to all modules (so that Doxygen picks them up)
  • Integrate into CMake (not really necessary but makes things more convenient)
  • Add some documentation to the repo explaining how to use Doxygen
  • Add some kind of template or guide on how SaC should be documented
  • Add information to the generated manual, like an introduction or similar

@hv15
Copy link
Member Author

hv15 commented Apr 7, 2019

Just a small taste: refman.pdf 😃

hv15 added 6 commits September 9, 2019 14:01
This commit adds support to generate documention using the Doxygen tool.
Principly this is a straightforward task, however the SaC language has
certain properties which do not work well with Doxygen's adherences to
C/C++ syntax conventions.

Through the included script, sac2doxygen.py, we are able to transform
the SaC code into a form that is more suitable for Doxygen.

The script either converts or removes certain keywords and statements.
Additionally it runs CPP beforehand, expanding all macros - this gives
us all function definitions which is more useful when referencing the
documentation.
Otherwise we might cause some strange transformation to occur,
especially if we have code examples in comments.
We did not handle the negate operator correctly. We also now handle
VARGS in return type of functions.
I think this makes more sense, and makes search for code more easily in
the docs. Imagine looking for + on Bools (contrived example), using the
*_symbol notation this is not possible (as you;d need to remember to
search for ADD, not +).
Also there were some interesting macro problems in FixedPoint which
should be resolved now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant