js-sequence-diagrams icon indicating copy to clipboard operation
js-sequence-diagrams copied to clipboard

Add grammar for alternative flow

Open havard024 opened this issue 8 years ago • 2 comments

Hi,

I'm interested in using alternative flow in this project and I'm willing to contribute to get there. I know there's an enhancement to add support to group signals together (#160), but I don't think I'll be able to solve that generic case as of yet. I'm thinking, by solving alternative flow, we'll have something that can be built on to solve the more generic case.

Below I've just tried to add grammar for supporting alternative flow, I would love some input on the grammar.

I'm trying to achive the following:

alt text1
    A->B: text
    B->A: text
else text2
    A->B: text
else text3
    A->B: text
end
screen shot 2017-01-08 at 11 12 49 am

havard024 avatar Jan 08 '17 10:01 havard024

Sorry for the slow reply!

Yes, that grammar looks fine to me. Please go ahead and update grammar.jison and add some tests

(the grammar.ebnf is used for drawing this diagram only)

bramp avatar Mar 12 '17 21:03 bramp

Will this be added soon?

KeishaW avatar Jul 22 '21 17:07 KeishaW