empty IMPORTS section is allowed

git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@1249 59561ff5-6e30-0410-9f3c-9617f08c8826
This commit is contained in:
vlm 2006-10-13 12:37:39 +00:00
parent b02675723d
commit 86851cd897
4 changed files with 1268 additions and 1236 deletions

File diff suppressed because it is too large Load Diff

View File

@ -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();

View File

@ -0,0 +1,18 @@
-- 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

View File

@ -0,0 +1,8 @@
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