diff docs/intro.rst @ 166:6a7dace0141e

Also implement filters to replace tokens in a token stream: TokenReplaceFilter and ErrorToGenericErrorTokenFilter
author Franz Glasner <fzglas.hg@dom66.de>
date Fri, 08 May 2026 23:54:06 +0200
parents a4317957148b
children
line wrap: on
line diff
--- a/docs/intro.rst	Fri May 08 23:50:24 2026 +0200
+++ b/docs/intro.rst	Fri May 08 23:54:06 2026 +0200
@@ -1,10 +1,13 @@
 .. -*- coding: utf-8; indent-tabs-mode: nil; -*-
 
 
-**************   
+**************
  Introduction
 **************
 
+Lexer
+=====
+
 The package contains the following lexers:
 
 .. include:: lexerlist.rst
@@ -129,6 +132,36 @@
 
 .. literalinclude:: examples/algorithm-edmonds-karp.pseudocode
    :language: algpseudocode-de
-   :lines: 2-           
+   :lines: 2-
+
+More details you will find :ref:`here <details-algpseudocode>`.
+
+
+Filter
+======
+
+The package contains the following filters:
+
+.. include:: filterlist.rst
+
+The AlgPseudocode lexer yields an error token for the following code block.
+`Sphinx`_ therefore suppresses highlighting completely:
+
+.. code-block:: none
 
-More details you will find :ref:`here <details-algpseudocode>`.          
+   \EXPR{TEST}
+
+With a custom AlgPseudocode lexer that has ``prohibit_raiseonerror_filter``
+activated the output in `Sphinx`_ is as:
+
+.. code-block:: no-raiseonerror-algpseudocode
+
+   \EXPR{TEST}
+
+
+With the "errortogenericerror" filter the very same block is highlighted
+as:
+
+.. code-block:: genericerror-algpseudocode
+
+   \EXPR{TEST}