Railroad Diagram of version range operators

This is a image version of the post here

range-set:
range-set

range-set   ::= range ( logical-or range )*

logical-or:

logical-or

logical-or  ::= ' '* '||' ' '*

referenced by: range-set

range:

range

range   ::= hyphen
           | simple ( ' ' simple )*
           | ''

referenced by: range-set

hyphen:

hyphen

hyphen   ::= partial ' - ' partial

referenced by: range

simple:

simple

simple   ::= primitive
           | partial
           | tilde
           | caret

referenced by: range

primitive:

primitive

primitive   ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial

referenced by: simple

partial:

partial

partial  ::= xr ( '.' xr ( '.' xr qualifier? )? )?

referenced by:

xr:

xr

xr    ::= 'x'
        | 'X'
        | '*'
        | nr

referenced by: partial

nr:

nr

nr    ::= '0'
        | ['1'-'9] ['0'-'9]*

referenced by:

tilde:

tilde

tilde    ::= '~' partial

referenced by: simple

caret:

caret

caret    ::= '^' partial

referenced by: simple

qualifier:

qualifier

qualifier   ::= ( '-' pre )? ( '+' build )?

referenced by: partial

pre:

pre

pre     ::= parts

referenced by: qualifier

build:

build

build   ::= parts

referenced by: qualifier

parts:

parts

parts   ::= part ( '.' part )*

referenced by:

part:

part    ::= nr | [-0-9A-Za-z]+

part

generated by RR - Railroad Diagram Generator


Please cite the source for reprints, feel free to verify the sources cited in the article, and point out any errors or lack of clarity of expression. You can comment in the comments section below or email to GreenMeeple@yahoo.com
This Repo