RetroShare/supportlibs/pegmarkdown/peg-0.1.9/examples/username.leg
2012-12-09 12:12:57 +00:00

15 lines
162 B
Plaintext

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