xo-reader: + docs scaffold

This commit is contained in:
Roland Conybeare 2025-07-04 10:09:04 -05:00
commit e7d46b2103
4 changed files with 98 additions and 6 deletions

View file

@ -4,6 +4,6 @@ xo_doxygen_collect_deps()
xo_docdir_doxygen_config()
xo_docdir_sphinx_config(
index.rst install.rst examples.rst implementation.rst
token-class.rst tokenizer-error-class.rst span-class.rst tokentype-enum.rst
input-state.rst
input-state-class.rst scan-result-class.rst schematika-tokens.rst span-class.rst
token-class-rst tokenizer-error-class.rst tokentype-enum.rst
)

View file

@ -9,10 +9,10 @@ standalone build
| +----------------------+
+------------------------------------------------->| .build/docs/Doxyfile |
| +----------------------+
| |
| ^
| (cmake |
| /------------/
| |
| v
| +---------------------------------------+ +-----------------+
+---->| doxygen |--->| .build/docs/dox |
| | $PREFIX/share/xo-macros/Doxyfile.in | | +- html/ |
@ -37,3 +37,5 @@ files
CMakeLists.txt build entry point
conf.py sphinx config
_static static files for sphinx
index.rst toplevel sphinx document; entry point

View file

@ -11,5 +11,95 @@ Schematika Tokens
- examples
- description
* - tk_i64
- 123, -8,
- ``123``, ``-8``
- 64-bit integer literal
* - tk_f64
- ``1.234``, ``-10``., ``-1.981e-10``, ``3e6``
- 64-bit floating-point literal
* - tk_string
- ``"hello"``, ``"Q: \"what's up?\"\nA: \"parsing!\""``
- string literal. Usual escapes ``\n``, ``\r``, ``\t``, ``\"``, ``\\``
* - tk_symbol
- ``apple``, ``funKy``, ``x123``, ``_mumble``, ``hyphenated-var``
- symbol name
* - tk_type
- ``type``
- keyword
* - tk_def
- ``def``
- keyword
* - tk_lambda
- ``lambda``
- keyword
* - tk_if
- ``if``
- keyword
* - tk_let
- ``let``
- keyword
* - tk_in
- ``in``
- keyword
* - tk_end
- ``end``
- keyword
* - tk_leftparen
- ``(``
-
* - tk_rightparen
- ``)``
-
* - tl_leftbracket
- ``[``
-
* - tk_rightbracket
- ``]``
-
* - tk_leftbrace
- ``{``
-
* - tk_rightbrace
- ``}``
-
* - tk_leftangle
- ``<``
-
* - tk_rightangle
- ``>``
-
* - tk_dot
- ``.``
-
* - tk_comma
- ``,``
-
* - tk_colon
- ``:``
-
* - tk_doublecolon
- ``::``
-
* - tk_semicolon
- ``;``
-
* - tk_singleassign
- ``=``
-
* - tk_assign
- ``:=``
-
* - tk_yields
- ``->``
-
* - tk_plus
- ``+``
- allowed in symbol
* - tk_minus
- ``-``
- allowed in symbol
* - tk_star
- ``*``
- allowed in symbol
* - tk_slash
- ``/``
- allowed in symbol

View file

@ -1,4 +1,4 @@
/** @file tokenrepl.cp **/
/** @file tokenrepl.cpp **/
#include "xo/tokenizer/tokenizer.hpp"
#include <iostream>