What does the "yy" in lex.yy.c stand for?
A:
Probably from YACC (Yet Another Compiler Compiler), which was used with Lex to implement quite a few compilers and similar programs. The Gnu equivalents are Bison and Flex, and look a lot more widespread now, so the connection may not be obvious.
David Thornley
2009-08-19 14:48:48
+6
A:
Lex was meant to be used in concert with Yacc. The history and details of this are detailed in Steven Johnson's paper Yacc: Yet Another Compiler Compiler. The Yacc parser uses only names beginning in "yy' - 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.
peterb
2009-08-19 14:52:51