Fixing an issue with output parameters that are of type IntPtr
[castle.git] / Experiments / Attic / Rook / Castle.Rook.Compiler / Parser / antlr / NoViableAltException.cs
blob80202b90472061896629abba7bf0db27c34cb5ab
1 using System;
3 using AST = antlr.collections.AST;
5 namespace antlr
7 /*ANTLR Translator Generator
8 * Project led by Terence Parr at http://www.jGuru.com
9 * Software rights: http://www.antlr.org/license.html
11 * $Id:$
15 // ANTLR C# Code Generator by Micheal Jordan
16 // Kunle Odutola : kunle UNDERSCORE odutola AT hotmail DOT com
17 // Anthony Oguntimehin
19 // With many thanks to Eric V. Smith from the ANTLR list.
22 [Serializable]
23 public class NoViableAltException : RecognitionException
25 public IToken token;
26 public AST node; // handles parsing and treeparsing
28 public NoViableAltException(AST t) : base("NoViableAlt", "<AST>", - 1, - 1)
30 node = t;
33 public NoViableAltException(IToken t, string fileName_) :
34 base("NoViableAlt", fileName_, t.getLine(), t.getColumn())
36 token = t;
40 * Returns a clean error message (no line number/column information)
42 override public string Message
44 get
46 if (token != null)
48 //return "unexpected token: " + token.getText();
49 return "unexpected token: " + token.ToString();
52 // must a tree parser error if token==null
53 if ( (node==null) || (node==TreeParser.ASTNULL) )
55 return "unexpected end of subtree";
57 return "unexpected AST node: " + node.ToString();