OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

xdi message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Fwd: ABNF


Sharing this thread with the TC list.

Markus

---------- Forwarded message ----------
From: Markus Sabadello <markus.sabadello@xdi.org>
Date: Tue, Nov 18, 2014 at 10:28 AM
Subject: Re: ABNF
To: =Drummond Reed <drummond.reed@xdi.org>
Cc: Joseph Boyle <boyle.joseph@gmail.com>, "Le Van Gong, Hubert" <Hubert.LeVanGong@neustar.biz>


I spent some time trying to add support for aParse and APG again in XDI2, based on this ABNF.
I think it basically works, but I would suggest the following changes:

1. Add a rule for the statement separator:

STMT = "/"

2. Rename the current rule "arc-address" to "context-arc-address", add new rule "arc-address", and add new rule "literal-arc-address":

arc-address            = context-arc-address / literal-arc-address

context-arc-address     = peer-root / inner-root / entity-singleton / entity-collection / entity-member /
                         attr-singleton / attr-collection / attr-member

literal-arc-address    = "&"

3. Then use the above new/changed rules appropriately

E.g. the "literal-statement" rule would then change from
literal-statement      = rooted-address "/&/" json-value
to
literal-statement      = rooted-address STMT literal-arc-address STMT json-value

This is all just for clarity, doesn't change the syntax itself.
I'm attaching my version of the ABNF with the above proposed changes.

Markus




On Tue, Nov 18, 2014 at 7:19 AM, =Drummond Reed <drummond.reed@xdi.org> wrote:
Joseph,

Thank you for extending this all the way through. I finally got a chance to look this over at a high level, and it looks pretty clean. Obviously it needs review at a much lower and more detailed level, as you have been doing in putting it together and testing it, but I won't be able to do that until at least Thursday and more likely next week.

The question of changing nesting order or switching symbols is obviously a very big one—I'm loathe to make any changes to syntax at this point unless there is an overwhelming good reason—but as you work through it, lay out your case.

Markus, I think we should schedule at least a report on this progress for this Friday's TC call (given that we won't be having one next week).

Thanks,

=Drummond  

On Sun, Nov 16, 2014 at 4:52 PM, Joseph Boyle <boyle.joseph@gmail.com> wrote:
This is not complete, but I wanted to keep you up on progress, and give Markus and Hubert a sample grammar that generates successfully with http://www.coasttocoastresearch.com/interactiveapg

Some problems with interaction between successive lines (e.g. when object ends with &) so best to test one XDI statement at a time.

Extra whitespace / blanklines are not provided for.

Literal statements use /&/ not old form &/&/

The following are workarounds added for features that are not working:
xdi-name-char is relaxed to include “:” because xdi-uuid is failing to match (an example in isolation works, not sure where bad interaction is)
Relaxed constraint that attribute collection with no attribute member can’t be used for literal because greedy matching is breaking it

Drummond: the part in red reflects our work this last week on which combinations are allowable, if you want to check. There’s some extra complexity in order to get the brackets in the nesting order we currently specify - I’d like to consider the best order, and also whether to switch {} and ||.


xdi-statements         = xdi-statement *( ENDLINE xdi-statement ) *ENDLINE
xdi-statement          = contextual-statement / relational-statement / literal-statement
contextual-statement   = peer-root-context / inner-root-context / entity-part-context / entity-member-context
                         attr-part-context / attr-member-context
relational-statement   = rooted-address "/" common-address "/" xdi-address
literal-statement      = rooted-address "/&/" json-value

peer-root-context      = *peer-root "//" peer-root
inner-root-context     = root-address "//" inner-root
entity-part-context    = root-address *entity-part "//" ( entity-singleton / entity-collection )
entity-member-context  = root-address *entity-part entity-collection "//" entity-member
attr-part-context      = rooted-address "//" ( attr-singleton / attr-collection )
attr-member-context    = rooted-address attr-collection "//" attr-member

xdi-address            = literal-address / rooted-address
rooted-address         = root-address common-address
root-address           = *peer-root *inner-root
common-address         = entity-address attr-address
entity-address         = *entity-part
attr-address           = *attr-part
literal-address        = rooted-address attr-unit "&"

arc-address            = peer-root / inner-root / entity-singleton / entity-collection / entity-member /
                         attr-singleton / attr-collection / attr-member

peer-root              = "(" common-address ")"
inner-root             = "(" common-address "/" common-address ")"

entity-unit            = ( entity-collection entity-member ) / entity-singleton
entity-part            = ( entity-collection [ entity-member ] ) / entity-singleton
attr-unit              = ( attr-collection attr-member ) / attr-singleton
attr-part              = ( attr-collection [ attr-member ] ) / attr-singleton

entity-singleton     = authority-singleton / authority-variable / class-singleton / class-variable / class-definition 
authority-variable   = VARL authority-singleton VARR
class-variable       = VARL class-singleton VARR
class-definition     = DEFL class-singleton DEFL

authority-singleton  = person-singleton / legal-singleton / general-singleton
class-singleton      = unreserved-class / reserved-class
person-singleton     = "=" C-I name-scheme-xref
legal-singleton      = "+" C-I name-scheme-xref
general-singleton    = "*" C-I name-scheme-xref
unreserved-class     = "#" C-I name-scheme-xref
reserved-class       = "$" C-I xdi-name

entity-collection    = authority-collection / auth-var-coll / class-collection / class-var-coll
auth-var-coll        = VARL authority-collection VARR
class-var-coll       = VARL class-collection     VARR
authority-collection = person-collection    / legal-collection / general-collection
class-collection     = reserved-collection  / unreserved-collection
person-collection    = COLL              "=" COLR 
legal-collection     = COLL              "+" COLR 
general-collection   = COLL              "*" COLR 
reserved-collection  = COLL   reserved-class COLR
unreserved-collection= COLL unreserved-class COLR

entity-member        = member 
member               = ordered-member / unordered-member
ordered-member       = "@" C-I ( ( %x31-39 DIGIT ) / "0" )
unordered-member     = "!" name-scheme-xref

attr-singleton       = attr-class/ attr-var / attr-defn 
attr-collection      = attr-coll-nonvar / attr-coll-var
attr-coll-var        = VARL attr-coll-nonvar VARR
attr-var             = VARL attr-class  VARR
attr-coll-nonvar     = COLL attr-class  COLR
attr-defn            = DEFL attr-class  DEFR
attr-class           = ATTL C-I class-singleton ATTR
attr-member          = ATTL C-I  member ATTR 


COLL     = "[" 
COLR     = "]"
ATTL     = "<" 
ATTR     = ">" 
DEFL     = "|"
DEFR     = "|"
VARL     = "{" 
VARR     = "}"
C-I    = ""

name-scheme-xref     = xdi-name / xdi-scheme / xref
xref        = "(" ( common-address / xdi-iri / xdi-name ) ")"

xdi-scheme   =  xdi-sha-256 / xdi-sha-384 / xdi-sha-512 / xdi-uuid / xdi-ipv6
xdi-uuid     = ":uuid:"      8HEX "-" 4HEX "-" 4HEX "-" 4HEX "-" 12HEX
xdi-sha-256  = ":sha-256:"  64HEX 
xdi-sha-384  = ":sha-384:"  96HEX 
xdi-sha-512  = ":sha-512:" 128HEX 
xdi-ipv6     = ":ipv6:"      4HEX 7*( ":" 4HEX )  

xdi-name       = *xdi-name-char
xdi-name-char  = UPPER / LOWER / DIGIT / "-" / "." / "_" / ":" / %x80-EFFFD  
context-symbol = "!" / "*" / "=" / "#" / "+" / "$"

LOWER          = %x61-7A
UPPER          = %x41-5A
HEX            = DIGIT / %x61-66
DIGIT          = %x30-39
NZDIG          = %x31-39
QUOTE          = %x22
ENDLINE        = %x0D / %x0A / ( %x0D %x0A )

xdi-iri    = iri-scheme ":" *iri-body
iri-scheme = LOWER *( LOWER / DIGIT ) 
iri-body   = ( "(" iri-body ")" ) / *iri-char
iri-char   = xdi-name-char / context-symbol / iri-delim
iri-delim  = "/" / "?" / "#" / "[" / "]" / "'" / "," 

json-value  = json-object / json-array / json-string / json-number / "true" / "false" / "null"
json-object = "{" [ json-string ":" json-value *( "," json-string ":" json-value ) ] "}"
json-array  = "[" [                 json-value *( ","                 json-value ) ] "]"
json-string = QUOTE *( " " / "!" / %x23-5B  / %x5D-EFFFD / json-escape )    QUOTE
json-escape = "\"    ("\" / "/" / "b" / "f" / "n" / "r" / "t" / QUOTE / ( "u" 4HEX ) )
json-number = ( "0" / [ "-" ] noleading ) [ "." notrailing ] [ "E" [ "-" ] noleading ]
noleading   = %x31-39 *DIGIT
notrailing  = *DIGIT  %x31-39




Attachment: xdi.2014-11-18.modified.abnf
Description: Binary data



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]