On Sunday, 25 May 2003 at 17:26:28 +0900, Minero Aoki wrote: > Hi, > > In mail "How do I report line no. on errors with racc?" > Jim Freeze <jim / freeze.org> 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). Thanks. I'll take a look. BTW, can you add an example of this in your sample directory? -- Jim Freeze ---------- "It's Fabulous! We haven't seen anything like it in the last half an hour!" -- Macy's