-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Recognizer v4 API suggests to use the prefix rec- for names of recognizers. E.g. rec-num or rec-nt.
A disadvantage is that it's a truncated English word, and it appears as a noun at the first glance — due to association to "record" or "recognizer". And also due to "rectype" term that is noun. But by convention, it should be a verb for such a Forth word (or an abbreviation to a verb at least).
I would suggest to use the complete English word and the prefix recognize- for such words. E.g. recognize-nt.
Concerning the second part, it's better if it is either a complete English noun, or an appropriate data type symbol from the standard types.
E.g. recognize-number, recognize-double, recognize-float, recognize-xt, recognize-word.
If we need to recognize the different lexeme formats for the same token, we can use the third part. E.g. recognize-float-e to recognize a float from a literal representation (lexeme) contains e symbol only, recognize-double-dot to recognize double-cell number from a literal that has a trailing dot only, etc.
recognize-word can be a compound recognizer that can return ( xt td-xt ), or ( xt td-xt-imm ), or ( xt1 xt2 td-xt-dual ) or ( nt td-nt ).