[jsr294-modularity-eg] 294 EG conf call, 2009-04-15
Alex Buckley
Alex.Buckley at Sun.COM
Wed Apr 22 22:31:09 EDT 2009
Bryan Atsatt wrote:
> module M @ 5.0 {
> requires module "N at 1.0+; optional=true";
> requires package "P@(1.0,2.0]";
> permits module "O"; // Module O is M's friend
> provides module "M at 4.5+"; // M v5.0 is compatible with 4.5+
> provides package "m"; // Exports package 'm'
> }
0) Can I suggest that 'requires system ...' is as good as 'system ...' ?
1) Can I suggest putting modifiers like 'optional' first:
optional requires module N @ 1.0+;
requires package P @ (1.0,2.0];
This mirrors class/method/field signatures and allows a simple, flexible
grammar for the content of a module compilation unit: (Id == identifier)
Id* ('requires'|'permits'|'provides') Id Id ['@' VStart VPart*] ';'
VStart:
digit
'['
'('
VPart:
InputCharacter but not FF, Space, Tab, '"', '\'', '\\', ';'
// InputCharacter is any UnicodeInputCharacter except CR and LF
// Note it includes comma and dot, allowing version ranges like
// 1.0,2.0 at the cost of disallowing multiple operands per requires
Alex
More information about the jsr294-modularity-eg
mailing list