left.c 285 B

123456789101112131415161718
  1. #include <stdio.h>
  2. #define YY_INPUT(buf, result, max) \
  3. { \
  4. int c= getchar(); \
  5. result= (EOF == c) ? 0 : (*(buf)= c, 1); \
  6. if (EOF != c) printf("<%c>\n", c); \
  7. }
  8. #include "left.peg.c"
  9. int main()
  10. {
  11. printf(yyparse() ? "success\n" : "failure\n");
  12. return 0;
  13. }