/PaaS/0
- get_pso
- evaluate
- source
- memory_map
- slice_contents
- slice
#!/usr/bin/env python3 | |
# gen-tags.py | |
# Generate a ctags compatible tags file for Parable | |
import fnmatch | |
import os | |
def tag(tag, file, line, textmate): |
'-' ':' describe | |
'-' 'nop' describe | |
'-' 'set-type' describe | |
'-' 'type?' describe | |
'-' '+' describe | |
'-' '-' describe | |
'-' '*' describe | |
'-' '/' describe | |
'-' 'rem' describe | |
'-' 'floor' describe |
BC_NOP = 000 | |
BC_SET_TYPE = 1 | |
BC_GET_TYPE = 2 | |
BC_ADD = 3 | |
BC_SUBTRACT = 4 | |
BC_MULTIPLY = 5 | |
BC_DIVIDE = 6 | |
BC_REMAINDER = 7 | |
BC_FLOOR = 8 | |
BC_POW = 9 |
0 'Confidence' var! | |
[ 'var?' ] { | |
[ 'Probability' ] :: | |
[ "s-s" dup first uppercase? [ &Probability increment ] if-true ] 'initial' : | |
[ "s-s" dup 1 fetch lowercase? [ &Probability increment ] if-true ] 'second' : | |
[ "s-s" dup lookup-function first remark? [ &Probability increment ] if-false drop ] 'no-comment?' : | |
[ "s-f" \ | |
0 !Probability \ |
"Various Geometric Conversions" | |
[ #0.0174532925 * ] 'degrees-to-radians' define | |
'( degrees - radians )\nConvert degrees to radians' 'degrees-to-radians' describe | |
[ #0.0174532925 / ] 'radians-to-degrees' define | |
'( radians - degrees )\nConvert radians to degrees' 'radians-to-degrees' describe | |
[ #3.14159 ] 'pi' define | |
'( - number )\nConstant; value for PI' 'pi' describe |
( 24-jan-2013 : revectoring experiment in retro ) | |
( ------------------------------------------------------- ) | |
( original goal was to capture a newline-delimited string ) | |
( looking in kernel.rx, i found newlines are converted to ) | |
( strings via remap:whitespace, and i decided to attempt ) | |
( revectoring this word to one that does nothing. ) | |
( ) | |
( had I paid a bit more attention, i might have noticed ) | |
( the variable called 'remapping'. the command: ) | |
( ) |
## OBERON SYNTAX TO COMPILE: | |
FOR x := start TO goal BY step DO | |
block | |
END; | |
## StringTemplate ( generating retro code ): | |
for_stmt(id, beg, end, step, block) ::= << | |
( FOR ) <id> |
( useful things ) | |
: dictionary.find/xt ( string:name - xt ) find [ @d->xt ] [ drop #0 ] if ; | |
: getc:internal ( -c ) &getc 2 + @ do ; | |
( keymap ) | |
9 variable: prefix:CHAR | |
create prefix:TABLE 256 allot | |
( We will lookup the keymap by name, to allow for per-application maps ) |
needs struct' | |
with struct' | |
variables| prefix lastbinding | | |
'; !prefix | |
{ | |
1 field .link | |
1 field .label |