Contributions of all kinds are welcome: feedback, PRs, reviews, ideas, bug reports, etc.
Please review and accept our code of conduct prior to engaging in the project.
Consult the design_notes.md
to see the latest codified
design philosophy and principles.
-
Install swi-prolog's swipl.
- Optionally, you may wish to use swivm to manage multiple installed versions of swi-prolog.
-
Hack on the source code in
[./prolog](./prolog)
. -
Run and explore your changes by loading the file in
swipl
(or using your editors IDE capabilities):- Example in swipl
# in ~/oss/tokenize on git:develop x [22:45:02] $ cd ./prolog # in ~/oss/tokenize/prolog on git:develop x [22:45:04] $ swipl Welcome to SWI-Prolog (threaded, 64 bits, version 8.0.2) SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software. Please run ?- license. for legal details. For online help and background, visit http://www.swi-prolog.org For built-in help, use ?- help(Topic). or ?- apropos(Word). % lod the tokenize module ?- [tokenize]. true. % experiment ?- tokenize("Foo bar baz", Tokens). Tokens = [word(foo), space(' '), word(bar), space(' '), word(baz)]. % reload the module when you make changes to the source code ?- make. % Updating index for library /usr/local/Cellar/swi-prolog/8.0.2/libexec/lib/swipl/library/ true. % finished ?- halt.
Please ask here or in ##prolog
on freenode if you
need any help! :)
Tests are located in the ./test
directory. To run the test suite,
simply execute make test:
$ make test
% PL-Unit: tokenize .. done
% All 2 tests passed
If inside the swipl repl, make sure to load the test file and query run_tests.
?- [test/test].
?- run_tests.
% PL-Unit: tokenize .. done
% All 2 tests passed
true.