The general parsing routine needed is:
[ FrenchNumber n; switch(NextWord()) { 'un', 'une': n=1; 'deux': n=2; 'trois': n=3; 'quatre': n=4; 'cinq': n=5; default: return -1; } parsed_number = n; return 1; ];