081981692421f02fe3984077dd0ab4bf1b1e5a92
[com/asn1c.git] / libasn1parser / asn1parser.h
1 /*
2  * This is a parser of the ASN.1 grammar.
3  */
4 #ifndef ASN1PARSER_H
5 #define ASN1PARSER_H
6
7 #ifdef  HAVE_CONFIG_H
8 #include "config.h"
9 #endif  /* HAVE_CONFIG_H */
10
11 #include "asn1_ref.h"
12 #include "asn1_buffer.h"
13 #include "asn1_namespace.h"
14
15 #include "asn1p_integer.h"
16 #include "asn1p_list.h"
17 #include "asn1p_oid.h"          /* Object identifiers (OIDs) */
18 #include "asn1p_module.h"       /* ASN.1 definition module */
19 #include "asn1p_value.h"        /* Value definition */
20 #include "asn1p_param.h"        /* Parameterization */
21 #include "asn1p_constr.h"       /* Type Constraints */
22 #include "asn1p_xports.h"       /* IMports/EXports */
23 #include "asn1p_class.h"        /* CLASS-related stuff */
24 #include "asn1p_expr.h"         /* A single ASN.1 expression */
25
26 /*
27  * Parser flags.
28  */
29 enum asn1p_flags {
30     A1P_NOFLAGS,
31     /*
32      * Enable verbose debugging output from lexer and parser.
33      */
34     A1P_DEBUG_LEXER = 0x01,
35     A1P_DEBUG_PARSER = 0x02,
36     /*
37      * Unlock internal helper value types.
38      */
39     A1P_EXTENDED_VALUES = 0x04
40 };
41
42 /*
43  * Perform low-level parsing of ASN.1 module[s]
44  * and return a list of module trees.
45  */
46 asn1p_t *asn1p_parse_file(const char *filename,
47         enum asn1p_flags);
48 asn1p_t *asn1p_parse_buffer(const char *buffer, int size /* = -1 */,
49         const char *debug_filename, int initial_lineno,
50         enum asn1p_flags);
51
52 extern const char *asn1p_parse_debug_filename;
53
54 int asn1p_lex_destroy();
55
56 #endif  /* ASN1PARSER_H */