Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EXTERNAL #140

Open
mfatemipour opened this issue Feb 18, 2017 · 3 comments · May be fixed by #295
Open

EXTERNAL #140

mfatemipour opened this issue Feb 18, 2017 · 3 comments · May be fixed by #295

Comments

@mfatemipour
Copy link

mfatemipour commented Feb 18, 2017

Hi,
Is EXTERNAL keyword supported by asn1c ?
The compiler does not generates error when see EXTERNAL but in generated code there is not corresponding file to handle that (EXTERNAL.h) and c compiler generates :
fatal error: EXTERNAL.h: No such file or directory compilation terminated.

velichkov added a commit to velichkov/asn1c that referenced this issue Mar 15, 2017
- Add EXTERNAL ASN.1 defintion from ITU-T X.208 in
  skeletons/standard-modules/ASN1C-UsefulInformationObjectClasses.asn1
- Remove EXTERNAL from asn1p_l.l and asn1p_y.y
- Add a test case:
  tests/135-EXTERNAL-OK.asn and
  asn1c/tests/check-src/check-135.c
- Regeneragte all tests/*.asn1.-Pfwide-types files
velichkov added a commit to velichkov/asn1c that referenced this issue Mar 15, 2017
- Remove EXTERNAL from asn1p_l.l and asn1p_y.y
- Add EXTERNAL ASN.1 definition from ITU-T X.208 in
  skeletons/standard-modules/ASN1C-UsefulInformationObjectClasses.asn1
- Add a test case:
  tests/135-EXTERNAL-OK.asn and
  asn1c/tests/check-src/check-135.c
- Regenerate all tests/*.asn1.-Pfwide-types files
velichkov added a commit to velichkov/asn1c that referenced this issue Mar 16, 2017
- Remove EXTERNAL from asn1p_l.l and asn1p_y.y
- Add EXTERNAL ASN.1 definition from ITU-T X.208 in
  skeletons/standard-modules/ASN1C-UsefulInformationObjectClasses.asn1
- Add a test case:
  tests/135-EXTERNAL-OK.asn and
  asn1c/tests/check-src/check-135.c
- Regenerate all tests/*.asn1.-Pfwide-types files
@mouse07410
Copy link

I tried to apply your commit 1bd1bae, but got problems:

. . . . .
  CCLD     check_fixer
/Applications/Xcode.app/Contents/Developer/usr/bin/make  check-TESTS
PASS: check_crange
FAIL: check_fixer
============================================================================
Testsuite summary for asn1c 0.9.28
============================================================================
# TOTAL: 2
# PASS:  1
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0
============================================================================
See libasn1fix/test-suite.log
Please report to [email protected]
============================================================================
make[3]: *** [test-suite.log] Error 1
make[2]: *** [check-TESTS] Error 2
make[1]: *** [check-am] Error 2
make: *** [check-recursive] Error 1

Some IMHO are straightforward - just a result of the test-files not ready for the new keyword EXTERNAL:

. . . . .
Testing in ../tests...
[=> 00-empty-OK.asn1]
ASN.1 grammar parse error near line 34 (token "EXTERNAL"): syntax error, unexpected TOK_EXTERNAL, expecting TOK_END
[=> 01-empty-OK.asn1]
ASN.1 grammar parse error near line 34 (token "EXTERNAL"): syntax error, unexpected TOK_EXTERNAL, expecting TOK_END
. . . . .

Some I don't know what to do about:

. . . . .
[=> 100-class-ref-OK.asn1]
ASN.1 grammar parse error near line 34 (token "EXTERNAL"): syntax error, unexpected TOK_EXTERNAL, expecting TOK_END
FATAL: Unknown type "TYPE-IDENTIFIER" referenced by "REF-ID" at line 16 in 100-class-ref-OK.asn1
FATAL: Unknown type "REF-ID.&id" referenced by "field" at line 17 in 100-class-ref-OK.asn1
FATAL: Unknown type "REF-ID.&Type" referenced by "params" at line 19 in 100-class-ref-OK.asn1
WARNING: SupportedReferences at line 21: Constraints ignored: Unresolved parent type in 100-class-ref-OK.asn1
Cannot process file "100-class-ref-OK.asn1": -1
FAILED: 100-class-ref-OK.asn1
[=> 101-class-ref-SE.asn1]
ASN.1 grammar parse error near line 34 (token "EXTERNAL"): syntax error, unexpected TOK_EXTERNAL, expecting TOK_END
Expecting some problems...
FATAL: Class field REF-ID.&id lookup at line 19 in something that is not a class: NOTCLASS at line 14 in 101-class-ref-SE.asn1
FATAL: Unknown type "REF-ID.&id" referenced by "field" at line 19 in 101-class-ref-SE.asn1
FATAL: Unknown type "REF-ID.&Type" referenced by "params" at line 21 in 101-class-ref-SE.asn1
Previous error is EXPECTED, no worry  <--- I'm not so sure here...
. . . . .

Here's the full log:
test-suite.log.txt

If I can apply this commit smoothly to my fork, I will.

velichkov added a commit to velichkov/asn1c that referenced this issue Mar 21, 2017
- Remove EXTERNAL from asn1p_l.l and asn1p_y.y
- Add EXTERNAL ASN.1 definition from ITU-T X.208 in
  skeletons/standard-modules/ASN1C-UsefulInformationObjectClasses.asn1
- Add a test case:
  tests/135-EXTERNAL-OK.asn and
  asn1c/tests/check-src/check-135.c
- Regenerate all tests/*.asn1.-Pfwide-types files
velichkov added a commit to velichkov/asn1c that referenced this issue Mar 21, 2017
- Remove EXTERNAL from asn1p_l.l and asn1p_y.y
- Add EXTERNAL ASN.1 definition from ITU-T X.208 in
  skeletons/standard-modules/ASN1C-UsefulInformationObjectClasses.asn1
- Add a test case:
  tests/135-EXTERNAL-OK.asn and
  asn1c/tests/check-src/check-135.c
- Regenerate all tests/*.asn1.-Pfwide-types files
@velichkov
Copy link
Contributor

velichkov commented Mar 21, 2017

Hi @mouse07410,

I tried to apply your commit 1bd1bae, but got problems:

You got problems because you've applied only 1bd1bae and not 8723e93. I haven't added the issue number in 8723e93 and that's why its not listed here.

I just rebased external-gh140 on top of mouse07410/master and I'm going to open a pull request,
The Travis Ci build succeed on 64-bit platform(s) https://travis-ci.org/velichkov/asn1c/builds/213463629

@mouse07410
Copy link

I'm processing that PR. There seems to be a problem (param deleted but required later on in the code) - see mouse07410#3

velichkov added a commit to velichkov/asn1c that referenced this issue Mar 27, 2017
- Remove EXTERNAL from asn1p_l.l and asn1p_y.y
- Add EXTERNAL ASN.1 definition from ITU-T X.208 in
  skeletons/standard-modules/ASN1C-UsefulInformationObjectClasses.asn1
- Add a test case:
  tests/135-EXTERNAL-OK.asn and
  asn1c/tests/check-src/check-135.c
- Regenerate all tests/*.asn1.-Pfwide-types files
mouse07410 referenced this issue in mouse07410/asn1c Mar 27, 2017
mouse07410 referenced this issue in mouse07410/asn1c Mar 28, 2017
This was referenced Sep 11, 2018
velichkov pushed a commit to velichkov/asn1c that referenced this issue Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants