Node 105
parse - this code may be simplified in such a way as to run word tag all the time and no need to jump to UP.
Source code
105 parse
tag? 00 -sn @b 30 over over and or ;
ign 03 tag? if ign ;
tok 06 tag? if dup or ! ! tok ; then then over -0t ;
hex 0B 0 tag? if drop over 2* 2* 2* 2* . + hex ;
name 10 tag? if drop over 2* 2* 2* 2* 2* 2* or name ;
then then nt0-0t push over ! pop over ;
un 18 @b 30 over over and or
if drop over dup 2* 2* . 2* . + un ; then nt0-tn drop over ;
dec 21 t ! @b dup 2D - or if drop un else un - 1 . +
then tn-0t ! 0 over ;
jump 2B n-n dup pop . + push ;
tag 2D 0t F and dup -9 . + . -if drop jump
tok ; tok ; ! name ; ! hex ; ! hex ; ! name ;
2/ dec ; ! name ; 2/ dec ; then ign ; 3D
init up b! right a! 2D tag dup push dup push dup push
dup push dup push dup push dup push dup push push 0 @b ; 48
3 l 4 d 0 ether
tag? 00 -sn @b 30 over over and or ;
ign 03 tag? if ign ;
tok 06 tag? if dup or ! ! tok ; then then over -0t ;
hex 0B 0 tag? if drop over 2* 2* 2* 2* . + hex ;
name 10 tag? if drop over 2* 2* 2* 2* 2* 2* or name ;
then then nt0-0t push over ! pop over ;
un 18 @b 30 over over and or
if drop over dup 2* 2* . 2* . + un ; then nt0-tn drop over ;
dec 21 t ! @b dup 2D - or if drop un else un - 1 . +
then tn-0t ! 0 over ;
jump 2B n-n dup pop . + push ;
tag 2D 0t F and dup -9 . + . -if drop jump
tok ; tok ; ! name ; ! hex ; ! hex ; ! name ;
2/ dec ; ! name ; 2/ dec ; then ign ; 3D
init up b! right a! 2D tag dup push dup push dup push
dup push dup push dup push dup push dup push push 0 @b ; 48
3 l 4 d 0 ether
Definitions
- tag?
- .
- ign
- .
- tok
- .
- upck
- .
- hex
- .
- name
- .
- un
- .
- dec
- .
- jump
- .
- tag
- .
- init
- Set registers A and B, fill return stack with address of word tag, place zero on stack, and jump to UP.