Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

naming: methods to switch the system's recognizer #3

Open
ruv opened this issue Jun 4, 2020 · 0 comments
Open

naming: methods to switch the system's recognizer #3

ruv opened this issue Jun 4, 2020 · 0 comments
Labels
naming Choosing names, the art

Comments

@ruv
Copy link
Collaborator

ruv commented Jun 4, 2020

Idea

The terms and words relations isomorphism.

a number — the number that is currently used as number-conversion base (radix) — set-base ( BASE ! in a traditional form)
a number — the number of significant digits currently used — set-precision
a list of word lists — the search order — set-order
a word list — the compilation word list (the wordlist that is used to append new words to) — set-current

a recognizer — the recognizer currently used by the Forth text interpreter — set-X

It is better if X would be a proper noun that is distinct from "recognizer".

X is the recognizer that currently used by the system (the Forth text interpreter) to recognize lexemes.

Words

Return the xt of X

name ( -- xt )

Some variants for name

  • recognizer
  • current-recognizer
  • forth-recognizer
  • system-recognizer
  • default-recognizer
  • discriminator
  • understander
  • perceptor

Set X to the recognizer identified by xt

name ( xt -- )

Some variants for name

  • set-X where X is a name from above.
    E.g.:
  • set-perceptor

Set X to be the combination of X and the recognizer identified by xt

name ( xt -- )

Some variants for name

  • enqueue-X
  • postpend-X
  • append-X
  • set-X-after
    E.g.:
  • set-perceptor-after

Set X to be the combination of the recognizer identified by xt and X

name ( xt -- )

Some variants for name

  • preempt-X
  • prepend-X
  • set-X-before
    E.g.:
  • set-perceptor-before

Undo the last changing of X

If it cannot be unchanged: if the Exception word set is provided, throw an exception (the code should be specified), otherwise an ambiguous condition exists.

name ( -- )

Some variants for name

  • undo-X
  • unset-X
  • revert-X
    E.g.:
  • undo-perceptor
  • unset-perceptor
  • revert-perceptor
@ruv ruv added the naming Choosing names, the art label Jun 5, 2020
@ruv ruv changed the title naming: change the current recognizer naming: methods to change the current recognizer Jun 6, 2020
@ruv ruv changed the title naming: methods to change the current recognizer naming: methods to switch the system's recognizer Aug 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
naming Choosing names, the art
Projects
None yet
Development

No branches or pull requests

1 participant