Thanks! :) This is the current beta of YAKINDU Statechart Tools installed via update site into the stmcubeide. I‘m a developer there and preparing an example.
https://en.wikipedia.org/wiki/Finite-state_machine
Both links give quick but comprehensive introductions to the topic.
In short, it is a way to track states and transitions.
In your example: You parse a text character by character. You reach a single asterisk. At this point, there can be two possibilities (actually more than two, but let's keep it at that).
Such states can be described for any formatting you want to handle and the transitions can also be precisely described.
You might want to check out Yakindu Statechart tools: https://www.itemis.com/en/yakindu/state-machine/
You can draw your statemachine in a graphical editor and generate code for your target language like C++.