docs: Sphinxify `docs/tutorial/`
Sorry for the massive commit, but I just wanted to knock this one down
and it is really straightforward.
There are still a couple trivial (i.e. not related to the content)
things left to fix:
- Use of raw HTML links where :doc:`...` and :ref:`...` could be used
instead. If you are a newbie and want to help fix this it would make
for some good bite-sized patches; more experienced developers should
be focusing on adding new content (to this tutorial or elsewhere, but
please _do not_ waste your time on formatting when there is such dire
need for documentation (see docs/SphinxQuickstartTemplate.rst to get
started writing)).
- Highlighting of the kaleidoscope code blocks (currently left as bare
`::`). I will be working on writing a custom Pygments highlighter for
this, mostly as training for maintaining the `llvm` code-block's lexer
in-tree. I want to do this because I am extremely unhappy with how it
just "gives up" on the slightest deviation from the expected syntax
and leaves the whole code-block un-highlighted.
More generally I am looking at writing some Sphinx extensions and
keeping them in-tree as well, to support common use cases that
currently have no good solution (like "monospace text inside a link").
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169343 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/docs/tutorial/index.rst b/docs/tutorial/index.rst
index 2da4212..4658f96 100644
--- a/docs/tutorial/index.rst
+++ b/docs/tutorial/index.rst
@@ -1,36 +1,30 @@
+================================
LLVM Tutorial: Table of Contents
================================
-.. TODO:: Use Sphinx toctree once all of these pages are converted.
+Kaleidoscope: Implementing a Language with LLVM
+===============================================
-#. Kaleidoscope: Implementing a Language with LLVM
+.. toctree::
+ :titlesonly:
+ :glob:
+ :numbered:
- #. `Tutorial Introduction and the Lexer <LangImpl1.html>`__
- #. `Implementing a Parser and AST <LangImpl2.html>`__
- #. `Implementing Code Generation to LLVM IR <LangImpl3.html>`__
- #. `Adding JIT and Optimizer Support <LangImpl4.html>`__
- #. `Extending the language: control flow <LangImpl5.html>`__
- #. `Extending the language: user-defined operators <LangImpl6.html>`__
- #. `Extending the language: mutable variables / SSA
- construction <LangImpl7.html>`__
- #. `Conclusion and other useful LLVM tidbits <LangImpl8.html>`__
+ LangImpl*
-#. Kaleidoscope: Implementing a Language with LLVM in Objective Caml
+Kaleidoscope: Implementing a Language with LLVM in Objective Caml
+=================================================================
- #. `Tutorial Introduction and the Lexer <OCamlLangImpl1.html>`__
- #. `Implementing a Parser and AST <OCamlLangImpl2.html>`__
- #. `Implementing Code Generation to LLVM IR <OCamlLangImpl3.html>`__
- #. `Adding JIT and Optimizer Support <OCamlLangImpl4.html>`__
- #. `Extending the language: control flow <OCamlLangImpl5.html>`__
- #. `Extending the language: user-defined
- operators <OCamlLangImpl6.html>`__
- #. `Extending the language: mutable variables / SSA
- construction <OCamlLangImpl7.html>`__
- #. `Conclusion and other useful LLVM tidbits <OCamlLangImpl8.html>`__
+.. toctree::
+ :titlesonly:
+ :glob:
+ :numbered:
-#. Advanced Topics
+ OCamlLangImpl*
- #. `Writing an Optimization for
- LLVM <http://llvm.org/pubs/2004-09-22-LCPCLLVMTutorial.html>`_
+Advanced Topics
+===============
+
+#. `Writing an Optimization for LLVM <http://llvm.org/pubs/2004-09-22-LCPCLLVMTutorial.html>`_