#!/usr/bin/env perl print< #ifndef __GNUC__ #define __attribute__(x) /* unused */ #endif static char *asn1p_expr_type2str[] __attribute__ ((unused)) = { EOM while(<>) { chomp; next if(/TYPE_MAX/); next unless(/^[ \t]+(ASN_[A-Z]+_([A-Za-z0-9_]+))/); print "\t[ $1 ]\t = "; $_ = $2; if($_ eq "RELATIVE_OID") { print '"RELATIVE-OID"'; } else { s/_/ /; print '"'.$_.'"'; } print ",\n"; } print<= 0); if(type < sizeof(asn1p_expr_type2str)/sizeof(asn1p_expr_type2str[0])) return asn1p_expr_type2str[type]; return NULL; } #endif /* ASN1_PARSER_EXPR_STR_H */ EOM