6.14.5.1 Default Recognizers

The standard Forth text interpreter recognizes words in the search order (rec-nt), integer numbers (rec-num), and floating point numbers (rec-float). By default Gforth also recognizes syntaxes for

You can use locate (see Locating source code definitions) to determine which recognizer recognizes a piece of source code. E.g.:

defer mydefer
locate ->mydefer

will show that rec-to recognizes ->mydefer. However, if the recognizer recognizes a dictionary word (e.g., the scope recognizer), locate will show that word.

You can see which recognizers are used and the order of recognizers with

.recognizers ( ) gforth-experimental “dot-recognizers”

Print the current recognizer order, with the first-searched recognizer leftmost (unlike .order). The inverted ~ is displayed instead of rec-, which is the common prefix of all recognizers.

Recognizers are typically designed to avoid matching the same strings as other recognizers. E.g., rec-env (the environment variable recognizer) requires braces to avoid a conflict with the number recognizer for input strings like $ADD. There are a few exceptions to this policy, however: