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