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