# $/kEND parse error nightmare

**URL:** <https://www.ruby-forum.com/t/kend-parse-error-nightmare/56548>\
**Category:** Ruby\
**Created:** [April 1, 2006, 12:48am UTC](https://www.ruby-forum.com/t/kend-parse-error-nightmare/56548 "2006-04-01T00:48:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kurt\_VSHindenburg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/ecb155/32.png) [@Kurt\_VSHindenburg](https://www.ruby-forum.com/u/Kurt_VSHindenburg)\
**Post date:** [April 1, 2006, 12:48am UTC](https://www.ruby-forum.com/t/kend-parse-error-nightmare/56548/1 "2006-04-01T00:48:24Z")

</div>

Hello,  
In all the time I’ve used Ruby, I’ve never come across such an  
aggravating,  
uninformative error message… argh!

parse error, unexpected $, expecting kEND

wtf?

Regards,  
Kurt

% ruby --version  
ruby 1.8.4 (2005-12-24) [sparc-linux]

---

<div class="post-metadata">

**Author:** ![Kurt\_VSHindenburg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/ecb155/32.png) [@Kurt\_VSHindenburg](https://www.ruby-forum.com/u/Kurt_VSHindenburg)\
**Post date:** [April 1, 2006, 1:31am UTC](https://www.ruby-forum.com/t/kend-parse-error-nightmare/56548/2 "2006-04-01T01:31:02Z")

</div>

On Mar 31, 2006, at 5:45 PM, Kurt V. Hindenburg wrote:

> parse error, unexpected $, expecting kEND

This means, unexpected end of line, (or possibly end of file) I was  
expecting to see the keyword “end”

---

<div class="post-metadata">

**Author:** ![Kurt\_VSHindenburg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/ecb155/32.png) [@Kurt\_VSHindenburg](https://www.ruby-forum.com/u/Kurt_VSHindenburg)\
**Post date:** [April 1, 2006, 11:01am UTC](https://www.ruby-forum.com/t/kend-parse-error-nightmare/56548/3 "2006-04-01T11:01:09Z")

</div>

Kurt V. Hindenburg ha scritto:

> Hello,  
> In all the time I’ve used Ruby, I’ve never come across such an aggravating,  
> uninformative error message… argh!
> 
> parse error, unexpected $, expecting kEND
> 
> wtf?

notice that before bison 2.0 you did not had neither this messages 🙂

I reported the strange messages around ruby-talk:179793 and matz said he  
did not know of a way to get better error messages.

In ruby-talk:182173 I reported that there is a siple solution, at least  
for some things, but I don’t know if someone in ruby-core/dev ever read  
or considered that, I guess providing a patch to parse.y would be  
helpful 🙂

---

<div class="post-metadata">

**Author:** ![Kurt\_VSHindenburg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/ecb155/32.png) [@Kurt\_VSHindenburg](https://www.ruby-forum.com/u/Kurt_VSHindenburg)\
**Post date:** [April 2, 2006, 3:09am UTC](https://www.ruby-forum.com/t/kend-parse-error-nightmare/56548/4 "2006-04-02T03:09:11Z")

</div>

gabriele renzi wrote:

> In ruby-talk:182173 I reported that there is a siple solution, at least  
> for some things, but I don’t know if someone in ruby-core/dev ever read  
> or considered that, I guess providing a patch to parse.y would be  
> helpful 🙂

Hi,

With the help of your mail about how to add descriptive names to tokens  
I wrote a patch and sent it to ruby-core 🙂  
[http://ruby-talk.org/cgi-bin/scat.rb/ruby/ruby-core/7653](http://ruby-talk.org/cgi-bin/scat.rb/ruby/ruby-core/7653)

Regards,  
Robin S.

---

<div class="post-metadata">

**Author:** ![Kurt\_VSHindenburg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/ecb155/32.png) [@Kurt\_VSHindenburg](https://www.ruby-forum.com/u/Kurt_VSHindenburg)\
**Post date:** [April 2, 2006, 1:21pm UTC](https://www.ruby-forum.com/t/kend-parse-error-nightmare/56548/5 "2006-04-02T13:21:37Z")

</div>

Robin S. ha scritto:

> Hi,
> 
> With the help of your mail about how to add descriptive names to tokens  
> I wrote a patch and sent it to ruby-core 🙂  
> [http://ruby-talk.org/cgi-bin/scat.rb/ruby/ruby-core/7653](http://ruby-talk.org/cgi-bin/scat.rb/ruby/ruby-core/7653)

well, great, I was hoping for something like this 🙂
