samples/JavaScript/ccalc-lex.js
// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
When called from action signals the lexer that this rule fails to match the input so the next matching rule ( regex ) should be tested instead .
function lexer_reject() {
        if (this.options.backtrack_lexer) {
            this._backtrack = true;
        } else {
            var p = this.constructLexErrorInfo('Lexical error on line ' + (this.yylineno + 1) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this.showPosition(), false);
            this._signaled_error_token = (this.parseError(p.errStr, p) || this.ERROR);
        }
        return this;
    }
function lexer_reject ( ) { if ( this . options . backtrack_lexer ) { this . _backtrack = true ; } else { var p = this . constructLexErrorInfo ( 'Lexical error on line ' + ( this . yylineno + 1 ) + '. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n' + this . showPosition ( ) , false ) ; this . _signaled_error_token = ( this . parseError ( p . errStr , p ) || this . ERROR ) ; } return this ; }
When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
When called from action signals the lexer that this rule fails to match the input so the next matching rule ( regex ) should be tested instead .
// when the parseError() call returns, we MUST ensure that the error is registered. // We accomplish this by signaling an 'error' token to be produced for the current // .lex() run.