From: Michel Demazure Date: 2010-01-18T12:44:58+09:00 Subject: Re: racc error on new 1.9 hash syntax Aaron Patterson wrote: > On Sun, Jan 17, 2010 at 12:37:42AM +0900, Michel Demazure wrote: >> racc 1.4.6 does not understand when parsing " in: value " >> >> F:/Ruby19/lib/ruby/gems/1.9.1/gems/racc-1.4.6/lib/racc/parser.rb:347:in >> `on_error': (Racc::ParseError) >> parse error on value "in" (kIN) > > Racc doesn't actually understand how to parse anything. Someone must > write a grammar that racc uses to generate a parser. > > You are seeing an error with the grammar file, not with Racc. What gem > are you using where you see this error? Can we get a larger stack > trace? Thanks for your answer. It comes from flog via ruby-parser (flay gives the same error): F:/Ruby19/lib/ruby/gems/1.9.1/gems/racc-1.4.6/lib/racc/parser.rb:347:in `on_error': (Racc::ParseError) parse error on value "in" (kIN) from F:/Ruby19/lib/ruby/gems/1.9.1/gems/racc-1.4.6/lib/racc/parser.rb:99:in `_racc_do_parse_c' from F:/Ruby19/lib/ruby/gems/1.9.1/gems/racc-1.4.6/lib/racc/parser.rb:99:in `do_parse' from F:/Ruby19/lib/ruby/gems/1.9.1/gems/ruby_parser-2.0.4/lib/ruby_parser_extras.rb:749:in `process' from F:/Ruby19/lib/ruby/gems/1.9.1/gems/flog-2.4.0/lib/flog.rb:176:in `block in flog' from F:/Ruby19/lib/ruby/gems/1.9.1/gems/flog-2.4.0/lib/flog.rb:170:in `each' from F:/Ruby19/lib/ruby/gems/1.9.1/gems/flog-2.4.0/lib/flog.rb:170:in `flog' from F:/Ruby19/lib/ruby/gems/1.9.1/gems/flog-2.4.0/bin/flog:11:in `' from F:/Ruby19/bin/flog:19:in `load' from F:/Ruby19/bin/flog:19:in `
' Of course, 'in' is also a keyword. When using a key which is not a keyword, the error happens when parsing the colon. -- Posted via http://www.ruby-forum.com/.