Commit 4a4543ff authored by Lev Walkin's avatar Lev Walkin
Browse files

empty IMPORTS section is allowed

parent 07aaa34e
This diff is collapsed.
......@@ -250,6 +250,7 @@ static asn1p_module_t *currentModule;
%type <a_module> optImports
%type <a_module> optExports
%type <a_module> ImportsDefinition
%type <a_module> optImportsBundleSet
%type <a_module> ImportsBundleSet
%type <a_xports> ImportsBundle
%type <a_xports> ImportsList
......@@ -606,7 +607,7 @@ optImports:
| ImportsDefinition;
ImportsDefinition:
TOK_IMPORTS ImportsBundleSet ';' {
TOK_IMPORTS optImportsBundleSet ';' {
if(!saved_aid && 0)
return yyerror("Unterminated IMPORTS FROM, "
"expected semicolon ';'");
......@@ -621,6 +622,10 @@ ImportsDefinition:
}
;
optImportsBundleSet:
{ $$ = asn1p_module_new(); }
| ImportsBundleSet;
ImportsBundleSet:
ImportsBundle {
$$ = asn1p_module_new();
......
-- OK: Everything is fine
-- iso.org.dod.internet.private.enterprise (1.3.6.1.4.1)
-- .spelio.software.asn1c.test (9363.1.5.1)
-- .121
ModuleEmptyIMPORTS
{ iso org(3) dod(6) internet (1) private(4) enterprise(1)
spelio(9363) software(1) asn1c(5) test(1) 121 }
DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
IMPORTS -- nothing --;
Type ::= INTEGER
END
ModuleEmptyIMPORTS { iso org(3) dod(6) internet(1) private(4) enterprise(1)
spelio(9363) software(1) asn1c(5) test(1) 121 }
DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
Type ::= INTEGER
END
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment