recognizers
A collection of recognizers
\
\ Purpose: Provide the not-found system hook
\
\ Author: Matthias Trute
\ Date: Oct 12, 2016
\ License: Public Domain
\
\ Add the rec:notfound as the last recognizer and
\ it will call a hook that must not return. The
\ default action just prints the name of the word
\ and throws an exception.
\ the general system hook
defer not-found
\ and its default action
:noname ( addr len -- )
." not-found: " type -13 throw ; is not-found
' not-found dup dup recognizer: r:notfound
: rec:notfound ( addr len -- r:notfound )
r:notfound
;
by mtrute
Versions
2.1.0, 2.0.0, 1.4.5, 1.4.4, 1.4.3, 1.4.2, 1.4.1, 1.4.0, 1.3.2, 1.3.1, 1.3.0, 1.2.1, 1.2.0, 1.1.0, 1.0.1, 1.0.0
Download current as zip
Tags
recognizer, recognizerstack, stack
Dependencies
ttester 1.x.x, stack 1.x.x
Dependents
None