<feed xmlns='http://www.w3.org/2005/Atom'>
<title>sciteco/tests, branch master</title>
<subtitle>Scintilla-based Text Editor and COrrector</subtitle>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/'/>
<entry>
<title>added left shift (^&lt;) and right shift (^&gt;) operators</title>
<updated>2026-11-15T07:57:03+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-11-15T07:57:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=902940401d1c1e657cdaf3e7bae8cbb89d14ffa9'/>
<id>902940401d1c1e657cdaf3e7bae8cbb89d14ffa9</id>
<content type='text'>
Previously you'd have to write `a * 2^*b` for left shift, which
is inefficient and cumbersome.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously you'd have to write `a * 2^*b` for left shift, which
is inefficient and cumbersome.
</pre>
</div>
</content>
</entry>
<entry>
<title>test suite: fixed check for very large floating point constant</title>
<updated>2026-11-10T21:20:54+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-11-10T21:20:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=03922ba0e3f2a46ebf09f2582333abcce023f596'/>
<id>03922ba0e3f2a46ebf09f2582333abcce023f596</id>
<content type='text'>
This was failing on aarch64 and ppc64 (via OBS) because they are
rounding to another approximation than amd64.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This was failing on aarch64 and ppc64 (via OBS) because they are
rounding to another approximation than amd64.
</pre>
</div>
</content>
</entry>
<entry>
<title>rewrote number parsing: convert only completely parsed numbers</title>
<updated>2026-11-09T23:15:22+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-11-09T23:15:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=6abc1299927860a3d433119c9632cf780ac79c7b'/>
<id>6abc1299927860a3d433119c9632cf780ac79c7b</id>
<content type='text'>
* We are now buffering until the end of the number constant before converting
  it to an integer or float.
* This way, the integer part of a floating point number does not necessarily
  have to fit into an teco_int_t -- floats can approximate very large numbers.
  When detecting a floating point number, we're parsing into floats from the
  very beginning.
  The behavior has been compared with Lua 5.4 and a test case has been added.
* Also, integers constants are now checked for overflows.
  Otherwise, constants could be arbitrarily long and the result would
  be unpredictable.
  Operations on integers are still not checked for overflows, though, since
  you might want to rely on it, e.g. for overlapping integers. But that
  might actually be pretty useless, especially with signed integers, so we
  might want to change that in the future.
* Having both overflow checks and increased floating point constant range
  is the reason we cannot practically immediately parse into a number,
  not even if we kept both an integer and float accumulator at the same time.
* Also fixes a memory corruption issue that existed since
  4aa2b717f9e050783b567540d9bb0193d692e3e9.
  You must emit undo tokens for fields in state machines only if
  ctx-&gt;parent.must_undo, i.e. if the state machine is not temporary as
  during a macro call.
  A test case has been added.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* We are now buffering until the end of the number constant before converting
  it to an integer or float.
* This way, the integer part of a floating point number does not necessarily
  have to fit into an teco_int_t -- floats can approximate very large numbers.
  When detecting a floating point number, we're parsing into floats from the
  very beginning.
  The behavior has been compared with Lua 5.4 and a test case has been added.
* Also, integers constants are now checked for overflows.
  Otherwise, constants could be arbitrarily long and the result would
  be unpredictable.
  Operations on integers are still not checked for overflows, though, since
  you might want to rely on it, e.g. for overlapping integers. But that
  might actually be pretty useless, especially with signed integers, so we
  might want to change that in the future.
* Having both overflow checks and increased floating point constant range
  is the reason we cannot practically immediately parse into a number,
  not even if we kept both an integer and float accumulator at the same time.
* Also fixes a memory corruption issue that existed since
  4aa2b717f9e050783b567540d9bb0193d692e3e9.
  You must emit undo tokens for fields in state machines only if
  ctx-&gt;parent.must_undo, i.e. if the state machine is not temporary as
  during a macro call.
  A test case has been added.
</pre>
</div>
</content>
</entry>
<entry>
<title>support floating point numbers</title>
<updated>2026-10-31T20:13:19+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-10-31T12:46:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=4aa2b717f9e050783b567540d9bb0193d692e3e9'/>
<id>4aa2b717f9e050783b567540d9bb0193d692e3e9</id>
<content type='text'>
* Extends the SciTECO type system. A number on the expression stack
  or in a Q-register can be either an integer or a float.
* Floating point constants begin with a digit (like all other
  numbers), are followed by a `.` and an optional fractional part.
  Exponents cannot currently be written.
  E.g. `1.` == `1.0`. But `.0` would still be `.,0`.
  (!) To push an integer followed by dot, you must now write e.g. `1,.` or `1 .`.
* All of the basic arithmetic operators operate like this:
  If both operands are integers, the result is also an integer (integer arithmetics).
  If at least one of the operands is a float, the result is also a float (float arithmetics).
* All of the binary operators (AND, OR, XOR) always cast all
  operands to integer and the result is always an integer as well.
* You can "cast" integers to float by `*1.` or `/1.`.
  You can "cast" floats to integers using `#0`.
* Most commands still accept only integers. Floats are implicitly casted to integers.
  Float-aware commands are: =, \, ^W, Qq, Uq, %q and the conditionals.
* `%q` will not change the current type of register q.
* Numeric part of "lexer.font" is now a float (in points).
* You cannot currently print octal and hexadecimal floats.
  `==` and `===` are identical to `=` on floats.
* `===` is now printing hex integers in lower case.
  This is because SciTECO's coding style for hex constants is also lower case.
* `--with-teco-integer` renamed to `--with-teco-number`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Extends the SciTECO type system. A number on the expression stack
  or in a Q-register can be either an integer or a float.
* Floating point constants begin with a digit (like all other
  numbers), are followed by a `.` and an optional fractional part.
  Exponents cannot currently be written.
  E.g. `1.` == `1.0`. But `.0` would still be `.,0`.
  (!) To push an integer followed by dot, you must now write e.g. `1,.` or `1 .`.
* All of the basic arithmetic operators operate like this:
  If both operands are integers, the result is also an integer (integer arithmetics).
  If at least one of the operands is a float, the result is also a float (float arithmetics).
* All of the binary operators (AND, OR, XOR) always cast all
  operands to integer and the result is always an integer as well.
* You can "cast" integers to float by `*1.` or `/1.`.
  You can "cast" floats to integers using `#0`.
* Most commands still accept only integers. Floats are implicitly casted to integers.
  Float-aware commands are: =, \, ^W, Qq, Uq, %q and the conditionals.
* `%q` will not change the current type of register q.
* Numeric part of "lexer.font" is now a float (in points).
* You cannot currently print octal and hexadecimal floats.
  `==` and `===` are identical to `=` on floats.
* `===` is now printing hex integers in lower case.
  This is because SciTECO's coding style for hex constants is also lower case.
* `--with-teco-integer` renamed to `--with-teco-number`.
</pre>
</div>
</content>
</entry>
<entry>
<title>numbers are separate parser states and there are syntactic octal and hexadecimal constants now</title>
<updated>2026-10-25T10:38:05+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-10-25T01:39:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=e0bf13622b0922252439e3fa8b43df9877678d75'/>
<id>e0bf13622b0922252439e3fa8b43df9877678d75</id>
<content type='text'>
* Instead of every digit being a stack-modifying standalone
  command, there is a single continuous parser state (teco_state_number)
  now - even though it has certain unique characteristics.
  They are consequently documented in the ARITHMETICS AND
  EXPRESSIONS chapter of sciteco(7).
* A number will therefore be rubbed out entirely by CTRL+W,
  including a possible @-modifier.
* (!) Spaces within constants are no longer ignored, but will push
  separate numbers to the stack instead (`1 2 3` pushes 3 numbers).
  The significance of the `,` operator is thus further reduced.
* (!) You can no longer "append" to numbers on the stack as in
  `Qa001` - this was never actually used and caused more confusion.
* (!) Digits outside the current radix are no longer accepted.
  E.g. digit 2 after `2^R`. This feature was also never used.
* (!) Octal constants are supported with leading zeros as in C.
  This works regardless of the current radix set via `8^R` or `^O`.
  It remains to see whether this is actually useful or is rather
  annoying (since every constant beginning with 0 is automatically
  octal, you cannot left-pad arbitrary numbers with 0).
* Hexadecimal constants are supported by at-modifying them as in
  `@0ff`. They must still begin with a digit 0-9 and since A-F are
  valid SciTECO commands, you may need additional spaces to separate
  hexadecimal constants from regular commands as in `@0ff D`.
  During syntax highlighting the number style is extended back to the
  at-sign.
  Note: Hexadecimal constants couldn't have been realized via
  `16^R` (or some shortcut) since that depends on runtime state, but
  we must know during parsing whether symbols A-F are part of the
  number of regular SciTECO commands.
* The new hexadecimal constants are used in the color schemes now.
  Thanks to them, we no longer need workarounds like the "color.rgb"
  macro.
* Since numbers don't have a dedicated terminator character, but any
  letter may terminate it, the number state must behave similar to a
  start state. Consequently, hexadecimal constants will currently be
  auto-case-folded if you enabled this feature.
  I recommend not to write hex constants in upper-case, though.
  Perhaps this should be worked around with a custom process_edit_cmd()
  callback.
* Test suite updated
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Instead of every digit being a stack-modifying standalone
  command, there is a single continuous parser state (teco_state_number)
  now - even though it has certain unique characteristics.
  They are consequently documented in the ARITHMETICS AND
  EXPRESSIONS chapter of sciteco(7).
* A number will therefore be rubbed out entirely by CTRL+W,
  including a possible @-modifier.
* (!) Spaces within constants are no longer ignored, but will push
  separate numbers to the stack instead (`1 2 3` pushes 3 numbers).
  The significance of the `,` operator is thus further reduced.
* (!) You can no longer "append" to numbers on the stack as in
  `Qa001` - this was never actually used and caused more confusion.
* (!) Digits outside the current radix are no longer accepted.
  E.g. digit 2 after `2^R`. This feature was also never used.
* (!) Octal constants are supported with leading zeros as in C.
  This works regardless of the current radix set via `8^R` or `^O`.
  It remains to see whether this is actually useful or is rather
  annoying (since every constant beginning with 0 is automatically
  octal, you cannot left-pad arbitrary numbers with 0).
* Hexadecimal constants are supported by at-modifying them as in
  `@0ff`. They must still begin with a digit 0-9 and since A-F are
  valid SciTECO commands, you may need additional spaces to separate
  hexadecimal constants from regular commands as in `@0ff D`.
  During syntax highlighting the number style is extended back to the
  at-sign.
  Note: Hexadecimal constants couldn't have been realized via
  `16^R` (or some shortcut) since that depends on runtime state, but
  we must know during parsing whether symbols A-F are part of the
  number of regular SciTECO commands.
* The new hexadecimal constants are used in the color schemes now.
  Thanks to them, we no longer need workarounds like the "color.rgb"
  macro.
* Since numbers don't have a dedicated terminator character, but any
  letter may terminate it, the number state must behave similar to a
  start state. Consequently, hexadecimal constants will currently be
  auto-case-folded if you enabled this feature.
  I recommend not to write hex constants in upper-case, though.
  Perhaps this should be worked around with a custom process_edit_cmd()
  callback.
* Test suite updated
</pre>
</div>
</content>
</entry>
<entry>
<title>fixed rubbing out radix changes (^O/^D/^R)</title>
<updated>2026-10-20T23:24:58+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-10-20T23:17:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=c4146a9e57a897c5393e1c4999110fd95208f43f'/>
<id>c4146a9e57a897c5393e1c4999110fd95208f43f</id>
<content type='text'>
This was missing the undoing after the refactoring
in a53fa85dabdfc2c47ec0c9e6626ddda2379a8e38.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This was missing the undoing after the refactoring
in a53fa85dabdfc2c47ec0c9e6626ddda2379a8e38.
</pre>
</div>
</content>
</entry>
<entry>
<title>help topics no longer need to be unique and can be toggled through with the `?$` command.</title>
<updated>2026-10-13T23:54:14+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-10-13T23:54:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=8b54d2c31410fcac43c8903007fe0738312834b0'/>
<id>8b54d2c31410fcac43c8903007fe0738312834b0</id>
<content type='text'>
* This mirrors how the `FT$` command toggles through several results.
* Some non-unique .SCITECO_TOPICs have been added to sciteco(1) and sciteco(7).
* This works by inserting non-unique keys into the help topic RB tree - or rather
  by turning filename:pos also into keys since rb3ptr does not allow non-unique keys.
  When searching for a topic, we sort lower than any other entry with the same name.
  This way we can easily iterate all entries with the same name (search topic).
  The alternative would have been to maintain a linked list in each and every
  teco_help_topic_t.
* teco_rb3str_auto_complete() now filters out possible duplicate keys.
* Updated test case: check for non-unique topic names.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* This mirrors how the `FT$` command toggles through several results.
* Some non-unique .SCITECO_TOPICs have been added to sciteco(1) and sciteco(7).
* This works by inserting non-unique keys into the help topic RB tree - or rather
  by turning filename:pos also into keys since rb3ptr does not allow non-unique keys.
  When searching for a topic, we sort lower than any other entry with the same name.
  This way we can easily iterate all entries with the same name (search topic).
  The alternative would have been to maintain a linked list in each and every
  teco_help_topic_t.
* teco_rb3str_auto_complete() now filters out possible duplicate keys.
* Updated test case: check for non-unique topic names.
</pre>
</div>
</content>
</entry>
<entry>
<title>automatically disable ^G modifier after successful auto-completions</title>
<updated>2026-10-04T20:18:06+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-10-04T19:42:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=bfafc42fc3e6ae33eec68f0eae07739df6ae5c2b'/>
<id>bfafc42fc3e6ae33eec68f0eae07739df6ae5c2b</id>
<content type='text'>
This will be important once we're doing LSP auto-completions.
Until a completion is complete, we do NOT want to disable the modifier however
since otherwise it can be disabled after a partial completion if there happened
to be a rubbed out command line.
Discarding a rubbed out command line consequently no longer disables
the modifier as well.

Any change of the modifier is now logged with an Info-level message.

Some rudimentary test case has been added for rub-in via ^G.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This will be important once we're doing LSP auto-completions.
Until a completion is complete, we do NOT want to disable the modifier however
since otherwise it can be disabled after a partial completion if there happened
to be a rubbed out command line.
Discarding a rubbed out command line consequently no longer disables
the modifier as well.

Any change of the modifier is now logged with an Info-level message.

Some rudimentary test case has been added for rub-in via ^G.
</pre>
</div>
</content>
</entry>
<entry>
<title>^E at the end of a line in a string argument "swallows" the EOL character</title>
<updated>2026-09-26T22:12:30+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-09-26T22:12:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=e48f1a6b5319224a92a8e7d60cbf5a4098d14ff5'/>
<id>e48f1a6b5319224a92a8e7d60cbf5a4098d14ff5</id>
<content type='text'>
This is similar to `\` at the line end in many languages like C and
allows you to split a very long string argument over several lines without
adding the EOL characters themselves.
The TECO equivalent to `\` would be ^Q, but it would be a semantic exception since
^Q (escaping) is supposed to _preserve_ the value of the following character.
Therefore I decided to use ^E instead.
This works with DOS and Mac line breaks as well.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is similar to `\` at the line end in many languages like C and
allows you to split a very long string argument over several lines without
adding the EOL characters themselves.
The TECO equivalent to `\` would be ^Q, but it would be a semantic exception since
^Q (escaping) is supposed to _preserve_ the value of the following character.
Therefore I decided to use ^E instead.
This works with DOS and Mac line breaks as well.
</pre>
</div>
</content>
</entry>
<entry>
<title>don't crash on `0N...$`, but always throw an error</title>
<updated>2026-08-18T19:32:03+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2026-08-18T19:32:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=3ae89e34f6a04dd553f3871856521334a4dbe62f'/>
<id>3ae89e34f6a04dd553f3871856521334a4dbe62f</id>
<content type='text'>
See also 8a8edaa2daf37f7c12e21b9199755b5de8e489f5.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
See also 8a8edaa2daf37f7c12e21b9199755b5de8e489f5.
</pre>
</div>
</content>
</entry>
</feed>
