1package org.antlr.runtime { 2 3 public class MissingTokenException extends MismatchedTokenException { 4 5 public var inserted:Object; 6 7 public function MissingTokenException(expecting:int, input:IntStream, inserted:Object) { 8 super(expecting, input); 9 this.inserted = inserted; 10 } 11 12 public function get missingType():int { 13 return expecting; 14 } 15 16 public override function toString():String { 17 if ( inserted!=null && token!=null ) { 18 return "MissingTokenException(inserted "+inserted+" at "+token.text+")"; 19 } 20 if ( token!=null ) { 21 return "MissingTokenException(at "+token.text+")"; 22 } 23 return "MissingTokenException"; 24 } 25 26 } 27 28}