From: Hugh Sasse Date: 2007-10-19T03:01:55+09:00 Subject: Improving 'syntax error, unexpected $end, expecting kEND'? I've had a look at this, but can't see how to do it: When I get syntax error, unexpected $end, expecting kEND I know from experience that $end means "end of file" and kEND means the lexical token "end". What I can't figure out from reading parse.c is how the stack works and how the rules are stored. I think knowing if it was expecting the 'end' from a 'class', 'def', 'begin' 'while', 'for', 'do', 'if', 'unless' or 'case' would help me narrow down where I've failed to have a closing "end". If there's line number information that would be even better. Indentation has not solved this for me. So is this too difficult, which is why is hasn't happened already? Meanwhile I'll just break up my program into smaller bits. Thank you, Hugh