[ 
https://issues.apache.org/jira/browse/DAFFODIL-2512?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Steve Lawrence updated DAFFODIL-2512:
-------------------------------------
    Summary: Unordered sequences with initiated content or discriminators does 
not parse correctly  (was: Unordered sequences with initiated content or 
discriminatores does not parse correctly)

> Unordered sequences with initiated content or discriminators does not parse 
> correctly
> -------------------------------------------------------------------------------------
>
>                 Key: DAFFODIL-2512
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2512
>             Project: Daffodil
>          Issue Type: Bug
>          Components: Back End
>            Reporter: Steve Lawrence
>            Priority: Critical
>
> Parsing of unordered sequences uses the ChoiceParser to handle parsing the 
> different alternatives. This causes issues because the SequenceParser that 
> orchestrates the ChoiceParser needs to know why a ChoiceParser fails and 
> react differently. If the ChoiceParser fails because all branches 
> speculatively failed, then we need to simply ignore the failure and it 
> signifies the end of the sequence. But if the ChoiceParser fails because a 
> discriminated branch failed, then it signifies the unordered seuence failed, 
> and the error must propogate upwards.
> This suggests that we cannot use the ChoiceParser when parsing an unordred 
> sequence because we cannot know the reason for failure once it completes–all 
> we know is it failed. Instead, the SequenceParser must create and manage 
> points of uncertainty attempt to parse each branch of the unordered sequence 
> individually, much like the ChoiceParser does. This way, it can know if a 
> branch was discriminated and failed, or if all branches were tried and they 
> all failed, and react appropriately.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to