l_brace.str 957 B

12345678910111213141516171819202122232425262728
  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. /* To determine the minimum scope of a local variable, all (braced)
  7. scopes are numbered consecutively. Next we maintain an array which
  8. maps the nesting depth (level) onto the scope number; we record
  9. the scope number of the first application of a local variable
  10. in its definition. Each further application requires that the
  11. level of the variable be at least large enough to comprise both
  12. the present scope and that of its first application. That level
  13. number is determined by searching the array and is then recorded in
  14. the definition (beacuse it is always equal to or smaller than the
  15. level already there).
  16. The array is implemented as a linked list of struct brace.
  17. */
  18. struct brace {
  19. struct brace *next;
  20. int br_count;
  21. int br_level;
  22. };
  23. /* ALLOCDEF "brace" 10 */