blob: 8f1a3b2a18f54831220ff21f7dd6fdb1dfb5d7c5 [file] [log] [blame]
Lev Walkinf15320b2004-06-03 03:38:44 +00001/*
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 Walkinda997b12017-08-04 01:38:41 -070011#include "asn1p_integer.h"
Lev Walkin4efbfb72005-02-25 14:20:30 +000012#include "asn1p_list.h"
13#include "asn1p_oid.h" /* Object identifiers (OIDs) */
Bi-Ruei, Chiu80fd3062017-05-07 21:00:51 +080014#include "asn1p_module.h" /* ASN.1 definition module */
Lev Walkin4efbfb72005-02-25 14:20:30 +000015#include "asn1p_ref.h" /* References to custom types */
16#include "asn1p_value.h" /* Value definition */
Lev Walkina00d6b32006-03-21 03:40:38 +000017#include "asn1p_param.h" /* Parameterization */
Lev Walkin4efbfb72005-02-25 14:20:30 +000018#include "asn1p_constr.h" /* Type Constraints */
19#include "asn1p_xports.h" /* IMports/EXports */
Lev Walkin4efbfb72005-02-25 14:20:30 +000020#include "asn1p_class.h" /* CLASS-related stuff */
21#include "asn1p_expr.h" /* A single ASN.1 expression */
Lev Walkinf15320b2004-06-03 03:38:44 +000022
23/*
24 * Parser flags.
25 */
26enum asn1p_flags {
27 A1P_NOFLAGS,
28 /*
29 * Enable verbose debugging output from lexer.
30 */
Lev Walkin70853052005-11-26 11:21:55 +000031 A1P_LEXER_DEBUG = 0x0001
Lev Walkinf15320b2004-06-03 03:38:44 +000032};
33
34/*
35 * Perform low-level parsing of ASN.1 module[s]
36 * and return a list of module trees.
37 */
38asn1p_t *asn1p_parse_file(const char *filename,
39 enum asn1p_flags);
40asn1p_t *asn1p_parse_buffer(const char *buffer, int size /* = -1 */,
41 enum asn1p_flags);
42
Bi-Ruei, Chiu3dcf05b2017-05-04 21:45:05 +080043int asn1p_lex_destroy();
Lev Walkind370e9f2006-03-16 10:03:35 +000044
Lev Walkinf15320b2004-06-03 03:38:44 +000045#endif /* ASN1PARSER_H */