Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 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 | |
Lev Walkin | da997b1 | 2017-08-04 01:38:41 -0700 | [diff] [blame] | 11 | #include "asn1p_integer.h" |
Lev Walkin | 4efbfb7 | 2005-02-25 14:20:30 +0000 | [diff] [blame] | 12 | #include "asn1p_list.h" |
| 13 | #include "asn1p_oid.h" /* Object identifiers (OIDs) */ |
Bi-Ruei, Chiu | 80fd306 | 2017-05-07 21:00:51 +0800 | [diff] [blame] | 14 | #include "asn1p_module.h" /* ASN.1 definition module */ |
Lev Walkin | 4efbfb7 | 2005-02-25 14:20:30 +0000 | [diff] [blame] | 15 | #include "asn1p_ref.h" /* References to custom types */ |
| 16 | #include "asn1p_value.h" /* Value definition */ |
Lev Walkin | a00d6b3 | 2006-03-21 03:40:38 +0000 | [diff] [blame] | 17 | #include "asn1p_param.h" /* Parameterization */ |
Lev Walkin | 4efbfb7 | 2005-02-25 14:20:30 +0000 | [diff] [blame] | 18 | #include "asn1p_constr.h" /* Type Constraints */ |
| 19 | #include "asn1p_xports.h" /* IMports/EXports */ |
Lev Walkin | 4efbfb7 | 2005-02-25 14:20:30 +0000 | [diff] [blame] | 20 | #include "asn1p_class.h" /* CLASS-related stuff */ |
| 21 | #include "asn1p_expr.h" /* A single ASN.1 expression */ |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 22 | |
| 23 | /* |
| 24 | * Parser flags. |
| 25 | */ |
| 26 | enum asn1p_flags { |
| 27 | A1P_NOFLAGS, |
| 28 | /* |
| 29 | * Enable verbose debugging output from lexer. |
| 30 | */ |
Lev Walkin | 7085305 | 2005-11-26 11:21:55 +0000 | [diff] [blame] | 31 | A1P_LEXER_DEBUG = 0x0001 |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 32 | }; |
| 33 | |
| 34 | /* |
| 35 | * Perform low-level parsing of ASN.1 module[s] |
| 36 | * and return a list of module trees. |
| 37 | */ |
| 38 | asn1p_t *asn1p_parse_file(const char *filename, |
| 39 | enum asn1p_flags); |
| 40 | asn1p_t *asn1p_parse_buffer(const char *buffer, int size /* = -1 */, |
| 41 | enum asn1p_flags); |
| 42 | |
Bi-Ruei, Chiu | 3dcf05b | 2017-05-04 21:45:05 +0800 | [diff] [blame] | 43 | int asn1p_lex_destroy(); |
Lev Walkin | d370e9f | 2006-03-16 10:03:35 +0000 | [diff] [blame] | 44 | |
Lev Walkin | f15320b | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 45 | #endif /* ASN1PARSER_H */ |