Ruby error messages often contain lexical constants with one-letter prefixes, for example:
syntax error, unexpected tIDENTIFIER, expecting kEND
Where do the t and k come from? Are there other letters? A master list of possible keywords?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
For questions like this, parse.y usually is the place to look. If memory serves, ‘t’ stands for token whereas ‘k’ signifies a keyword.
Here’s the different tokens that signify identifiers (in the sense of names for other things):
The only definition for
kENDI found with a quick search was fork_end: