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

General requirements and principles #18

Open
ruv opened this issue Oct 15, 2020 · 0 comments
Open

General requirements and principles #18

ruv opened this issue Oct 15, 2020 · 0 comments

Comments

@ruv
Copy link
Collaborator

ruv commented Oct 15, 2020

(under construction)

What variant is better among some two?

Definition: a lexical size for a program fragment is the number of lexemes in this fragment excluding comments.

If some two variants are equivalent in functionality (considering the required parts of functionality only), due to one can be implemented via another, we should take the variant that produces less summary lexical size.

If some A can be implemented via some B, and B can be implemented via A, then we should compare summary lexical code size of both variants of implementation, namely:

  1. basis A (in a system specific way), and B over A
  2. basis B (in a system specific way), and A over B

And take for basis a variant that produces the less summary lexical size.

Requirements

  1. Support of recognizers nesting.
    Nesting of recognizers is a case when a recognizer calls another particular recognizer, or calls the recognizer that the Forth text interpreter uses (i.e. the perceptor), and can behave dependently on what they are return. Example: news:rdpu54$pfn$1@dont-email.me.

To guarantee this ability, the recognizers shall not have side effects that are detectable by a standard program.

NB: if a recognizer calls the perceptor with the arguments that were passed to this recognizer, it can cause infinite indirect recursion in absence of a special care.

  1. An ability to override any system's recognizers (e.g., the system's recognizers for numbers and for Forth words).
    For example, it should provide a way to make recognizing numbers conaining dot as floating point numbers.

  2. (to be provided ... )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant