Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Since history questions are considered on topic, I figured I'd ask one that's been bugging me for quite some time and no one I know seems to know the answer. Does anyone know what the historical significance is of the prefix yy? Most of the variables and functions generated by lex start with it, such as yylval, and yylex(). I also remember seeing a utility named yyrsa somewhere, but can't find references to it anywhere now. Inquiring minds want to know!

share|improve this question
and I thought this was a vim question :P – xenoterracide Nov 16 '10 at 11:07
up vote 8 down vote accepted

I think it has something to do with yacc, which has files ending in .y, and requires a function called yylex.

share|improve this answer
This SO question seems to agree – Michael Mrozek Sep 7 '10 at 15:44
Quoting @peterb's response in the SO post linked by Michael, "there's no apparent meaning discussed beyond simply desiring a namespace. The "yy" in lex.yy.c indicates that the lex output is intended for a yacc parser." Thanks guys! – Timothy Sep 7 '10 at 15:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.