Fixing an issue with output parameters that are of type IntPtr
[castle.git] / Experiments / Attic / Rook / Castle.Rook.Compiler / Parser / antlr / DefaultFileLineFormatter.cs
blob4e43216a3387256975d3ba36c334dd1527f1e8e5
1 using System;
2 using StringBuilder = System.Text.StringBuilder;
4 namespace antlr
6 /*ANTLR Translator Generator
7 * Project led by Terence Parr at http://www.jGuru.com
8 * Software rights: http://www.antlr.org/license.html
10 * $Id:$
14 // ANTLR C# Code Generator by Micheal Jordan
15 // Kunle Odutola : kunle UNDERSCORE odutola AT hotmail DOT com
16 // Anthony Oguntimehin
18 // With many thanks to Eric V. Smith from the ANTLR list.
21 public class DefaultFileLineFormatter : FileLineFormatter
23 public override string getFormatString(string fileName, int line, int column)
25 StringBuilder buf = new StringBuilder();
27 if (fileName != null)
28 buf.Append(fileName + ":");
30 if (line != - 1)
32 if (fileName == null)
33 buf.Append("line ");
35 buf.Append(line);
37 if (column != - 1)
38 buf.Append(":" + column);
40 buf.Append(":");
43 buf.Append(" ");
45 return buf.ToString();