All of the tokens I pass to Lemon are structures that have line number information attached. 

Look at the syntax\_error definition below

```
%name SinkParser
%token_prefix SINKPARSER_TOKEN_

%token_type {SinkParserNode*}

%extra_argument { SinkParserContext *parser_context }
%syntax_error {
  SinkParser_SyntaxError(parser_context);
}
%token_destructor { SinkParserNode_Destruct($$); }

```

However I don't see how to report what file and line the error was. I have the information on all tokens but how do I access the appropriate one in the syntax\_error handler?

Do I need to separately keep track of my place in the tokenizer and peek at it in the syntax error? I realize that the tokenizer will probably be ahead of the parser by the time it hits syntax error.