You may prefer to use a different recognizer sequence, but with (some of the) existing recognizers. You can use the following words for that:
The system recognizer: forth-recognize
is a defer
red
word that contains a recognizer (sequence). The system’s text
interpreter calls forth-recognize
.
Define name, a recognizer sequence that first searches
xtn and last searches xt1. name is a recognizer
itself, which makes recognizer sequences nestable. The order
of operands is inspired by get-order
and
set-order
.
You probably don’t want to create a new recognizer sequence every time you want to change the system recognizer sequence. There are two ways to change an existing recognizer sequence:
defer
red words in a recognizer sequence, and
change the recognizer in this word later. If you do not want such a
deferred word to recognize anything for now, put rec-nothing
in
it.
stack
(see User-defined Stacks), and you can use the words for
manipulating stacks on it. In particular, if you add a recognizer
with >stack
, that recognizer will be tried first; if you add it
with >back
, it will be tried last.
This recognizer recognizes nothing. It can be useful as a placeholder.
Here is an example of adding rec-nothing
as last recognizer to
the system recognizers: