Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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
2  
and I thought this was a vim question :P –  xenoterracide Nov 16 '10 at 11:07
add comment

1 Answer

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
5  
This SO question seems to agree –  Michael Mrozek Sep 7 '10 at 15:44
5  
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
add comment

Your Answer

 
discard

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.