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