<feed xmlns='http://www.w3.org/2005/Atom'>
<title>sciteco/lib/lexers/cpp.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>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>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>added troff/nroff lexer</title>
<updated>2024-08-18T16:48:06+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2024-08-18T16:34:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=bbcf801ddfd3eb50203518c130beb400de7ca53f'/>
<id>bbcf801ddfd3eb50203518c130beb400de7ca53f</id>
<content type='text'>
* This is optimized for Groff, but works for Heirloom Troff and Neatroff as well.
  Currently, the Heirloom and Neatroff requests are just added ontop of the Groff
  ones. Theoretically, we could also try to separate the keyword lists into
  a base K&amp;R set with Groff, Heirloom and Neatroff ontop.
* The lexer necessarily has many restrictions, as Troff is fundamentally unparseable
  (like classic TECO) and needs a lot of per-request knowledge.
* The "*.mm" extension has been removed from the lexers/cpp.tes.
  I don't know what language this was for, and I prefer `*.mm` files
  to be considered Troff.
* Temporarily changed the lexilla submodule URL.
  The corresponding Lexila lexer is in the process of being upstreamed.
  Once it is, I will probably revert the submodule to the official repository,
  as the "troff" branch is not stable (can be rebased).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* This is optimized for Groff, but works for Heirloom Troff and Neatroff as well.
  Currently, the Heirloom and Neatroff requests are just added ontop of the Groff
  ones. Theoretically, we could also try to separate the keyword lists into
  a base K&amp;R set with Groff, Heirloom and Neatroff ontop.
* The lexer necessarily has many restrictions, as Troff is fundamentally unparseable
  (like classic TECO) and needs a lot of per-request knowledge.
* The "*.mm" extension has been removed from the lexers/cpp.tes.
  I don't know what language this was for, and I prefer `*.mm` files
  to be considered Troff.
* Temporarily changed the lexilla submodule URL.
  The corresponding Lexila lexer is in the process of being upstreamed.
  Once it is, I will probably revert the submodule to the official repository,
  as the "troff" branch is not stable (can be rebased).
</pre>
</div>
</content>
</entry>
<entry>
<title>improved the C/C++ and Gob lexers</title>
<updated>2022-11-21T05:27:04+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2022-11-21T05:27:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=d10997addbd6753b6a4e2db663a539848510ddbc'/>
<id>d10997addbd6753b6a4e2db663a539848510ddbc</id>
<content type='text'>
* single quoted constants are highlighted like single quoted strings in all other
  auto-generated lexers using "CPP".
* recognize /// and //! and comments after preprocessor statements
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* single quoted constants are highlighted like single quoted strings in all other
  auto-generated lexers using "CPP".
* recognize /// and //! and comments after preprocessor statements
</pre>
</div>
</content>
</entry>
<entry>
<title>upgraded to Scintilla 5.1.3 and Scinterm 3.1</title>
<updated>2021-10-11T05:02:05+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2021-10-11T05:02:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=6e67f5a682ff46d69888fec61b94bf45cec46721'/>
<id>6e67f5a682ff46d69888fec61b94bf45cec46721</id>
<content type='text'>
* Previous Scintilla version was 3.6.4 and Scinterm was 1.7 (with lots of custom patches).
  All of the patches are now either irrelevant or have been merged upstream.
* Since Scintilla 5 requires C++17, this increases the minimum GCC version at least
  to 5.0. We may actually require even newer versions.
* I could not upgrade the scintilla-mirror (which was imported from Mercurial),
  so the old sciteco-dev branch was renamed to sciteco-dev-pre-v2.0.0,
  master was deleted and I reimported the entire Scintilla repo using
  git-remote-hg.
  This means that scintilla-mirror now contains two entirely separate trees.
  But it is still possible to clone old SciTECO repos.
* The strategy/workflow of maintaining hotfix branches on scintilla-mirror has been changed.
  Instead of having one sciteco-dev branch that is rebased onto new Scintilla upstream
  releases and tagging SciTECO releases in scintilla-mirror (to keep the commits referenced),
  we now create a branch for every Scintilla version we are based on (eg. sciteco-rel-5-1-3).
  This branch is never rebased or deleted. Therefore, we are guaranteed to be able to
  clone arbitrary SciTECO repo commits - not only releases.
  Releases no longer have to be tagged in scintilla-mirror.
  On the downside, fixup commits may accumulate in these new branches.
  They can only be squashed once a new branch for a new Scintilla release is created
  (e.g. by cherry-picking followed by rebase).
* Scinterm does no longer have to reside in the Scintilla subdirectory,
  so we added it as a regular submodule.
  There are no more recursive submodules.
  The Scinterm build system has not been improved at all, but we use
  a trick based on VPATH to build Scinterm in scintilla/bin/.
* Scinterm is now in Git and we reference the upstream repo for the
  time being.
  We might mirror it and apply the same branching workflow as with Scintilla
  if necessary.
  The scinterm-mirror repository still exists but has not been touched.
  We will also have to rewrite its master branch as it was a non-reproducible
  Mercurial import.
* Scinterm now also comes with patches for Scintilla which we simply applied
  on our sciteco-rel-5-1-3 branch.
* Scintilla 5 outsourced its lexers into the Lexilla project.
  We added it as yet another submodule.
* All submodules have been moved into contrib/.
* The Scintilla API for setting lexers has consequently changed.
  We now have to call SCI_SETILEXER(0, CreateLexer(name)).
  As I did not want to introduce a separate command for setting lexers,
  &lt;ES&gt; has been extended to allow setting lexers by name with the SCI_SETILEXER
  message which effectively replaces SCI_SETLEXERLANGUAGE.
* The lexer macros (SCLEX_...) no longer serve any purpose - they weren't used
  in the SciTECO standard library anyway - and have consequently been removed
  from symbols-scilexer.c.
  The style macros from SciLexer.h (SCE_...) are theoretically still useful - even
  though they are not used by our current color schemes - and have therefore been
  retained. They can be specified as wParam in &lt;ES&gt;.
* &lt;ES&gt; no longer allows symbolic constants for lParam.
  This never made any sense since all supported symbols were always wParam.
* Scinterm supports new native cursor modes.
  They are not used for the time being and the previous CARETSTYLE_BLOCK_AFTER
  caret style is configured by default.
  It makes no sense to enable native cursor modes now since the
  command line should have a native cursor but is not yet a Scintilla view.
* The Scintilla upgrade performed much worse than before,
  so some optimizations will be necessary.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Previous Scintilla version was 3.6.4 and Scinterm was 1.7 (with lots of custom patches).
  All of the patches are now either irrelevant or have been merged upstream.
* Since Scintilla 5 requires C++17, this increases the minimum GCC version at least
  to 5.0. We may actually require even newer versions.
* I could not upgrade the scintilla-mirror (which was imported from Mercurial),
  so the old sciteco-dev branch was renamed to sciteco-dev-pre-v2.0.0,
  master was deleted and I reimported the entire Scintilla repo using
  git-remote-hg.
  This means that scintilla-mirror now contains two entirely separate trees.
  But it is still possible to clone old SciTECO repos.
* The strategy/workflow of maintaining hotfix branches on scintilla-mirror has been changed.
  Instead of having one sciteco-dev branch that is rebased onto new Scintilla upstream
  releases and tagging SciTECO releases in scintilla-mirror (to keep the commits referenced),
  we now create a branch for every Scintilla version we are based on (eg. sciteco-rel-5-1-3).
  This branch is never rebased or deleted. Therefore, we are guaranteed to be able to
  clone arbitrary SciTECO repo commits - not only releases.
  Releases no longer have to be tagged in scintilla-mirror.
  On the downside, fixup commits may accumulate in these new branches.
  They can only be squashed once a new branch for a new Scintilla release is created
  (e.g. by cherry-picking followed by rebase).
* Scinterm does no longer have to reside in the Scintilla subdirectory,
  so we added it as a regular submodule.
  There are no more recursive submodules.
  The Scinterm build system has not been improved at all, but we use
  a trick based on VPATH to build Scinterm in scintilla/bin/.
* Scinterm is now in Git and we reference the upstream repo for the
  time being.
  We might mirror it and apply the same branching workflow as with Scintilla
  if necessary.
  The scinterm-mirror repository still exists but has not been touched.
  We will also have to rewrite its master branch as it was a non-reproducible
  Mercurial import.
* Scinterm now also comes with patches for Scintilla which we simply applied
  on our sciteco-rel-5-1-3 branch.
* Scintilla 5 outsourced its lexers into the Lexilla project.
  We added it as yet another submodule.
* All submodules have been moved into contrib/.
* The Scintilla API for setting lexers has consequently changed.
  We now have to call SCI_SETILEXER(0, CreateLexer(name)).
  As I did not want to introduce a separate command for setting lexers,
  &lt;ES&gt; has been extended to allow setting lexers by name with the SCI_SETILEXER
  message which effectively replaces SCI_SETLEXERLANGUAGE.
* The lexer macros (SCLEX_...) no longer serve any purpose - they weren't used
  in the SciTECO standard library anyway - and have consequently been removed
  from symbols-scilexer.c.
  The style macros from SciLexer.h (SCE_...) are theoretically still useful - even
  though they are not used by our current color schemes - and have therefore been
  retained. They can be specified as wParam in &lt;ES&gt;.
* &lt;ES&gt; no longer allows symbolic constants for lParam.
  This never made any sense since all supported symbols were always wParam.
* Scinterm supports new native cursor modes.
  They are not used for the time being and the previous CARETSTYLE_BLOCK_AFTER
  caret style is configured by default.
  It makes no sense to enable native cursor modes now since the
  command line should have a native cursor but is not yet a Scintilla view.
* The Scintilla upgrade performed much worse than before,
  so some optimizations will be necessary.
</pre>
</div>
</content>
</entry>
<entry>
<title>CPP lexer: support *.ino files (Arduino IDE sketches)</title>
<updated>2017-11-16T21:25:23+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2017-11-16T21:25:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=df6c898e8e56886488951bc51967089003768b12'/>
<id>df6c898e8e56886488951bc51967089003768b12</id>
<content type='text'>
 * a proper Arduino lexer supporting the special Arduino keywords/classes
   could in principle be written, but for the time being they're treated
   just like regular C++ sources
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
 * a proper Arduino lexer supporting the special Arduino keywords/classes
   could in principle be written, but for the time being they're treated
   just like regular C++ sources
</pre>
</div>
</content>
</entry>
<entry>
<title>fixed Objective C++ lexing: it is now handled by cpp.tes</title>
<updated>2016-02-19T18:45:31+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2016-02-19T18:45:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=9f7f187f1860047c8cb24ca34552f31bf7a2c3ce'/>
<id>9f7f187f1860047c8cb24ca34552f31bf7a2c3ce</id>
<content type='text'>
 * the *.mm extension is for Objective C++. Therefore cpp.tes
   should be responsible.
 * Objective C keywords have been added to lexer.c.basekeywords.
   It does not hurt adding them to all C descendants.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
 * the *.mm extension is for Objective C++. Therefore cpp.tes
   should be responsible.
 * Objective C keywords have been added to lexer.c.basekeywords.
   It does not hurt adding them to all C descendants.
</pre>
</div>
</content>
</entry>
<entry>
<title>The "cpp" lexer configuration has been split into "c.tes" and "cpp.tes"</title>
<updated>2016-02-17T13:50:07+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2016-02-17T13:50:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=b091d8b4f34efe653b10bf681df6491ddb993527'/>
<id>b091d8b4f34efe653b10bf681df6491ddb993527</id>
<content type='text'>
 * The keyword list is too different in C when compared to C++.
   The many additional keywords are annoying when editing plain C
   files.
 * Underscored C99 and C11 keywords (like _Bool) have been added
   to the "c.tes" lexer configuration.
   The C++ language does not contain these keywords.
   However, C has stdbool.h to define bool which is part of standard C++.
 * Therefore a macro "lexer.c.basekeywords" has been defined for
   all languages __directly__ derived (more or less supersets) of C.
   It contains most of the C99/C11 standard header shortcuts.
 * Objective C lexing is set up by c.tes since Objective C is
   a relatively strict superset of C.
   All Objective C keywords are handled by c.tes.
   Since they begin with "@", this should not cause problems when
   editing plain C files.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
 * The keyword list is too different in C when compared to C++.
   The many additional keywords are annoying when editing plain C
   files.
 * Underscored C99 and C11 keywords (like _Bool) have been added
   to the "c.tes" lexer configuration.
   The C++ language does not contain these keywords.
   However, C has stdbool.h to define bool which is part of standard C++.
 * Therefore a macro "lexer.c.basekeywords" has been defined for
   all languages __directly__ derived (more or less supersets) of C.
   It contains most of the C99/C11 standard header shortcuts.
 * Objective C lexing is set up by c.tes since Objective C is
   a relatively strict superset of C.
   All Objective C keywords are handled by c.tes.
   Since they begin with "@", this should not cause problems when
   editing plain C files.
</pre>
</div>
</content>
</entry>
<entry>
<title>simplified "lexer.test..." macros using the $$ return command</title>
<updated>2016-02-17T12:11:58+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2016-02-17T12:11:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=6efa2ebd0e44b758740120374d63874beda7ba6a'/>
<id>6efa2ebd0e44b758740120374d63874beda7ba6a</id>
<content type='text'>
 * this is slightly more efficient than using repeated conditionals
 * the last :EN does not require a conditional, as its return
   value can simply be forwarded.
 * even without $$, this could have been done easier using
   a once-only loop and breaking out of the loop if :EN fails using :;.
   The last :EN result is still stored in QReg "_".
 * :EN could also be used to match header lines if lexer.tes would
   leave the first line (header line) in some Q-Reg, like the local
   .[header].
   However, repeated :ENs would be necessary as globbing currently
   does not support {...,...} expansions.
   Since sooner or later, the header line must be evaluated for some
   lexer.set macro, this is probably more efficient than the current
   solution using SciTECO patterns and [lexer.checkheader] could be removed
   as well.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
 * this is slightly more efficient than using repeated conditionals
 * the last :EN does not require a conditional, as its return
   value can simply be forwarded.
 * even without $$, this could have been done easier using
   a once-only loop and breaking out of the loop if :EN fails using :;.
   The last :EN result is still stored in QReg "_".
 * :EN could also be used to match header lines if lexer.tes would
   leave the first line (header line) in some Q-Reg, like the local
   .[header].
   However, repeated :ENs would be necessary as globbing currently
   does not support {...,...} expansions.
   Since sooner or later, the header line must be evaluated for some
   lexer.set macro, this is probably more efficient than the current
   solution using SciTECO patterns and [lexer.checkheader] could be removed
   as well.
</pre>
</div>
</content>
</entry>
<entry>
<title>lexer library: avoid unnecessary argument discards after SETLEXERLANGUAGE</title>
<updated>2016-02-15T14:00:55+00:00</updated>
<author>
<name>Robin Haberkorn</name>
<email>robin.haberkorn@googlemail.com</email>
</author>
<published>2016-02-13T14:09:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.fmsbw.de/sciteco/commit/?id=d836579118d8632f21f17bf02f29695ec2d57495'/>
<id>d836579118d8632f21f17bf02f29695ec2d57495</id>
<content type='text'>
 * causes problems with the $$ command implemented
 * was already fixed in scite2co.lua but the existing code
   was manually updated and generated with an earlier version of scite2co.lua
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
 * causes problems with the $$ command implemented
 * was already fixed in scite2co.lua but the existing code
   was manually updated and generated with an earlier version of scite2co.lua
</pre>
</div>
</content>
</entry>
</feed>
