-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6aa5d57
commit 432c4d0
Showing
10 changed files
with
179 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> | ||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> | ||
<classpathentry kind="src" path="src"/> | ||
<classpathentry kind="output" path="bin"/> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
bin | ||
.settings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>busses</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>rascal_eclipse.rascal_builder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>rascal_eclipse.term_builder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.pde.ManifestBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.pde.SchemaBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>rascal_eclipse.rascal_nature</nature> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
<nature>org.eclipse.pde.PluginNature</nature> | ||
<nature>rascal_eclipse.term_nature</nature> | ||
</natures> | ||
<linkedResources> | ||
<link> | ||
<name>eclipse</name> | ||
<type>2</type> | ||
<locationURI>rascal-library://eclipse</locationURI> | ||
</link> | ||
<link> | ||
<name>std</name> | ||
<type>2</type> | ||
<locationURI>rascal-library://rascal</locationURI> | ||
</link> | ||
</linkedResources> | ||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
3 : Overbergplatz, Eduard-M�ller-Stra�e, In der Goldgrube, Lindenstra�e, Br�derhaus, Roonstra�e, Christuskirche, | ||
L�hr-Center, Ludwig-Erhard-Stra�e, Peter-Kl�ckner-Stra�e, Verwaltungszentrum, Kurt-Schumacher-Br�cke, Winninger Stra�e. | ||
|
||
5 : Hauptbahnhof, Christuskirche, Zentralplatz, L�hr-Center, Balduinbr�cke, Sch�llerplatz, An der Ringmauer, | ||
Langemarckplatz, Johannesstra�e, Bubenheimer Weg, Closterbrauerei, R�benacher Stra�e, Im Acker, Sportplatz, | ||
Kirmesplatz, Raiffaisenstra�e, Am Alten Sch�tenplatz, Eulenhorst, Oberweiher, Uni. | ||
|
||
15 : Hauptbahnhof, Christuskirche, Zentralplatz, L�hr-Center, Balduinbr�cke, Sch�llerplatz, An der Ringmauer, | ||
Langemarckplatz, Johannesstra�e, Bubenheimer Weg, Closterbrauerei, In der Wegl�nge, Trifter Weg, Pfaffengasse, | ||
Bienenst�ck. | ||
|
||
20 : Hauptbahnhof, Christuskirche, L�hr-Center, Saarplatz, Franz-Weis-Stra�e, St-Elisabeth-Kirche, Bl�cherstra�e, | ||
Marienhof, Verwaltungszentrum, Kurt-Schumacher-Br�cke, Winninger Stra�e, Oberweiher. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
digraph Metro { node [shape=box] | ||
|
||
"Peter-Klöckner-Straße" -> "Verwaltungszentrum" | ||
"Langemarckplatz" -> "Johannesstraße" | ||
"Rübenacher Straße" -> "Im Acker" | ||
"Eduard-Müller-Straße" -> "In der Goldgrube" | ||
"Blücherstraße" -> "Marienhof" | ||
"Am Alten Schütenplatz" -> "Eulenhorst" | ||
"Closterbrauerei" -> "Rübenacher Straße" | ||
"Balduinbrücke" -> "Schüllerplatz" | ||
"Johannesstraße" -> "Bubenheimer Weg" | ||
"Saarplatz" -> "Franz-Weis-Straße" | ||
"Kirmesplatz" -> "Raiffaisenstraße" | ||
"Brüderhaus" -> "Roonstraße" | ||
"St-Elisabeth-Kirche" -> "Blücherstraße" | ||
"Pfaffengasse" -> "Bienenstück" | ||
"Franz-Weis-Straße" -> "St-Elisabeth-Kirche" | ||
"Hauptbahnhof" -> "Christuskirche" | ||
"Lindenstraße" -> "Brüderhaus" | ||
"Kurt-Schumacher-Brücke" -> "Winninger Straße" | ||
"Oberweiher" -> "Uni" | ||
"Sportplatz" -> "Kirmesplatz" | ||
"Closterbrauerei" -> "In der Weglänge" | ||
"Schüllerplatz" -> "An der Ringmauer" | ||
"Trifter Weg" -> "Pfaffengasse" | ||
"Christuskirche" -> "Zentralplatz" | ||
"An der Ringmauer" -> "Langemarckplatz" | ||
"Roonstraße" -> "Christuskirche" | ||
"Bubenheimer Weg" -> "Closterbrauerei" | ||
"Löhr-Center" -> "Ludwig-Erhard-Straße" | ||
"Winninger Straße" -> "Oberweiher" | ||
"In der Weglänge" -> "Trifter Weg" | ||
"Marienhof" -> "Verwaltungszentrum" | ||
"Löhr-Center" -> "Saarplatz" | ||
"Im Acker" -> "Sportplatz" | ||
"Verwaltungszentrum" -> "Kurt-Schumacher-Brücke" | ||
"Christuskirche" -> "Löhr-Center" | ||
"Löhr-Center" -> "Balduinbrücke" | ||
"Eulenhorst" -> "Oberweiher" | ||
"Zentralplatz" -> "Löhr-Center" | ||
"Overbergplatz" -> "Eduard-Müller-Straße" | ||
"Raiffaisenstraße" -> "Am Alten Schütenplatz" | ||
"Ludwig-Erhard-Straße" -> "Peter-Klöckner-Straße" | ||
"In der Goldgrube" -> "Lindenstraße" | ||
|
||
"Closterbrauerei" [shape=ellipse] | ||
"Löhr-Center" [shape=ellipse] | ||
"Christuskirche" [shape=ellipse] | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Manifest-Version: 1.0 | ||
Bundle-ManifestVersion: 2 | ||
Bundle-Name: busses | ||
Bundle-SymbolicName: busses | ||
Bundle-Version: 1.0.0 | ||
Require-Bundle: org.eclipse.imp.pdb.values, | ||
rascal | ||
Bundle-RequiredExecutionEnvironment: JavaSE-1.6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
all: | ||
dot -Tpdf Koblenz.dot > Koblenz.pdf | ||
|
||
curate: | ||
perl -pi -w -e 's/ä/ä/g;' Koblenz.dot | ||
perl -pi -w -e 's/ü/ü/g;' Koblenz.dot | ||
perl -pi -w -e 's/ö/ö/g;' Koblenz.dot | ||
perl -pi -w -e 's/ß/ß/g;' Koblenz.dot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
bin.includes = META-INF/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
@contributor{Jurgen Vinju - Jurgen.Vinju@cwi.nl - SWAT, CWI} | ||
@contributor{Vadim Zaytsev - vadim@grammarware.net - SWAT, CWI} | ||
module Busses | ||
|
||
import IO; | ||
import Set; | ||
import String; | ||
import ParseTree; | ||
|
||
start syntax System = Line+; | ||
syntax Line = Num ":" {Id ","}+ "." ; | ||
layout WS = [\ \t\n\r]* !>> [\ \t\n\r]; | ||
lexical Id = [A-Za-z][A-Za-zŸŠš\-\ ]+[A-Za-z] !>> [A-Za-z]; | ||
lexical Num = [0-9]+ !>> [0-9]; | ||
|
||
rel[Id,Id] extractGraph(loc source) = | ||
{<from,to> | /Line b := parse(#start[System],source), (Line)`<Num _>: <{Id ","}* _>, <Id from>, <Id to>, <{Id ","}* _>.` := b}; | ||
|
||
bool kannUmsteigen(rel[Id,Id] sys, Id hs) = size(sys[hs]) > 1; | ||
|
||
void synthesizeDotGraph(loc source, loc target) | ||
{ | ||
rel[Id from,Id to] conn = extractGraph(source); | ||
writeFile(target, | ||
"digraph Metro { node [shape=box] | ||
'<for (<from, to> <- conn) {> | ||
' \"<from>\" -\> \"<to>\"<}> | ||
'<for (st <- conn<from>, kannUmsteigen(conn, st)){> | ||
' \"<st>\" [shape=ellipse]<}> | ||
'}"); | ||
} | ||
public void main() | ||
{ | ||
//parse(#start[System],|home:///projects/slps/topics/implementation/busses/Koblenz.bus|); | ||
synthesizeDotGraph( |home:///projects/slps/topics/implementation/busses/Koblenz.bus|, | ||
|home:///projects/slps/topics/implementation/busses/Koblenz.dot|); | ||
} | ||