rubysolo/dentaku — pull request #9 by CraigCottingham (2013-12-11 18:45:47+00:00)
Title: Add support for external functions

commit 6c925e309c8460edaf1694e70b13abafbdab4b96
Merge: cff41dd 6802e34
Author: Craig S. Cottingham
Date: Wed Dec 11 12:40:34 2013 -0600

Merge branch 'master' of https://github.com/rubysolo/dentaku

commit cff41dd7a5abfdf5340c682fd354dd7928dceae3
Author: Craig S. Cottingham
Date: Wed Dec 11 11:05:43 2013 -0600

Add support for external functions

commit 7314695216f40c10141548b493ce4f00766f6b03
Author: Craig S. Cottingham
Date: Wed Dec 11 11:04:33 2013 -0600

Update README.md with documentation on adding external functions

commit 3690ddfd5dffeb0663548f094ee2bed8007d75e8
Author: Craig S. Cottingham
Date: Wed Dec 11 10:43:31 2013 -0600

Move external function specs to their own file

commit 5af8f0942b943fd4db0e43c62ececfe5fa09afe0
Author: Craig S. Cottingham
Date: Wed Dec 11 10:43:16 2013 -0600

Replace Rules#add_rules with #add_rule

commit d114c8213e112ac200a7a3e57250fc70211516dc
Author: Craig S. Cottingham
Date: Wed Dec 11 10:42:52 2013 -0600

Add Calculator#add_rule()

commit 644fc6549f514e310b48a1c462bf51c8d5ffc7a2
Merge: 2ef6081 5e15722
Author: Craig S. Cottingham
Date: Wed Dec 11 10:30:13 2013 -0600

Merge branch 'external_funcs' of github.com:CraigCottingham/dentaku into external_funcs

commit 2ef6081ee99a2e62475aec464de475ac9b537011
Author: Craig S. Cottingham
Date: Wed Dec 11 10:28:25 2013 -0600

Move more of the function's token pattern into Rules.add_rules

commit 6b5fc8dd3836a3fc101347836ffd64c6cdd19863
Author: Craig S. Cottingham
Date: Wed Dec 11 10:14:37 2013 -0600

Add specs to test external functions

commit 593209183a816b42b1dd9b2036638491e02ca0b9
Author: Craig S. Cottingham
Date: Wed Dec 11 09:47:01 2013 -0600

Return self from Calculator#add_rules()

Enables chaining.

commit 32fd542611ba7d4ac134e0902fb69537e5b47ee8
Author: Craig S. Cottingham
Date: Wed Dec 11 09:42:22 2013 -0600

Add external function bodies to Rules

commit 41619c9e2bfabdf1265d852cecad292b3996a20b
Author: Craig S. Cottingham
Date: Wed Dec 11 09:41:09 2013 -0600

Add initial support for calling external functions to Evaluator#evaluate_step()

commit 7447902c00276b9a6577ac0771ec6ce67f5de574
Author: Craig S. Cottingham
Date: Wed Dec 11 09:22:12 2013 -0600

Add add_rules method to Calculator

commit da45106fcf4b36704609d982ed512355239dce39
Author: Craig S. Cottingham
Date: Wed Dec 11 09:21:41 2013 -0600

Add self.add_rules to Rules to add new rules to the rulebase

New rules need to be added to the *beginning* of the rulebase. Is this a precedence thing?

commit 2925191d99e27b7bd76d890151a3e3bb41c0528c
Author: Craig S. Cottingham
Date: Wed Dec 11 09:03:56 2013 -0600

Add method_missing and respond_to_missing? to TokenMatcher

This will facilitate adding arbitrary functions at runtime. I don't much like returning true for everything in respond_to_missing?, so maybe a lookup table should be added later.

commit 5e157221fe4cbf7f0d2a26506eb57ab12bc1ba28
Author: Craig S. Cottingham
Date: Wed Dec 11 10:28:25 2013 -0600

Move more of the function's token pattern into Rules.add_rules

commit 86d14642fe2ed281053fb3927f4decfc2981c12b
Author: Craig S. Cottingham
Date: Wed Dec 11 10:14:37 2013 -0600

Add specs to test external functions

commit 0fbcd2b304b168a7f0c5c1ef164aedf79a395e4d
Author: Craig S. Cottingham
Date: Wed Dec 11 09:47:01 2013 -0600

Return self from Calculator#add_rules()

Enables chaining.

commit 0b7bf52b6e9d330c8b409d5ee92f61ebc26304ae
Author: Craig S. Cottingham
Date: Wed Dec 11 09:42:22 2013 -0600

Add external function bodies to Rules

commit b87e4a8fe737f818d0e892daad399d02dd1ea0c2
Author: Craig S. Cottingham
Date: Wed Dec 11 09:41:09 2013 -0600

Add initial support for calling external functions to Evaluator#evaluate_step()

commit 2d785c7fac3c7e8580eacb9f4eba09ecb25fb615
Author: Craig S. Cottingham
Date: Wed Dec 11 09:22:12 2013 -0600

Add add_rules method to Calculator

commit b233f788dbc45db6ae04244ae2400fb4ae881064
Author: Craig S. Cottingham
Date: Wed Dec 11 09:21:41 2013 -0600

Add self.add_rules to Rules to add new rules to the rulebase

New rules need to be added to the *beginning* of the rulebase. Is this a precedence thing?

commit 9c915aab3b35a6d9d55bc74918706391366754ef
Author: Craig S. Cottingham
Date: Wed Dec 11 09:03:56 2013 -0600

Add method_missing and respond_to_missing? to TokenMatcher

This will facilitate adding arbitrary functions at runtime. I don't much like returning true for everything in respond_to_missing?, so maybe a lookup table should be added later.

commit 88bc6836466a24789ff100d26eebda6a889641a6
Merge: 91e9600 e63b236
Author: Craig S. Cottingham
Date: Wed Dec 11 10:29:58 2013 -0600

Merge branch 'master' of github.com:CraigCottingham/dentaku

commit 91e9600e64118b6a30c1181dc3647114adf10f82
Author: Craig S. Cottingham
Date: Tue Dec 10 16:46:19 2013 -0600

Change the definition of a function to an identifier followed by an open parenthesis

This will make it a little easier to add more functions in the future.

commit 2bc381d6adf4e8f514b83f7cce09b3ca97e1af95
Author: Craig S. Cottingham
Date: Tue Dec 10 16:45:13 2013 -0600

Update documentation

commit c19c517607f088c99a8ae50abad9b046a3b6a95b
Author: Craig S. Cottingham
Date: Tue Dec 10 16:43:45 2013 -0600

Add more specs

commit 2820ce7ebefb3efd278e5ea8806dcdca539d1d1f
Author: Craig S. Cottingham
Date: Tue Nov 19 16:56:25 2013 -0600

Ignore RVM config files

commit d9eff2859908b3a2204ca4cff1418f2d73e81604
Author: Mark Brocato
Date: Sat Nov 9 17:12:13 2013 -0500

added support for % operator