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