JPMS Module Path question

Peter Kriens peter.kriens at
Wed Jun 21 08:10:52 UTC 2017

> On 19 Jun 2017, at 21:22, Alex Buckley <alex.buckley at> wrote:
> On 6/17/2017 3:48 AM, Peter Kriens wrote:
>>> On 16 Jun 2017, at 22:02, Alex Buckley <alex.buckley at> wrote:
>>> On 6/15/2017 11:55 PM, Peter Kriens wrote:
>>>> In the current summary in (which I understand was pat of the input to the vote), the following things were wrong:
>>>> 	* Grammar (package declaration allowed together with a module declaration), and
>>> As I said earlier in this thread, I don't understand this comment. Where is a package declaration allowed with a module declaration in:
>>> CompilationUnit:
>>>  [PackageDeclaration] {ImportDeclaration} {TypeDeclaration}
>>>  {ImportDeclaration} ModuleDeclaration
>>> ?  The definition of CompilationUnit has been refactored since publication of this lang-vm.html file, but the language accepted by CompilationUnit has not changed.
>> As you said, in the latest draft this is corrected but it is imho therefore still [wrong] in the current lang-vm.html file? I.e. in lang-vm it still allows:
>> 	package foo;
>> 	module foo {}
> lang-vm does not allow this and has never allowed it. The CompilationUnit production that is presented above has two alternatives. The first alternative accepts:
> package ...
> import ...
> class ...
> The second alternative accepts:
> import ...
> module …
Yes, I see I misinterpreted the formatting. The draft is much clearer in this OR


	OrdinaryCompilationUnit: [PackageDeclaration] {ImportDeclaration} {TypeDeclaration} 
	ModularCompilationUnit: {ImportDeclaration} ModuleDeclaration

Thanks, kind regards,

	Peter Kriens

> Alex

More information about the jpms-spec-observers mailing list