-
Notifications
You must be signed in to change notification settings - Fork 2
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Or method enhancements #4
Comments
The right implementation of Should it be capable of implementation like this? (verbal-Expression-0 Or must it be implemented like this? (Verbal-Expression-0) The first requires If I went around this with the Racket implementation which currently is a Ben On Tue, Aug 13, 2013 at 7:12 AM, Patrice Ferlet notifications@github.hscsec.cnwrote:
|
Sorry for the late answer, I was out for 2 days. With my implementation, this tests:
should be call with distributed form:
"A" is evaluated 2 times if B is false I like your idea but I dislike the fact to have "var args" (optionnal argument) (certainly because I develop with Go :)) I have got another idea that is (I guess) more effective. I think that Or() method should get a VerbalExpression object as argument. And with should add a method named "And()" that accept VerbalExpression object. This is an example:
This should return:
This way, we can imaginate very complexe expressions that are seperated in several objects... I can prepare a branch to validate if that works |
This is as I did in my branch: See Or() and And() methods that accept VerbalExpression Objects as argument. My test: Other Test for basic "Or": |
Still working on implementatin, I see the whole implementation (excepting mine, but I'm wrong to implement this before speaking about with you) uses this kind of method:
I'm afraid that this one is not very usefull. It can be ok for simple test, but what about finding:
startofline, then "foo", then "bar", endofline
OR
startofline, then "bar", then "baz". endofline
My implementation does:
That returns:
I only record an array of "parts" to concatanate at compile time... My unittest work as expected.
That works with simple expressions, or multiple expressions...
The text was updated successfully, but these errors were encountered: