--- gforth/prims2x.fs 2001/03/01 14:27:22 1.88 +++ gforth/prims2x.fs 2001/03/11 21:47:27 1.90 @@ -1013,6 +1013,15 @@ s" IP" save-mem w s" error don't use # o combined prim-c-name 2@ type ." */" cr ; +: output-forth-peephole ( -- ) + combined-prims num-combined @ 1- cells combinations search-wordlist + s" the prefix for this combination must be defined earlier" ?print-error + execute prim-num @ 5 .r + combined-prims num-combined @ 1- th @ prim-num @ 5 .r + combined prim-num @ 5 .r ." prim, \ " + combined prim-c-name 2@ type + cr ; + \ the parser @@ -1167,7 +1176,7 @@ Variable c-flag )) <- simple-primitive ( -- ) (( {{ init-combined }} - ` = (( white ++ {{ start }} forth-ident {{ end add-prim }} )) ++ + ` = white ** (( {{ start }} forth-ident {{ end add-prim }} white ** )) ++ nleof {{ process-combined }} )) <- combined-primitive