3 using AST
= antlr
.collections
.AST
;
7 /*ANTLR Translator Generator
8 * Project led by Terence Parr at http://www.jGuru.com
9 * Software rights: http://www.antlr.org/license.html
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.
23 public class NoViableAltException
: RecognitionException
26 public AST node
; // handles parsing and treeparsing
28 public NoViableAltException(AST t
) : base("NoViableAlt", "<AST>", - 1, - 1)
33 public NoViableAltException(IToken t
, string fileName_
) :
34 base("NoViableAlt", fileName_
, t
.getLine(), t
.getColumn())
40 * Returns a clean error message (no line number/column information)
42 override public string Message
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();