diff options
| author | aarne <unknown> | 2004-04-28 09:08:31 +0000 |
|---|---|---|
| committer | aarne <unknown> | 2004-04-28 09:08:31 +0000 |
| commit | 1bd3dc8433b433cae6937a246045f9e4cbb8bf73 (patch) | |
| tree | 71da3486f9e13b49096c38b7dea1fc64c00b4178 /grammars/timetable/TimetableHTML.gf | |
| parent | e5c60c9cfd25d260576c451f3005d8f6f27966a4 (diff) | |
timetable
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 ; + +} |
