I am new to sml and ml-lex. To convert string to real numbers we use the function real.fromstring. This is my code for conversion where yytext is an array of characters or a string.
getOpt ((Real.fromString(yytext)), 0.0);
I am using the above syntax in ml-lex for tokenising real numbers.
{real} => (REAL(getOpt ((Real.fromString(yytext)), 0.0)));
But i get the error,
math.lex.sml:5.234-5.240 Error: type constructor Assembly.option given 0 arguments, wants 1
Kindly, tell me what is wrong with the fromstring function.