mnikhil-git / mscgen

Automatically exported from code.google.com/p/mscgen
GNU General Public License v2.0
0 stars 0 forks source link

Support double-ended arrows #29

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Add relops that produce bi-directional arcs (with arrows on both ends):

These would produce the same line and arrowhead styles as the current
uni-directional arc types, but with arrowheads on both ends:

a<>b
a<->b
a<=>b
a<<=>>b
a<<>>b
a<:>

and then relops that produce non-directional arcs (same line style as the
corresponding direction arcs, but with no arrowheads):

a.b
a-b
a=b
a:b

What version of the product are you using? On what operating system?

0.16, Fedora 10

Original issue reported on code.google.com by xmlscott on 28 Aug 2009 at 9:04

GoogleCodeExporter commented 8 years ago

Original comment by Michael....@gmail.com on 31 Aug 2009 at 7:35

GoogleCodeExporter commented 8 years ago
Hi

I have created a small patch that allows you to make "headless" "=>" arrows by 
using
"==". I did not choose "=" since that clashed with another token already 
present in
the lexer and the parser. 

Implementation notes: 
I did not create a new token for this in the lexer (I was unsure of what to 
call it),
instead I recycled TOK_REL_METHOD_TO, which works.

Adding the rest of the headless arrows is simply a matter of adding them to the
lexer. The foundation of supporting double-headed arrows have also been laid, 
but
will require a little more work. 

As it is arrowL and arrowR are probably identical enough to "merge" them into a
single function and have it also handle the double-arrow case.

I have also attached a test case to go with the patch.

Thank you for considering it,
~Niels

Original comment by NThykier@gmail.com on 3 Oct 2009 at 1:17

Attachments:

GoogleCodeExporter commented 8 years ago
Should be fixed at r103.

Original comment by Michael....@gmail.com on 18 Oct 2009 at 2:25

GoogleCodeExporter commented 8 years ago
This is great - and useful as is.

It would be good to have the documentation updated to match...
I attach an expanded version of examples/msg_types.mscin that shows the new 
arcs.

The double-ended left and right arcs don't render correctly, but I'm not sure 
how
serious that is.

Original comment by xmlscott on 19 Oct 2009 at 7:28

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks!  I will attach example and update the site.

Original comment by Michael....@gmail.com on 19 Oct 2009 at 8:31

GoogleCodeExporter commented 8 years ago
Hi

Just a reminder, [1] needs to be updated to mention these.

~Niels

[1] http://www.mcternan.me.uk/mscgen/grammar.txt

Original comment by NThykier@gmail.com on 10 Jul 2010 at 3:30

GoogleCodeExporter commented 8 years ago
The grammar has been updated with the release of 0.18.

A script under the packaging/manual directory also now allows the human 
readable grammar to be generated from the bison output using a bunch of sed 
replacements for the token names.

Original comment by Michael....@gmail.com on 30 Aug 2010 at 11:43