-
Notifications
You must be signed in to change notification settings - Fork 0
johnbartholomew/brainfunc
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
brainfunc: a really bad brainfuck interpreter ============================================= Copyright (C) 2011, John Bartholomew <[email protected]> brainfunc compiles brainfuck code to bytecode and then interprets it. It also extends the language to provide 'functions'. Any functions must appear after the main body of the program (nothing else makes sense syntactically, as you'll see...) A function starts with an identifier immediately followed by a colon (no space or other characters are allowed between the identifier and the colon). A function ends when you define another function, or when the source code ends. An identifier not followed by a colon is a function call. Calls to a function may appear before the function itself: function resolution happens at the end of compilation. An identifier is matched by the expression ([a-zA-Z\_]\[a-zA-Z0-9\_]\*) The '#' character is used as a line comment marker, causing all further characters on that line to be ignored. By default, program source code size is limited to 1MB, and programs run with a 1MB tape. To allow movement left, programs start half way along the tape. The size limits can be changed by altering the #defines at the top of this file. The need for function resolution means that all source code must be available before the program begins execution (sorry about that). ---- LICENSE ---- It is released under the Do What The Fuck You Want To Public License DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004 Copyright (C) 2004 Sam Hocevar <[email protected]> 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 0. You just DO WHAT THE FUCK YOU WANT TO. ---- WARRANTY ---- This program is free software. It comes without any warranty, to the extent permitted by applicable law. You can redistribute it and/or modify it under the terms of the Do What The Fuck You Want To Public License, Version 2, as listed above. # vim: set ts=8 sts=4 sw=4 et noai:
About
A really bad brainfuck interpreter
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published