comparison docs/lexer-frpseudocode.rst @ 168:bff8b900713a

REFACTOR: All documentation pages refactored: merge intro and details for lexers and filters
author Franz Glasner <fzglas.hg@dom66.de>
date Mon, 11 May 2026 01:31:12 +0200
parents docs/details-frpseudocode.rst@4acf578ae93f
children d45dfbbec209
comparison
equal deleted inserted replaced
167:ddefcc20367c 168:bff8b900713a
1 .. -*- coding: utf-8; indent-tabs-mode: nil; -*-
2
3 .. _XXfr-pseudocode:
4
5 **************
6 FrPseudocode
7 **************
8
9 This is the pseudocode lexer from the original `pygments-lexer-pseudocode`
10 package.
11
12 It has been changed somewhat:
13
14 - renamed from ``Pseudocode`` to ``FrPseudocode``
15 - changed aliases to ``fr-pseudocode``, ``fr-pseudo``, ``fr-algorithm``
16 and ``fr-algo``
17 - changed file extension to ``.fr-algo`` and ``.fr-pseudocode``
18 - changed some exististing arrows and added some more
19 - numbers parsing is more flexible by following the rules of the `Pygments`_
20 lexer for `Python`_
21 - also allow ``!=`` as inequality operator (in addition to ``<>``)
22
23 It mostly just recognizes some (french) keywords and highlights them.
24
25 Comments are supported (``//`` and ``/* ... */`` (single-line only))-
26 "Directives" in "special" comments are to be enclosed in curly braces ``{ ... }``.
27
28 It also implements some symbol replacements/conversions like
29 ``<=`` to ``≤``, ``>=`` to ``≥`` or ``<>`` to ``≠``.
30
31
32 .. rubric:: Example:
33
34 The follwing example
35
36 .. code-block:: none
37
38 /* foo bar */
39
40 fonction fonc-1({passage par valeur}param1)
41 début
42 si param1 <= 0 alors
43 b = 0
44 sinon
45 b = 1
46 a = param1
47 répéter
48 a = a - 1
49 b = b * 2
50 tantque a <> 0
51 fin si
52 retourner b
53 fin fonction
54
55 will be highlighted as
56
57 .. code-block:: fr-algorithm
58
59 /* foo bar */
60
61 fonction fonc-1({passage par valeur}param1)
62 début
63 si param1 <= 0 alors
64 b = 0
65 sinon
66 b = 1
67 a = param1
68 répéter
69 a = a - 1
70 b = b * 2
71 tantque a <> 0
72 fin si
73 retourner b
74 fin fonction
75
76
77 Lexer Options
78 =============
79
80 There are no lexer options besides the `Pygments`_ standard lexer options.