algollike.h 933 B

123456789101112131415161718192021222324252627
  1. /* This file is part of the software similarity tester SIM.
  2. Written by Dick Grune, Vrije Universiteit, Amsterdam.
  3. $Id: algollike.h,v 1.1 1997/06/20 12:03:11 dick Exp $
  4. */
  5. /* The class Algollike is a subclass of Language. It implements
  6. the routines InitLanguage, MayBeStartOfRun and CheckRun for
  7. ALGOL-like languages, in which it is meaningful and useful to
  8. isolate function bodies.
  9. It requires the user to define, preferably in Xlang.l, four token
  10. sets, represented as TOKEN[] and terminated by NOTOKEN:
  11. TOKEN NonFinals[] tokens that may not end a chunk
  12. TOKEN NonInitials[] tokens that may not start a chunk
  13. TOKEN Openers[] openers of parentheses that must balance
  14. in functions
  15. TOKEN Closers[] the corresponding closers, in the same order
  16. */
  17. #include "language.h"
  18. #include "token.h"
  19. extern const TOKEN NonFinals[];
  20. extern const TOKEN NonInitials[];
  21. extern const TOKEN Openers[];
  22. extern const TOKEN Closers[];