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

Lifetime of qualified tokens #21

Open
ruv opened this issue Nov 13, 2024 · 0 comments
Open

Lifetime of qualified tokens #21

ruv opened this issue Nov 13, 2024 · 0 comments
Labels
requrement Requirements to specifications or API

Comments

@ruv
Copy link
Collaborator

ruv commented Nov 13, 2024

In some cases, the result of recognizing has a limited lifetime, after which it becomes invalid.

For example, if the result of recognizing the lexeme "foobar" from the input buffer is a string, the lifetime of this string is limited by the lifetime of the input buffer contents. As an opposite example, the lifetime of integer numbers is not limited.

Some plausible user-defined recognizer may return a token whose lifetime ends on the next time that recognizer is called or the next time it successfully recognizes a lexeme. This should be documented.

Thus, if the lifetime of a sub-type members of the qualified token type is limited, this must be specified for that sub-type.

@ruv ruv added the requrement Requirements to specifications or API label Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
requrement Requirements to specifications or API
Projects
None yet
Development

No branches or pull requests

1 participant