YAZ-ASNCOMP(1)
π YAZ-ASNCOMP π
okay bestie, gather round, because today we're talking about yaz-asncomp from the Commands manual β the YAZ ASN.1 compiler, no cap. she's written in Tcl (any version of Tcl works, she's very chill like that) and she is genuinely iconic for what she does. let's get into it β¨
β¨ SYNOPSIS β¨
yaz-asncomp [-v] [-c cfile] [-h hfile] [-p pfile] [-d config]
[-I includeout] [-i includedir] [-m module] [filename]
π¦ DESCRIPTION π¦
so yaz-asncomp is an ASN.1 compiler. she reads an ASN.1 specification in filename and, in return, produces C/C++ definitions plus BER encoders/decoders for it. it's giving translator energy. π
the produced C/C++ code and header files use the ODR module of YAZ β that's the library that encodes/decodes/prints BER packages, iykyk.
yaz-asncomp lets you specify the name of the resulting source via options. alternatively, you can specify a DEFINITIONS file, which provides customized output to many output files β super handy if the ASN.1 specification file consists of many modules. π«Ά
fr fr, this utility is written in Tcl. any version of Tcl should work. lowkey iconic of her.
π OPTIONS π
-vβ makes the ASN.1 compiler print more verbose about the various stages of operations. she's a talker and we love that for her. π£οΈ-c cfileβ specifies the name of the C/C++ file with encoders/decoders.-h hfileβ specifies the name of header file with definitions.-p pfileβ specifies the name of the a private header file with definitions. by default all definitions are put in header file (option-h). bestie, note the default: everything goes in-hunless you say otherwise. πΈ-d dfileβ specifies the name of a definitions file.-I ioutβ specifies first part of directory in which header files are written.-i idirβ specifies second part of directory in which header files are written.-m moduleβ specifies that ASN.1 compiler should only process the module given. if this option is not specified, all modules in the ASN.1 file are processed. main character energy only when asked. π
π DEFINITIONS FILE π
the definitions file is really a Tcl script, but it follows traditional rules for Shell like configuration files. that means:
#denotes the beginning of a comment- definitions are line oriented
the definitions files usually consist of a series of variable assignments of the form:
set name value
available variables, babes, are:
default-prefixβ sets prefix for names in the produced output. the value consists of three tokens: C function prefix, C typedef prefix and preprocessor prefix respectively.prefix(module)β this value sets prefix values for module module. the value has same form asdefault-prefix.filename(module)β specifies filename for C/header file for module module.init(module,h)β code fragment to be put in first part of public header for module module.body(module,h)β code fragment to be put in last part of public header for module module (trailer).init(module,c)β code fragment to be put in first part of C based encoder/decoder for module module.body(module,c)β code fragment to be put in last part of C based encoder/decoder for module module (trailer).map(module,name)β maps ASN.1 type in module module of name to value.membermap(module,name,member)β maps member member in SEQUENCE/CHOICE of name in module module to value. the value consists of one or two tokens. first token is name of C preprocessor part. second token is resulting C member name. if second token is omitted the value (one token) is both preprocessor part and C struct,union.unionmap(module,name,member)β maps member member in CHOICE of name in module module to value. value consists of two or three tokens. the first token is name of the integer in the union that is used as selector for the union itself. the second token is name of the union. the third token overrides the name of the CHOICE member; if omitted the member name is used.
π FILES π
/usr/share/yaz/z39.50/z.tcl/usr/share/yaz/z39.50/*.asn
π SEE ALSO π
yaz(7)- Section "The ODR Module" in the YAZ manual.
π AUTHORS π
Index Data
that's the whole page bestie, you ate it up. π run her, love her, and remember: this was YAZ 5.38.1, dated 10/16/2026 β periodt. πβ¨
π¦ where this page comes from
- arch rolling: yaz 5.38.1-1 Β· LicenseRef-yaz
- fedora 44: libyaz-devel 5.38.1-1.fc44 Β· BSD-3-Clause
- fedora 44: libyaz-devel 5.38.1-1.fc44 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms