编译原理 flex 代码输出问题

用flex编写自动机时,要求
若代码中存在指数数字的词法错误,要求输出错误信息,格式为 Error type A at Line [行号]: Illegal floating point number “[错误的指数单词]”.。

输入:

int main()

{

float i = 1.0005e;

}

输出:

Error type A at Line 3: Illegal floating point number "1.0005e".

要添加什么才能在读到error_float时跳出并输出上述信息

{definitions}
%%
{rules}
%%
{user subroutines}