ref: 6971398c0518da1507146cc65827b5dbf8e71c01 dir: /examples/username.leg/
%{ #include <unistd.h> %} start = "username" { printf("%s", getlogin()); } | < . > { putchar(yytext[0]); } %% int main() { while (yyparse()); return 0; }