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