diff options
Diffstat (limited to 'grammars/timetable/TimetableHTML.gf')
| -rw-r--r-- | grammars/timetable/TimetableHTML.gf | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/grammars/timetable/TimetableHTML.gf b/grammars/timetable/TimetableHTML.gf new file mode 100644 index 000000000..41b7c39a0 --- /dev/null +++ b/grammars/timetable/TimetableHTML.gf @@ -0,0 +1,24 @@ +--# -path=.:../prelude + +concrete TimetableHTML of Timetable = open Prelude in { + + lin + MkTable cs ts = + ss ("<table>" ++ "<tr><td></td>"++ cs.s ++ </tr> ++ ts.s ++ "</table>") ; + NilTrain _ = ss [] ; + ConsTrain cs n t ts = + ss ("<tr>" ++ n.s ++ t.s ++ "</tr>") ; + OneCity c = ss ("<td>" ++ c ++ "</td>") ; + ConsCity c cs = ss (c.s ++ "to" ++ cs.s) ; + + StopTime t = t ; + NoStop = ss ["no stop"] ; + + LocTrain c s = cc2 c s ; + CityTrain c s cs t = ss (c.s ++ s.s ++ "," ++ t.s) ; + + T i = prefixSS "at" i ; + N n = prefixSS "train" n ; + C s = s ; + +} |
