<feed xmlns='http://www.w3.org/2005/Atom'>
<title>sciteco/lib/lexers/sciteco.tes, branch v2.5.2</title>
<subtitle>Scintilla-based Text Editor and COrrector</subtitle>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/'/>
<entry>
<title>SciTECO lexer: braces and two-character operators are now actually styled as operators</title>
<updated>2025-12-11T14:13:09+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2025-12-10T01:15:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=376c62bc63870fa1121548fc8b53271c21ed79a6'/>
<id>376c62bc63870fa1121548fc8b53271c21ed79a6</id>
<content type='text'>
* For consistency with other lexers, like the C/C++ lexer.
* `^*`, `^/` and `^#` are also true operators and shouldn't be styled
  as regular commands.
  This required introducing a new operator style (3).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* For consistency with other lexers, like the C/C++ lexer.
* `^*`, `^/` and `^#` are also true operators and shouldn't be styled
  as regular commands.
  This required introducing a new operator style (3).
</pre>
</div>
</content>
</entry>
<entry>
<title>updated Scintilla: tabs in command lines and SciTECO buffers are now rendered as "TAB" without any indentation</title>
<updated>2025-11-12T00:05:52+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2025-11-11T23:43:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=f5ebfce42ded9c146487c02f01f1e335e789084e'/>
<id>f5ebfce42ded9c146487c02f01f1e335e789084e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>render tabs as "TAB" in the command-line and in SciTECO macros</title>
<updated>2025-11-02T22:21:21+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>rhaberkorn@fmsbw.de</email>
</author>
<published>2025-11-02T22:21:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=1391e9c6ea1f9bef965f96e70f4e27141abcb5cd'/>
<id>1391e9c6ea1f9bef965f96e70f4e27141abcb5cd</id>
<content type='text'>
* This requires the new SCI_SETTABDRAWMODE(SCTD_CONTROLCHAR).
* It makes no sense to let TAB indent in TECO code as it can be
  the insert-with-tab command (^I).
  On the other hand large `I`-blocks could include TABs which are
  actually meant as indentations.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* This requires the new SCI_SETTABDRAWMODE(SCTD_CONTROLCHAR).
* It makes no sense to let TAB indent in TECO code as it can be
  the insert-with-tab command (^I).
  On the other hand large `I`-blocks could include TABs which are
  actually meant as indentations.
</pre>
</div>
</content>
</entry>
<entry>
<title>the ES command (send Scintilla message) now supports passing both wParam and lParam as null-terminated strings</title>
<updated>2025-03-23T15:42:07+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-03-23T15:31:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=9e101ec36e0bf45f294f63015e0352d1d08d641d'/>
<id>9e101ec36e0bf45f294f63015e0352d1d08d641d</id>
<content type='text'>
* Being able to embed null bytes into the lParam string is
  practically useless - there aren't any messages where this is useful
  and where there are no native SciTECO counterparts - so this case is now catched
  and the null-byte separates wParam from lParam.
* wParam can be the empty string, but it is not supported to pass wParam as a
  string and lParam as the empty string.
  If the second string argument ends in ^@, lParam is popped from the stack instead.
* This is a temporary workaround until we can properly parse the Scintilla.iface and
  generate more elegant per-message wrappers.
* It in particular unlocks the SCI_SETREPRESENTATION and SCI_SETPROPERTY messages.
  The former allows us to write a special hex-editor macro which sets hexadecimal
  character representations, while the latter allows you to set lexer properties.
* The C-based lexers ("cpp" in Lexilla) can now take preprocessor definitions into account.
  This is disabled by default, unless you set lexer.c.defines before opening a file.
  You can also set it interactively and re-set the lexer. For instance:
  ^U[lexer.c.defines]NDEBUG$ M[lexer.set.c]
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Being able to embed null bytes into the lParam string is
  practically useless - there aren't any messages where this is useful
  and where there are no native SciTECO counterparts - so this case is now catched
  and the null-byte separates wParam from lParam.
* wParam can be the empty string, but it is not supported to pass wParam as a
  string and lParam as the empty string.
  If the second string argument ends in ^@, lParam is popped from the stack instead.
* This is a temporary workaround until we can properly parse the Scintilla.iface and
  generate more elegant per-message wrappers.
* It in particular unlocks the SCI_SETREPRESENTATION and SCI_SETPROPERTY messages.
  The former allows us to write a special hex-editor macro which sets hexadecimal
  character representations, while the latter allows you to set lexer properties.
* The C-based lexers ("cpp" in Lexilla) can now take preprocessor definitions into account.
  This is disabled by default, unless you set lexer.c.defines before opening a file.
  You can also set it interactively and re-set the lexer. For instance:
  ^U[lexer.c.defines]NDEBUG$ M[lexer.set.c]
</pre>
</div>
</content>
</entry>
<entry>
<title>sciteco lexer: enable 2-char soft tabs by default</title>
<updated>2025-03-12T11:06:58+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2025-03-12T11:06:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=cefe7e65281a34c20da7288618d1df11d3b9db28'/>
<id>cefe7e65281a34c20da7288618d1df11d3b9db28</id>
<content type='text'>
* You practically never want to indent in SciTECO code with hard tabs, as the hard tab is
  an insertion command.
* 2-char soft tabs are the convention in SciTECO's included macros.
* Fixes the M#it macro among other things.
* If you do want to insert an insertion-with-tab command (ASCII 9), you almost always will
  want to type it ^I instead.
  Real ASCII 9s should consequently be highlighted, ie. there should be a character representation.
  Unfortunately, character representations are currently set in C code and cannot be changed via &lt;ES&gt;.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* You practically never want to indent in SciTECO code with hard tabs, as the hard tab is
  an insertion command.
* 2-char soft tabs are the convention in SciTECO's included macros.
* Fixes the M#it macro among other things.
* If you do want to insert an insertion-with-tab command (ASCII 9), you almost always will
  want to type it ^I instead.
  Real ASCII 9s should consequently be highlighted, ie. there should be a character representation.
  Unfortunately, character representations are currently set in C code and cannot be changed via &lt;ES&gt;.
</pre>
</div>
</content>
</entry>
<entry>
<title>introduced true block and EOL comments</title>
<updated>2024-12-24T10:29:32+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2024-12-24T10:29:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=ef897b418a4487196e1dbc18a97046f8f0aea2e8'/>
<id>ef897b418a4487196e1dbc18a97046f8f0aea2e8</id>
<content type='text'>
* The previous convention of !* ... *! are now true block comments,
  i.e. they are parsed faster, don't spam the goto table and allow
  embedding of exclamation marks - only "*!" terminates the comment.
* It is therefore now forbidden to have goto labels beginning with "*".
* Also support "!!" to introduce EOL comments (like C++'s //).
  This disallows empty labels, but they weren't useful anyway.
  This is the shortest way to begin a comment.
* All comment labels have been converted to true comments, to ensure
  that syntax highlighting works correctly.
  EOL comments are used for single line commented-out code, since it's
  easiest to uncomment - you don't have to jump to the line end.
  This is a pure convention / coding style.
  Other people might do it differently.
* It's of course still possible to abuse goto labels as comments
  as TECO did for ages.
* In lexing / syntax highlighting, labels and comments are highlighted differently.
* When syntax highlighting, a single "!" will first be highlighted as a label
  since it's not yet unambiguous. Once you type the second character (* or !),
  the first character is retroactively styled as a comment as well.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* The previous convention of !* ... *! are now true block comments,
  i.e. they are parsed faster, don't spam the goto table and allow
  embedding of exclamation marks - only "*!" terminates the comment.
* It is therefore now forbidden to have goto labels beginning with "*".
* Also support "!!" to introduce EOL comments (like C++'s //).
  This disallows empty labels, but they weren't useful anyway.
  This is the shortest way to begin a comment.
* All comment labels have been converted to true comments, to ensure
  that syntax highlighting works correctly.
  EOL comments are used for single line commented-out code, since it's
  easiest to uncomment - you don't have to jump to the line end.
  This is a pure convention / coding style.
  Other people might do it differently.
* It's of course still possible to abuse goto labels as comments
  as TECO did for ages.
* In lexing / syntax highlighting, labels and comments are highlighted differently.
* When syntax highlighting, a single "!" will first be highlighted as a label
  since it's not yet unambiguous. Once you type the second character (* or !),
  the first character is retroactively styled as a comment as well.
</pre>
</div>
</content>
</entry>
<entry>
<title>update sciteco.tes: this again highlights commands, but not Q-Register names</title>
<updated>2024-12-13T21:23:47+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2024-12-13T21:23:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=a673abe372df0a112e075737640dd3786587f870'/>
<id>a673abe372df0a112e075737640dd3786587f870</id>
<content type='text'>
It's a bit easier on the eyes.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's a bit easier on the eyes.
</pre>
</div>
</content>
</entry>
<entry>
<title>fixup 244a54a18b7db6af177c9d10f3224772f08d7484: abuse the Scintilla view's "identifier" to enable lexing in the container</title>
<updated>2024-12-13T12:28:04+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2024-12-13T12:17:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=7871c54db8fe2b8dcd1cb81aaec3b85099cb20a8'/>
<id>7871c54db8fe2b8dcd1cb81aaec3b85099cb20a8</id>
<content type='text'>
* SCI_SETILEXER(NULL) is not a reliable way to do that since
  that's the default for all views.
* This was breaking the git.tes lexer for instance and was unnecessarily
  driving teco_lexer_style() on plain-text documents.
* Since we currently do not implement the ILexer5 C++ interface
  and teco_view_t is just a pointer alias, we are abusing the view's "identifier" instead.
  This is probably sufficient, as long as there is only one lexer "in the container".
  Otherwise, there should perhaps be a single C++ class that does nothing but
  wrapping a callback into an ILexer5 object with a C ABI.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* SCI_SETILEXER(NULL) is not a reliable way to do that since
  that's the default for all views.
* This was breaking the git.tes lexer for instance and was unnecessarily
  driving teco_lexer_style() on plain-text documents.
* Since we currently do not implement the ILexer5 C++ interface
  and teco_view_t is just a pointer alias, we are abusing the view's "identifier" instead.
  This is probably sufficient, as long as there is only one lexer "in the container".
  Otherwise, there should perhaps be a single C++ class that does nothing but
  wrapping a callback into an ILexer5 object with a C ABI.
</pre>
</div>
</content>
</entry>
<entry>
<title>implemented Scintilla lexer for SciTECO code, i.e. TECO syntax highlighting</title>
<updated>2024-12-12T21:58:14+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2024-12-09T09:58:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=244a54a18b7db6af177c9d10f3224772f08d7484'/>
<id>244a54a18b7db6af177c9d10f3224772f08d7484</id>
<content type='text'>
* this works by embedding the SciTECO parser and driving it always (exclusively)
  in parse-only mode.
* A new teco_state_t::style determines the Scintilla style for any character
  accepted in the given state.
* Therefore, the SciTECO lexer is always 100% exact and corresponds to the current
  SciTECO grammer - it does not have to be maintained separately.
  There are a few exceptions and tweaks, though.
* The contents of curly-brace escapes (`@^Uq{...}`) are rendered as ordinary
  code using a separate parser instance.
  This can be disabled with the lexer.sciteco.macrodef property.
  Unfortunately, SciTECO does not currently allow setting lexer properties (FIXME).
* Labels and comments are currently styled the same.
  This could change in the future once we introduce real comments.
* Lexers are usually implemented in C++, but I did not want to draw in C++.
  Especially not since we'd have to include parser.h and other SciTECO headers,
  that really do not want to keep C++-compatible.
  Instead, the lexer is implemented "in the container".
  @ES/SCI_SETILEXER/sciteco/ is internally translated to SCI_SETILEXER(NULL)
  and we get Scintilla notifications when styling the view becomes necessary.
  This is then centrally forwarded to the teco_lexer_style() which
  uses the ordinary teco_view_ssm() API for styling.
* Once the command line becomes a Scintilla view even on Curses,
  we can enabled syntax highlighting of the command line macro.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* this works by embedding the SciTECO parser and driving it always (exclusively)
  in parse-only mode.
* A new teco_state_t::style determines the Scintilla style for any character
  accepted in the given state.
* Therefore, the SciTECO lexer is always 100% exact and corresponds to the current
  SciTECO grammer - it does not have to be maintained separately.
  There are a few exceptions and tweaks, though.
* The contents of curly-brace escapes (`@^Uq{...}`) are rendered as ordinary
  code using a separate parser instance.
  This can be disabled with the lexer.sciteco.macrodef property.
  Unfortunately, SciTECO does not currently allow setting lexer properties (FIXME).
* Labels and comments are currently styled the same.
  This could change in the future once we introduce real comments.
* Lexers are usually implemented in C++, but I did not want to draw in C++.
  Especially not since we'd have to include parser.h and other SciTECO headers,
  that really do not want to keep C++-compatible.
  Instead, the lexer is implemented "in the container".
  @ES/SCI_SETILEXER/sciteco/ is internally translated to SCI_SETILEXER(NULL)
  and we get Scintilla notifications when styling the view becomes necessary.
  This is then centrally forwarded to the teco_lexer_style() which
  uses the ordinary teco_view_ssm() API for styling.
* Once the command line becomes a Scintilla view even on Curses,
  we can enabled syntax highlighting of the command line macro.
</pre>
</div>
</content>
</entry>
</feed>
