From: Martin Duerst Date: 2007-10-25T16:04:18+09:00 Subject: Re: Improving 'syntax error, unexpected $end, expecting kEND'? At 16:57 07/10/24, David Flanagan wrote: >Thanks for filling these in Martin. I'm sorry, but I should have compiled these earlier. I actually get some warnings because some strings (e.g. "if", "do") appear multiple times. >I worry that this is such a simple thing that there must be some reason it wasn't done before.... Impact on performance? Breaking the Ripper code? One reason I suspect is yacc. As an example, http://dinosaur.compilertools.net/yacc/index.html, which gives explicit yacc syntax in appendix C, doesn't mention this facility. Regards, Martin. >It occurs to me that maybe the end-of-file line should just be > > end_of_file 0 > >instead of > > end_of_file 0 "end-of-file" > >that ought to get rid of the misleading quotes that make "end-of-file" appear like a keyword. I tried using "EOF" as the token name, but there was already a macro with that name and that messed everything up. > > David #-#-# Martin J. Du"rst, Assoc. Professor, Aoyama Gakuin University #-#-# http://www.sw.it.aoyama.ac.jp mailto:duerst@it.aoyama.ac.jp