]>
Commit | Line | Data |
---|---|---|
3eb9473e | 1 | #ifndef astlib_h\r |
2 | #define astlib_h\r | |
3 | \r | |
4 | /*\r | |
5 | * astlib.h -- C ast_* library header\r | |
6 | *\r | |
7 | * SOFTWARE RIGHTS\r | |
8 | *\r | |
9 | * We reserve no LEGAL rights to SORCERER -- SORCERER is in the public\r | |
10 | * domain. An individual or company may do whatever they wish with\r | |
11 | * source code distributed with SORCERER or the code generated by\r | |
12 | * SORCERER, including the incorporation of SORCERER, or its output, into\r | |
13 | * commerical software.\r | |
14 | *\r | |
15 | * We encourage users to develop software with SORCERER. However, we do\r | |
16 | * ask that credit is given to us for developing SORCERER. By "credit",\r | |
17 | * we mean that if you incorporate our source code into one of your\r | |
18 | * programs (commercial product, research project, or otherwise) that you\r | |
19 | * acknowledge this fact somewhere in the documentation, research report,\r | |
20 | * etc... If you like SORCERER and have developed a nice tool with the\r | |
21 | * output, please mention that you developed it using SORCERER. In\r | |
22 | * addition, we ask that this header remain intact in our source code.\r | |
23 | * As long as these guidelines are kept, we expect to continue enhancing\r | |
24 | * this system and expect to make other tools available as they are\r | |
25 | * completed.\r | |
26 | *\r | |
27 | * SORCERER 1.00B\r | |
28 | * Terence Parr\r | |
29 | * AHPCRC, University of Minnesota\r | |
30 | * 1992-1994\r | |
31 | */\r | |
32 | #include <setjmp.h>\r | |
33 | #include "sorcerer.h"\r | |
34 | #include "sorlist.h"\r | |
35 | \r | |
36 | #define MaxTreeStackDepth 400\r | |
37 | \r | |
38 | #ifdef __USE_PROTOS\r | |
39 | extern SORAST *ast_make(SORAST *rt, ...);\r | |
40 | extern SORAST *ast_find_all(SORAST *t, SORAST *u, SORAST **cursor);\r | |
41 | extern int ast_match(SORAST *t, SORAST *u);\r | |
42 | extern void ast_insert_after(SORAST *a, SORAST *b);\r | |
43 | extern void ast_append(SORAST *a, SORAST *b);\r | |
44 | extern SORAST *ast_tail(SORAST *a);\r | |
45 | extern SORAST *ast_bottom(SORAST *a);\r | |
46 | extern SORAST *ast_cut_between(SORAST *a, SORAST *b);\r | |
47 | extern SList *ast_to_slist(SORAST *t);\r | |
48 | extern SORAST *slist_to_ast(SList *list);\r | |
49 | extern void ast_free(SORAST *t);\r | |
50 | extern int ast_scan(char *template, SORAST *tree, ...);\r | |
51 | extern int ast_nsiblings(SORAST *t);\r | |
52 | extern SORAST *ast_sibling_index(SORAST *t, int i);\r | |
53 | extern int ast_match_partial(SORAST *t, SORAST *u);\r | |
54 | #else\r | |
55 | extern SORAST *ast_make();\r | |
56 | extern SORAST *ast_find_all();\r | |
57 | extern int ast_match();\r | |
58 | extern void ast_insert_after();\r | |
59 | extern void ast_append();\r | |
60 | extern SORAST *ast_tail();\r | |
61 | extern SORAST *ast_bottom();\r | |
62 | extern SORAST *ast_cut_between();\r | |
63 | extern SList *ast_to_slist();\r | |
64 | extern SORAST *slist_to_ast();\r | |
65 | extern void ast_free();\r | |
66 | extern int ast_scan();\r | |
67 | extern int ast_nsiblings();\r | |
68 | extern SORAST *ast_sibling_index();\r | |
69 | extern int ast_match_partial();\r | |
70 | #endif\r | |
71 | \r | |
72 | #endif\r |