How to detect eof in ml-lex
问题 While writing a code in ml-lex we need to write to write the eof function val eof = fn () => EOF; is this a necessary part to write also if i want my lexer to stop at the detection of an eof then what should i add to the given function. Thanks. 回答1: The User’s Guide to ML-Lex and ML-Yacc by Roger Price is great for learning ml-lex and ml-yacc. The eof function is mandatory in the user declarations part of your lex definition together with the lexresult type as: The function eof is called by