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