xref: /Universal-ctags/main/subparser_p.h (revision 9650c4ce6ee28a9c28dd3c4f76738c7dce66ec38)
1 /*
2  *
3  *  Copyright (c) 2017, Red Hat, Inc.
4  *  Copyright (c) 2017, Masatake YAMATO
5  *
6  *  Author: Masatake YAMATO <yamato@redhat.com>
7  *
8  *   This source code is released for free distribution under the terms of the
9  *   GNU General Public License version 2 or (at your option) any later version.
10  *
11  */
12 #ifndef CTAGS_MAIN_SUBPARSER_PRIVATE_H
13 #define CTAGS_MAIN_SUBPARSER_PRIVATE_H
14 
15 /*
16 *   INCLUDE FILES
17 */
18 #include "general.h"  /* must always come first */
19 
20 #include "colprint_p.h"
21 #include "dependency_p.h"
22 #include "types.h"
23 
24 /*
25 *   FUNCTION PROTOTYPES
26 */
27 extern subparser *getFirstSubparser(struct slaveControlBlock *controlBlock);
28 extern langType getSubparserLanguage (subparser *s);
29 
30 /* A base parser doesn't have to call the following three functions.
31    The main part calls them internally. */
32 extern void notifyInputStart (void);
33 extern void notifyInputEnd   (void);
34 extern void notifyMakeTagEntry (const tagEntryInfo *info, int corkIndex);
35 
36 extern void setupSubparsersInUse (struct slaveControlBlock *controlBlock);
37 extern subparser* teardownSubparsersInUse (struct slaveControlBlock *controlBlock);
38 
39 extern struct colprintTable * subparserColprintTableNew (void);
40 extern void subparserColprintAddSubparsers (struct colprintTable *table,
41 											struct slaveControlBlock *scb);
42 extern void subparserColprintTablePrint (struct colprintTable *table,
43 										 bool withListHeader, bool machinable, FILE *fp);
44 
45 extern void useDefaultSubparsers (struct slaveControlBlock *controlBlock);
46 extern void useSpecifiedSubparser (struct slaveControlBlock *controlBlock, subparser *s);
47 
48 #endif	/* CTAGS_MAIN_SUBPARSER_PRIVATE_H */
49