JFlex: yyline/yycolumn stay 0 unless you declare %line/%column - track positions yourself
A JFlex-generated lexer does not maintain position counters unless you switch counting on. Add the directives %line and %column in the declarations section; only then do yyline/yycolumn hold the line/column (0-based, counted to the START of the current token). Without those directives the fields are never updated, so any error message built from them reports 0:0.
If you do not want the directives (they cost extra work per token), maintain the counters in your own actions. Two rules make this correct: 1. Capture the start line/column at the top of the action, BEFORE consuming the text. 2. Advance the counters by scanning the matched text: increment the line and reset the column on each newline char, otherwise increment the column.
Apply the same advance on skipped input (whitespace, comments, newlines), otherwise positions drift. Watch out: \n is LF only, so CRLF input leaves the \r unmatched unless it is part of the whitespace class (e.g. [ \t\r]+).