Mercurial > hgrepos > Python > libs > pygments-lexer-pseudocode2
annotate docs/lexer-frpseudocode.rst @ 293:6d5d630506e4
Enhance the short description of FrPseudocode: renamed and slightly changed
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Fri, 22 May 2026 23:46:11 +0200 |
| parents | 2e78e255b54e |
| children |
| rev | line source |
|---|---|
|
128
2a653897f31e
Prepare a file for docs of FrPseudocodeLexer
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
1 .. -*- coding: utf-8; indent-tabs-mode: nil; -*- |
|
2a653897f31e
Prepare a file for docs of FrPseudocodeLexer
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
2 |
|
2a653897f31e
Prepare a file for docs of FrPseudocodeLexer
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
3 ************** |
|
2a653897f31e
Prepare a file for docs of FrPseudocodeLexer
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
4 FrPseudocode |
|
131
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
5 ************** |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
6 |
|
263
2e78e255b54e
Make a link to the reST source where appropriate to learn about the lexer syntax
Franz Glasner <fzglas.hg@dom66.de>
parents:
202
diff
changeset
|
7 .. only:: html |
|
293
6d5d630506e4
Enhance the short description of FrPseudocode: renamed and slightly changed
Franz Glasner <fzglas.hg@dom66.de>
parents:
263
diff
changeset
|
8 |
|
263
2e78e255b54e
Make a link to the reST source where appropriate to learn about the lexer syntax
Franz Glasner <fzglas.hg@dom66.de>
parents:
202
diff
changeset
|
9 .. hint:: |
|
2e78e255b54e
Make a link to the reST source where appropriate to learn about the lexer syntax
Franz Glasner <fzglas.hg@dom66.de>
parents:
202
diff
changeset
|
10 The reST source of this documentation page can be found |
|
2e78e255b54e
Make a link to the reST source where appropriate to learn about the lexer syntax
Franz Glasner <fzglas.hg@dom66.de>
parents:
202
diff
changeset
|
11 `here <_sources/lexer-frpseudocode.rst.txt>`_. |
|
2e78e255b54e
Make a link to the reST source where appropriate to learn about the lexer syntax
Franz Glasner <fzglas.hg@dom66.de>
parents:
202
diff
changeset
|
12 |
|
293
6d5d630506e4
Enhance the short description of FrPseudocode: renamed and slightly changed
Franz Glasner <fzglas.hg@dom66.de>
parents:
263
diff
changeset
|
13 This is the renamed pseudocode lexer from the original |
|
6d5d630506e4
Enhance the short description of FrPseudocode: renamed and slightly changed
Franz Glasner <fzglas.hg@dom66.de>
parents:
263
diff
changeset
|
14 `pygments-lexer-pseudocode` package. |
|
131
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
15 |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
16 It has been changed somewhat: |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
17 |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
18 - renamed from ``Pseudocode`` to ``FrPseudocode`` |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
19 - changed aliases to ``fr-pseudocode``, ``fr-pseudo``, ``fr-algorithm`` |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
20 and ``fr-algo`` |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
21 - changed file extension to ``.fr-algo`` and ``.fr-pseudocode`` |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
22 - changed some exististing arrows and added some more |
| 146 | 23 - numbers parsing is more flexible by following the rules of the `Pygments`_ |
| 24 lexer for `Python`_ | |
|
131
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
25 - also allow ``!=`` as inequality operator (in addition to ``<>``) |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
26 |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
27 It mostly just recognizes some (french) keywords and highlights them. |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
28 |
| 174 | 29 Comments are supported (``//`` and ``/* ... */`` (single-line only)). |
| 30 "Directives" in "special" comments are to be enclosed in curly braces | |
| 31 ``{ ... }``. | |
|
131
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
32 |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
33 It also implements some symbol replacements/conversions like |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
34 ``<=`` to ``≤``, ``>=`` to ``≥`` or ``<>`` to ``≠``. |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
35 |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
36 |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
37 .. rubric:: Example: |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
38 |
| 202 | 39 The following example |
|
131
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
40 |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
41 .. code-block:: none |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
42 |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
43 /* foo bar */ |
|
128
2a653897f31e
Prepare a file for docs of FrPseudocodeLexer
Franz Glasner <fzglas.hg@dom66.de>
parents:
diff
changeset
|
44 |
|
131
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
45 fonction fonc-1({passage par valeur}param1) |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
46 début |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
47 si param1 <= 0 alors |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
48 b = 0 |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
49 sinon |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
50 b = 1 |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
51 a = param1 |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
52 répéter |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
53 a = a - 1 |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
54 b = b * 2 |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
55 tantque a <> 0 |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
56 fin si |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
57 retourner b |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
58 fin fonction |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
59 |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
60 will be highlighted as |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
61 |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
62 .. code-block:: fr-algorithm |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
63 |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
64 /* foo bar */ |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
65 |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
66 fonction fonc-1({passage par valeur}param1) |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
67 début |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
68 si param1 <= 0 alors |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
69 b = 0 |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
70 sinon |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
71 b = 1 |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
72 a = param1 |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
73 répéter |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
74 a = a - 1 |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
75 b = b * 2 |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
76 tantque a <> 0 |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
77 fin si |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
78 retourner b |
|
0455294e20c4
First and basic documentation of FrPseudocodeLeser
Franz Glasner <fzglas.hg@dom66.de>
parents:
128
diff
changeset
|
79 fin fonction |
|
168
bff8b900713a
REFACTOR: All documentation pages refactored: merge intro and details for lexers and filters
Franz Glasner <fzglas.hg@dom66.de>
parents:
150
diff
changeset
|
80 |
|
bff8b900713a
REFACTOR: All documentation pages refactored: merge intro and details for lexers and filters
Franz Glasner <fzglas.hg@dom66.de>
parents:
150
diff
changeset
|
81 |
|
bff8b900713a
REFACTOR: All documentation pages refactored: merge intro and details for lexers and filters
Franz Glasner <fzglas.hg@dom66.de>
parents:
150
diff
changeset
|
82 Lexer Options |
|
bff8b900713a
REFACTOR: All documentation pages refactored: merge intro and details for lexers and filters
Franz Glasner <fzglas.hg@dom66.de>
parents:
150
diff
changeset
|
83 ============= |
|
bff8b900713a
REFACTOR: All documentation pages refactored: merge intro and details for lexers and filters
Franz Glasner <fzglas.hg@dom66.de>
parents:
150
diff
changeset
|
84 |
|
bff8b900713a
REFACTOR: All documentation pages refactored: merge intro and details for lexers and filters
Franz Glasner <fzglas.hg@dom66.de>
parents:
150
diff
changeset
|
85 There are no lexer options besides the `Pygments`_ standard lexer options. |
