@@ -185,7 +185,7 @@ func (this *DefaultErrorStrategy) Recover(recognizer Parser, e RecognitionExcept
185
185
// <p><strong>ORIGINS</strong></p>
186
186
//
187
187
// <p>Previous versions of ANTLR did a poor job of their recovery within loops.
188
- // A single misMatch token or missing token would force the parser to bail
188
+ // A single mismatch token or missing token would force the parser to bail
189
189
// out of the entire rules surrounding the loop. So, for rule</p>
190
190
//
191
191
// <pre>
@@ -299,7 +299,7 @@ func (this *DefaultErrorStrategy) ReportNoViableAlternative(recognizer Parser, e
299
299
// @param e the recognition exception
300
300
//
301
301
func (this * DefaultErrorStrategy ) ReportInputMisMatch (recognizer Parser , e * InputMisMatchException ) {
302
- var msg = "misMatched input " + this .GetTokenErrorDisplay (e .offendingToken ) +
302
+ var msg = "mismatched input " + this .GetTokenErrorDisplay (e .offendingToken ) +
303
303
" expecting " + e .getExpectedTokens ().StringVerbose (recognizer .GetLiteralNames (), recognizer .GetSymbolicNames (), false )
304
304
recognizer .NotifyErrorListeners (msg , e .offendingToken , e )
305
305
}
@@ -326,7 +326,7 @@ func (this *DefaultErrorStrategy) ReportFailedPredicate(recognizer Parser, e *Fa
326
326
// {@code recognizer} is in error recovery mode.
327
327
//
328
328
// <p>This method is called when {@link //singleTokenDeletion} identifies
329
- // single-token deletion as a viable recovery strategy for a misMatched
329
+ // single-token deletion as a viable recovery strategy for a mismatched
330
330
// input error.</p>
331
331
//
332
332
// <p>The default implementation simply returns if the handler is already in
@@ -355,7 +355,7 @@ func (this *DefaultErrorStrategy) ReportUnwantedToken(recognizer Parser) {
355
355
// method returns, {@code recognizer} is in error recovery mode.
356
356
//
357
357
// <p>This method is called when {@link //singleTokenInsertion} identifies
358
- // single-token insertion as a viable recovery strategy for a misMatched
358
+ // single-token insertion as a viable recovery strategy for a mismatched
359
359
// input error.</p>
360
360
//
361
361
// <p>The default implementation simply returns if the handler is already in
@@ -377,7 +377,7 @@ func (this *DefaultErrorStrategy) ReportMissingToken(recognizer Parser) {
377
377
recognizer .NotifyErrorListeners (msg , t , nil )
378
378
}
379
379
380
- // <p>The default implementation attempts to recover from the misMatched input
380
+ // <p>The default implementation attempts to recover from the mismatched input
381
381
// by using single token insertion and deletion as described below. If the
382
382
// recovery attempt fails, this method panics an
383
383
// {@link InputMisMatchException}.</p>
@@ -446,7 +446,7 @@ func (this *DefaultErrorStrategy) RecoverInline(recognizer Parser) Token {
446
446
//
447
447
// This method implements the single-token insertion inline error recovery
448
448
// strategy. It is called by {@link //recoverInline} if the single-token
449
- // deletion strategy fails to recover from the misMatched input. If this
449
+ // deletion strategy fails to recover from the mismatched input. If this
450
450
// method returns {@code true}, {@code recognizer} will be in error recovery
451
451
// mode.
452
452
//
@@ -458,7 +458,7 @@ func (this *DefaultErrorStrategy) RecoverInline(recognizer Parser) Token {
458
458
//
459
459
// @param recognizer the parser instance
460
460
// @return {@code true} if single-token insertion is a viable recovery
461
- // strategy for the current misMatched input, otherwise {@code false}
461
+ // strategy for the current mismatched input, otherwise {@code false}
462
462
//
463
463
func (this * DefaultErrorStrategy ) singleTokenInsertion (recognizer Parser ) bool {
464
464
var currentSymbolType = recognizer .GetTokenStream ().LA (1 )
@@ -479,7 +479,7 @@ func (this *DefaultErrorStrategy) singleTokenInsertion(recognizer Parser) bool {
479
479
480
480
// This method implements the single-token deletion inline error recovery
481
481
// strategy. It is called by {@link //recoverInline} to attempt to recover
482
- // from misMatched input. If this method returns nil, the parser and error
482
+ // from mismatched input. If this method returns nil, the parser and error
483
483
// handler state will not have changed. If this method returns non-nil,
484
484
// {@code recognizer} will <em>not</em> be in error recovery mode since the
485
485
// returned token was a successful Match.
@@ -492,7 +492,7 @@ func (this *DefaultErrorStrategy) singleTokenInsertion(recognizer Parser) bool {
492
492
//
493
493
// @param recognizer the parser instance
494
494
// @return the successfully Matched {@link Token} instance if single-token
495
- // deletion successfully recovers from the misMatched input, otherwise
495
+ // deletion successfully recovers from the mismatched input, otherwise
496
496
// {@code nil}
497
497
//
498
498
func (this * DefaultErrorStrategy ) singleTokenDeletion (recognizer Parser ) Token {
@@ -659,7 +659,7 @@ func (this *DefaultErrorStrategy) escapeWSAndQuote(s string) string {
659
659
// In this case, for input "[]", LA(1) is ']' and in the set, so we would
660
660
// not consume anything. After printing an error, rule c would
661
661
// return normally. Rule b would not find the required '^' though.
662
- // At this point, it gets a misMatched token error and panics an
662
+ // At this point, it gets a mismatched token error and panics an
663
663
// exception (since LA(1) is not in the viable following token
664
664
// set). The rule exception handler tries to recover, but finds
665
665
// the same recovery set and doesn't consume anything. Rule b
0 commit comments