Toki Pona is a constructed, minimal language. This parser based on swi-prolog and definite clause grammars (dcg) and supports spelling, grammar check and ambiguity check of Toki Pona sentences.
Enter io loop upon start, so the user does not have to type
"check_grammar(P)." for every single line.
This needed a check, if compilation was going on. We must not run the io loop when compiling otherwise the compilation would not terminate. I did this by checking for the '--stand-alone' flag. If the flag has been used to call swipl, the loop is not started.
Enter io loop upon start, so the user does not have to type "check_grammar(P)." for every single line.
This needed a check, if compilation was going on. We must not run the io loop when compiling otherwise the compilation would not terminate. I did this by checking for the '--stand-alone' flag. If the flag has been used to call swipl, the loop is not started.