2020-05-15 22:44:49 -04:00
|
|
|
( strings being sent to parse routines are always null
|
|
|
|
terminated )
|
|
|
|
|
|
|
|
: (parsec) ( a -- n f )
|
|
|
|
( apostrophe is ASCII 39 )
|
2020-05-25 20:34:52 -04:00
|
|
|
DUP 1+ C@ 39 = OVER 3 + C@ 39 = AND ( a f )
|
2020-05-15 22:44:49 -04:00
|
|
|
NOT IF 0 EXIT THEN ( a 0 )
|
|
|
|
( surrounded by apos, good, return )
|
2020-05-25 20:34:52 -04:00
|
|
|
2+ C@ 1 ( n 1 )
|
2020-05-15 22:44:49 -04:00
|
|
|
;
|