aboutsummaryrefslogtreecommitdiffstats
path: root/libasn1compiler/asn1c_lang.h
blob: 8c9a6ea70d12f3824cf7a16a552329fb622df458 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef	ASN1_COMPILER_LANGUAGE_H
#define	ASN1_COMPILER_LANGUAGE_H

struct arg_s;

typedef struct asn1_language_map_s {
	asn1p_expr_meta_e meta_match;		/* meta_type */
	asn1p_expr_type_e expr_match;		/* expr_type */
	/*
	 * A callback that would create a language-specific type declaration.
	 */
	int (*type_cb)(struct arg_s *arg);
} asn1_language_map_t;


extern asn1_language_map_t asn1_lang_map[AMT_EXPR_META_MAX][ASN_EXPR_TYPE_MAX];


typedef enum asn1c_target_language {
	ASN1C_LANGUAGE_C,
} asn1c_target_language_e;

/*
 * Initialize the compiler to generate specified target language.
 */
int asn1c_with_language(asn1c_target_language_e lang);

#endif	/* ASN1_COMPILER_LANGUAGE_H */