Rail2tptp is a project mainly written in Python, it's free.
Rail station to TPTP convertor (a4m33au)
This project is part of the A4M33AU course on Faculty of Electrical Engineering, the submission is [here][submission] (czech).
The station is represented by directed graph where each node has specific format:
node - in1 out1
node | in1 out1
node > in1 in2 out1
node < in1 out1 out2
node I out1
node O in1
Example railway station:
I ----- > --- | --- < ----->
/ \
/ \
I ---- ---->
Example in rail format:
a1 I 1
a2 I 2
b > 1 2 3
c | 3 4
d < 4 5 6
e1 O 5
e2 O 6