• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

asn1c/H17-Sep-2014-10,0027,918

doc/H03-May-2022-2,2231,860

examples/H03-May-2022-30,24227,263

libasn1compiler/H17-Sep-2014-6,3575,074

libasn1fix/H17-Sep-2014-7,2055,239

libasn1parser/H17-Sep-2014-16,58012,973

libasn1print/H17-Sep-2014-1,4781,256

m4/H17-Sep-2014-8,5247,682

skeletons/H17-Sep-2014-25,84618,626

tests/H03-May-2022-46,16039,198

.gitignoreH A D17-Sep-20141.1 KiB8266

.travis.ymlH A D17-Sep-201482 65

AUTHORSH A D17-Sep-201429 21

BUGSH A D17-Sep-20141.5 KiB3325

COPYINGH A D17-Sep-20141.4 KiB2827

ChangeLogH A D17-Sep-201421.6 KiB553432

FAQH A D17-Sep-20141.2 KiB4330

INSTALLH A D17-Sep-2014723 3119

MANIFESTH A D17-Sep-201489 109

Makefile.amH A D17-Sep-2014296 1610

Makefile.inH A D17-Sep-201424.6 KiB789696

READMEH A D17-Sep-20142.9 KiB8057

TODOH A D17-Sep-2014322 128

aclocal.m4H A D17-Sep-201436.3 KiB1,019916

asn1c.spec.inH A D17-Sep-20141.2 KiB5741

config.guessH A D17-Sep-201443.2 KiB1,5011,289

config.h.inH A D17-Sep-20142.8 KiB10976

config.subH A D17-Sep-201431.8 KiB1,6171,473

configureH A D17-Sep-2014450.5 KiB15,69113,287

configure.acH A D17-Sep-20143 KiB11194

depcompH A D17-Sep-201417.2 KiB585370

install-shH A D17-Sep-201412.9 KiB508340

ltconfigH A D17-Sep-201494.8 KiB3,0972,389

ltmain.shH A D17-Sep-2014276.1 KiB9,6377,288

missingH A D17-Sep-201410.9 KiB368275

mkinstalldirsH A D17-Sep-20143.4 KiB162112

stamp-h.inH A D17-Sep-201410 21

ylwrapH A D17-Sep-20146 KiB224124

README

1WHAT TO READ?
2=============
3
4If you haven't installed the asn1c yet, read the INSTALL file for
5a short installation guide.
6
7For the list of asn1c command line options, see `asn1c -h` or `man asn1c`.
8
9For more complete documentation on this compiler and on using the
10results of compilation phase, please look into asn1c-quick.pdf and
11asn1c-usage.{pdf,html}.
12If you are building the compiler from the sources, these documents reside
13in the ./doc directory, otherwise they lie nearby the README file you're
14reading right now.
15
16Please also read the FAQ file.
17
18An excellent book on ASN.1 is written by Olivier Dubuisson:
19"ASN.1 Communication between heterogeneous systems", ISBN:0-12-6333361-0.
20
21QUICK START (also check out asn1c-quick.pdf)
22============================================
23
24After building [and installing] the compiler (see INSTALL), you may use
25the asn1c command to compile the ASN.1 specification:
26
27	asn1c <module.asn1>			# Compile module
28
29If several specifications contain interdependencies, all of them must be
30specified:
31
32	asn1c <module1.asn1> <module2.asn1> ...	# Compile interdependent modules
33
34If you are building the asn1c from the sources, the ./examples directory
35contains several ASN.1 modules and a script to extract the ASN.1 modules
36from RFC documents. Refer to the README file in that directory.
37To compile the X.509 PKI module:
38
39	./asn1c/asn1c -P ./examples/rfc3280-*.asn1	# Compile-n-print
40
41In this example, -P option is used to instruct the compiler to print the
42compiled text on the standard output instead of creating multiple .c
43and .h files for every ASN.1 type found inside the specified ASN.1 modules.
44This is useful for debugging and test automation.
45
46The compiler -E and -EF options are used for testing the parser and
47the semantic fixer, respectively. These options will instruct the compiler
48to dump out the parsed (and fixed) ASN.1 specification as it was
49"understood" by the compiler. It might be useful for checking
50whether a particular syntactic construction is properly supported
51by the compiler.
52
53	asn1c -EF <module-to-test.asn1>		# Check semantic validity
54
55
56MODEL OF OPERATION
57==================
58
59The asn1c compiler works by processing the ASN.1 module specification
60in several stages:
611. In the first stage, the ASN.1 file is parsed.
62	(Parsing produces an ASN.1 syntax tree for the subsequent levels)
632. In the second stage, the syntax tree is "fixed".
64	(Fixing is a process of checking the tree for semantic errors,
65	 accompanied by the tree transformation into the canonical form)
663. In the third stage, the syntax tree is compiled into the target language.
67
68There are several command-line options reserved for printing the results
69after each stage of operation:
70
71	<parser> => print					(-E)
72	<parser> => <fixer> => print				(-E -F)
73	<parser> => <fixer> => <compiler> => print		(-P)
74	<parser> => <fixer> => <compiler> => save-compiled	[default]
75
76
77--
78Lev Walkin
79vlm@lionet.info
80