strlisp.c 539 B

12345678910111213141516171819202122232425262728
  1. #include <stdio.h>
  2. #include "./grammar.c"
  3. #define BUFSIZE 4096
  4. /* buffer to be used for user input */
  5. static char buf[BUFSIZE];
  6. int main(int argc, char** argv) {
  7. /* print version and exit info */
  8. printf("strlst lisp 0.1\n");
  9. //printf("<C-d> to signal EOF\n");
  10. printf("<C-c> to interrupt\n");
  11. /* lex loop */
  12. while (1) {
  13. /* prompt */
  14. fputs("strlisp> ", stdout);
  15. /* fill buffer */
  16. fgets(buf, BUFSIZE, stdin);
  17. printf("screw you for saying %s", buf);
  18. }
  19. return 0;
  20. }