com.sonar.sslr.api
Interface RecognitionException


public interface RecognitionException

If a parsing error is encountered, an exception which implements this RecognitionException is thrown by the Parser. This RecognitionException allows to get some contextual information about the parsing error like the parsing stack trace.


Method Summary
 int getLine()
          Line where the parsing error has occurred.
 String getMessage()
          The full parsing stack trace.
 

Method Detail

getLine

int getLine()
Line where the parsing error has occurred.

Returns:
line

getMessage

String getMessage()
The full parsing stack trace. Here is an example :

Expected : but was : ('file1': Line 34 / Column 46) at ParentRule := ((language | implements)) at GrandParentRule := (ParentRule)

Returns:
parsing stack trace.


Copyright © 2011 SonarSource. All Rights Reserved.