ebnf2railroad icon indicating copy to clipboard operation
ebnf2railroad copied to clipboard

Tiny Rendering Error in Complex Overview Diagram

Open TheLostLambda opened this issue 5 months ago • 0 comments

Hello!

This is admittedly a pretty tiny graphical bug, but I figured it's worth reporting! It seems maybe the line is making the tightest turn possible, but can't fit in the space so the end of the curve pokes through the top line?

Tiny Error (Circled in red)

Here is the EBNF used:

Muropeptide = Monomer , { Connection , Monomer } , [ Connection ] , [ { " " }- ,
  ( Modifications , [ { " " }- , Crosslinks ]
  | Crosslinks , [ { " " }- , Modifications ]
  ) ] ;

Monomer
  = Glycan
  | Peptide
  | Glycan , "-" , Peptide
  ;

Connection
  = "=" (* Crosslink *)
  | "~" (* Glycosidic Bond *)
  | ( "~=" | "=~" ) (* Both *)
  ;

Modifications = "(" ,
  ( Predefined Modification
  | Chemical Offset
  ) , { { " " } , "," , { " " } ,
  ( Predefined Modification
  | Chemical Offset
  ) } , ")" ;

Crosslinks = "(" , Crosslink Descriptors ,
  { { " " } , "," , { " " } , Crosslink Descriptors } , ")" ;

Glycan = { Monosaccharide , [ Modifications ] }- ;

Peptide = { Amino Acid , [ Modifications ] ,
  [ Lateral Chain ] }- ;

Predefined Modification = [ Multiplier ] , letter ,
  { letter | digit | "_" } ;

Chemical Offset = ( "+" | "-" ) , [ Multiplier ] ,
  Chemical Composition ;

Crosslink Descriptors = Crosslink Descriptor ,
  { { " " } , "&" , { " " } , Crosslink Descriptor } ;

Monosaccharide = lowercase ;

Amino Acid = uppercase ;

Lateral Chain = "[" , [ "<" (* C-to-N *) | ">" (* N-to-C *) ] ,
  { Amino Acid , [ Modifications ] }- , "]" ;

Multiplier = Integer , "x" ;

Chemical Composition = { ( Element | Isotope ) ,
  [ Integer ] }- ,
  { Particle Offset } ;

Crosslink Descriptor = position ,
  ( "-" (* Donor-Acceptor *)
  | "=" (* Acceptor=Donor *)
  ) , position ;

Integer = { digit }- ;

Element = uppercase , [ lowercase ] ;

Isotope = "[" , Integer , Element , "]" ;

Particle Offset = ( "+" | "-" ) , [ Integer ] ,
  lowercase ;

letter = uppercase | lowercase ;

uppercase
  = "A" | "B" | "C" | "D" | "E" | "F" | "G"
  | "H" | "I" | "J" | "K" | "L" | "M" | "N"
  | "O" | "P" | "Q" | "R" | "S" | "T" | "U"
  | "V" | "W" | "X" | "Y" | "Z"
  ;

lowercase
  = "a" | "b" | "c" | "d" | "e" | "f" | "g"
  | "h" | "i" | "j" | "k" | "l" | "m" | "n"
  | "o" | "p" | "q" | "r" | "s" | "t" | "u"
  | "v" | "w" | "x" | "y" | "z"
  ;

digit
  = "0" | "1" | "2" | "3" | "4" | "5" | "6"
  | "7" | "8" | "9"
  ;

position = "1" | "2" | "3" | "4" | "5" ;

Let me know if I can provide any more helpful information!

TheLostLambda avatar Jan 11 '24 00:01 TheLostLambda