Mercurial > hgrepos > Python > libs > pygments-lexer-pseudocode2
comparison docs/example-1.pseudocode @ 150:4acf578ae93f
Much more details in the documentation
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Thu, 07 May 2026 16:06:59 +0200 |
| parents | 1c1985532139 |
| children |
comparison
equal
deleted
inserted
replaced
| 149:380d2607d5c7 | 150:4acf578ae93f |
|---|---|
| 2 \PROGRAM {The Pseudocode Lexer} \IS | 2 \PROGRAM {The Pseudocode Lexer} \IS |
| 3 | 3 |
| 4 /* | 4 /* |
| 5 * The program is here, but it also could be an \ALGORITHM | 5 * The program is here, but it also could be an \ALGORITHM |
| 6 * | 6 * |
| 7 * /* YES! Nested multiline comments work! */ | 7 * /* YES! Nested multi-line comments work! */ |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 \PROC {A Procedure name} \IS | 10 \PROC {A Procedure name} \IS |
| 11 \TBLOCK {A text block 1} | 11 \TBLOCK {A text block 1} |
| 12 \TBLOCK {A text block 2 with an expression: \expr{flag is FALSE}} | 12 \TBLOCK {A text block 2 with a nested expression: \expr{flag is FALSE}} |
| 13 \BLOCK { | 13 \BLOCK { |
| 14 \REMARK A remark on its own line within a "BLOCK" | 14 \REMARK A remark on its own line within a "BLOCK" |
| 15 } | 15 } |
| 16 \END-PROC {A Procedure name} | 16 \END-PROC {A Procedure name} |
| 17 | 17 |
| 29 \CLASS{A Class} \IS | 29 \CLASS{A Class} \IS |
| 30 // This is a one-line comment | 30 // This is a one-line comment |
| 31 a and b xor (c in d) \rem this is another remark | 31 a and b xor (c in d) \rem this is another remark |
| 32 | 32 |
| 33 # This is another one-line comment | 33 # This is another one-line comment |
| 34 | |
| 35 (* Here is a "block" of expressions. | |
| 36 A block has a leading symbol. *) | |
| 34 \block {foo | 37 \block {foo |
| 35 bar} | 38 bar} |
| 36 \block{a 1.2 {x in X\} c} | 39 \block{a 1.2 {x in X\} c} |
| 40 (* Analogous there is a variant that is in text-mode by default. | |
| 41 It has an other leading symbol. *) | |
| 37 \tstate{We will compute next \expr{a xor b or (\text{set} X is Empty)} \rem without c! | 42 \tstate{We will compute next \expr{a xor b or (\text{set} X is Empty)} \rem without c! |
| 38 or multiply it the other way round} | 43 or multiply it the other way round} |
| 39 | 44 |
| 40 \tstate{foo bar \rem A remark within a text statement until LF! | 45 \tstate{foo bar \rem A remark within a text statement until LF! |
| 41 nextfoo nextbar | 46 nextfoo nextbar |
