Permalink
Browse files

fixes issue #4 - problem with sequence in choice

  • Loading branch information...
willemdj committed Sep 4, 2011
1 parent 326e53e commit 549a383495b51fb9916245e300c397013c5cac82
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/erlsom_pass2.erl
View
@@ -585,12 +585,12 @@ pass4Element(Element = #el{alts = Alternatives, mn = Min}, Types, Count, NextEle
Element#el{alts = UniqueAlternatives, mn = Min2}.
pass4Alternatives(Alternatives, Types, Count, NextElements, Info) ->
- pass4Alternatives(Alternatives, [], true, Types, Count, NextElements, Info).
+ pass4Alternatives(Alternatives, [], false, Types, Count, NextElements, Info).
%% returns {TranslatedAlternatives, Optional}
pass4Alternatives([Alternative | Tail], Acc, Optional, Types, Count, NextElements, Info) ->
{TranslatedAlternatives, Optional2} = pass4Alternative(Alternative, Types, Count, NextElements, Info),
- Optional3 = if Optional2 == true -> Optional; true -> false end,
+ Optional3 = if Optional2 == true -> true; true -> Optional end,
pass4Alternatives(Tail, TranslatedAlternatives ++ Acc, Optional3, Types, Count, NextElements, Info);
pass4Alternatives([], Acc, Optional, _Types, _Count, _NextElements, _Info) ->
{Acc, Optional}.

0 comments on commit 549a383

Please sign in to comment.