/* * $Header: /home/gene/icfp2001/source/RCS/lexer.c,v 1.2 2001/07/29 00:43:21 gene Exp $ */ #include #include #include int main () { int rc = 0; int c; printf ("("); while (rc == 0 && (c = fgetc (stdin)) != EOF) { if (c == '<') { printf ("\""); do { printf ("%c", c); } while (rc == 0 && (c = fgetc (stdin)) != EOF && c != '>'); printf ("%c\"\n", c); } else { printf ("#\\%c\n", c); } } printf (")\n"); return rc; } /* --- end of file --- */