Recognize Forth 2012 number syntax
authorHelmut Eller <eller.helmut@gmail.com>
Mon, 19 Dec 2016 20:45:50 +0000 (21:45 +0100)
committerHelmut Eller <eller.helmut@gmail.com>
Mon, 19 Dec 2016 20:45:50 +0000 (21:45 +0100)
commit40c6f87ff261cacf78377241c8746da1aaa504c5
treedcd0e45b1c3bd1394dadcda53962be74b203b661
parent1f02140179ae9dd0b5d7f477b514c5af8210bf80
Recognize Forth 2012 number syntax

Forth 2012 adds more convenient syntax for numbers and characters.

* csrc/pf_words.c (ffWord): Don't upcase input.  Without this
change we can't support the '<char>' syntax.
(ffNumberQ): Recgonize new syntax.

* fth/numerio.fth (>number-with-base): New helper.
(((NUMBER?))): Recognize new syntax.

* fth/t_corex.fth: Add test for number prefixes, from Gerry Jackson's
Forth2012 test suite.
csrc/pf_words.c
fth/numberio.fth
fth/t_corex.fth