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

Look into implementing Recognisers. #57

Open
SirWumpus opened this issue Nov 4, 2024 · 4 comments
Open

Look into implementing Recognisers. #57

SirWumpus opened this issue Nov 4, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request future Long term goal.

Comments

@SirWumpus
Copy link
Owner

We come to consensus on a number of questions recently, and I just uploaded my reference implementation. I have checked, this implementation works in Post4 too.

@ruv is this the current recogniser proposal or are there more than one to consider?

@SirWumpus SirWumpus self-assigned this Nov 4, 2024
@SirWumpus SirWumpus added enhancement New feature or request future Long term goal. labels Nov 4, 2024
@ruv
Copy link
Contributor

ruv commented Nov 5, 2024

Yes, this is the current proposal, along with Common terminology for recognizers. At present, the proposal has not yet been updated following recent discussions.

@SirWumpus
Copy link
Owner Author

We come to consensus on a number of questions recently, and I just uploaded my reference implementation. I have checked, this implementation works in Post4 too.

@ruv Did you do anything special to test this? I presume you overrode the internal REPL with the recogniser's.

@ruv
Copy link
Contributor

ruv commented Nov 6, 2024

Did you do anything special to test this?

There are tests for recognizers: name.test.fth, number.test.fth, word.test.fth.

They can be run with well-known ttester.fth.

I presume you overrode the internal REPL with the recogniser's.

In this implementation nothing is overridden (at the moment). It provides example.interpret ( i*x "ccc" -- j*x ) and example.evaluate ( i*x sd -- j*x ) in example.interpret.fth.

Usage example:

example.interpret 2 3 + .
s" 2 3 + . " example.evaluate

In this code, 2 3 + . is interpreted using the recognizer recognize-forth-default (that is assigned to the perceptor).

@SirWumpus
Copy link
Owner Author

SideScuttal:

They can be run with well-known ttester.fth.

I have my own version test/assert.p4 that supports the same words and adds a few more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request future Long term goal.
Projects
None yet
Development

No branches or pull requests

2 participants