%interactive
%filenames scanner

%%

[ \t]+                          // Often used: skip white space

[0-9]+                          {
                                    *d_val = atoi(matched().c_str());
                                    return Parser::NR;
                                }

.|\n                            {
                                    d_loc->first_line = lineNr() - 1;
                                    return matched()[0];
                                }
