-
Notifications
You must be signed in to change notification settings - Fork 19
Cor Grammar
Ovid edited this page Sep 14, 2021
·
10 revisions
Please see the main page of the repo for the actual RFC. As it states there:
Anything in the Wiki should be considered "rough drafts."
Click here to provide feedback.
Below is a minimal and almost certainly incorrect grammar as a starting point for discussion.
Corinna ::= CLASS | ROLE
CLASS ::= DESCRIPTOR? 'class' NAMESPACE
DECLARATION BLOCK
DESCRIPTOR ::= 'abstract'
ROLE ::= 'role' NAMESPACE
DECLARATION BLOCK
NAMESPACE ::= IDENTIFIER { '::' IDENTIFIER } VERSION?
DECLARATION ::= { PARENTS | ROLES } | { ROLES | PARENTS }
PARENTS ::= 'isa' NAMESPACE { ',' NAMESPACE }
ROLES ::= 'does' NAMESPACE { ',' NAMESPACE } ','?
IDENTIFIER ::= [:alpha:] {[:alnum:]}
VERSION ::= 'v' DIGIT {DIGIT} '.' DIGIT {DIGIT} '.' DIGIT {DIGIT}
DIGIT ::= [0-9]
BLOCK ::= # Perl +/- Extras
Corinna—Bringing Modern OO to Perl