Skip to content

Instantly share code, notes, and snippets.

@lsparrish
Created October 5, 2012 05:17
Show Gist options
  • Save lsparrish/3838227 to your computer and use it in GitHub Desktop.
Save lsparrish/3838227 to your computer and use it in GitHub Desktop.
: header' here @last' , !last' &.word , here 2 + , , ;
: :' getc dup putc header' 0 , 0 , ]] ;
variable c
: find' ( c-af ) !c last' repeat @ dup 0; 3 + @ @c = dup if; drop again ;
: d'' ( "-a) getc dup putc find' drop ;
: pair ( h-aa ) dup @d->xt swap @d->class ;
: start -1 repeat getc dup putc find' [ pair do ] ifTrue 0; again ;
:' a 1 putn ;
:' b 2 putn ;
:' c drop 0 ;
:' z bye ;
start abcz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment