// Author : Gregory R. Olsen // Center for Design Research, Stanford University // 560 Panama Street // Stanford, CA 94305-2232 // olsen@cs.stanford.edu // Copyright (c) 1993 Stanford University. All rights reserved. /* * Permission is hereby granted, without written agreement and without * license, to use, copy, modify, and distribute this software and its * documentation for non-commercial use, provided that the above * copyright notice and the following two paragraphs appear in * all copies of this software. * * THIS SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. * * IN NO EVENT SHALL STANFORD UNIVERSITY BE LIABLE FOR ANY SPECIAL, * INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, * WHETHER OR NOT ADVISEDOF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY * OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ #include #include #include #include "KIFClass.h" #include "KIFGrammar.tab.h" #define MAXMESLEN 1024 extern expression *kif_parse(int, const char *); static int get_line2(FILE *id,char *line,int max) { int c,i; i=0; while ((c=getc(id)) != '\n' && c != EOF) if (ikifstring(); else tmp = strdup("Unparseable"); fprintf(stdout,"\nTest Print: <%s> %s\n\n",typeName(kif_obj),tmp); fflush(stdout); delete kif_obj; delete tmp; }