Index: trunk/de.ugoe.cs.swe.bnftools.ebnf.ui/.classpath
===================================================================
--- trunk/de.ugoe.cs.swe.bnftools.ebnf.ui/.classpath	(revision 37)
+++ trunk/de.ugoe.cs.swe.bnftools.ebnf.ui/.classpath	(revision 38)
@@ -3,4 +3,5 @@
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="src" path="src-gen"/>
+	<classpathentry exported="true" kind="lib" path="lib/commons-lang-2.5.jar"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
Index: trunk/de.ugoe.cs.swe.bnftools.ebnf.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/de.ugoe.cs.swe.bnftools.ebnf.ui/META-INF/MANIFEST.MF	(revision 37)
+++ trunk/de.ugoe.cs.swe.bnftools.ebnf.ui/META-INF/MANIFEST.MF	(revision 38)
@@ -21,2 +21,4 @@
 Export-Package: de.ugoe.cs.swe.bnftools.ui.contentassist.antlr
 Bundle-Activator: de.ugoe.cs.swe.bnftools.ui.internal.EbnfActivator
+Bundle-ClassPath: .,
+ lib/commons-lang-2.5.jar
Index: trunk/de.ugoe.cs.swe.bnftools.ebnf.ui/build.properties
===================================================================
--- trunk/de.ugoe.cs.swe.bnftools.ebnf.ui/build.properties	(revision 37)
+++ trunk/de.ugoe.cs.swe.bnftools.ebnf.ui/build.properties	(revision 38)
@@ -2,3 +2,7 @@
 bin.includes = META-INF/,\
                .,\
-               plugin.xml
+               plugin.xml,\
+               lib/commons-lang-2.5.jar
+
+source.. = src/,\
+           src-gen/
Index: trunk/de.ugoe.cs.swe.bnftools.ebnf.ui/src/de/ugoe/cs/swe/bnftools/ui/formatter/EbnfHtmlFormatterVisitor.java
===================================================================
--- trunk/de.ugoe.cs.swe.bnftools.ebnf.ui/src/de/ugoe/cs/swe/bnftools/ui/formatter/EbnfHtmlFormatterVisitor.java	(revision 37)
+++ trunk/de.ugoe.cs.swe.bnftools.ebnf.ui/src/de/ugoe/cs/swe/bnftools/ui/formatter/EbnfHtmlFormatterVisitor.java	(revision 38)
@@ -8,4 +8,6 @@
 
 import de.ugoe.cs.swe.bnftools.ebnf.EtsiBnf;
+import de.ugoe.cs.swe.bnftools.ebnf.Rule;
+import de.ugoe.cs.swe.bnftools.ebnf.RuleReference;
 import de.ugoe.cs.swe.bnftools.ebnf.SectionHeading;
 
@@ -125,4 +127,8 @@
 	// -----------------------------------------------------------------------------
 	
+	protected void visitAfter(EtsiBnf node) {
+		weaveComments();
+	}
+
 	protected void visitBefore(SectionHeading node) {
 		if (!lastWasSectionHeading && !buf.substring(buf.length()-2).equals("\n\n"))
@@ -138,7 +144,41 @@
 	protected void visitAfter(SectionHeading node) {
 	}
+	
+	protected void visitBefore(RuleReference node) {
+		wrap();
+		
+		metaText("<a href=\"#" + node.getRuleref().getName() + "\">");
+		text(node.getRuleref().getName());
+		metaText("</a>");
+	}
 
-	protected void visitAfter(EtsiBnf node) {
-		weaveComments();
+	protected void visitAfter(RuleReference node) {
+	}
+
+	protected void visitBefore(Rule node) {
+		if (lastWasSectionHeading)
+			newLine();
+		
+		lastWasSectionHeading=false;
+
+		newLineOffsetCounter = 0;
+
+		if (node.getRulenumber() > 0)
+			text(node.getRulenumber() + ". ");
+		
+		metaText("<a name=\"#" + node.getName() + "\">");
+		text(node.getName());
+		metaText("</a>");
+		text(" ::= ");
+		
+		rightHandSideRuleOffset = newLineOffsetCounter;
+		ruleSpacingStack.push(newLineOffsetCounter);
+	}
+	
+	protected void visitAfter(Rule node) {
+		metaText("<br/>");
+		text(";");
+		newLine();
+		ruleSpacingStack.pop();
 	}
 }
