File tree Expand file tree Collapse file tree
csharp/ToolGood.Algorithm/math Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ using Antlr4 . Runtime ;
2+ using Antlr4 . Runtime . Misc ;
3+ using System ;
4+ using System . Collections . Generic ;
5+ using System . Text ;
6+ using ToolGood . Algorithm . Internals . Visitors ;
7+
8+ namespace ToolGood . Algorithm . math
9+ {
10+ partial class mathParser
11+ {
12+ private AntlrErrorData ErrorData ;
13+ public void AddErrorData ( AntlrErrorData data )
14+ {
15+ ErrorData = data ;
16+ }
17+
18+ public override void NotifyErrorListeners ( IToken offendingToken , string msg , RecognitionException e )
19+ {
20+ ErrorData . IsError = true ;
21+ ErrorData . ErrorMsg = msg ;
22+ //base.NotifyErrorListeners(offendingToken, msg, e);
23+ }
24+ }
25+ partial class mathLexer
26+ {
27+ private AntlrErrorData ErrorData ;
28+ public void AddErrorData ( AntlrErrorData data )
29+ {
30+ ErrorData = data ;
31+ }
32+ public override void NotifyListeners ( LexerNoViableAltException e )
33+ {
34+ ErrorData . IsError = true ;
35+ ErrorData . ErrorMsg = "Lexer is err" ;
36+ }
37+ }
38+ }
You can’t perform that action at this time.
0 commit comments