https://ideone.com/a42kXa
: s, ( au-) dup c, here swap dup allot move ;
: s+ ( a-a) count + ;
\ verses: tag c, beast s, aside s, len c,
: v: ( u-) here >r c, parse-name s, 10 parse s, here r> - c, ;
: v+ ( a-a) 1+ s+ s+ 1+ ;
: v- ( a-a) 1- dup c@ - ;
: tag ( au-af) over c@ = ;
Create fly
1 v: fly I don't know why she swallowed a fly, perhaps she'll die.
1 v: spider It wiggled and jiggled and tickled inside her.
0 v: bird How absurd, to swallow a bird.
0 v: cat Imagine that! She swallowed a cat!
0 v: dog What a hog to swallow a dog.
0 v: goat She just opened her throat and swallowed that goat.
0 v: cow I don't know how she swallowed that cow.
2 v: horse.. She's dead, of course.
: twaolwsa ( -) ." There was an old lady who swallowed a " ;
: sst ( -) ." She swallowed the " ;
: tct ( -) ." to catch the " ;
: dot ( -) '.' emit ;
: beast ( a-a) dup 1+ count type ;
: aside ( a-a) cr dup 1+ s+ count type ;
: ?aside ( a-a) 1 tag if aside then ;
: reason- ( a-a) cr sst beast tct v- beast dot ?aside ;
: reasons ( a-a) dup begin reason- dup fly = until drop ;
: lyric ( a-a) cr cr twaolwsa beast dot aside ;
: verses ( a-a) begin lyric reasons v+ 2 tag until ;
: song ( -) fly lyric v+ verses lyric drop ;
song