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: Full Graph Model ABNF Test


So I tried to use the APG parser generator with the proposed Full Graph Model ABNF on a few sample XDI statements.

For example, I tried to run it on this:
=markus$!(+name)/!/(data:,MarkusSabadello)

... and I ran into 2 problems.

First problem:

According to the ABNF, $!(+name) is a valid entity-singleton.
This doesn't have a big effect on the overall parsing process, but it's not correct.

Second problem:

The parser doesn't actually recognize the whole string as a valid XDI statement.

Why? Let's look at the ABNF rule that has to be satisfied:
literal = [ context ] literal-context "/!/" data-xref
Now what happens is that the parser thinks that the context part of this is matched by =markus$!(+name), which leaves nothing to match the literal-context, therefore, parsing fails.

Instead, what should happen is that the context part is matched by only =markus, and that the literal-context part is matched by $!(+name).

But for some reason the parser isn't able to figure that out.

I know this has something to do with the parsing algorithm, with left recursion, and with backtracking, but I'd have to read up on these concepts to fully understand the problem.

I also found this, very interesting:
http://en.wikipedia.org/wiki/Comparison_of_parser_generators

Markus



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