Commit Graph

170 Commits

Author SHA1 Message Date
Lev Walkin 840fb8e37b debug origin lines 2017-11-20 19:41:23 -08:00
Lev Walkin 5e73c5058b add missing member 2017-10-26 00:38:43 -07:00
Lev Walkin 836686167d fix after UPER round-trip fuzz 2017-10-21 00:24:31 -07:00
Bi-Ruei, Chiu 156b0feb5c Fix duplication of selector functions
There will be two selector functions generated for the following ASN.1 excerpt.

InitiatingMessage ::= SEQUENCE {
    procedureCode S1AP-ELEMENTARY-PROCEDURE.&procedureCode     ({S1AP-ELEMENTARY-PROCEDURES}),
    criticality   S1AP-ELEMENTARY-PROCEDURE.&criticality       ({S1AP-ELEMENTARY-PROCEDURES}{@procedureCode}),
    value         S1AP-ELEMENTARY-PROCEDURE.&InitiatingMessage ({S1AP-ELEMENTARY-PROCEDURES}{@procedureCode})
}

This pull request enables different function names by adding field name after type name.
2017-10-20 17:15:57 -07:00
Bi-Ruei, Chiu dcc822a090 Fix duplicate type names generated in headers file
For example, there are many 'enum value_PR' and 'struct value' generated if
a class is instantiated as many instances.

typedef enum value_PR {
    value_PR_NOTHING,    /* No components present */
    .....
} value_PR;

typedef struct ProtocolIE_Field_6563P5 {
    ....
    struct value {
        value_PR present;
        union value_u {
        } choice;

        /* Context for parsing across buffer boundaries */
        asn_struct_ctx_t _asn_ctx;
    } value;

    /* Context for parsing across buffer boundaries */
    asn_struct_ctx_t _asn_ctx;
} ProtocolIE_Field_6563P5_t;
2017-10-20 17:15:57 -07:00
Bi-Ruei, Chiu b6bd8d788b Use parenthesis to avoid ambiguity of operator precedence 2017-10-20 17:15:57 -07:00
Bi-Ruei, Chiu 742a196624 Fix 'FATAL: Does not look like criticality is a CLASS field reference (xxxx) denoting a type one line xxx' 2017-10-20 17:15:57 -07:00
Bi-Ruei, Chiu 069c07657e Fix crash during dealing with empty optinal fields of ioc cell 2017-10-20 17:15:57 -07:00
Lev Walkin 48e82d1f1f removed gcc-7 warnings 2017-10-19 03:07:27 -07:00
Lev Walkin 0b56b22ca5 fix default value cmp/set order 2017-10-18 00:40:32 -07:00
Lev Walkin 04ca1b5293 typo fix 2017-10-18 00:27:35 -07:00
Lev Walkin 37231fb195 forward and backward canonical map for CHOICE 2017-10-17 21:24:34 -07:00
Lev Walkin 22cef6cb93 BMPString and UniversalString fuzz testing 2017-10-16 20:33:07 -07:00
Lev Walkin a4f8e94bc1 get rid of alloca() in compiler 2017-10-08 19:28:56 -07:00
Lev Walkin 4329272a64 for OER use IEEE754 binary32 and binary64 format over the wire 2017-10-05 00:33:32 -07:00
Lev Walkin afcc891c86 add OER binary32 and binary64 IEEE-754 formats for native REAL type 2017-10-04 23:48:35 -07:00
Lev Walkin b5450704fe generate float instead of double if constraints suggest this 2017-10-04 02:54:16 -07:00
Lev Walkin 026e21abe1 narrowing to support 32-bit floats 2017-10-04 00:49:01 -07:00
Lev Walkin 14e75ed755 upgrade to a new API 2017-09-29 23:15:13 -07:00
Lev Walkin 1711a5dd0e Merge branch 'master' of github.com:vlm/asn1c 2017-09-26 18:39:11 -07:00
Lev Walkin 2e93c223da emit cross-compilable attributes 2017-09-26 18:29:15 -07:00
Bi-Ruei, Chiu 59b1bc8e90 Fix some memory leakage and access violation in recent code 2017-09-20 07:30:05 +08:00
Lev Walkin 154519a3a7 removed superfluous constraints duplication 2017-09-06 23:34:40 -07:00
Lev Walkin b46156d9be naming abstraction 2017-09-05 02:53:05 -07:00
Lev Walkin 6713bcb012 0..MAX constraint is positive for OER 2017-08-30 20:21:52 -07:00
Ryan Sleevi a93d9971d2 Add unittest, which revealed that default booleans were not set properly 2017-08-28 17:37:09 -07:00
Lev Walkin 135d7dd4e1 pull extensions for aliased types 2017-08-28 00:21:38 -07:00
Lev Walkin 14fd3e5a89 added explicit (deprecated) ANY flag 2017-08-27 01:39:05 -07:00
Bi-Ruei, Chiu 1f87ac0058 Move type operations to another structure
Every type has free, print, check_constraints, ber_decoder, der_encoder,
xer_decoder, xer_encoder, uper_decoder, uper_encoder and outmost_tag
operations. We move them out to a separate structure asn_TYPE_operation_t.

Combined with previous logic simplification, these operations are based
on ASN.1 basic types, constructed types and string types. So we can
reduce the space occupied by asn_TYPE_descriptor_t variables.
2017-08-24 14:09:28 +08:00
Lev Walkin ade508caed avoid generating references to empty maps 2017-08-23 10:25:46 -07:00
Lev Walkin 53a28a26c4 empty information object sets are OK 2017-08-23 09:56:53 -07:00
Lev Walkin d8e07c5f08 parameterized referencing of information object sets 2017-08-23 07:38:30 -07:00
Lev Walkin cf3f6ebb9f constness fix 2017-08-23 04:35:34 -07:00
Lev Walkin 792641eed2 add const 2017-08-22 20:41:58 -07:00
Lev Walkin c0e03b946e introduce namespaces 2017-08-22 01:48:23 -07:00
Lev Walkin acdca41847 revert too broad of a change 2017-08-12 20:59:16 -07:00
Denis Filatov dbb8990a2b use special name decoration for embedded annonymous types 2017-08-12 20:47:14 -07:00
Lev Walkin f6853ce38e further runtime support for information object classes 2017-08-11 01:37:26 -07:00
Lev Walkin 6aae7c62c1 make J2735 compile again 2017-08-10 17:58:56 -07:00
Lev Walkin 5d929d87c7 signedness fix 2017-08-10 15:17:44 -07:00
Lev Walkin 9de6cd89ca using ioc constraints in run time 2017-08-10 05:51:56 -07:00
Lev Walkin cd2f48eb5a structure comparison functions 2017-08-10 02:52:25 -07:00
Lev Walkin ad0d637c90 generate runtime information object set tables 2017-08-08 02:02:42 -07:00
Lev Walkin 4dcf8367d9 refactor constraint matrix handling 2017-08-07 20:10:05 -07:00
Lev Walkin 62d95d2ef4 rm warnings 2017-08-06 23:41:11 -07:00
Lev Walkin ea6635bdae better parsing information object class sets 2017-08-06 23:23:04 -07:00
Lev Walkin ebdf02646d Merge pull request #173 from mattipee/mattipee-no-constraints
Omit constraints code if -fno-constraints
2017-08-05 18:18:58 -07:00
Lev Walkin 92fc0130ac Merge pull request #168 from brchiu/fix_compile_J2735_issue
Fix compile SAE J2735_201603DA.ASN issue
2017-08-05 18:10:08 -07:00
mattipee e0b99abe50 Omit constraints code if -fno-constraints
Raised in #122, prevent reference to constraints in generated code if compiled with -fno-constraints
2017-08-04 11:44:04 +01:00
Lev Walkin da997b1ea1 work in 128-bit integer values while compiling 2017-08-04 01:38:41 -07:00