misc.c 652 B

12345678910111213141516171819202122232425262728293031
  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. * Author: Ceriel J.H. Jacobs
  6. */
  7. /* M I S C E L L A N E O U S R O U T I N E S */
  8. /* stripped version from the one in the Modula-2 compiler */
  9. /* $Header$ */
  10. #include "f_info.h"
  11. #include "idf.h"
  12. #include "LLlex.h"
  13. struct idf *
  14. gen_anon_idf()
  15. {
  16. /* A new idf is created out of nowhere, to serve as an
  17. anonymous name.
  18. */
  19. static int name_cnt;
  20. char buff[100];
  21. char *sprint();
  22. sprint(buff, "#%d in %s, line %u",
  23. ++name_cnt, FileName, LineNumber);
  24. return str2idf(buff, 1);
  25. }