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