LLmessage.c 516 B

123456789101112131415161718192021222324
  1. /*
  2. * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
  3. * See the copyright notice in the ACK home directory, in the file "Copyright".
  4. */
  5. /* $Id$ */
  6. /* PARSER ERROR ADMINISTRATION */
  7. #include "arith.h"
  8. #include "LLlex.h"
  9. #include "Lpars.h"
  10. extern char *symbol2str();
  11. LLmessage(tk) {
  12. if (tk < 0)
  13. error("garbage at end of line");
  14. else if (tk) {
  15. error("%s missing", symbol2str(tk));
  16. if (DOT != EOF) SkipToNewLine();
  17. DOT = EOF;
  18. }
  19. else
  20. error("%s deleted", symbol2str(DOT));
  21. }