Execute Brain****/E: Difference between revisions

m
Fixed syntax highlighting.
(New page: {{implementation|Brainf***}}{{collection|RCBF}}Category:E This BF implementation compiles BF programs into functions (from strings to strings) in the host language, E. It has a fixed...)
 
m (Fixed syntax highlighting.)
 
(2 intermediate revisions by 2 users not shown)
Line 1:
{{implementation|Brainf***}}{{collection|RCBF}}[[Category:E]]
 
This [[Brainf***|BF]] implementation compiles BF programs into functions (from strings to strings) in the host language, [[E]].
 
It has a fixed-size memory defined in terms of characters, not bytes, and initialized to the null character. It does not permit the BF program to notice EOF.
 
<langsyntaxhighlight lang="e">pragma.syntax("0.9")
pragma.enable("accumulator")
 
Line 80:
}
`.eval(safeScope)
}</langsyntaxhighlight>
 
Example usage:
 
<langsyntaxhighlight lang="e">? def incr3 := bfCompiler(",>,>,><<<[+.>]")
# value: <BF function>
 
? incr3("abc")
# value: "bcd"</langsyntaxhighlight>
9,482

edits