From: Minero Aoki Date: 2003-05-25T17:26:28+09:00 Subject: Re: How do I report line no. on errors with racc? Hi, In mail "How do I report line no. on errors with racc?" Jim Freeze wrote: > I am using racc to parse a file. I need to be able to > report a clear error message when a syntax error is > encountered. > > I don't think this can be done in the tokenizer (#parse) > and I don't see how on_error yields a line number. I don't think the parser can know the line number. If the tokenizer discards line terminators, how the parser counts line number? For example, the tokenizer reports line number in Racc (racc/raccs.rb). Regards, Minero Aoki