Php-brain-fuck is a project mainly written in PHP, based on the View license.
An interperter for BrainFuck in PHP
A over-engineered tokenizer / parser / interpreter for BrainFuck, Ook! and the Okke language (the Ook language with Ook replace by Okke).
|Tokenizer| - /(array)Token/-> |Parser| -/(array)ParseToken/-> |Interpreter| => |Virtual Machine|
Because I wanted to learn more about writing parsers / interpreters and my PM was named Okke, which reminded me of the Ook! language.
Note that this is a toy interpreter and does not have any optimizations, in fact it is not meant for production use.
If you use the [ command but do not provide a ] then the interpreter will assume that you meant to close it at the end of the file. So the following is completely valid: +++++++++++[-.
Note that this is still invalid syntax: ++++]
Thanks to Okke Harsta, my PM @ the SURFconext project by SURFnet for inspiration. Thanks to Martin Fowler for his book 'Domain Specific Languages'. Thanks to Marcello Duarte for helping me get started with Git and GitHub.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar 14 rue de Plaisance, 75014 Paris, France Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION